/* =========================================
   1. GLOBAL STYLES (from home.php)
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* overflow-x: hidden; Removing this as it breaks sticky position in some browsers */
    background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #1f2937;
    min-height: 100vh;
}

/* =========================================
   2. HEADER & NAVIGATION (from home.php)
   ========================================= */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6b7280 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* =========================================
   3. BUTTONS (Merged)
   ========================================= */
.btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-login {
    background: transparent;
    color: #60a5fa;
    border: 2px solid #60a5fa;
}

.btn-login:hover {
    background: #60a5fa;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(96, 165, 250, 0.3);
}

.btn-register,
.btn-primary {
    background: linear-gradient(135deg, #6b7280 0%, #60a5fa 100%);
    color: white;
    border: none;
}

.btn-register:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(96, 165, 250, 0.4);
    color: white;
}

.btn-success {
    background-color: #27ae60;
    border-color: #27ae60;
    color: white;
}

.btn-outline-primary {
    color: #60a5fa;
    border-color: #60a5fa;
}

.btn-outline-primary:hover {
    background-color: #60a5fa;
    color: white;
}

/* =========================================
   4. PAGE LAYOUT CONTAINERS
   ========================================= */
/* Add padding top to body content to account for fixed header */
.main-content {
    padding-top: 85px;
    min-height: calc(100vh - 200px);
    /* Ensure footer stays at bottom */
    padding-bottom: 3rem;
}

/* =========================================
   5. CARDS & COMPONENTS (Preserved)
   ========================================= */
.card {
    border: none;
    border-radius: 16px;
    /* Updated to match home theme */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    transition: transform 0.2s;
    background: #ffffff;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    border-radius: 16px 16px 0 0 !important;
    padding: 1rem 1.5rem;
}

/* Specific Header Colors override */
.card-header.bg-primary {
    background: linear-gradient(135deg, #6b7280 0%, #60a5fa 100%) !important;
    border: none;
}

/* Login/Register specific */
#otpSection,
#loginOtpSection {
    background-color: #e8f6f3;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #d4efdf;
}

/* Exam Interface */
#examTimer {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: #e74c3c;
}

#proctorVideo {
    border: 3px solid #333;
    border-radius: 5px;
    background-color: #000;
}

/* Growth Card Progress Bars */
.progress {
    background-color: #e9ecef;
    border-radius: 5px;
    height: 10px;
}

.progress-bar {
    border-radius: 5px;
    background: linear-gradient(135deg, #6b7280 0%, #60a5fa 100%);
}

/* =========================================
   6. FOOTER (from home.php)
   ========================================= */
footer {
    background: #1f2937;
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: auto;
}

footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .auth-buttons .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* =========================================
   7. MOBILE NAVBAR DROPDOWN FIX
   ========================================= */
/* =========================================
   7. MOBILE NAVBAR DROPDOWN FIX
   ========================================= */
@media (max-width: 991px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 0;
        width: auto;
        /* Allow it to shrink to fit text */
        min-width: 160px;
        /* Minimum reasonable width */
        max-width: 200px;
        /* Cap it to prevent excessive covering */
        background: rgba(255, 255, 255, 0.95);
        /* High transparency glass effect */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 1.5rem;
        border-radius: 0 0 0 20px;
        box-shadow: -5px 10px 30px rgba(0, 0, 0, 0.08);
        /* Soft professional shadow */
        z-index: 9999;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        display: none;
        /* Bootstrap toggler will remove this style to show it */
    }

    /* When the menu is shown (Bootstrap adds .show class) */
    .navbar-collapse.show {
        display: block;
    }

    .navbar-nav {
        align-items: flex-end !important;
        /* Right align the text */
        text-align: right;
    }

    .nav-item {
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 0.8rem;
    }

    .nav-link {
        padding-right: 0 !important;
        font-size: 1.05rem;
        color: #374151 !important;
    }

    .nav-link.active {
        color: #2563eb !important;
        background: transparent !important;
        /* Remove background rectangle */
        padding-left: 0 !important;
    }

    /* Auth buttons spacing */
    .auth-buttons {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-end;
        width: 100%;
        margin-top: 1rem;
    }
}

/* Fix for Action Button Hover State */
.user-action-btn {
    transition: all 0.3s ease;
}

.user-action-btn:hover {
    background-color: #f8f9fa !important;
    /* Keep white/light */
    color: #1d4ed8 !important;
    /* Darker blue text */
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2) !important;
}

/* responsive border for profile plan card */
@media (min-width: 768px) {
    .border-md-x {
        border-left: 1px solid #dee2e6 !important;
        border-right: 1px solid #dee2e6 !important;
    }
}

@media (max-width: 767px) {
    .border-sm-bottom {
        border-bottom: 1px solid #dee2e6 !important;
        padding-bottom: 1rem !important;
    }
}