/* ==========================================
   1. Reset & Variables
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #4F46E5;       
    --primary-light: #EEF2FF;      
    --text-dark: #1F2937;          
    --text-muted: #6B7280;         
    --bg-light: #F8FAFC;           
    --white: #FFFFFF;
    --border-color: #F1F5F9;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow: 0 4px 15px rgba(79, 70, 229, 0.05);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.04);
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

button, select, input {
    outline: none;
    font-family: inherit;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 60px 0;
}

/* ==========================================
   Result Modal Styles
   ========================================== */
.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.result-modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s ease-out;
}

.result-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
}

.result-icon.success {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.result-icon.fail {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
}

.result-modal-header h2 {
    font-size: 28px;
    color: var(--text-dark);
    margin: 0;
}

.result-modal-body {
    text-align: center;
    margin-bottom: 30px;
}

.result-score {
    margin-bottom: 25px;
}

.score-number {
    display: block;
    font-size: 64px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), #6366F1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    font-size: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-details {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.result-detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 14px;
    color: var(--text-muted);
}

.detail-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.detail-value.success {
    color: #10B981;
}

.detail-value.fail {
    color: #EF4444;
}

.result-modal-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.result-modal-footer .btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-modal-footer .btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.result-modal-footer .btn-secondary:hover {
    background: var(--border-color);
}

.result-modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #6366F1);
    color: white;
    border: none;
}

.result-modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================
   Confirm Modal Styles
   ========================================== */
.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.confirm-modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s ease-out;
}

.confirm-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.confirm-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 35px;
}

.confirm-modal-header h2 {
    font-size: 24px;
    color: var(--text-dark);
    margin: 0 0 15px 0;
}

.confirm-modal-header p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.confirm-modal-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-modal-footer .btn {
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.confirm-modal-footer .btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.confirm-modal-footer .btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.confirm-modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #6366F1);
    color: white;
    border: none;
}

.confirm-modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

/* ==========================================
   Auth Modal Styles
   ========================================== */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.auth-modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s ease-out;
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1, #4F46E5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 35px;
}

.auth-modal-header h2 {
    font-size: 24px;
    color: var(--text-dark);
    margin: 0 0 15px 0;
}

.auth-modal-header p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.auth-modal-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.auth-modal-footer .btn {
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-modal-footer .btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.auth-modal-footer .btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.auth-modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #6366F1);
    color: white;
    border: none;
}

.auth-modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

/* ==========================================
   Fallback Avatar Styles
   ========================================== */
.profile-avatar-wrapper,
.dropdown-avatar {
    position: relative;
    border-radius: 50%;
    overflow: hidden;
}

.profile-avatar-img,
.dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================
   2. Header / Navbar
   ========================================== */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
}

.logo i {
    font-size: 28px;
}

.logo strong {
    font-size: 22px;
    display: block;
}

.logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    font-weight: 500;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
    font-size: 15px;
    text-decoration: none;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link.active {
    position: relative;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.nav-item a {
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
    font-size: 15px;
    text-decoration: none;
}

.nav-item a:hover, .nav-item.active a {
    color: var(--primary-color);
}

.nav-item.active a {
    position: relative;
    font-weight: 600;
}

.nav-item.active a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-btn span {
    width: 100%;
    height: 2.5px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 30px 20px;
        gap: 0;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        padding: 16px 0;
        border-bottom: 1px solid #f1f5f9;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 16px;
        font-weight: 600;
        color: #1e293b;
        transition: all 0.2s ease;
        text-decoration: none;
        position: relative;
        z-index: 1000;
        pointer-events: auto;
    }

    .nav-link:hover {
        background: #f8fafc;
        padding-left: 10px;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link i {
        font-size: 18px;
        color: #667eea;
        width: 24px;
        text-align: center;
    }

    .hamburger-btn {
        display: flex;
        z-index: 1001;
    }

    .hamburger-btn span {
        background: #1e293b;
    }

    .header-actions {
        gap: 12px;
    }
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-trigger {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
}

.nav-notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 17px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.nav-notification-bell:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

.nav-notification-bell.has-notifications {
    color: var(--primary-color);
    animation: bellRing 0.5s ease-in-out;
}

.nav-notification-bell.has-notifications:hover {
    animation: none;
}

.nav-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #ef4444;
    border-radius: 9px;
    border: 2px solid #fff;
    line-height: 1;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(12deg); }
    30% { transform: rotate(-12deg); }
    45% { transform: rotate(8deg); }
    60% { transform: rotate(-8deg); }
    75% { transform: rotate(4deg); }
}

/* Nav Bell Dropdown */
.nav-bell-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-notification-bell {
    cursor: pointer;
    border: none;
    background: transparent;
}

