:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --text-color: #2c3e50;
    --light-bg: rgba(255, 255, 255, 0.95);
    --dark-bg: rgba(44, 62, 80, 0.95);
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    position: relative;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    background-color: #1a1a1a;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/OtherImages/DCbackground1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    filter: brightness(0.8) contrast(1.1);
}

/* Navbar Styling */
.navbar {
    background-color: var(--dark-bg) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.5rem;
    width: 100%;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white !important;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Page Content */
.page-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 1rem 0;
    margin-bottom: var(--footer-height);
}

/* Cards and Containers */
.card {
    background-color: var(--light-bg);
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin-bottom: 1rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
}

/* Forms */
.form-control {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 0.75rem;
    transition: border-color 0.3s ease;
    width: 100%;
    max-width: 100%;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
    background-color: var(--dark-bg);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* Buttons */
.btn {
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-danger:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: white;
    padding: 1rem 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Tables */
.table {
    background-color: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--dark-bg);
    color: white;
    border: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    body::before {
        background-attachment: scroll;
        background-position: center;
        transform: scale(1.1);
    }

    .page-wrapper {
        padding: 0.5rem;
    }

    .card {
        margin: 0.5rem 0;
        border-radius: 8px;
    }

    .form-control {
        padding: 0.6rem;
        font-size: 16px; /* Prevents iOS zoom on input focus */
    }

    .btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .table-responsive {
        margin: 0;
        padding: 0;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table th, .table td {
        white-space: nowrap;
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
        width: 100%;
        max-width: 100%;
    }
}

/* Fix for iOS devices */
@supports (-webkit-touch-callout: none) {
    body::before {
        background-attachment: scroll;
        position: absolute;
    }

    .btn, .form-control {
        -webkit-appearance: none;
        border-radius: 5px;
    }
}

/* Ensure content doesn't overflow */
.container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

/* Fix iOS input zoom */
@media screen and (-webkit-min-device-pixel-ratio: 0) { 
    select,
    textarea,
    input {
        font-size: 16px !important;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

header, main {
    margin: 0;
    padding: 0;
}

.navbar {
    margin-bottom: 0;
}