.nav-bell-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 20px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.06);
    z-index: 10000;
    overflow: hidden;
    animation: bellDropIn 0.25s ease;
}
@keyframes bellDropIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.nav-bell-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
}
.nav-bell-dropdown-header span {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-bell-dropdown-header span i {
    color: var(--primary-color, #4f46e5);
}
.nav-bell-markall {
    border: none;
    background: rgba(79,70,229,0.08);
    color: var(--primary-color, #4f46e5);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.nav-bell-markall:hover {
    background: var(--primary-color, #4f46e5);
    color: white;
}

.nav-bell-dropdown-list {
    max-height: 380px;
    overflow-y: auto;
}

.nav-bell-dropdown-item {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f8fafc;
}
.nav-bell-dropdown-item:hover {
    background: rgba(79,70,229,0.04);
    padding-left: 22px;
}
.nav-bell-dropdown-item.unread {
    background: rgba(79,70,229,0.03);
}
.nav-bell-dropdown-item.unread .nav-bell-item-icon {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}
.nav-bell-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.nav-bell-item-content {
    flex: 1;
    min-width: 0;
}
.nav-bell-item-content strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-bell-item-content span {
    display: block;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nav-bell-item-content small {
    font-size: 11px;
    color: #94a3b8;
}

.nav-bell-loading,
.nav-bell-empty {
    text-align: center;
    padding: 32px 18px;
    color: #94a3b8;
    font-size: 13px;
}
.nav-bell-empty i {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.3;
}
.nav-bell-empty p {
    margin: 0;
}

.nav-bell-dropdown-footer {
    border-top: 1px solid #f1f5f9;
    padding: 12px 18px;
    text-align: center;
}
.nav-bell-dropdown-footer a {
    color: var(--primary-color, #4f46e5);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}
.nav-bell-dropdown-footer a:hover {
    gap: 10px;
}

@media (max-width: 768px) {
    .nav-bell-dropdown {
        width: 300px;
        right: -50px;
    }
}

.btn-login {
    font-weight: 600;
    color: var(--text-dark);
    padding: 10px 16px;
}

.btn-register {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    transition: background-color 0.2s;
}

.btn-register:hover {
    background-color: #4338CA;
}

/* ==========================================
   3. Hero Section & Main Box
   ========================================== */
.hero-section {
    padding: 50px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.hero-content h1 {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--primary-color);
}

.hero-content p {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 25px;
}

.hero-stats-mini {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.hero-stats-mini i {
    color: var(--primary-color);
    margin-right: 4px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.15);
}

.btn-secondary {
    background-color: var(--white);
    border: 1px solid #E2E8F0;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
}

/* Illustration box in design */
.hero-illustration {
    position: relative;
    display: flex;
    justify-content: center;
}

.ill-main-box {
    width: 380px;
    height: 380px;
    background-color: #EEF2FF;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-ill-icon {
    font-size: 120px;
    color: var(--primary-color);
    opacity: 0.8;
}

.floating-badge {
    position: absolute;
    background: var(--white);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #F1F5F9;
}

.floating-badge i { font-size: 20px; }
.floating-badge strong { display: block; font-size: 14px; }
.floating-badge small { color: var(--text-muted); font-size: 11px; }

.badge-1 { top: 40px; left: -40px; }
.badge-2 { bottom: 60px; left: -60px; }
.badge-3 { top: 120px; right: -50px; }

/* ==========================================
   4. Search Container
   ========================================== */
.search-container {
    background-color: var(--white);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: 50px;
    border: 1px solid rgba(0,0,0,0.01);
}

.search-container h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

.search-form {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr;
    gap: 12px;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 16px;
    color: var(--text-muted);
}

.input-group input {
    padding-left: 44px !important;
}

.search-form input, .search-form select {
    width: 100%;
    padding: 14px 16px;
    background-color: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    font-size: 14px;
}

.btn-search {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

.popular-searches {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.tag {
    background-color: #F1F5F9;
    color: var(--text-dark);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ==========================================
   5. Section Headers & Cards
   ========================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 { font-size: 24px; font-weight: 700; }
.view-all { color: var(--primary-color); font-weight: 600; }

.section-center-header {
    text-align: center;
    margin-bottom: 35px;
}
.section-center-header h2 { font-size: 26px; font-weight: 700; }

/* Subjects Grid */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.subject-card {
    background-color: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid #F8FAFC;
}

.subject-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
}

.icon-math { background-color: #DCFCE7; color: #16A34A; }
.icon-english { background-color: #FFEDD5; color: #EA580C; }
.icon-physics { background-color: #E0F2FE; color: #0284C7; }
.icon-chemistry { background-color: #F3E8FF; color: #9333EA; }
.icon-native { background-color: #FCE7F3; color: #DB2777; }
.icon-history { background-color: #FEF9C3; color: #CA8A04; }

.subject-card h3 { font-size: 16px; margin-bottom: 4px; }
.subject-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.subject-link { font-size: 13px; color: var(--primary-color); font-weight: 600; }

/* ==========================================
   6. Statistics Banner (Purple)
   ========================================== */
.stats-banner-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0;
    margin: 30px 0;
}

.stats-banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    text-align: center;
}

.stats-banner-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.stats-banner-item i { font-size: 32px; opacity: 0.9; }
.stats-banner-item h3 { font-size: 26px; font-weight: 700; }
.stats-banner-item p { font-size: 13px; opacity: 0.8; }

/* ==========================================
   7. Features (Nega NexusOne)
   ========================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.feature-item {
    background-color: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.feature-item i { font-size: 24px; margin-bottom: 16px; display: block; }
.feat-icon-1 { color: #6366F1; }
.feat-icon-2 { color: #F59E0B; }
.feat-icon-3 { color: #10B981; }
.feat-icon-4 { color: #3B82F6; }
.feat-icon-5 { color: #EF4444; }

.feature-item h3 { font-size: 15px; margin-bottom: 8px; }
.feature-item p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ==========================================
   8. Quizzes Grid (Mashhur testlar)
   ========================================== */
.quizzes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.quiz-card {
    background-color: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    position: relative;
    border: 1px solid #F8FAFC;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 12px;
}

.badge-dtm { background-color: #EEF2FF; color: var(--primary-color); }
.badge-grammar { background-color: #ECFDF5; color: #10B981; }
.badge-school { background-color: #EFF6FF; color: #3B82F6; }
.badge-abituriyent { background-color: #FFF7ED; color: #F97316; }

.quiz-card h3 { font-size: 16px; margin-bottom: 6px; font-weight: 700; }
.quiz-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }

.quiz-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #F1F5F9;
    padding-top: 14px;
}

.quiz-views { font-size: 11px; color: var(--text-muted); }
.quiz-views i { color: #FF4500; }
.btn-card-start { color: var(--primary-color); font-weight: 600; font-size: 13px; }

/* ==========================================
   9. Reviews & CTA
   ========================================== */
.reviews-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

.reviews-grid > * {
    flex: 0 0 auto;
}

.reviews-grid::-webkit-scrollbar {
    height: 8px;
}

.reviews-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.reviews-grid::-webkit-scrollbar-thumb {
    background: #4F46E5;
    border-radius: 10px;
}

.review-card {
    background-color: var(--white);
    padding: 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.12);
    border-color: var(--primary-color);
}

.review-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 18px;
    color: var(--primary-color);
    opacity: 0.1;
}

.review-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.review-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1px;
}

.review-card small {
    font-size: 11px;
    color: var(--text-muted);
}

.review-rating {
    color: #fbbf24;
    font-size: 14px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.review-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    font-style: italic;
}

/* Bottom CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, var(--primary-color), #6366F1);
    color: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cta-left { display: flex; align-items: center; gap: 24px; }
.cta-large-icon { font-size: 50px; opacity: 0.8; }
.cta-banner h2 { font-size: 22px; margin-bottom: 4px; }
.cta-banner p { opacity: 0.9; font-size: 14px; }
.cta-buttons { display: flex; gap: 14px; }

.btn-cta-white { background-color: var(--white); color: var(--primary-color); padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; }
.btn-cta-trans { border: 1px solid var(--white); color: var(--white); padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; }

/* ==========================================
   10. Footer Stillari
   ========================================== */
.main-footer {
    background-color: #0F172A;
    color: #94A3B8;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 30px;
    border-bottom: 1px solid #334155;
    padding-bottom: 40px;
}

.footer-brand-col .logo { margin-bottom: 16px; }
.footer-desc { font-size: 13px; line-height: 1.6; margin-bottom: 20px; }
.social-links { display: flex; gap: 12px; }
.social-links a { width: 36px; height: 36px; background-color: #1E293B; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); }

.footer-links-col h4 { color: var(--white); font-size: 15px; margin-bottom: 16px; }
.footer-links-col a, .footer-links-col p { display: block; font-size: 13px; color: #94A3B8; margin-bottom: 10px; }
.footer-links-col a:hover { color: var(--white); }
.footer-links-col p i { margin-right: 6px; color: var(--primary-color); }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 12px;
}

/* ==========================================
   11. CSS3 Super Animatsiyalar Bloklari
   ========================================== */

/* 1. Sahifa yuklanganda elementlarning silliq ko'tarilib chiqishi */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1, 
.hero-content p, 
.hero-buttons,
.search-container {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-content p { animation-delay: 0.2s; }
.hero-buttons { animation-delay: 0.4s; }
.search-container { animation-delay: 0.5s; }

/* 2. O'ng tomondagi asosiy aylananing sekin aylanib turishi */
@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ill-main-box::before {
    content: '';
    position: absolute;
    width: 105%;
    height: 105%;
    border: 2px dashed rgba(79, 70, 229, 0.2);
    border-radius: 50%;
    animation: slowRotate 30s linear infinite;
    z-index: -1;
}

/* 3. Suzuvchi kartalar uchun alohida tepaga-pastga harakat (Floating effect) */
@keyframes floatAnimation1 {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

@keyframes floatAnimation2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(8px) rotate(2deg); }
}

.badge-1 { animation: floatAnimation1 4s ease-in-out infinite; }
.badge-2 { animation: floatAnimation2 5s ease-in-out infinite 0.5s; }
.badge-3 { animation: floatAnimation1 4.5s ease-in-out infinite 1s; }

/* 4. Asosiy illyustratsiya belgisining pulsatsiyasi */
@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 15px rgba(79, 70, 229, 0.4)); }
}

.main-ill-icon {
    animation: pulseGlow 3s ease-in-out infinite;
}

/* 5. Hover effektlari (Sichqoncha olib kelingandagi jonlanish) */
.subject-card, .feature-item, .quiz-card, .review-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.subject-card:hover, .feature-item:hover, .quiz-card:hover, .review-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(79, 70, 229, 0.2);
}

/* Tugmalardagi to'lqinli o'tish */
.btn-primary, .btn-register, .btn-search {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-register:hover, .btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    filter: brightness(1.1);
}

.btn-primary:active, .btn-register:active {
    transform: translateY(0);
}

/* Qidiruv formasi elementlariga urg'u berish */
.search-form input:focus, .search-form select:focus {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background-color: var(--white);
}




/* ==========================================
   12. Responsiv Dizayn (Media Queries)
   ========================================== */

/* --- 1. Planshetlar uchun (Ekran o'lchami 992px dan kichik bo'lganda) --- */
@media screen and (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr; /* Bloklar ustma-ust tushadi */
        text-align: center;
        gap: 30px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-stats-mini, .hero-buttons {
        justify-content: center;
    }

    .hero-illustration {
        order: -1; /* Rasmli qism matndan tepaga chiqadi */
        margin-bottom: 20px;
    }

    .search-form {
        grid-template-columns: 1fr 1fr; /* Qidiruv 2 qatorga o'tadi */
    }

    .btn-search {
        grid-column: span 2; /* Qidirish tugmasi to'liq enni oladi */
    }

    .subjects-grid {
        grid-template-columns: repeat(3, 1fr); /* 6 talik grid 3 talik bo'ladi */
    }

    .stats-banner-grid {
        grid-template-columns: 1fr 1fr; /* 4 talik statistika 2x2 bo'ladi */
        gap: 30px 0;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr); /* 5 talik ustun 3 talik bo'ladi */
    }

    .quizzes-grid {
        grid-template-columns: 1fr 1fr; /* Testlar 2 tadan joylashadi */
    }

    .reviews-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- 2. Katta Telefonlar uchun (Ekran o'lchami 768px dan kichik bo'lganda) --- */
@media screen and (max-width: 768px) {
    /* Mobil menyu (Gamburger menyu uchun zamin) */
    .nav-menu {
        display: none; /* Amaliyotda buni JS bilan ochiladigan qilinadi */
    }

    .nav-wrapper {
        height: 70px;
    }

    .logo strong {
        font-size: 18px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .ill-main-box {
        width: 280px;
        height: 280px;
    }

    .main-avatar-glow {
        width: 130px !important;
        height: 130px !important;
    }

    .main-avatar-glow i {
        font-size: 50px !important;
    }

    /* Suzib yuruvchi badgelarni telefonda biroz kichiklashtiramiz */
    .floating-badge {
        padding: 8px 12px;
    }
    .floating-badge strong { font-size: 12px; }
    .floating-badge small { display: none; } /* Joy tejash uchun */

    .badge-1 { top: 10px; left: -20px; }
    .badge-2 { bottom: 20px; left: -30px; }
    .badge-3 { top: 80px; right: -30px; }

    .search-form {
        grid-template-columns: 1fr; /* Qidiruv to'liq 1 ustun bo'ladi */
    }

    .btn-search {
        grid-column: span 1;
    }

    .subjects-grid {
        grid-template-columns: 1fr 1fr; /* Fanlar 2 tadan */
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cta-banner {
        flex-direction: column; /* Banner elementlari ustma-ust tushadi */
        text-align: center;
        gap: 24px;
        padding: 30px 20px;
    }

    .cta-left {
        flex-direction: column;
        gap: 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr; /* Footer 2 ustun bo'ladi */
    }

    .footer-brand-col {
        grid-column: span 2;
        margin-bottom: 20px;
    }
}

/* --- 3. Kichik Telefonlar uchun (Ekran o'lchami 480px dan kichik bo'lganda) --- */
@media screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: 26px;
    }

    .hero-buttons {
        flex-direction: column; /* Tugmalar ustma-ust */
        width: 100%;
    }

    .btn-primary, .btn-secondary {
        text-align: center;
        width: 100%;
    }

    .hero-stats-mini {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .subjects-grid, 
    .quizzes-grid, 
    .features-grid, 
    .reviews-grid,
    .stats-banner-grid,
    .footer-grid {
        grid-template-columns: 1fr; /* Mutloq hamma narsa 1 qator bo'lib joylashadi */
    }

    .stats-banner-item {
        flex-direction: column;
        gap: 8px;
    }

    .nav-auth .btn-login {
        display: none; /* Joy tejash uchun login matni yashiriladi */
    }
}

/* ==========================================
   13. Hamburger Menu va Ultra-Responsiv Stillar
   ========================================== */

/* Kompyuter versiyada yashirin bo'lishi kerak bo'lgan elementlar */
.hamburger-btn, .mobile-auth-links, .nav-menu-overlay {
    display: none;
}

/* --- PLANSHEТ VA MOBIL UCHUN (max-width: 992px) --- */
@media screen and (max-width: 992px) {
    /* Hamburger Tugmasi Dizayni */
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
        padding: 0;
    }

    .hamburger-btn span {
        width: 100%;
        height: 2.5px;
        background-color: var(--text-dark);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Hamburger Faol (Ochiq) holatdagi animatsiyasi */
    .hamburger-btn.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-btn.open span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-btn.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Orqa fon parda (Overlay) */
    .nav-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .nav-menu-overlay.show {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    /* Yon tomondan chiquvchi mobil menyu paneli */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -300px; /* Yashirin holat */
        width: 280px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 90px 24px 30px 24px;
        box-shadow: -5px 0 25px rgba(0,0,0,0.05);
        z-index: 1000;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
    }

    .nav-menu.open {
        right: 0; /* Menyu ochiladi */
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-item a {
        display: block;
        padding: 16px 0;
        font-size: 16px;
        width: 100%;
    }

    .nav-item.active a::after {
        display: none; /* Mobil menyuda chiziq shart emas */
    }
    .nav-item.active a {
        color: var(--primary-color);
        font-weight: 700;
    }

    /* Mobil menyu ichidagi kirish tugmalari */
    .mobile-auth-links {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 30px;
        width: 100%;
    }

    .btn-mobile-login {
        text-align: center;
        padding: 12px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        font-weight: 600;
    }

    .btn-mobile-register {
        text-align: center;
        padding: 12px;
        background-color: var(--primary-color);
        color: var(--white);
        border-radius: var(--radius-md);
        font-weight: 600;
    }

    /* Asosiy navbar ichidagi eski tugmalarni yashiramiz */
    .nav-auth .btn-login, .nav-auth .btn-register {
        display: none;
    }

    /* Hero qismidagi gorizontal skrol kamchiligini yo'qotish */
    .hero-illustration {
        width: 100%;
        overflow: hidden; /* Badgelar ekrandan chiqib ketmaydi */
        padding: 20px 0;
    }

    .ill-main-box {
        width: 320px;
        height: 320px;
        margin: 0 auto;
    }

    .badge-1 { top: 20px; left: -10px; }
    .badge-2 { bottom: 30px; left: -20px; }
    .badge-3 { top: 90px; right: -10px; }
}

/* --- SMARTSFONLAR UCHUN (max-width: 480px) --- */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 16px; /* Chetki bo'shliqlar ixchamlashtirildi */
    }

    .hero-content h1 {
        font-size: 28px;
    }

    /* Ekrandan chiqib ketish muammosi bo'lgan suzuvchi kartalarni telefonda markazga moslash */
    .ill-main-box {
        width: 260px;
        height: 260px;
    }

    .main-avatar-glow {
        width: 110px !important;
        height: 110px !important;
    }

    .floating-badge {
        padding: 6px 10px;
        gap: 6px;
    }
    .floating-badge strong { font-size: 11px; }

    .badge-1 { top: 10px; left: -15px; }
    .badge-2 { bottom: 15px; left: -20px; }
    .badge-3 { top: 70px; right: -15px; }

    /* Qidiruv formasi dizayn kamchiligi */
    .search-container {
        padding: 20px 16px;
        margin-top: 30px;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    /* Sifatli ro'yxat va gridlarni 1 ustunga keltirish */
    .subjects-grid, .quizzes-grid, .features-grid, .reviews-grid, .stats-banner-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .stats-banner-section {
        padding: 30px 0;
    }

    .stats-banner-item {
        flex-direction: row;
        text-align: left;
        justify-content: flex-start;
        padding-left: 20%;
    }

    .cta-banner h2 {
        font-size: 18px;
    }
}

/* --- ULTRA KICHIK EKRANLAR UCHUN (max-width: 360px) --- */
@media screen and (max-width: 360px) {
    .ill-main-box {
        scale: 0.9; /* Elementlar siqilmasligi uchun proporsional kichraytiriladi */
    }
    .stats-banner-item {
        padding-left: 10%;
    }
}

/* ==========================================
   14. Jonli Qidiruv (Live Search) Oynasi
   ========================================== */
.search-input-wrapper {
    position: relative;
}

.live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-top: 10px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 2000;
    border: 1px solid var(--border-color);
    display: none; /* Boshlang'ich holatda yashirin */
}

/* Faol bo'lganda ko'rinishi */
.live-search-results.active {
    display: block;
    animation: fadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Natija qatorlari dizayni */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #F1F5F9;
    transition: background-color 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #F8FAFC;
}

.search-result-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.search-result-info h4 {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 2px;
    font-weight: 600;
}

.search-result-info span {
    font-size: 12px;
    color: var(--text-muted);
}

/* Natija topilmaganda */
.search-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Scrollbar dizayni */
.live-search-results::-webkit-scrollbar { width: 6px; }
.live-search-results::-webkit-scrollbar-track { background: transparent; }
.live-search-results::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 10px; }





/* ==========================================
   15. TESTLAR SAHIFASI (tests.php) STILLARI
   ========================================== */

/* Page Header & Breadcrumbs */
.page-header {
    background: linear-gradient(135deg, var(--primary-light), #E0E7FF);
    padding: 40px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #E2E8F0;
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a {
    color: var(--primary-color);
    font-weight: 500;
}

.breadcrumb .separator {
    font-size: 10px;
    color: #94A3B8;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Layout Grid */
.tests-page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* Filtr paneli (Sidebar) */
.filters-sidebar {
    background-color: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 100px; /* Skrol bo'lganda tepada ushlab turish uchun */
}

.filter-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.filter-sidebar-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
}

.close-filter-btn {
    display: none; /* Kompyuterda yashirin */
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-title {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

/* Custom Input & Checkboxes */
.filter-input-wrap {
    position: relative;
}

.filter-input-wrap i {
    position: absolute;
    left: 14px;
    top: 12px;
    color: var(--text-muted);
}

.filter-input-wrap input {
    width: 100%;
    padding: 10px 10px 10px 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #F8FAFC;
    font-size: 14px;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    color: #475569;
    transition: color 0.2s;
}

.custom-checkbox:hover {
    color: var(--primary-color);
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #F1F5F9;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    transition: all 0.2s;
}

.custom-checkbox:hover input ~ .checkmark {
    background-color: #E2E8F0;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.btn-filter-submit {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-filter-submit:hover {
    background-color: #4338CA;
}

/* O'ng tomon: Testlar kontenti */
.tests-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background-color: var(--white);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.results-count {
    font-size: 14px;
    color: var(--text-muted);
}

.results-count strong {
    color: var(--text-dark);
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.sort-box select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #F8FAFC;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
}

/* Grid for right side */
.tests-main-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.page-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.page-link:hover:not(.disabled) {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-light);
}

.page-link.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #F8FAFC;
}

.page-dots {
    color: var(--text-muted);
    font-weight: bold;
}

/* Mobil filter tugmasi (kompyuterda yashirin) */
.btn-mobile-filter {
    display: none;
    width: 100%;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow);
}

/* Responsivlik (Mobil va Planshet) */
@media screen and (max-width: 992px) {
    .tests-page-layout {
        grid-template-columns: 1fr; /* 1 qator bo'ladi */
    }

    .tests-main-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-mobile-filter {
        display: block; /* Mobil tugma ko'rinadi */
    }

    /* Filtr yon paneli mobil ko'rinishida yashirinib, chapdan chiqadigan bo'ladi */
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        z-index: 2000;
        border-radius: 0;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }

    .filters-sidebar.open {
        left: 0;
    }

    .close-filter-btn {
        display: block;
    }
}

@media screen and (max-width: 768px) {
    .tests-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .sort-box {
        width: 100%;
        justify-content: space-between;
    }
}

@media screen and (max-width: 480px) {
    .tests-main-grid {
        grid-template-columns: 1fr; /* Telefonda testlar ustma-ust tushadi */
    }
}



/* Hero section */
.quiz-detail-hero { padding: 80px 0; background: #F8FAFC; min-height: 80vh; display: flex; align-items: center; }

.detail-card {
    background: white;
    padding: 50px;
    border-radius: 30px;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 50px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    border: 1px solid #E2E8F0;
    animation: slideUp 0.8s ease-out;
}

.visual-circle {
    width: 250px; height: 250px;
    background: linear-gradient(135deg, var(--primary-color), #818CF8);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    position: relative;
    box-shadow: 0 20px 30px rgba(99, 102, 241, 0.3);
}

/* Tugma animatsiyasi */
.btn-glow {
    background: var(--primary-color);
    color: white;
    padding: 18px 40px;
    border-radius: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

.btn-glow:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.6);
}

/* Stats bar */
.stats-bar { display: flex; gap: 30px; margin: 30px 0; }
.stat { display: flex; align-items: center; gap: 10px; color: #64748B; }
.stat strong { color: var(--text-dark); font-size: 18px; }

/* Animatsiya */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .detail-card { grid-template-columns: 1fr; text-align: center; }
    .visual-circle { margin: 0 auto; }
    .stats-bar { justify-content: center; }
}

/* Modal Glassmorphism */
.modal-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 40px;
    border-radius: 30px;
    max-width: 450px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

.modal-box h3 { font-size: 24px; margin-bottom: 15px; }
.modal-box p { color: #64748B; margin-bottom: 30px; line-height: 1.6; }




.quiz-play-container { padding: 40px 0; background: #F1F5F9; min-height: 100vh; }

/* Header & Timer */
.quiz-header { display: flex; align-items: center; gap: 20px; margin-bottom: 40px; }
.progress-wrapper { flex: 1; height: 8px; background: #E2E8F0; border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary-color); transition: 0.3s; }
.timer-box { font-weight: 700; color: var(--text-dark); background: white; padding: 10px 20px; border-radius: 12px; box-shadow: var(--shadow); }

/* Savol kartasi */
.question-card { background: white; padding: 40px; border-radius: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.question-number { color: var(--primary-color); font-weight: 600; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 30px; }

.option-item { 
    padding: 20px; border: 2px solid #E2E8F0; border-radius: 15px; 
    cursor: pointer; transition: 0.3s; display: flex; align-items: center; 
}
.option-item:hover { border-color: var(--primary-color); background: #F5F3FF; }
.option-item input { margin-right: 15px; }

/* Footer */
.quiz-footer { display: flex; justify-content: space-between; margin-top: 30px; }
.btn-nav { padding: 15px 30px; border-radius: 12px; border: none; font-weight: 600; cursor: pointer; }
.btn-next { background: var(--primary-color); color: white; }



.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: none; /* Boshida ko'rinmaydi */
    justify-content: center; align-items: center; z-index: 9999;
}
.modal-overlay.show { display: flex; }

.modal-box {
    background: white; padding: 40px; border-radius: 25px;
    text-align: center; max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: center; }
.btn-secondary { padding: 12px 20px; border: 1px solid #E2E8F0; border-radius: 10px; cursor: pointer; background: white; }
.btn-primary-modal { padding: 12px 20px; background: var(--primary-color); color: white; border-radius: 10px; text-decoration: none; }


.auth-body { background: #F8FAFC; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-container { width: 100%; max-width: 400px; padding: 20px; }
.auth-card { background: white; padding: 40px; border-radius: 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }

.auth-header { text-align: center; margin-bottom: 30px; }
.input-group { position: relative; margin-bottom: 20px; }
.input-group i { position: absolute; left: 15px; top: 15px; color: #94A3B8; }
.input-group input { 
    width: 100%; padding: 12px 12px 12px 40px; border: 2px solid #E2E8F0; 
    border-radius: 12px; outline: none; transition: 0.3s; 
}
.input-group input:focus { border-color: var(--primary-color); }

.btn-auth { 
    width: 100%; padding: 15px; background: var(--primary-color); color: white; 
    border: none; border-radius: 12px; font-weight: 600; cursor: pointer; 
}
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; }

/* Ikonkalarni joylashtirish */
.input-group { position: relative; display: flex; align-items: center; }
.input-group .icon { position: absolute; left: 15px; color: #64748B; transition: 0.3s; }
.input-group input:focus + .icon { color: var(--primary-color); }

/* Parolni ko'rsatish tugmasi */
.toggle-pass { color: #94A3B8; transition: 0.3s; }
.toggle-pass:hover { color: var(--primary-color); }

/* Tugma animatsiyasi */
.btn-auth { display: flex; align-items: center; justify-content: center; gap: 10px; transition: 0.4s; }
.btn-auth:hover { transform: scale(1.02); box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3); }




/* --- Profil Layout (Grid) --- */
.profile-grid { 
    display: grid; 
    grid-template-columns: 300px 1fr; 
    gap: 30px; 
    margin-top: 50px; 
}

/* --- Sidebar --- */
.profile-sidebar { background: #fff; padding: 30px; border-radius: 25px; height: fit-content; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.avatar-box { text-align: center; margin-bottom: 30px; }
.avatar-box img { width: 120px; border-radius: 20px; margin-bottom: 15px; }
.role-badge { background: #EEF2FF; color: var(--primary-color); padding: 5px 15px; border-radius: 20px; font-size: 12px; font-weight: bold; display: inline-block; }

.profile-menu a { display: block; padding: 15px; color: #64748B; text-decoration: none; border-radius: 12px; transition: 0.3s; }
.profile-menu a.active { background: var(--primary-color); color: white; }

/* --- Content --- */
.profile-content { background: #fff; padding: 40px; border-radius: 25px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }

/* Stats Cards */
.stats-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 30px 0; }
.stat-card { background: #F8FAFC; padding: 25px; border-radius: 20px; text-align: center; }
.stat-card i { font-size: 24px; margin-bottom: 10px; }

/* Progress Bar */
.test-item { background: #F8FAFC; padding: 20px; border-radius: 15px; }
.progress-bar-small { width: 100%; height: 8px; background: #E2E8F0; border-radius: 4px; margin-top: 10px; }
.progress-bar-small div { height: 100%; background: var(--primary-color); border-radius: 4px; }

/* Form */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.profile-form input { width: 100%; padding: 15px; margin-bottom: 15px; border: 1px solid #E2E8F0; border-radius: 12px; outline: none; }
.btn-save { padding: 15px 30px; background: var(--primary-color); color: white; border: none; border-radius: 12px; cursor: pointer; }

/* Mobil uchun */
@media (max-width: 768px) {
    .profile-grid { grid-template-columns: 1fr; }
}

.logout-btn {
    margin-top: 20px; /* Boshqa menyulardan ajratish uchun */
    color: #EF4444 !important; /* Qizil rang */
    border-top: 1px solid #F1F5F9;
}
.logout-btn:hover {
    background: #FEF2F2 !important; /* Yengil qizil fon */
}


/* ==========================================
   16. Modern Auth Pages (Login/Register) - Purple Theme
   ========================================== */

.auth-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container-modern {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.auth-page-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card-modern {
    background: white;
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 0.6s ease-out;
}

.auth-header-modern {
    text-align: center;
    margin-bottom: 35px;
}

.auth-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.auth-icon-wrapper i {
    font-size: 36px;
    color: white;
}

.auth-header-modern h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.auth-header-modern p {
    font-size: 14px;
    color: #6b7280;
}

.input-group-modern {
    margin-bottom: 24px;
}

.input-group-modern label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: #9ca3af;
    font-size: 16px;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    color: #1f2937;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-wrapper input::placeholder {
    color: #9ca3af;
}

.toggle-pass {
    position: absolute;
    right: 16px;
    left: auto !important;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.3s;
}

.toggle-pass:hover {
    color: #667eea;
}

.auth-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.forgot-password {
    font-size: 13px;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #764ba2;
}

.btn-auth-modern {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-auth-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5);
}

.btn-auth-modern:active {
    transform: translateY(0);
}

.terms-checkbox {
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-label .checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 5px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.checkbox-label:hover .checkmark {
    background-color: #e5e7eb;
}

.checkbox-label input:checked ~ .checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.checkbox-label .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.auth-footer-modern {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.auth-footer-modern p {
    font-size: 14px;
    color: #6b7280;
}

.auth-footer-modern a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.auth-footer-modern a:hover {
    color: #764ba2;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .auth-card-modern {
        padding: 40px 30px;
    }
    
    .auth-header-modern h2 {
        font-size: 24px;
    }
    
    .auth-icon-wrapper {
        width: 70px;
        height: 70px;
    }
    
    .auth-icon-wrapper i {
        font-size: 30px;
    }
}

@media screen and (max-width: 480px) {
    .auth-card-modern {
        padding: 35px 25px;
        border-radius: 20px;
    }
    
    .auth-header-modern h2 {
        font-size: 22px;
    }
    
    .input-wrapper input {
        padding: 12px 14px 12px 44px;
    }
}


/* ==========================================
   17. Animated Notification System (Toast)
   ========================================== */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification {
    min-width: 320px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 14px;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.notification.success::before {
    background: linear-gradient(180deg, #10B981, #059669);
}

.notification.error::before {
    background: linear-gradient(180deg, #EF4444, #DC2626);
}

.notification.warning::before {
    background: linear-gradient(180deg, #F59E0B, #D97706);
}

.notification.info::before {
    background: linear-gradient(180deg, #3B82F6, #2563EB);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification.success .notification-icon {
    background: #ECFDF5;
    color: #10B981;
}

.notification.error .notification-icon {
    background: #FEF2F2;
    color: #EF4444;
}

.notification.warning .notification-icon {
    background: #FFFBEB;
    color: #F59E0B;
}

.notification.info .notification-icon {
    background: #EFF6FF;
    color: #3B82F6;
}

.notification-icon i {
    font-size: 18px;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    background: #F3F4F6;
    color: #6B7280;
}

.notification.hiding {
    animation: slideOutRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Progress bar for auto-dismiss */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    animation: progress 5s linear forwards;
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Responsive notifications */
@media screen and (max-width: 480px) {
    .notification-container {
        right: 10px;
        left: 10px;
        top: 10px;
    }
    
    .notification {
        min-width: auto;
        max-width: none;
    }
}


/* ==========================================
   18. Modern Profile Page - Animated & Functional
   ========================================== */

.profile-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 30px 0;
}

.profile-page-modern {
    animation: fadeInUp 0.6s ease-out;
}

.profile-grid-modern {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    max-width: 1400px;
}

/* --- Sidebar --- */
.profile-sidebar-modern {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-card-sidebar {
    background: white;
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: slideInLeft 0.6s ease-out;
}

.avatar-wrapper-modern {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.avatar-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    animation: pulseGlow 3s ease-in-out infinite;
    filter: blur(20px);
    opacity: 0.5;
}

.avatar-image {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    z-index: 2;
}

.avatar-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.profile-info-sidebar h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
}

.role-badge-modern {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
}

.profile-stats-mini {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
}

.mini-stat {
    text-align: center;
}

.mini-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
}

.mini-stat-label {
    font-size: 12px;
    color: #6B7280;
}

/* --- Menu --- */
.profile-menu-modern {
    background: white;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: slideInLeft 0.8s ease-out;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    color: #6B7280;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.menu-item:hover {
    background: #F3F4F6;
    color: #667eea;
    transform: translateX(5px);
}

.menu-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.menu-item i {
    font-size: 16px;
    width: 20px;
}

.logout-btn-modern {
    margin-top: 10px;
    color: #EF4444 !important;
}

.logout-btn-modern:hover {
    background: #FEF2F2 !important;
    color: #DC2626 !important;
}

/* --- Main Content --- */
.profile-content-modern {
    animation: fadeInUp 0.8s ease-out;
}

.content-section-modern {
    display: none;
}

.content-section-modern.active {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

/* --- Dashboard Header --- */
.dashboard-header-modern {
    background: white;
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-greeting h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
}

.welcome-greeting p {
    color: #6B7280;
    font-size: 14px;
}

.quick-action-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* --- Stats Cards Modern --- */
.stats-cards-modern {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card-modern {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.stat-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.stat-icon-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-card-fire .stat-icon-wrapper {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
}

.stat-card-trophy .stat-icon-wrapper {
    background: linear-gradient(135deg, #FCD34D, #F59E0B);
    color: white;
}

.stat-card-chart .stat-icon-wrapper {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
}

.stat-card-clock .stat-icon-wrapper {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.stat-icon-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    filter: blur(15px);
    opacity: 0.4;
    animation: pulseGlow 3s ease-in-out infinite;
}

.stat-card-fire .stat-icon-glow {
    background: #F59E0B;
}

.stat-card-trophy .stat-icon-glow {
    background: #FCD34D;
}

.stat-card-chart .stat-icon-glow {
    background: #3B82F6;
}

.stat-card-clock .stat-icon-glow {
    background: #10B981;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 8px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

.stat-trend.positive {
    color: #10B981;
}

.stat-trend.negative {
    color: #EF4444;
}

/* --- Section Headers --- */
.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header-modern h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1F2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header-modern h3 i {
    color: #667eea;
}

.view-all-link {
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s;
}

.view-all-link:hover {
    color: #764ba2;
}

/* --- Activity Timeline --- */
.recent-activity-section {
    background: white;
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #F8FAFC;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #F3F4F6;
    transform: translateX(5px);
}

.activity-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.activity-success {
    background: #ECFDF5;
    color: #10B981;
}

.activity-progress {
    background: #DBEAFE;
    color: #3B82F6;
}

.activity-achievement {
    background: #FEF3C7;
    color: #F59E0B;
}

.activity-content {
    flex: 1;
}

.activity-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 4px;
}

.activity-content p {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: #9CA3AF;
}

.activity-score {
    background: #ECFDF5;
    color: #10B981;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
}

.activity-progress-bar {
    width: 80px;
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6, #2563EB);
    border-radius: 3px;
}

.activity-badge {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

/* --- Continue Learning --- */
.continue-learning-section {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.courses-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.course-card-modern {
    background: #F8FAFC;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.course-card-modern:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.course-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.course-math {
    background: #DCFCE7;
    color: #10B981;
}

.course-english {
    background: #FFEDD5;
    color: #F59E0B;
}

.course-physics {
    background: #DBEAFE;
    color: #3B82F6;
}

.course-info {
    flex: 1;
}

.course-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 4px;
}

.course-info p {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 12px;
}

.course-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-track {
    flex: 1;
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill-modern {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
}

.continue-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.continue-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* --- Stats Detailed --- */
.stats-detailed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat-detail-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.stat-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.stat-detail-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
}

.stat-period {
    font-size: 12px;
    color: #6B7280;
    background: #F3F4F6;
    padding: 4px 12px;
    border-radius: 20px;
}

.stat-chart-placeholder {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 150px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 8px 8px 0 0;
    transition: height 0.5s ease;
    position: relative;
}

.chart-bar:hover {
    filter: brightness(1.1);
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6B7280;
}

.subject-stats-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subject-stat-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subject-stat-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subject-name {
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
}

.subject-percent {
    font-size: 14px;
    font-weight: 700;
}

.subject-progress-bar {
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.subject-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* --- Achievements --- */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.achievement-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.achievement-unlocked {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea, #764ba2) border-box;
}

.achievement-locked {
    opacity: 0.6;
    filter: grayscale(0.3);
}

.achievement-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
}

.achievement-gold {
    background: linear-gradient(135deg, #FCD34D, #F59E0B);
    color: white;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.achievement-silver {
    background: linear-gradient(135deg, #E5E7EB, #9CA3AF);
    color: white;
    box-shadow: 0 8px 20px rgba(156, 163, 175, 0.4);
}

.achievement-bronze {
    background: linear-gradient(135deg, #D97706, #B45309);
    color: white;
    box-shadow: 0 8px 20px rgba(180, 83, 9, 0.4);
}

.achievement-locked-icon {
    background: #E5E7EB;
    color: #9CA3AF;
}

.achievement-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
}

.achievement-card p {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 12px;
}

.achievement-date {
    font-size: 12px;
    color: #9CA3AF;
}

.achievement-progress {
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
    background: #EEF2FF;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

/* --- Saved Items --- */
.saved-items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.saved-item-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.saved-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.saved-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.saved-math {
    background: #DCFCE7;
    color: #10B981;
}

.saved-english {
    background: #FFEDD5;
    color: #F59E0B;
}

.saved-physics {
    background: #DBEAFE;
    color: #3B82F6;
}

.saved-item-info {
    flex: 1;
}

.saved-item-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 4px;
}

.saved-item-info p {
    font-size: 12px;
    color: #6B7280;
}

.saved-item-action {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.saved-item-action:hover {
    transform: scale(1.1);
}

/* --- Settings Form --- */
.settings-container {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.profile-form-modern {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-section {
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 30px;
}

.form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 20px;
}

.form-row-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-modern label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.form-group-modern input {
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.form-group-modern input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.avatar-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #E5E7EB;
    background: #f9fafb;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-upload-avatar,
.btn-remove-avatar {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-upload-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-upload-avatar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-remove-avatar {
    background: #fee2e2;
    color: #dc2626;
}

.btn-remove-avatar:hover {
    background: #fecaca;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-save-modern {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-save-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* --- Animations --- */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

/* --- Responsive --- */
@media screen and (max-width: 1024px) {
    .profile-grid-modern {
        grid-template-columns: 280px 1fr;
    }
    
    .stats-cards-modern {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .courses-grid-modern,
    .achievements-grid,
    .saved-items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-detailed-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .profile-body {
        padding: 15px 0;
    }
    
    .profile-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar-modern {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .profile-card-sidebar {
        flex: 1;
        min-width: 250px;
    }
    
    .profile-menu-modern {
        flex: 1;
        min-width: 250px;
    }
    
    .dashboard-header-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .stats-cards-modern {
        grid-template-columns: 1fr;
    }
    
    .courses-grid-modern,
    .achievements-grid,
    .saved-items-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row-modern {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .profile-sidebar-modern {
        flex-direction: column;
    }
    
    .profile-card-sidebar,
    .profile-menu-modern {
        min-width: 100%;
    }
    
    .stat-card-modern {
        padding: 16px;
    }
    
    .stat-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 20px;
    }
}



/* ==========================================
   19. Modern Navbar - Animated & Responsive
   ========================================== */

.navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-modern.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.brand-link:hover {
    transform: scale(1.05);
}

.brand-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    animation: pulseGlow 2s infinite;
}

.brand-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.navbar-link:hover::before {
    opacity: 0.1;
}

.navbar-link:hover {
    color: #667eea;
    transform: translateY(-2px);
}

.navbar-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.navbar-link.active::before {
    opacity: 0;
}

.navbar-link i {
    font-size: 18px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-toggle {
    display: none;
    width: 45px;
    height: 45px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.navbar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-dropdown-btn:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.user-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.user-dropdown-btn i {
    font-size: 12px;
    color: #a0aec0;
    transition: transform 0.3s ease;
}

.user-dropdown.open .user-dropdown-btn i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.user-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f7fafc;
    color: #667eea;
    transform: translateX(5px);
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dropdown-item-danger {
    color: #e53e3e;
}

.dropdown-item-danger:hover {
    background: #fff5f5;
    color: #c53030;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}

/* ==========================================
   20. White UI Profile Design - Minimalist
   ========================================== */

.profile-page-modern {
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
    min-height: 100vh;
    padding: 40px 0;
}

.profile-grid-modern {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 28px;
    max-width: 1400px;
}

/* Sidebar - Modern */
.profile-sidebar-modern {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* Sidebar User Card */
.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}
.sidebar-user-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}
.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.sidebar-avatar-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid white;
}
.sidebar-user-info {
    flex: 1;
    min-width: 0;
}
.sidebar-user-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-info p {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Menu Group Labels */
.menu-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    padding: 12px 16px 6px;
}

/* Menu Items */
.profile-menu-modern {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.25s ease;
    position: relative;
}

.menu-item:hover {
    background: rgba(79, 70, 229, 0.06);
    color: #4f46e5;
    transform: translateX(3px);
}

.menu-item.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

.menu-item i {
    font-size: 16px;
    width: 22px;
    text-align: center;
}

.logout-btn-modern {
    color: #ef4444;
    margin-top: 8px;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}

.logout-btn-modern:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    transform: translateX(3px);
}

/* Main Content */
.profile-content-modern {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    min-height: 600px;
}

.content-section-modern {
    display: none;
}

.content-section-modern.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

/* Profile Notifications */
.notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #ef4444;
    border-radius: 9px;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notif-item {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.notif-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.notif-item.unread {
    border-color: #a7f3d0;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.notif-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f1f5f9;
    font-size: 18px;
    color: #667eea;
}

.notif-item.unread .notif-icon {
    background: #d1fae5;
    color: #047857;
}

.notif-content h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.notif-content p {
    margin: 0 0 6px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.notif-content small {
    font-size: 12px;
    color: #94a3b8;
}

/* Profile Header */
.profile-header-white {
    border-radius: 14px;
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: white;
}

.profile-header-cover {
    height: 100px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 40%, #9333ea 100%);
    position: relative;
}
.profile-cover-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.12) 0%, transparent 40%),
                      radial-gradient(circle at 80% 30%, rgba(255,255,255,0.08) 0%, transparent 35%),
                      radial-gradient(circle at 60% 80%, rgba(255,255,255,0.06) 0%, transparent 30%);
}
.profile-cover-pattern::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1' fill='rgba(255,255,255,0.08)'/%3E%3C/svg%3E");
}

.profile-header-body {
    display: flex;
    align-items: flex-end;
    gap: 22px;
    padding: 0 26px 22px;
    margin-top: -40px;
    position: relative;
}

.profile-avatar-large {
    position: relative;
    width: 105px;
    height: 105px;
    flex-shrink: 0;
}

.avatar-img, .profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.18);
}

.avatar-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(251, 191, 36, 0.4);
}

.profile-info-white {
    flex: 1;
    padding-bottom: 8px;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.profile-info-white h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.profile-verified-badge {
    color: #4f46e5;
    font-size: 20px;
    display: flex;
    align-items: center;
}

.profile-username {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 2px;
}

.profile-email {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.profile-email::before {
    content: '\f0e0';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: #94a3b8;
}

.profile-meta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.profile-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #f1f5f9;
    border-radius: 20px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}
.profile-meta-chip i {
    color: #94a3b8;
    font-size: 12px;
}

.profile-actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.membership-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
    transition: all 0.25s ease;
}
.membership-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.4);
    color: white;
}
.membership-arrow {
    font-size: 12px;
    transition: transform 0.25s;
}
.membership-badge:hover .membership-arrow {
    transform: translateX(4px);
}

.btn-edit-profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-edit-profile:hover {
    border-color: #4f46e5;
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.04);
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.1);
}

/* Statistics Cards */
.stats-grid-white {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card-white {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.stat-card-white::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--stat-color, #4f46e5);
    opacity: 0;
    transition: opacity 0.3s;
}
.stat-card-white:hover::before { opacity: 1; }

.stat-card-white:hover {
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}
.stat-card-white:nth-child(1) { --stat-color: #4f46e5; }
.stat-card-white:nth-child(2) { --stat-color: #10b981; }
.stat-card-white:nth-child(3) { --stat-color: #f59e0b; }
.stat-card-white:nth-child(4) { --stat-color: #ef4444; }

.stat-icon-white {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon-tests {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

.stat-icon-correct {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.stat-icon-score {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.stat-icon-ranking {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.stat-content-white h3 {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
    line-height: 1;
}

.stat-content-white p {
    color: #94a3b8;
    font-size: 13px;
    margin: 0;
}

/* Recent Results Section */
.recent-results-section {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}

.section-header-white {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header-white h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.view-all-white {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.view-all-white:hover {
    color: #7c3aed;
    gap: 8px;
}

.results-list-white {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-item-white {
    background: white;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
    border: 1px solid #e2e8f0;
}

.result-item-white:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
    transform: translateX(4px);
}

.result-info-white h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.result-info-white p {
    color: #94a3b8;
    font-size: 13px;
    margin: 0;
}

.result-score-white {
    text-align: right;
}

.result-score-white .score {
    font-size: 22px;
    font-weight: 700;
    color: #4f46e5;
}

.result-score-white .time {
    color: #94a3b8;
    font-size: 12px;
}

/* Section Header Modern */
.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.section-header-modern h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header-modern h2 i {
    color: #4f46e5;
    font-size: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .profile-grid-modern {
        grid-template-columns: 1fr;
    }

    .profile-sidebar-modern {
        position: static;
        display: block;
    }

    .profile-menu-modern {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .menu-group-label {
        display: none;
    }

    .menu-item {
        padding: 10px 14px;
        font-size: 13px;
    }

    .menu-item span {
        display: none;
    }

    .menu-item i {
        font-size: 18px;
    }

    .menu-item.active span {
        display: inline;
    }

    .logout-btn-modern {
        margin-top: 0;
        border-top: none;
        padding-top: 10px;
    }

    .stats-grid-white {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-header-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 20px 28px;
        gap: 20px;
    }

    .profile-avatar-large {
        width: 90px;
        height: 90px;
    }

    .profile-meta-row {
        justify-content: center;
    }

    .profile-actions-row {
        justify-content: center;
    }

    .profile-name-row {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .profile-page-modern {
        padding: 16px 0;
    }

    .profile-content-modern {
        padding: 20px;
    }

    .stats-grid-white {
        grid-template-columns: 1fr;
    }

    .profile-header-white {
        margin-bottom: 20px;
    }

    .profile-header-cover {
        height: 70px;
    }

    .profile-avatar-large {
        width: 80px;
        height: 80px;
    }

    .profile-info-white h2 {
        font-size: 22px;
    }

    .section-header-modern h2 {
        font-size: 18px;
    }

    .section-header-white {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
/* Responsive Navbar */
@media (max-width: 1024px) {
    .navbar-container {
        padding: 0 20px;
    }
    
    .navbar-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 4px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .navbar-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .navbar-link {
        width: 100%;
        justify-content: flex-start;
        padding: 16px 20px;
    }
    
    .navbar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .user-name {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        height: 70px;
        padding: 0 15px;
    }
    
    .brand-text {
        font-size: 20px;
    }
    
    .brand-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .navbar-menu {
        top: 70px;
    }
}

/* Navbar Animations */
@keyframes navbarSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar-modern {
    animation: navbarSlideIn 0.5s ease-out;
}

@keyframes linkHover {
    0%, 100% {
        transform: translateY(-2px);
    }
    50% {
        transform: translateY(-4px);
    }
}

.navbar-link:hover {
    animation: linkHover 0.3s ease;
}

/* User Dropdown for Main Header */
.user-dropdown {
    position: relative;
}

.user-avatar-btn {
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.user-avatar-btn:hover {
    transform: scale(1.1);
}

.user-avatar-btn .profile-avatar-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
}

.user-avatar-btn .profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.user-avatar-btn:hover .profile-avatar-img {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.avatar-glow-effect {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: pulseGlow 2s infinite;
    z-index: -1;
}

.user-dropdown.open .avatar-glow-effect {
    animation: none;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 16px);
    right: 0;
    min-width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
}

.user-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.dropdown-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-user-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.dropdown-user-info p {
    font-size: 13px;
    color: #64748b;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item span {
    flex: 1;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #667eea;
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.dropdown-item:hover i {
    color: #667eea;
}

.dropdown-item-danger {
    color: #ef4444;
}

.dropdown-item-danger:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
}

.dropdown-item-danger:hover i {
    color: #dc2626;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0;
}

/* Auth Dropdown */
.auth-dropdown {
    position: relative;
}

.btn-auth-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-auth-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-auth-toggle i {
    font-size: 16px;
}

.auth-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
}

.auth-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
}

.search-modal.active {
    display: block;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.search-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.search-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.search-close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.3s ease;
}

.search-close-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.search-modal-body {
    padding: 24px;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-filters select {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-filters select:focus {
    outline: none;
    border-color: #667eea;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
}

.search-placeholder {
    text-align: center;
    color: #94a3b8;
    padding: 40px 20px;
}

.search-result-item {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: #f8fafc;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.search-result-meta {
    font-size: 13px;
    color: #64748b;
}

.search-trigger {
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.3s ease;
}

.search-trigger:hover {
    background: #e2e8f0;
    color: #667eea;
}

/* Courses Section */
.courses-section {
    margin-top: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    color: #667eea;
}

.view-all {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-all:hover {
    color: #764ba2;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.course-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
}

.course-card.free {
    border-left: 4px solid #10b981;
}

.course-card.paid {
    border-left: 4px solid #667eea;
}

.course-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    z-index: 1;
}

.free-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.paid-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.course-content {
    padding: 20px;
}

.course-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.4;
}

.course-description {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #94a3b8;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.course-meta i {
    color: #667eea;
}

.btn-course {
    display: block;
    text-align: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.course-card.free .btn-course {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.course-card.free .btn-course:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.course-card.paid .btn-course {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.course-card.paid .btn-course:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* Filter Action Buttons */
.filter-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-filter-search,
.btn-filter-clear {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-filter-search {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-filter-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-filter-clear {
    background: #f1f5f9;
    color: #64748b;
}

.btn-filter-clear:hover {
    background: #e2e8f0;
    color: #475569;
}

/* New Test Card Design */
.quiz-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(102, 126, 234, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
}

.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quiz-card:hover::before {
    opacity: 1;
}

.quiz-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.2);
}

.quiz-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.quiz-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #f59e0b;
    font-size: 12px;
    font-weight: 600;
    background: #fffbeb;
    padding: 4px 10px;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.1);
}

.quiz-rating i {
    font-size: 13px;
}

.quiz-card-body {
    padding: 16px;
    flex: 1;
}

.quiz-subject {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.quiz-subject i {
    font-size: 13px;
}

.quiz-card-body h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.3;
    background: linear-gradient(135deg, #1e293b 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-meta {
    display: flex;
    gap: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.quiz-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f8fafc;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.quiz-meta span:hover {
    background: #e2e8f0;
}

.quiz-meta i {
    color: #667eea;
    font-size: 13px;
}

.quiz-card-footer {
    padding: 12px 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
}

.quiz-price {
    font-size: 14px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
}

.quiz-price.free {
    color: #10b981;
    background: #ecfdf5;
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.1);
}

.quiz-price.paid {
    color: #667eea;
    background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.1);
}

.quiz-price.accessed {
    color: #047857;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    box-shadow: 0 1px 4px rgba(4, 120, 87, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.quiz-price.accessed::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
}

.btn-card-start {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-card-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* Test Taking Page Styles */
.test-taking-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}

.test-main-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.test-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.test-top-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #e2e8f0;
    color: #475569;
}

.test-subject {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
}

.test-top-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.test-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
}

.test-progress {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
}

.test-progress span:last-child {
    color: #667eea;
}

.question-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.question-number {
    font-size: 18px;
    font-weight: 700;
    color: #64748b;
}

.question-number span {
    color: #667eea;
}

.difficulty-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty-badge.easy {
    background: #dcfce7;
    color: #16a34a;
}

.difficulty-badge.medium {
    background: #fef3c7;
    color: #d97706;
}

.difficulty-badge.hard {
    background: #fee2e2;
    color: #dc2626;
}

.question-text {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.6;
    margin-bottom: 30px;
}

.question-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.option-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.option-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.option-card.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.option-card.selected .option-letter {
    background: white;
    color: #667eea;
}

.option-card.selected .option-text {
    color: white;
}

.option-letter {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.option-text {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.test-bottom-nav {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-nav {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-prev {
    background: #f1f5f9;
    color: #64748b;
}

.btn-prev:hover:not(:disabled) {
    background: #e2e8f0;
    color: #475569;
}

.btn-next {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.test-sidebar {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
}

.test-sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.test-sidebar-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.question-item {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid transparent;
}

.question-item:hover {
    transform: scale(1.1);
}

.question-item.answered {
    background: #dcfce7;
    color: #16a34a;
    border-color: #16a34a;
}

.question-item.reviewed {
    background: #fef3c7;
    color: #d97706;
    border-color: #d97706;
}

.question-item.marked {
    background: #fee2e2;
    color: #dc2626;
    border-color: #dc2626;
}

.question-item.unanswered {
    background: #f1f5f9;
    color: #94a3b8;
}

.legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-color.answered {
    background: #dcfce7;
    border: 2px solid #16a34a;
}

.legend-color.reviewed {
    background: #fef3c7;
    border: 2px solid #d97706;
}

.legend-color.marked {
    background: #fee2e2;
    border: 2px solid #dc2626;
}

.legend-color.unanswered {
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
}

.btn-finish-test {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-finish-test:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

@media (max-width: 1024px) {
    .test-taking-layout {
        grid-template-columns: 1fr;
    }
    
    .test-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .test-top-bar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .test-top-left {
        justify-content: space-between;
    }
    
    .test-top-right {
        justify-content: space-between;
    }
    
    .question-options {
        grid-template-columns: 1fr;
    }
    
    .questions-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .legend {
        grid-template-columns: 1fr;
    }
}

/* Loading and Error States */
.loading-state, .error-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 16px;
}

.loading-state i, .error-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.loading-state i {
    color: #667eea;
}

.error-state i {
    color: #ef4444;
}

.loading-state {
    animation: fadeIn 0.3s ease;
}

/* Pricing Page Styles */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.pricing-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.pricing-card.featured {
    border-color: #667eea;
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pricing-header {
    text-align: center;
    margin-bottom: 30px;
}

.pricing-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.price .currency {
    font-size: 36px;
    font-weight: 800;
    color: #667eea;
}

.price .period {
    font-size: 16px;
    color: #64748b;
}

.pricing-desc {
    color: #64748b;
    font-size: 14px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 15px;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li i.fa-check {
    color: #10b981;
    font-size: 18px;
}

.pricing-features li i.fa-xmark {
    color: #ef4444;
    font-size: 18px;
}

/* Subscription Status Banner */
.subscription-status-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-radius: 14px;
    margin-bottom: 30px;
    font-size: 15px;
}
.subscription-status-banner i { font-size: 28px; }
.subscription-status-banner strong { display: block; font-size: 16px; margin-bottom: 2px; }
.subscription-status-banner.active {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #047857;
    border: 1px solid #a7f3d0;
}
.subscription-status-banner.pending {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Duration Selector */
.pricing-duration-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.duration-btn {
    flex: 1;
    padding: 10px 4px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s;
    text-align: center;
    line-height: 1.4;
}
.duration-btn small { display: block; font-weight: 400; color: #94a3b8; font-size: 11px; }
.duration-btn:hover { border-color: #667eea; color: #667eea; }
.duration-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
.duration-btn.active small { color: rgba(255,255,255,0.8); }

/* Purchase button full width */
.pricing-card .btn-primary.w-100,
.pricing-card .btn-outline.w-100 {
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.pricing-card .btn-primary.w-100 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
.pricing-card .btn-primary.w-100:hover { opacity: 0.9; transform: translateY(-2px); }
.pricing-card .btn-outline.w-100 {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #64748b;
}
.pricing-card .btn-outline.w-100:disabled { opacity: 0.6; cursor: not-allowed; }

/* Payment Modal */
.payment-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.payment-modal {
    background: white;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 30px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.payment-modal h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}
.payment-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
}
.payment-modal-close:hover { background: #e2e8f0; }
.payment-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.payment-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
}
.payment-summary-row.total {
    border-top: 2px solid #e2e8f0;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
}
.payment-summary-row.total strong { color: #667eea; }
.payment-instructions h4 { font-size: 16px; margin-bottom: 12px; }
.payment-instructions p { color: #64748b; font-size: 14px; margin-bottom: 12px; }
.payment-card-info {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
}
.payment-card-info i { font-size: 28px; }
.payment-card-info strong { display: block; font-size: 18px; letter-spacing: 2px; }
.payment-card-info small { opacity: 0.8; }
.payment-note { font-size: 13px !important; color: #94a3b8; }
.payment-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.payment-method-option {
    flex: 1;
    cursor: pointer;
}
.payment-method-option input { display: none; }
.payment-method-option span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s;
}
.payment-method-option input:checked + span {
    border-color: #667eea;
    background: #eef2ff;
    color: #667eea;
}

/* Payment Upload Section */
.payment-upload-section {
    margin-bottom: 20px;
}
.payment-upload-section h4 {
    font-size: 16px;
    margin-bottom: 12px;
}
.payment-upload-area {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}
.payment-upload-area:hover {
    border-color: #667eea;
    background: #eef2ff;
}
.payment-upload-placeholder i {
    font-size: 36px;
    color: #94a3b8;
    margin-bottom: 8px;
}
.payment-upload-placeholder p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}
.payment-upload-placeholder small {
    color: #94a3b8;
    font-size: 12px;
}
.payment-upload-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    z-index: 1;
}
.payment-upload-remove:hover {
    background: rgba(220,38,38,0.8);
}

.faq-section {
    margin-top: 80px;
}

.faq-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 40px;
}

.faq-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.faq-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
}

.faq-item p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
}

/* Blog Page Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
}

.blog-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.blog-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
    pointer-events: none;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-image img {
    transform: scale(1.15);
}

.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.blog-content {
    padding: 28px;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.blog-meta i {
    color: #667eea;
    font-size: 14px;
}

.blog-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 14px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-content h3 {
    color: #667eea;
}

.blog-content p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 22px;
}

.blog-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.blog-link:hover {
    gap: 14px;
    color: #764ba2;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: white;
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pagination-link:hover:not(.disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

.pagination-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-ellipsis {
    padding: 10px 14px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* Blog Single Page Styles */
.blog-single-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 30px;
    align-items: start;
}

.blog-single {
    max-width: 100%;
}

.blog-sidebar-left,
.blog-sidebar-right {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-widget h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-widget h3 i {
    color: #667eea;
}

/* Author Widget */
.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-details h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.author-details p {
    font-size: 13px;
    color: #64748b;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 12px;
}

.category-list li:last-child {
    margin-bottom: 0;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8fafc;
    border-radius: 10px;
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-list a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
}

.category-list span {
    background: #e2e8f0;
    padding: 2px 10px;
    border-radius: 15px;
    font-size: 12px;
    color: #64748b;
}

.category-list a:hover span {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Popular Posts */
.popular-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-posts li {
    margin-bottom: 15px;
}

.popular-posts li:last-child {
    margin-bottom: 0;
}

.popular-posts a {
    display: flex;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.popular-posts a:hover {
    transform: translateX(5px);
}

.popular-posts img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.popular-post-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1.4;
}

.popular-post-info span {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.popular-post-info span i {
    color: #667eea;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud a {
    padding: 8px 16px;
    background: #f8fafc;
    border-radius: 20px;
    color: #4a5568;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag-cloud a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

/* Subscribe Form */
.subscribe-form p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 15px;
    line-height: 1.6;
}

.subscribe-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.subscribe-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.subscribe-form button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscribe-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.blog-single-header {
    margin-bottom: 30px;
    text-align: center;
}

.blog-single-image {
    width: 100%;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    position: relative;
}

.blog-single-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    pointer-events: none;
}

.blog-single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-single-image:hover img {
    transform: scale(1.05);
}

.blog-single-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.blog-single-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.blog-single-date,
.blog-single-read-time {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    background: #f8fafc;
    padding: 6px 15px;
    border-radius: 18px;
}

.blog-single-date i,
.blog-single-read-time i {
    color: #667eea;
    font-size: 14px;
}

.blog-single-title {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1e293b 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-single-content {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-single-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 20px 20px 0 0;
}

.blog-single-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 30px 0 15px 0;
    line-height: 1.4;
    position: relative;
    padding-left: 18px;
}

.blog-single-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    height: 28px;
    width: 4px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 2px;
}

.blog-single-content p {
    font-size: 16px;
    line-height: 1.9;
    color: #4a5568;
    margin-bottom: 20px;
}

.blog-single-content p:first-of-type {
    font-size: 18px;
    font-weight: 500;
    color: #334155;
    line-height: 1.7;
}

.blog-single-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-single-share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.blog-single-share span {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.share-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.btn-back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-back-to-blog:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.45);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

@media screen and (max-width: 1200px) {
    .blog-single-layout {
        grid-template-columns: 250px 1fr 250px;
        gap: 25px;
    }
}

@media screen and (max-width: 992px) {
    .blog-single-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar-left,
    .blog-sidebar-right {
        position: static;
    }
    
    .blog-sidebar-left {
        order: 2;
    }
    
    .blog-sidebar-right {
        order: 3;
    }
    
    .blog-single {
        order: 1;
    }
}

@media screen and (max-width: 768px) {
    .blog-single-title {
        font-size: 28px;
    }
    
    .blog-single-image {
        height: 300px;
    }
    
    .blog-single-content {
        padding: 25px;
    }
    
    .blog-single-content h3 {
        font-size: 22px;
    }
    
    .blog-single-content p {
        font-size: 15px;
    }
    
    .blog-single-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .blog-single-share {
        justify-content: center;
    }
}

.error-state {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Hero search dynamic overrides
   ========================================== */
.hero-section .search-container {
    background: rgba(255, 255, 255, 0.98);
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(79, 70, 229, 0.06);
    margin-top: 50px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    z-index: 10;
    animation: searchPopIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.5s;
}

@keyframes searchPopIn {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-section .search-head {
    margin-bottom: 20px;
}

.hero-section .search-head h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.hero-section .search-head h3 i {
    color: var(--primary-color);
    -webkit-text-fill-color: var(--primary-color);
    font-size: 22px;
}

.hero-section .search-head p {
    color: var(--text-muted);
    font-size: 14px;
}

.hero-section .search-form {
    display: grid;
    grid-template-columns: 2fr 1.1fr 1.1fr 1.1fr auto;
    gap: 10px;
    align-items: stretch;
}

.hero-section .search-form .input-group,
.hero-section .search-form .select-wrapper {
    position: relative;
}

.hero-section .search-form .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}

.hero-section .search-form input,
.hero-section .search-form select {
    width: 100%;
    height: 100%;
    min-height: 44px;
    padding: 10px 14px 10px 40px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.hero-section .search-form input {
    cursor: text;
    padding-left: 40px;
}

.hero-section .search-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

.hero-section .search-form input:focus,
.hero-section .search-form select:focus {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
    outline: none;
}

.hero-section .btn-search {
    min-height: 46px;
    padding: 0 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366F1 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.25);
}

.hero-section .btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.35);
    filter: brightness(1.08);
}

.hero-section .btn-search i {
    font-size: 14px;
}

.hero-section .popular-searches {
    margin-top: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.hero-section .popular-searches > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.hero-section .popular-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-section .popular-searches .tag {
    background: #F1F5F9;
    color: var(--text-dark);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.hero-section .popular-searches .tag:hover {
    background: linear-gradient(135deg, var(--primary-color), #6366F1);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    border-color: rgba(255,255,255,0.2);
}

.hero-section .live-search-results {
    top: calc(100% + 8px);
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
    max-height: 300px;
}

/* Responsive hero search */
@media screen and (max-width: 992px) {
    .hero-section .search-form {
        grid-template-columns: 1fr 1fr;
    }
    .hero-section .btn-search {
        grid-column: span 2;
    }
}

@media screen and (max-width: 640px) {
    .hero-section .search-container {
        padding: 24px 20px;
        border-radius: 20px;
    }
    .hero-section .search-form {
        grid-template-columns: 1fr;
    }
    .hero-section .btn-search {
        grid-column: span 1;
    }
    .hero-section .popular-searches {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Extra hero search polish */
.hero-section .search-head h3 {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366F1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-size: 22px;
}

.hero-section .search-form input:hover,
.hero-section .search-form select:hover {
    border-color: #CBD5E1;
    transform: translateY(-1px);
}

.hero-section .btn-search::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
}

.hero-section .btn-search:hover::after {
    left: 150%;
}
