/* ============================================================
   ICT with Roshan — Premium Light Theme 2026
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
    /* Brand */
    --primary-dark: #181F3A;
    --accent-blue: #4F7CFF;
    --accent-cyan: #38BDF8;

    /* Backgrounds */
    --bg-white: #FFFFFF;
    --bg-secondary: #F7F9FC;
    --bg-soft-blue: #F2F7FF;

    /* Text */
    --text-primary: #181F3A;
    --text-muted: #64748B;
    --text-white: #FFFFFF;

    /* Borders */
    --border-subtle: rgba(24, 31, 58, 0.10);
    --border-medium: rgba(24, 31, 58, 0.16);

    /* Shadows */
    --shadow-xs: 0 1px 3px rgba(24, 31, 58, 0.04);
    --shadow-sm: 0 2px 8px rgba(24, 31, 58, 0.06);
    --shadow-card: 0 2px 16px rgba(24, 31, 58, 0.07);
    --shadow-elevated: 0 8px 32px rgba(24, 31, 58, 0.10);
    --shadow-float: 0 16px 48px rgba(24, 31, 58, 0.12);

    /* Radii */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 9999px;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;

    /* Transitions */
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s var(--ease-smooth);
    --transition-smooth: all 0.4s var(--ease-smooth);
    --transition-slow: all 0.6s var(--ease-smooth);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-white);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: rgba(79, 124, 255, 0.18);
    color: var(--primary-dark);
}

/* Scrollbar — light */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ── Container ─────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
    color: var(--primary-dark);
    -webkit-text-fill-color: var(--primary-dark);
    background: none;
    -webkit-background-clip: unset;
}

h2 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

p {
    color: var(--text-muted);
}

/* ── Animations ────────────────────────────────────────────── */

/* --- Core Keyframes --- */
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeLeft {
    0% { opacity: 0; transform: translateX(-50px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes fadeRight {
    0% { opacity: 0; transform: translateX(50px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5); }
    60% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes slideInUp {
    0% { opacity: 0; transform: translateY(60px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 124, 255, 0); }
    50% { box-shadow: 0 0 20px 4px rgba(79, 124, 255, 0.15); }
}

@keyframes floatGentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes spinSlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Initial entry animations (always play) --- */
.animate-fade-in-up {
    animation: fadeUp 0.9s var(--ease-smooth) forwards;
}
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* --- Direction-Aware & Replayable Scroll Reveal System --- */
.reveal,
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 0;
    will-change: opacity, transform;
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up,
.reveal {
    transform: translateY(30px);
}

.reveal-left {
    transform: translateX(-35px);
}

.reveal-right {
    transform: translateX(35px);
}

.reveal-scale {
    transform: scale(0.95) translateY(15px);
}

/* Revealed / Active Visible State */
.reveal.is-revealed,
.reveal-up.is-revealed,
.reveal-left.is-revealed,
.reveal-right.is-revealed,
.reveal-scale.is-revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

/* Staggered Grid Container & Children */
.reveal-stagger {
    will-change: opacity, transform;
}

.reveal-stagger > * {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-stagger.is-revealed > * {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.reveal-stagger.is-revealed > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-revealed > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.is-revealed > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.is-revealed > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.is-revealed > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.is-revealed > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.is-revealed > *:nth-child(7) { transition-delay: 0.47s; }
.reveal-stagger.is-revealed > *:nth-child(8) { transition-delay: 0.54s; }

/* --- Hero-specific animations --- */
@keyframes portrait-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-4px) rotate(0.2deg); }
    50% { transform: translateY(-7px) rotate(0deg); }
    75% { transform: translateY(-3px) rotate(-0.2deg); }
}

@keyframes ribbon-flow {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    20% { transform: translateY(-5px) rotate(0.4deg) scale(1.003); }
    40% { transform: translateY(-10px) rotate(0deg) scale(1.006); }
    60% { transform: translateY(-6px) rotate(-0.3deg) scale(1.003); }
    80% { transform: translateY(-2px) rotate(0.2deg) scale(1.001); }
    100% { transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes ribbon-gradient {
    0% { stop-color: #181F3A; }
    50% { stop-color: #2A3A6A; }
    100% { stop-color: #181F3A; }
}

@keyframes cloud-drift-slow {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(25px) translateY(-5px); }
    100% { transform: translateX(40px) translateY(0); }
}

@keyframes cloud-drift-medium {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(35px) translateY(-8px); }
    100% { transform: translateX(55px) translateY(0); }
}

@keyframes cloud-drift-fast {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(45px) translateY(-6px); }
    100% { transform: translateX(70px) translateY(0); }
}

@keyframes heroGlowPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

@keyframes dotPatternDrift {
    0% { background-position: 0 0; }
    100% { background-position: 28px 28px; }
}

/* Eyebrow badge pulse */
@keyframes eyebrowPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 124, 255, 0); }
    50% { box-shadow: 0 0 16px 2px rgba(79, 124, 255, 0.12); }
}

/* Hero heading lines staggered entrance */
.hero h1 {
    animation: fadeUp 1s var(--ease-smooth) 0.1s both;
}

/* Highlight text gradient shimmer */
.highlight {
    background: linear-gradient(
        135deg,
        var(--accent-blue) 0%,
        var(--accent-cyan) 40%,
        #7C9FFF 60%,
        var(--accent-blue) 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    animation: gradientShift 4s ease-in-out infinite;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: 1px solid transparent;
    gap: 0.5rem;
    letter-spacing: -0.01em;
    min-height: 48px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

/* Shimmer hover effect on buttons */
.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}
.btn:hover::after {
    left: 120%;
}

/* Active press effect */
.btn:active {
    transform: translateY(0) scale(0.97);
    transition-duration: 0.1s;
}

/* Arrow icon slides on hover */
.btn svg {
    transition: transform 0.3s var(--ease-smooth);
}
.btn:hover svg {
    transform: translateX(3px);
}

.btn-primary {
    background: var(--primary-dark);
    color: var(--text-white);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(24, 31, 58, 0.2);
}

.btn-primary:hover {
    background: #232D52;
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(24, 31, 58, 0.3);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-dark);
    border: 1.5px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-soft-blue);
    border-color: var(--accent-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
    border: 1.5px solid var(--border-medium);
}

.btn-outline:hover {
    background: var(--bg-soft-blue);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-3px);
}

.btn-white {
    background: var(--bg-white);
    color: var(--primary-dark);
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.btn-white:hover {
    background: #F8FAFC;
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
}

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: -moz-fit-content;
    width: fit-content;
    max-width: min(96vw, 1080px);
    height: 4.25rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    z-index: 100;
    transition: var(--transition-smooth);
    animation: fadeDown 0.7s var(--ease-smooth) both;
}

.navbar.scrolled {
    top: 0.75rem;
    background: rgba(255, 255, 255, 0.96);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-card);
}

.nav-content {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: max-content;
    max-width: 100%;
    height: 100%;
    padding: 0 1.25rem 0 1.5rem !important;
    margin: 0 !important;
    position: relative;
    box-sizing: border-box;
    gap: 1.25rem;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    height: 32px;
    max-height: 34px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s var(--ease-smooth), opacity 0.3s ease;
}
.logo a:hover img {
    transform: scale(1.04);
    opacity: 0.9;
}

.footer-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    transition: transform 0.3s var(--ease-smooth);
}
.footer-logo:hover {
    transform: translateY(-2px) scale(1.03);
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: initial;
    min-width: 0;
    margin-left: 0;
    gap: 1.15rem;
}

.nav-links {
    display: flex;
    gap: 1.15rem;
    align-items: center;
    white-space: nowrap;
    margin: 0;
    flex-shrink: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.88rem;
    transition: var(--transition-fast);
    position: relative;
    padding: 0.35rem 0.2rem;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-dark);
}

.nav-links a.active {
    color: var(--primary-dark);
    font-weight: 600;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--accent-blue);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: 0.25rem;
    flex-shrink: 0;
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem;
    border-radius: 50%;
    flex-shrink: 0;
}
.search-btn:hover {
    color: var(--primary-dark);
    background: var(--bg-soft-blue);
}

.btn-login {
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    height: 2.3rem;
    min-height: 2.3rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-dark);
    cursor: pointer;
    padding: 0.5rem;
}

/* ── Search Overlay ────────────────────────────────────────── */
/* ── Search Overlay ────────────────────────────────────────── */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    padding-top: 12vh;
    padding-bottom: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.close-search {
    position: fixed;
    top: 2rem;
    right: 2.25rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(24, 31, 58, 0.05);
    border: 1px solid rgba(24, 31, 58, 0.08);
    color: var(--primary-dark, #181F3A);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.2s ease;
}

.close-search:hover {
    background: rgba(24, 31, 58, 0.12);
    color: var(--accent-blue, #0066FF);
    transform: rotate(90deg);
}

.close-search:focus-visible {
    outline: 2px solid var(--accent-blue, #0066FF);
    outline-offset: 2px;
}

.search-container {
    width: 100%;
    max-width: 760px;
    position: relative;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute;
    left: 0.25rem;
    color: var(--text-muted, #94A3B8);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    font-size: 1.65rem;
    font-weight: 500;
    padding: 0.85rem 1rem 0.85rem 2.5rem;
    border: none;
    border-bottom: 2.5px solid var(--border-subtle, #E2E8F0);
    background: transparent;
    color: var(--primary-dark, #181F3A);
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: var(--accent-blue, #0066FF);
}

.search-input::placeholder {
    color: #94A3B8;
    font-size: 1.45rem;
    font-weight: 400;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    margin: 1.25rem 0 0;
    border: 1px solid rgba(24, 31, 58, 0.08);
    border-radius: 16px;
    background: var(--bg-white, #FFFFFF);
    box-shadow: 0 20px 40px -15px rgba(24, 31, 58, 0.12), 0 0 1px 1px rgba(24, 31, 58, 0.05);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #64748B);
}

.search-resource-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    background: #FAFCFF;
    border: 1px solid rgba(0, 102, 255, 0.08);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.15s ease;
    gap: 1rem;
}

.search-resource-card:hover {
    background: #F0F6FF;
    border-color: rgba(0, 102, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.08);
}

.search-resource-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.search-resource-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.search-badge-resource {
    background: #EBF3FF;
    color: #0066FF;
}

.search-badge-page {
    background: #F1F5F9;
    color: #475569;
}

.search-resource-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--primary-dark, #181F3A);
    margin: 0;
    line-height: 1.35;
    word-break: break-word;
}

.search-resource-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-muted, #64748B);
}

.search-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 4px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    color: #334155;
}

.search-pill-grade {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #1D4ED8;
}

.search-pill-medium {
    background: #F0FDF4;
    border-color: #BBF7D0;
    color: #15803D;
}

.search-resource-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    background: #0066FF;
    color: #FFFFFF;
    border-radius: 8px;
    white-space: nowrap;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.search-resource-card:hover .search-resource-action {
    background: #0052CC;
}

.search-page-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: #FFFFFF;
    border: 1px solid #F1F5F9;
    text-decoration: none;
    color: var(--text-primary, #334155);
    transition: all 0.15s ease;
}

.search-page-card:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: var(--accent-blue, #0066FF);
}

.search-page-card .search-page-title {
    font-size: 0.92rem;
    font-weight: 500;
}

.search-empty-state, .search-loading-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: #64748B;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.search-empty-state p, .search-loading-state p {
    margin: 0;
    font-size: 0.92rem;
}

@media (max-width: 768px) {
    .search-overlay {
        padding-top: 5rem;
    }
    .close-search {
        top: 1.25rem;
        right: 1.25rem;
        width: 38px;
        height: 38px;
    }
    .search-input {
        font-size: 1.25rem;
        padding-left: 2rem;
    }
    .search-input::placeholder {
        font-size: 1.1rem;
    }
    .search-resource-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .search-resource-action {
        width: 100%;
        justify-content: center;
    }
}

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
    padding: 6.75rem 0 2.5rem;
    min-height: auto;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-white);
}

/* Subtle radial glows in the background */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.hero::before {
    width: 50vw;
    height: 50vw;
    max-width: 700px;
    max-height: 700px;
    top: -10%;
    right: -5%;
    background: radial-gradient(circle, rgba(79, 124, 255, 0.08) 0%, transparent 70%);
}

.hero::after {
    width: 40vw;
    height: 40vw;
    max-width: 500px;
    max-height: 500px;
    bottom: -5%;
    left: 10%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.06) 0%, transparent 70%);
}

/* Subtle dot pattern overlay — slow drift */
.hero-bg-pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.3;
    background-image: radial-gradient(circle, rgba(24, 31, 58, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    animation: dotPatternDrift 60s linear infinite;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1.15rem;
    background: var(--bg-soft-blue);
    border: 1px solid rgba(79, 124, 255, 0.15);
    color: var(--accent-blue);
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1.75rem;
    text-transform: uppercase;
    animation: fadeUp 0.6s var(--ease-smooth) both, eyebrowPulse 3s ease-in-out 1.5s infinite;
}

.hero-text p {
    animation: fadeUp 0.8s var(--ease-smooth) 0.3s both;
}

.hero-buttons {
    animation: fadeUp 0.8s var(--ease-smooth) 0.5s both;
}

.hero h1 {
    max-width: 600px;
    text-wrap: balance;
    margin-bottom: 0;
}

.hero-text p {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    margin: 1.5rem 0 2.5rem;
    max-width: 520px;
    color: var(--text-muted);
    line-height: 1.75;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ── Hero Visual Composition ───────────────────────────────── */
.hero-visual {
    position: relative;
    height: 100%;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background glow behind the portrait — animated pulse */
.hero-glow {
    position: absolute;
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    background: radial-gradient(circle, rgba(79, 124, 255, 0.12) 0%, rgba(56, 189, 248, 0.06) 50%, transparent 80%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
    animation: heroGlowPulse 5s ease-in-out infinite;
}

/* SVG Ribbon — behind the portrait */
.hero-ribbon {
    position: absolute;
    width: 110%;
    height: 110%;
    top: -5%;
    left: -5%;
    z-index: 1;
    animation: ribbon-flow 12s ease-in-out infinite;
    pointer-events: none;
}

.hero-ribbon svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Portrait image */
.hero-portrait {
    position: relative;
    z-index: 2;
    width: 80%;
    max-width: 420px;
    animation: portrait-float 6s ease-in-out infinite;
}

.hero-portrait img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 20px 50px rgba(24, 31, 58, 0.16));
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* ── Cyber Tech HUD Hologram Backdrop ──────────────────────── */
.tech-hud-layer {
    position: absolute;
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-hud-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.hud-spin-slow {
    transform-origin: 300px 300px;
    animation: hudSpinCW 35s linear infinite;
}

.hud-spin-reverse {
    transform-origin: 300px 300px;
    animation: hudSpinCCW 24s linear infinite;
}

.hud-spin-pulse {
    transform-origin: 300px 300px;
    animation: hudSpinCW 18s linear infinite, hudPulseGlow 4s ease-in-out infinite alternate;
}

@keyframes hudSpinCW {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes hudSpinCCW {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes hudPulseGlow {
    0% { opacity: 0.4; stroke-width: 1.5px; }
    100% { opacity: 0.9; stroke-width: 3px; }
}

.hud-node-pulse {
    animation: nodePulse 2.5s ease-in-out infinite alternate;
}

.hud-node-pulse.delay-1 { animation-delay: 0.6s; }
.hud-node-pulse.delay-2 { animation-delay: 1.2s; }
.hud-node-pulse.delay-3 { animation-delay: 1.8s; }

@keyframes nodePulse {
    0% { r: 3px; opacity: 0.5; filter: drop-shadow(0 0 2px #38BDF8); }
    100% { r: 7px; opacity: 1; filter: drop-shadow(0 0 12px #38BDF8); }
}

/* ── 3D G.C.E. O/L 2026 Countdown Wrapper ──────────────────── */
.hero-countdown-wrapper {
    margin-top: 2.25rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(79, 124, 255, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(24, 31, 58, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    max-width: 540px;
    animation: fadeUp 0.9s var(--ease-smooth) 0.6s both;
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.hero-countdown-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(24, 31, 58, 0.12), 0 0 25px rgba(79, 124, 255, 0.15);
    border-color: rgba(79, 124, 255, 0.35);
}

.countdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.countdown-badge {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--accent-blue);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.countdown-target {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-soft-blue);
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
}

.countdown-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.countdown-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #FFFFFF 0%, #F8FAFC 100%);
    border: 1px solid rgba(24, 31, 58, 0.08);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.5rem;
    box-shadow: 0 4px 12px rgba(24, 31, 58, 0.05), inset 0 1px 0 #FFFFFF;
    perspective: 400px;
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.countdown-card:hover {
    transform: translateY(-3px) rotateX(8deg);
    box-shadow: 0 8px 20px rgba(79, 124, 255, 0.15);
    border-color: rgba(79, 124, 255, 0.3);
}

.countdown-val {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
    transition: transform 0.2s ease;
}

.countdown-val.flip-pop {
    animation: numFlipPop 0.35s var(--ease-smooth);
}

@keyframes numFlipPop {
    0% { transform: scale(1) rotateX(0deg); }
    50% { transform: scale(1.25) rotateX(-20deg); }
    100% { transform: scale(1) rotateX(0deg); }
}

.countdown-lbl {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    margin-top: 0.25rem;
}

.countdown-sep {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-blue);
    opacity: 0.6;
    margin-bottom: 0.8rem;
    animation: colonBlink 1.5s ease-in-out infinite;
}

@keyframes colonBlink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.9; }
}

/* ── Eyebrow Pulse Dot ──────────────────────────────────────── */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-blue);
    margin-right: 0.5rem;
    box-shadow: 0 0 0 0 rgba(79, 124, 255, 0.5);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 124, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(79, 124, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 124, 255, 0); }
}

/* ── Button Glow Effect ─────────────────────────────────────── */
.btn-glow {
    position: relative;
    box-shadow: 0 4px 20px rgba(24, 31, 58, 0.25);
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}
.btn-glow:hover {
    box-shadow: 0 10px 30px rgba(79, 124, 255, 0.35), 0 0 15px rgba(56, 189, 248, 0.2);
    transform: translateY(-3px) scale(1.02);
}

/* ── Hero Floating Motion Cards ────────────────────────────── */
.floating-elem {
    position: absolute;
    z-index: 5;
    animation: floatMotion 5s ease-in-out infinite alternate;
}

.delay-float {
    animation-delay: 2.5s;
}

@keyframes floatMotion {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
    100% { transform: translateY(-18px) rotate(-1deg); }
}

.hero-float-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.15rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(24, 31, 58, 0.12), 0 2px 6px rgba(24, 31, 58, 0.04);
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
    cursor: default;
    user-select: none;
}

.hero-float-card:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 20px 40px rgba(24, 31, 58, 0.18), 0 0 20px rgba(79, 124, 255, 0.15);
    border-color: rgba(79, 124, 255, 0.3);
}

.float-icon {
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--bg-soft-blue);
}

.float-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.float-text strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}

.float-text span {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.float-card-1 {
    top: 12%;
    left: -8%;
}

.float-card-2 {
    top: 18%;
    right: -6%;
}

.float-card-3 {
    bottom: 18%;
    left: -6%;
}

.float-card-4 {
    bottom: 10%;
    right: -4%;
    padding: 0.5rem 0.85rem;
}

.tech-pill code {
    font-family: 'SF Mono', Consolas, Monaco, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue);
    background: rgba(79, 124, 255, 0.08);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-xs);
}

.binary-pill code {
    color: #38BDF8 !important;
    background: rgba(56, 189, 248, 0.1) !important;
    letter-spacing: 0.05em;
}

@media (max-width: 991px) {
    .float-card-1, .float-card-2, .float-card-3, .float-card-4, .float-card-5 {
        display: none;
    }
}

/* ── Cloud Layers ──────────────────────────────────────────── */
.cloud {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Far clouds — largest, slowest, faintest */
.cloud--far-1 {
    width: 280px;
    height: 80px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.7) 0%, rgba(226, 237, 255, 0.3) 50%, transparent 80%);
    filter: blur(30px);
    top: 8%;
    right: -10%;
    opacity: 0.35;
    z-index: 0;
    animation: cloud-drift-slow 28s ease-in-out infinite alternate;
}

.cloud--far-2 {
    width: 320px;
    height: 90px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.6) 0%, rgba(210, 228, 255, 0.3) 50%, transparent 80%);
    filter: blur(35px);
    top: 18%;
    left: -15%;
    opacity: 0.3;
    z-index: 0;
    animation: cloud-drift-slow 32s ease-in-out infinite alternate-reverse;
}

/* Mid clouds — medium size, moderate speed */
.cloud--mid-1 {
    width: 200px;
    height: 60px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.8) 0%, rgba(220, 235, 255, 0.4) 50%, transparent 80%);
    filter: blur(18px);
    top: 30%;
    right: -5%;
    opacity: 0.4;
    z-index: 1;
    animation: cloud-drift-medium 22s ease-in-out infinite alternate;
}

.cloud--mid-2 {
    width: 180px;
    height: 50px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.75) 0%, rgba(230, 240, 255, 0.35) 50%, transparent 80%);
    filter: blur(15px);
    bottom: 28%;
    left: -8%;
    opacity: 0.35;
    z-index: 1;
    animation: cloud-drift-medium 25s ease-in-out infinite alternate-reverse;
}

/* Near clouds — smaller, fastest, more visible */
.cloud--near-1 {
    width: 150px;
    height: 45px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.9) 0%, rgba(240, 247, 255, 0.5) 50%, transparent 80%);
    filter: blur(10px);
    bottom: 15%;
    right: 5%;
    opacity: 0.5;
    z-index: 3;
    animation: cloud-drift-fast 18s ease-in-out infinite alternate;
}

.cloud--near-2 {
    width: 120px;
    height: 35px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.85) 0%, rgba(235, 245, 255, 0.45) 50%, transparent 80%);
    filter: blur(8px);
    bottom: 22%;
    left: 5%;
    opacity: 0.45;
    z-index: 3;
    animation: cloud-drift-fast 20s ease-in-out infinite alternate-reverse;
}

/* ── Sections Global ───────────────────────────────────────── */
section {
    padding: 3.75rem 0;
    position: relative;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-soft {
    background: var(--bg-soft-blue);
}

.section-header {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 2.5rem;
}

.section-header h2 {
    text-wrap: balance;
}

.section-header p {
    font-size: 1.02rem;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

/* ── Grade Selector ────────────────────────────────────────── */
.grade-selector {
    padding: 3.5rem 0;
    background: var(--bg-white);
    position: relative;
}

.grade-selector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 124, 255, 0.15), transparent);
}

.grade-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1rem;
}

.grade-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    padding: 1.6rem 0.85rem;
    min-height: 110px;
    background: var(--bg-white);
    border: 1.5px solid rgba(24, 31, 58, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all 0.35s var(--ease-smooth);
    box-shadow: 0 4px 12px rgba(24, 31, 58, 0.03);
    position: relative;
    overflow: hidden;
}

.grade-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

.grade-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 28px rgba(79, 124, 255, 0.12);
    background: var(--bg-white);
}

.grade-card:hover::before {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
}

.grade-card h3 {
    color: var(--primary-dark);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.grade-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* O/L special card highlight */
.grade-card[data-grade="GCE O/L"] {
    border-color: rgba(79, 124, 255, 0.3) !important;
    background: linear-gradient(145deg, #F2F7FF 0%, #FFFFFF 100%) !important;
    box-shadow: 0 4px 16px rgba(79, 124, 255, 0.1) !important;
}

.grade-card[data-grade="GCE O/L"]::before {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
}

/* ── Resources Section ─────────────────────────────────────── */
.resources {
    padding: 3.75rem 0;
    background: var(--bg-white);
    position: relative;
    overflow: hidden;
}

/* Hide the matrix canvas overlay */
.resources::before {
    display: none;
}

.resources .container {
    position: relative;
    z-index: 2;
}

#matrix-canvas {
    display: none;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.resource-card {
    background: var(--bg-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    min-height: 260px;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-muted);
    box-shadow: var(--shadow-xs);
}

.resource-card:hover {
    border-color: rgba(79, 124, 255, 0.3);
    transform: translateY(-7px) rotate(-0.3deg);
    box-shadow: var(--shadow-elevated);
}

.resource-icon {
    width: 52px;
    height: 52px;
    background: var(--bg-soft-blue);
    border: 1px solid rgba(79, 124, 255, 0.12);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    margin-bottom: 1.25rem;
    transition: var(--transition-smooth);
}

.resource-card:hover .resource-icon {
    background: rgba(79, 124, 255, 0.14);
    border-color: rgba(79, 124, 255, 0.3);
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 6px 16px rgba(79, 124, 255, 0.12);
}

.resource-card h3 {
    color: var(--primary-dark);
    margin-bottom: 0.6rem;
    font-size: 1.15rem;
}

.resource-card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.92rem;
}

.card-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}
.resource-card:hover .card-link {
    gap: 0.75rem;
    color: var(--primary-dark);
}

/* ── Latest Resources ──────────────────────────────────────── */
.latest-resources {
    background: var(--bg-secondary);
    padding: 3.5rem 0;
}

.latest-list {
    max-width: 880px;
    margin: 0 auto;
}

.latest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.5rem;
    border: 1px solid var(--border-subtle);
    background: var(--bg-white);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: var(--transition-smooth);
    gap: 1rem;
}

.latest-item:hover {
    border-color: rgba(79, 124, 255, 0.25);
    box-shadow: var(--shadow-sm);
}

.latest-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.latest-badge,
.badge {
    background: var(--bg-soft-blue);
    color: var(--accent-blue);
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border: 1px solid rgba(79, 124, 255, 0.12);
}

.latest-title {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.95rem;
}

.latest-type {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.latest-action {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    transition: var(--transition-fast);
}
.latest-action:hover {
    color: var(--primary-dark);
    gap: 0.6rem;
}

.view-all {
    text-align: center;
    margin-top: 2.5rem;
}

/* ── Quiz Promo ────────────────────────────────────────────── */
.quiz-promo {
    padding: 4rem 0;
    background: var(--bg-white);
}

.quiz-container {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #243264 60%, #1E3A6E 100%);
    border: none;
    border-radius: var(--radius-xl);
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-float);
}

.quiz-container::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 70% 30%, rgba(79, 124, 255, 0.15) 0%, transparent 50%);
    z-index: 0;
}

.quiz-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
}

.quiz-content h2 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.quiz-content p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.quiz-features {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.quiz-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.92rem;
}

.quiz-feature svg {
    color: var(--accent-cyan);
}

.quiz-illustration {
    position: relative;
    z-index: 1;
    opacity: 0.25;
}

.quiz-illustration svg {
    width: 200px;
    height: 200px;
}

/* ── Why Learn (Features) ──────────────────────────────────── */
.why-learn {
    background: var(--bg-soft-blue);
    padding: 3.5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.feature-block {
    background: var(--bg-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-xs);
}

.feature-block:hover {
    border-color: rgba(79, 124, 255, 0.2);
    transform: translateY(-6px) rotate(0.3deg);
    box-shadow: var(--shadow-card);
}

.feature-icon {
    width: 52px;
    height: 52px;
    background: var(--bg-soft-blue);
    border: 1px solid rgba(79, 124, 255, 0.1);
    color: var(--accent-blue);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: var(--transition-smooth);
}

.feature-block:hover .feature-icon {
    background: rgba(79, 124, 255, 0.14);
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 4px 12px rgba(79, 124, 255, 0.1);
}

.feature-block h3 {
    color: var(--primary-dark);
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}

.feature-block p {
    font-size: 0.92rem;
    color: var(--text-muted);
}

/* ── About Section ─────────────────────────────────────────── */
.about {
    background: var(--bg-white);
    padding: 4.5rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 4rem;
    align-items: flex-start;
}

.about-visual-col {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 6rem;
}

/* Ambient soft glow light behind freedom cutout photo */
.about-visual-col::after {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    background: radial-gradient(circle, rgba(79, 124, 255, 0.16) 0%, rgba(56, 189, 248, 0.08) 50%, transparent 75%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

.about-image {
    width: 100%;
    max-width: 440px;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    border: none;
    box-shadow: none;
    filter: drop-shadow(0 20px 40px rgba(24, 31, 58, 0.14));
    position: relative;
    z-index: 1;
    transition: transform 0.4s var(--ease-smooth);
}

.about-image:hover {
    transform: translateY(-8px) scale(1.02);
}

.about-content-col h2 {
    color: var(--primary-dark);
    font-size: clamp(2rem, 3.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.about-teacher-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 0.25rem;
}

.about-subtitle {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.98rem;
    margin-bottom: 1rem;
}

.about-grade-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.95rem;
    background: linear-gradient(135deg, rgba(79, 124, 255, 0.08) 0%, rgba(56, 189, 248, 0.08) 100%);
    border: 1px solid rgba(79, 124, 255, 0.2);
    border-radius: var(--radius-pill);
    color: var(--accent-blue);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.about-bio {
    margin-bottom: 1.15rem;
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

/* Stats Cards */
.about-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.about-stat-card {
    background: var(--bg-soft-blue);
    border: 1.5px solid rgba(79, 124, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.25rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.about-stat-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.about-stat-card .stat-num {
    display: block;
    color: var(--primary-dark);
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.about-stat-card .stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
}

/* Education & Qualifications Group */
.about-credential-group {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.credential-group-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.credential-group-title svg {
    color: var(--accent-blue);
}

.credential-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.credential-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    background: var(--bg-white);
    border: 1.5px solid rgba(24, 31, 58, 0.08);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(24, 31, 58, 0.03);
    transition: var(--transition-fast);
}

.credential-card:hover {
    border-color: rgba(79, 124, 255, 0.25);
    background: var(--bg-soft-blue);
    transform: translateY(-2px);
}

.credential-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
}

.credential-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.credential-text strong {
    font-size: 0.88rem;
    color: var(--primary-dark);
    font-weight: 700;
    line-height: 1.3;
}

.credential-text span {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Qualification Chips */
.qualification-chips-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.qual-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: #FAFCFF;
    border: 1px solid rgba(79, 124, 255, 0.12);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    color: var(--primary-dark);
    font-weight: 600;
    transition: var(--transition-fast);
}

.qual-chip:hover {
    background: var(--bg-soft-blue);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateX(3px);
}

.qual-chip-bullet {
    color: var(--accent-blue);
    font-size: 0.75rem;
}

.about-cta-row {
    display: flex;
    gap: 1rem;
    margin-top: 2.25rem;
    flex-wrap: wrap;
}

/* ── CTA Section ───────────────────────────────────────────── */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--bg-soft-blue) 0%, rgba(79, 124, 255, 0.06) 100%);
}

.cta-container {
    text-align: center;
    max-width: 660px;
    margin: 0 auto;
}

.cta-container h2 {
    margin-bottom: 1rem;
}

.cta-container p {
    margin-bottom: 2.5rem;
    font-size: 1.08rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Contact Section ───────────────────────────────────────── */
.contact {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.contact h2 {
    text-wrap: balance;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 3.5rem;
    box-shadow: var(--shadow-card);
}

.contact-info p {
    color: var(--text-muted);
    margin-top: 0.75rem;
    font-size: 1.02rem;
    line-height: 1.6;
}

/* Contact Action Buttons (WhatsApp & Call) */
.contact-actions-wrap {
    display: flex;
    gap: 1rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

.btn-whatsapp-action {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #25D366;
    color: #FFFFFF !important;
    border: 1.5px solid #25D366;
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.28);
    transition: all 0.3s var(--ease-smooth);
}

.btn-whatsapp-action:hover {
    background: #20BA56;
    border-color: #20BA56;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.38);
    color: #FFFFFF !important;
}

.btn-call-action {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--bg-white);
    color: var(--primary-dark) !important;
    border: 1.5px solid rgba(24, 31, 58, 0.16);
    padding: 0.85rem 1.35rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    box-shadow: var(--shadow-xs);
    transition: all 0.3s var(--ease-smooth);
}

.btn-call-action:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue) !important;
    background: var(--bg-soft-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.contact-methods {
    margin-top: 2rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1.25rem;
}

.method-icon {
    width: 44px;
    height: 44px;
    background: var(--bg-soft-blue);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.method-details h4 {
    color: var(--primary-dark);
    margin-bottom: 0.2rem;
}

.method-details p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.contact-form {
    padding: 2rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--primary-dark);
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-white);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.1);
}

.form-control::placeholder {
    color: #94A3B8;
}

textarea.form-control {
    resize: vertical;
    min-height: 110px;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
    background: var(--primary-dark);
    border-top: none;
    padding: 3.5rem 0 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-brand-col p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    max-width: 280px;
}

.footer-brand {
    color: var(--text-white);
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.footer-col h4 {
    color: var(--text-white);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a,
.footer-links li {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text-white);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: var(--transition-fast);
}

.social-links a:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--text-white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

.admin-link {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.admin-link:hover {
    color: var(--text-white);
}

/* ── Quiz Modal ────────────────────────────────────────────── */
.quiz-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(24, 31, 58, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.quiz-panel {
    position: relative;
    width: min(100%, 600px);
    padding: clamp(2rem, 5vw, 3rem);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    background: var(--bg-white);
    box-shadow: var(--shadow-float);
}

.quiz-panel h2 {
    margin: 1rem 0 1.5rem;
    color: var(--primary-dark);
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

.quiz-panel p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.quiz-progress {
    color: var(--accent-blue);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-soft-blue);
    color: var(--primary-dark);
}

.quiz-answers {
    display: grid;
    gap: 0.65rem;
}

.quiz-answers button {
    padding: 0.95rem 1.15rem;
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-primary);
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
}

.quiz-answers button:hover {
    border-color: var(--accent-blue);
    background: var(--bg-soft-blue);
    color: var(--primary-dark);
}

/* ── Subpage Headers (for other pages) ─────────────────────── */
.page-header {
    padding: 11rem 0 5rem !important;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #243264 60%, #1E3A6E 100%) !important;
    border-bottom: none;
}

.page-header h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem) !important;
    color: var(--text-white) !important;
    -webkit-text-fill-color: var(--text-white) !important;
}

.page-header p {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ── Subpage utilities (resource lists, filters, etc.) ──────── */
.resource-list { min-height: 260px; }

.loading-indicator,
.empty-state {
    display: grid;
    place-items: center;
    grid-column: 1 / -1;
    min-height: 260px;
    padding: 2rem;
    text-align: center;
    border: 1px dashed var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.empty-state h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
}

.filter-group label {
    color: var(--text-primary);
}

.filter-group input,
.filter-group select {
    color: var(--text-primary);
    border: 1.5px solid var(--border-subtle);
    background: var(--bg-white);
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.1);
}

/* ── Admin page ────────────────────────────────────────────── */
.admin-container {
    background: var(--bg-white) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-card) !important;
    color: var(--text-primary);
}

.form-header h2 {
    color: var(--primary-dark) !important;
}

.status-message {
    border-radius: var(--radius-sm);
}

/* ── Reduced Motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html { scroll-behavior: auto; }

    .hero-portrait,
    .hero-ribbon,
    .cloud {
        animation: none !important;
    }
}

/* ── Responsive: Tablet (1024px) ───────────────────────────── */
@media (max-width: 1024px) {
    .hero-grid {
        gap: 2rem;
    }

    .grade-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .resource-grid,
    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-grid {
        gap: 3rem;
    }

    .quiz-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 3rem 2rem;
    }

    .quiz-features {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        padding: 2.5rem 2rem;
    }
}

/* ── Responsive: Tablet & Mobile Navbar (860px and below) ─── */
@media (max-width: 860px) {
    .navbar {
        width: 92%;
    }

    .nav-right {
        position: absolute;
        top: calc(100% + 0.75rem);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: var(--radius-md);
        flex-direction: column;
        padding: 1.75rem;
        border: 1px solid var(--border-subtle);
        box-shadow: var(--shadow-elevated);
        display: none;
        margin-left: 0;
        gap: 1rem;
    }

    .nav-right.active {
        display: flex;
    }

    .nav-links {
        position: static;
        transform: none;
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
        gap: 0.75rem;
        margin: 0;
    }

    .nav-links a {
        font-size: 1.05rem;
        padding: 0.35rem 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-subtle);
        gap: 0.75rem;
    }

    .btn-login {
        width: auto;
    }
}

/* ── Responsive: Tablet Portrait (768px) ───────────────────── */
@media (max-width: 768px) {

    .hero {
        padding: 9rem 0 3.5rem;
        min-height: auto;
        text-align: center;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-text {
        order: 1;
    }

    .hero-text p {
        margin: 1.25rem auto 2rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }

    .hero-visual {
        order: 2;
        min-height: 340px;
    }

    .hero-portrait {
        width: 65%;
        max-width: 300px;
    }

    .hero-ribbon {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
    }

    .cloud--far-1, .cloud--far-2 {
        width: 180px;
        height: 50px;
    }

    .cloud--mid-1, .cloud--mid-2 {
        width: 130px;
        height: 40px;
    }

    .cloud--near-1, .cloud--near-2 {
        width: 100px;
        height: 30px;
    }

    .btn {
        width: 100%;
    }

    .grade-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .grade-card {
        min-height: 100px;
        padding: 1.25rem 0.75rem;
    }

    .resource-grid,
    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-card {
        min-height: 220px;
        padding: 1.5rem 1.25rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-visual-col {
        position: static;
        display: flex;
        justify-content: center;
    }

    .about-visual-col::after {
        display: none;
    }

    .about-image {
        height: auto;
        max-width: 320px;
    }

    .about-content-col {
        text-align: left;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .credential-cards {
        grid-template-columns: 1fr;
    }

    .qualification-chips-grid {
        grid-template-columns: 1fr;
    }

    .contact-actions-wrap {
        flex-direction: column;
    }

    .btn-whatsapp-action,
    .btn-call-action {
        width: 100%;
        justify-content: center;
    }

    .contact-grid {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .latest-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ── Responsive: Mobile (430px and below) ──────────────────── */
@media (max-width: 430px) {
    .grade-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 8rem 0 2.5rem;
    }

    .hero h1 {
        font-size: 2.3rem;
    }

    .hero-visual {
        min-height: 280px;
    }

    .hero-portrait {
        width: 60%;
        max-width: 240px;
    }

    .eyebrow {
        font-size: 0.65rem;
    }

    section {
        padding: 4rem 0;
    }

    .contact-grid {
        padding: 1.25rem;
    }
}

/* ── Responsive: Small Mobile (390px) ──────────────────────── */
@media (max-width: 390px) {
    .container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .grade-grid {
        gap: 0.5rem;
    }

    .grade-card {
        min-height: 90px;
        padding: 1rem 0.5rem;
    }

    .grade-card h3 {
        font-size: 0.95rem;
    }
}

/* ============================================================
   Public Paper Resource Grid & Card Component
   ============================================================ */

/* ── Container Grid Specification ────────────────────────── */
.latest-grid,
.resource-list,
.public-resource-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1.25rem !important;
    width: 100%;
}

/* ── Toolbar Component ─────────────────────────────────────── */
.public-toolbar-container {
    background: #FFFFFF;
    border: 1px solid rgba(24, 31, 58, 0.08);
    border-radius: 14px;
    padding: 0.75rem 1.15rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(24, 31, 58, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.public-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    min-width: 260px;
}

.public-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 340px;
}

.public-search-wrapper input {
    width: 100%;
    padding: 0.45rem 0.85rem 0.45rem 2.2rem;
    border: 1px solid rgba(24, 31, 58, 0.14);
    border-radius: 8px;
    font-size: 0.84rem;
    font-family: inherit;
    outline: none;
    transition: all 0.18s ease;
    background: #F8FAFC;
}

.public-search-wrapper input:focus {
    background: #FFFFFF;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.public-search-wrapper .search-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748B;
    pointer-events: none;
}

.public-result-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748B;
    white-space: nowrap;
}

.public-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.public-toolbar-select {
    padding: 0.45rem 1.8rem 0.45rem 0.75rem;
    border: 1px solid rgba(24, 31, 58, 0.14);
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: inherit;
    background-color: #FFFFFF;
    color: #181F3A;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 0.85rem;
    cursor: pointer;
}

.public-toolbar-select:focus {
    border-color: #2563EB;
}

/* ── Compact Vertical Card ─────────────────────────────────── */
.public-paper-card {
    background: #FFFFFF;
    border: 1px solid rgba(24, 31, 58, 0.09);
    border-radius: 16px;
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    height: 100%;
    min-height: 240px;
    box-shadow: 0 4px 14px rgba(24, 31, 58, 0.04);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.public-paper-card:hover {
    border-color: rgba(37, 99, 235, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

.paper-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.paper-card-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563EB;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.public-paper-card:hover .paper-card-icon-badge {
    background: #2563EB;
    color: #FFFFFF;
}

.paper-card-category-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748B;
    background: #F1F5F9;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

.paper-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.paper-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #181F3A;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.7em;
}

.paper-card-pills {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
}

.paper-pill-grade {
    background: rgba(37, 99, 235, 0.08);
    color: #2563EB;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
}

.paper-pill-medium {
    background: #F1F5F9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
}

.paper-card-date {
    font-size: 0.75rem;
    color: #94A3B8;
    margin-top: 0.2rem;
}

.paper-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(24, 31, 58, 0.06);
}

.btn-card-view {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    height: 36px;
    padding: 0 0.5rem;
    background: #FFFFFF;
    border: 1px solid rgba(24, 31, 58, 0.16);
    color: #181F3A;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.btn-card-view:hover {
    background: #F8FAFC;
    border-color: #181F3A;
}

.btn-card-download {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    height: 36px;
    padding: 0 0.5rem;
    background: #181F3A;
    border: 1px solid #181F3A;
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.18s ease;
    box-shadow: 0 2px 6px rgba(24, 31, 58, 0.12);
    white-space: nowrap;
}

.btn-card-download:hover {
    background: #2563EB;
    border-color: #2563EB;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ── Responsive Breakpoints ────────────────────────────────── */
@media (max-width: 1199px) {
    .latest-grid,
    .resource-list,
    .public-resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    .latest-grid,
    .resource-list,
    .public-resource-grid {
        grid-template-columns: 1fr !important;
    }
    .public-toolbar-container {
        flex-direction: column;
        align-items: stretch;
    }
    .public-toolbar-left,
    .public-toolbar-right {
        width: 100%;
    }
    .public-search-wrapper {
        max-width: 100%;
    }
}

/* ── Student Auth Split-Screen & LMS Learning Platform System ── */
.student-auth-body {
    background: #F8FAFC;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1E293B;
}

/* Header & Top Navigation Bar for Auth Pages */
.student-auth-header-bar {
    height: 72px;
    background: #181F3A;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
}

.student-auth-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.student-auth-logo img {
    height: 34px;
    width: auto;
}

.btn-auth-header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    color: #FFFFFF !important;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-auth-header-action:hover {
    background: #0284c7;
    border-color: #0284c7;
    transform: translateY(-1px);
}

/* Split-Screen Auth Layout */
.student-split-screen {
    display: flex;
    min-height: calc(100vh - 72px);
    width: 100%;
}

/* Left Visual Branded Panel (45%) */
.student-auth-visual-panel {
    flex: 0 0 45%;
    max-width: 45%;
    background: linear-gradient(145deg, #181F3A 0%, #0F172A 60%, #1E293B 100%);
    position: relative;
    overflow: hidden;
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #FFFFFF;
}

.student-auth-visual-panel::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 80% 70%, rgba(79, 124, 255, 0.12) 0%, transparent 55%);
    pointer-events: none;
}

.student-auth-visual-content {
    position: relative;
    z-index: 2;
    margin: auto 0;
}

.student-auth-visual-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 30px;
    color: #38bdf8;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Clear readable high contrast headings on dark panel */
.student-auth-visual-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    margin-bottom: 1rem;
}

.student-auth-visual-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #B8C4D9 !important;
    max-width: 440px;
    margin-bottom: 2rem;
}

.student-auth-feature-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.student-auth-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #F1F5F9 !important;
    font-weight: 500;
}

.student-auth-feature-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.student-auth-visual-footer {
    font-size: 0.82rem;
    color: #94A3B8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.25rem;
    position: relative;
    z-index: 2;
}

/* Right Form Area Panel (55%) */
.student-auth-form-panel {
    flex: 0 0 55%;
    max-width: 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    background: #F8FAFC;
}

.student-auth-form-container {
    width: 100%;
    max-width: 500px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
}

.student-auth-form-container.wide-form {
    max-width: 580px;
}

.student-auth-header {
    margin-bottom: 1.75rem;
}

.student-auth-header h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: #181F3A;
    margin-bottom: 0.35rem;
}

.student-auth-header p {
    font-size: 0.88rem;
    color: #64748B;
}

/* Standardized Input & Select Field Redesign */
.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #181F3A;
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="password"],
.form-field select {
    width: 100%;
    height: 50px;
    padding: 0 1.1rem;
    background-color: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    border-radius: 11px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1E293B;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.form-field input:hover,
.form-field select:hover {
    border-color: #94A3B8;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.15);
}

.form-field input::placeholder {
    color: #94A3B8;
}

/* Custom Select Dropdown Styling */
.form-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Password Input Toggle Alignment */
.password-input-group {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.password-input-group input {
    padding-right: 3rem !important;
}

.btn-toggle-password {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748B;
    cursor: pointer;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 5;
}

.btn-toggle-password:hover {
    color: #0284c7;
}

/* Avatar Option Picker Grid Redesign */
.avatar-picker-grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.4rem;
    padding: 0.85rem 1rem;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    flex-wrap: wrap;
}

.avatar-option-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.avatar-option-card {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #CBD5E1;
    background: #FFFFFF;
    cursor: pointer;
    overflow: visible;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-option-card img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-option-card .avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #ffffff;
}

.avatar-option-card:hover {
    border-color: #0284c7;
    transform: translateY(-3px) scale(1.06);
}

.avatar-option-card.selected {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2), 0 4px 12px rgba(2, 132, 199, 0.25);
    transform: scale(1.08);
}

.avatar-option-card.selected::after {
    content: '✓';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 18px;
    height: 18px;
    background: #0284c7;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.avatar-option-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    text-align: center;
    margin-top: 2px;
}

.avatar-option-item:hover .avatar-option-label,
.avatar-option-card.selected + .avatar-option-label {
    color: #0284c7;
    font-weight: 700;
}

/* Primary Auth Action Button */
.btn-auth-primary {
    width: 100%;
    height: 50px;
    background: #0284c7;
    border: 1px solid #0284c7;
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1.5rem;
}

.btn-auth-primary:hover {
    background: #0369a1;
    border-color: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

/* LMS Top Navigation Bar for Dashboard */
.lms-navbar {
    background: #181F3A;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.lms-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
    gap: 1.25rem;
}

.lms-nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
    min-width: 0;
}

/* Stable Prominent LMS Logo */
.lms-navbar .logo,
.lms-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.lms-navbar .logo a,
.lms-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.lms-navbar .logo img,
.lms-logo img {
    height: 38px;
    width: auto;
    max-height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    transition: transform 0.25s var(--ease-smooth), opacity 0.25s ease;
}

.lms-navbar .logo a:hover img,
.lms-logo a:hover img {
    transform: scale(1.03);
    opacity: 0.95;
}

.lms-nav-menu {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.lms-nav-menu li {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.lms-nav-link {
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0.42rem 0.65rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.lms-nav-link svg {
    flex-shrink: 0;
}

.lms-nav-link:hover,
.lms-nav-link.active {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
}

.lms-user-menu {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.lms-user-menu button,
.lms-user-menu a {
    white-space: nowrap;
    flex-shrink: 0;
}

/* LMS Mobile Menu Toggle Button */
.lms-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.lms-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
}

.lms-mobile-toggle:focus-visible {
    outline: 2px solid #38BDF8;
    outline-offset: 2px;
}

/* LMS Mobile Dropdown Drawer */
.lms-mobile-drawer {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #181F3A;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
    padding: 1rem 1.25rem 1.25rem;
    z-index: 999;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 0.35rem;
    animation: lmsDrawerSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lms-mobile-drawer.active {
    display: flex;
}

@keyframes lmsDrawerSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lms-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #94A3B8;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s ease;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
}

.lms-mobile-link svg {
    flex-shrink: 0;
    color: #64748B;
    transition: color 0.18s ease;
}

.lms-mobile-link:hover,
.lms-mobile-link.active {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
}

.lms-mobile-link:hover svg,
.lms-mobile-link.active svg {
    color: #38BDF8;
}

.lms-mobile-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.4rem 0;
}

.lms-mobile-link.logout-link {
    color: #F87171;
}

.lms-mobile-link.logout-link svg {
    color: #F87171;
}

.lms-mobile-link.logout-link:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

/* LMS Compact Hero Welcome Banner */
.student-hero-banner {
    background: linear-gradient(135deg, #181F3A 0%, #0F172A 60%, #1E293B 100%);
    color: #FFFFFF;
    padding: 2.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.student-hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.student-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

.student-hero-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.student-hero-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    background: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.student-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-hero-avatar .fallback-initial {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
}

.student-hero-name {
    font-size: 1.55rem;
    font-weight: 800;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.student-hero-grade-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.student-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Lightweight KPI Cards Grid */
.student-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: -1.75rem;
    margin-bottom: 2.25rem;
    position: relative;
    z-index: 10;
}

.student-kpi-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.student-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    border-color: rgba(2, 132, 199, 0.3);
}

.student-kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #F1F5F9;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.student-kpi-card:hover .student-kpi-icon {
    transform: scale(1.08);
}

.student-kpi-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: #181F3A;
    line-height: 1.1;
}

.student-kpi-lbl {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748B;
    margin-top: 2px;
}

/* LMS Main Section Cards */
.lms-card-container {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
    margin-bottom: 2rem;
}

.lms-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.lms-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #181F3A;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.lms-card-subtitle {
    font-size: 0.84rem;
    color: #64748B;
    margin-top: 0.2rem;
}

/* Responsive Media Queries */
@media (max-width: 991px) {
    .student-auth-visual-panel {
        flex: 0 0 40%;
        max-width: 40%;
        padding: 2.5rem 1.75rem;
    }

    .student-auth-form-panel {
        flex: 0 0 60%;
        max-width: 60%;
        padding: 2rem 1.5rem;
    }

    .student-auth-visual-title {
        font-size: 1.75rem;
    }

    .student-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lms-nav-menu {
        display: none;
    }

    .lms-mobile-toggle {
        display: flex;
    }

    .lms-navbar .logo img,
    .lms-logo img {
        height: 34px;
    }
}

@media (max-width: 767px) {
    .student-split-screen {
        flex-direction: column;
    }

    .student-auth-visual-panel {
        display: none; /* Hide large visual panel on mobile per requirement 13 */
    }

    .student-auth-form-panel {
        flex: 1;
        max-width: 100%;
        width: 100%;
        padding: 2rem 1rem;
    }

    .student-auth-form-container {
        padding: 1.75rem 1.25rem;
        box-shadow: none;
        border: none;
        background: transparent;
    }

    .student-auth-header-bar {
        padding: 0 1rem;
    }

    .avatar-picker-grid {
        justify-content: space-around;
        gap: 0.5rem;
    }

    .avatar-option-card {
        width: 48px;
        height: 48px;
    }

    .register-form-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 576px) {
    .student-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   STUDENT QUIZ SYSTEM - MODERN COMPONENT STYLES (PHASE 3B)
   ============================================================ */

/* Available Quizzes Grid on Student Dashboard */
#availableQuizzesContainer {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)) !important;
    gap: 1.5rem !important;
    margin-top: 0.5rem;
}

/* Modern Student Quiz Card */
.student-quiz-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.45rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.15rem;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-sizing: border-box;
}

.student-quiz-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px -4px rgba(2, 132, 199, 0.12), 0 4px 12px rgba(15, 23, 42, 0.04);
    border-color: #38BDF8;
}

.student-quiz-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.student-quiz-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
    color: #0284C7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
}

.speed-bonus-badge {
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.22rem 0.65rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    letter-spacing: 0.01em;
}

.speed-bonus-badge.enabled {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.speed-bonus-badge.disabled {
    background: #F1F5F9;
    color: #64748B;
    border: 1px solid #E2E8F0;
}

.student-quiz-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.01em;
}

.student-quiz-desc {
    font-size: 0.82rem;
    color: #64748B;
    line-height: 1.5;
    margin-bottom: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.student-quiz-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.95rem;
}

.quiz-pill-grade {
    background: #F0F9FF;
    color: #0369A1;
    border: 1px solid #BAE6FD;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border-radius: 6px;
    letter-spacing: 0.01em;
}

.student-quiz-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    margin-bottom: 0.25rem;
    text-align: center;
}

.quiz-meta-item-val {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0F172A;
    display: block;
}

.quiz-meta-item-lbl {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.btn-start-quiz {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    height: 42px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #FFFFFF;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    transition: all 0.22s ease;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
    cursor: pointer;
    box-sizing: border-box;
}

.btn-start-quiz:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
    transform: translateY(-1px);
    color: #FFFFFF;
}

/* ============================================================
   STUDENT QUIZ OVERVIEW SHELL PAGE STYLES (student-quiz.html)
   ============================================================ */

.quiz-shell-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 2.25rem 2.5rem;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.02);
    max-width: 760px;
    margin: 1.5rem auto;
    box-sizing: border-box;
}

.quiz-shell-badge-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.quiz-shell-type-badge {
    background: #E0F2FE;
    color: #0284C7;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    border: 1px solid rgba(2, 132, 199, 0.25);
}

.quiz-shell-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.35;
    margin: 0.85rem 0 0.5rem 0;
    letter-spacing: -0.01em;
}

.quiz-shell-desc {
    font-size: 0.9rem;
    color: #64748B;
    line-height: 1.6;
    margin: 0 0 1.65rem 0;
}

.quiz-shell-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

@media (max-width: 680px) {
    .quiz-shell-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quiz-shell-metric-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 0.95rem 0.6rem;
    text-align: center;
    transition: all 0.2s ease;
}

.quiz-shell-metric-box:hover {
    background: #FFFFFF;
    border-color: #BAE6FD;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.quiz-shell-metric-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0F172A;
    display: block;
    margin-bottom: 0.2rem;
}

.quiz-shell-metric-lbl {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.quiz-shell-rules {
    background: linear-gradient(135deg, #F0F9FF 0%, #EFF6FF 100%);
    border: 1px solid #BAE6FD;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
}

.quiz-shell-rules h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0369A1;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-shell-rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.quiz-shell-rules li {
    font-size: 0.86rem;
    color: #1E3A8A;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    line-height: 1.45;
}

.quiz-shell-rules li::before {
    content: "✓";
    font-weight: 800;
    color: #0284C7;
    flex-shrink: 0;
}

.quiz-shell-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1.25rem;
    border-top: 1px solid #F1F5F9;
}

.btn-shell-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 44px;
    padding: 0 1.25rem;
    border-radius: 10px;
    border: 1px solid #CBD5E1;
    background: #FFFFFF;
    color: #334155;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-shell-back:hover {
    background: #F8FAFC;
    border-color: #94A3B8;
    color: #0F172A;
}

.btn-shell-start {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 44px;
    padding: 0 1.75rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-shell-start:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
    transform: translateY(-1px);
    color: #FFFFFF;
}

/* ============================================================
   ICTONE STUDENT QUIZ PLAYER STYLES (Phase 3C)
   ============================================================ */

.quiz-player-container {
    max-width: 880px;
    margin: 1.5rem auto 3rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* Sticky/Prominent Player Top Bar */
.quiz-player-header-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.15rem 1.5rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    margin-bottom: 1.25rem;
}

.quiz-player-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.quiz-player-title-box {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.quiz-player-main-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
    letter-spacing: -0.01em;
}

.quiz-player-meta-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: #64748B;
    font-weight: 600;
}

.quiz-player-right-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Autosave status indicator pill */
.quiz-autosave-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.25s ease;
    background: #F1F5F9;
    color: #475569;
}

.quiz-autosave-badge.saving {
    background: #FEF3C7;
    color: #B45309;
}

.quiz-autosave-badge.saved {
    background: #ECFDF5;
    color: #059669;
}

.quiz-autosave-badge.failed,
.quiz-autosave-badge.error {
    background: #FEE2E2;
    color: #DC2626;
}

.quiz-autosave-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Timer Widget */
.quiz-timer-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    border-radius: 12px;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    color: #0F172A;
    font-family: 'Inter', monospace, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
}

.quiz-timer-widget.timer-warning {
    background: #FFFBEB;
    border-color: #FCD34D;
    color: #D97706;
}

.quiz-timer-widget.timer-critical {
    background: #FEF2F2;
    border-color: #FCA5A5;
    color: #DC2626;
    animation: gentlePulse 2s infinite ease-in-out;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Progress bar inside header */
.quiz-player-progress-bar-wrap {
    width: 100%;
    height: 6px;
    background: #F1F5F9;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.quiz-player-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.35s ease;
}

/* Main Question Card */
.quiz-question-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 2rem 2.25rem;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05), 0 0 0 1px rgba(15, 23, 42, 0.02);
    margin-bottom: 1.5rem;
    box-sizing: border-box;
}

.quiz-question-top-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #F1F5F9;
}

.question-counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0284C7;
    background: #E0F2FE;
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
}

.question-marks-badge {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748B;
}

.quiz-question-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    word-break: break-word;
}

/* Optional Code Block Snippet */
.quiz-code-block {
    background: #0F172A;
    color: #38BDF8;
    padding: 1.1rem 1.35rem;
    border-radius: 12px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.92rem;
    line-height: 1.55;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid #1E293B;
}

/* Optional Question Image */
.quiz-question-img-wrap {
    margin-bottom: 1.5rem;
    text-align: center;
    max-width: 100%;
}

.quiz-question-img-wrap img {
    max-width: 100%;
    max-height: 380px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Options Grid / List */
.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.quiz-option-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 1.5px solid #E2E8F0;
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.quiz-option-card:hover {
    border-color: #94A3B8;
    background: #F8FAFC;
    transform: translateX(2px);
}

.quiz-option-card.selected {
    border-color: #0284C7;
    background: #F0F9FF;
    box-shadow: 0 0 0 1px #0284C7, 0 4px 12px rgba(2, 132, 199, 0.08);
}

.quiz-option-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    font-size: 0.85rem;
    font-weight: 800;
    color: #475569;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.quiz-option-card.selected .quiz-option-badge {
    background: #0284C7;
    border-color: #0284C7;
    color: #FFFFFF;
}

.quiz-option-text {
    font-size: 0.98rem;
    font-weight: 500;
    color: #1E293B;
    line-height: 1.5;
    flex-grow: 1;
}

.quiz-option-card.selected .quiz-option-text {
    color: #0369A1;
    font-weight: 600;
}

/* Question Action Footer (Prev, Next, Finish) */
.quiz-player-nav-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid #F1F5F9;
}

.btn-quiz-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 42px;
    padding: 0 1.25rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quiz-prev {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #475569;
}

.btn-quiz-prev:hover:not(:disabled) {
    background: #F8FAFC;
    color: #0F172A;
    border-color: #94A3B8;
}

.btn-quiz-prev:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-quiz-next {
    background: #0284C7;
    border: 1px solid #0284C7;
    color: #FFFFFF;
    font-weight: 700;
}

.btn-quiz-next:hover {
    background: #0369A1;
    border-color: #0369A1;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-quiz-finish {
    background: #059669;
    border: 1px solid #059669;
    color: #FFFFFF;
    font-weight: 700;
}

.btn-quiz-finish:hover {
    background: #047857;
    border-color: #047857;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

/* Question Navigator Card */
.quiz-nav-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.quiz-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.quiz-nav-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0F172A;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.quiz-nav-legend {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.74rem;
    color: #64748B;
    font-weight: 500;
}

.quiz-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.quiz-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.quiz-legend-dot.answered { background: #0284C7; }
.quiz-legend-dot.current { background: #F59E0B; }
.quiz-legend-dot.unanswered { background: #CBD5E1; }

.quiz-nav-pills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quiz-nav-pill-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    color: #64748B;
}

.quiz-nav-pill-btn:hover {
    border-color: #94A3B8;
    color: #0F172A;
    transform: translateY(-1px);
}

.quiz-nav-pill-btn.answered {
    background: #0284C7;
    border-color: #0284C7;
    color: #FFFFFF;
}

.quiz-nav-pill-btn.current {
    border-color: #F59E0B;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
    color: #D97706;
    background: #FFFBEB;
    transform: scale(1.06);
}

.quiz-nav-pill-btn.answered.current {
    background: #0284C7;
    border-color: #F59E0B;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.5);
    color: #FFFFFF;
}

/* Modals & Popups for Student Quiz (Exit Warning, Time Expired) */
.quiz-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quiz-modal-content {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.2);
    text-align: center;
    box-sizing: border-box;
}

.quiz-modal-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem auto;
}

.quiz-modal-icon-box.warning {
    background: #FEF3C7;
    color: #D97706;
}

.quiz-modal-icon-box.danger {
    background: #FEE2E2;
    color: #DC2626;
}

.quiz-modal-icon-box.success {
    background: #ECFDF5;
    color: #059669;
}

.quiz-modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 0.5rem;
}

.quiz-modal-text {
    font-size: 0.92rem;
    color: #64748B;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.quiz-modal-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
}

.btn-modal-cancel {
    height: 42px;
    padding: 0 1.25rem;
    border-radius: 10px;
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    color: #475569;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.btn-modal-confirm {
    height: 42px;
    padding: 0 1.4rem;
    border-radius: 10px;
    background: #0284C7;
    border: 1px solid #0284C7;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-confirm:hover {
    background: #0369A1;
}

.btn-modal-danger {
    background: #DC2626;
    border-color: #DC2626;
}

.btn-modal-danger:hover {
    background: #B91C1C;
}

@media (max-width: 640px) {
    .quiz-player-container {
        padding: 0 0.75rem;
        margin-top: 1rem;
    }
    .quiz-question-card {
        padding: 1.5rem 1.25rem;
    }
    .quiz-player-header-card {
        padding: 1rem;
    }
    .quiz-player-top-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .quiz-player-right-tools {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 380px) {
    .quiz-option-card {
        padding: 0.85rem 0.95rem;
        gap: 0.75rem;
    }
}

/* ============================================================
   STUDENT PROFILE ONBOARDING / COMPLETION TWO-COLUMN UI
   ============================================================ */

.profile-completion-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: #F8FAFC;
    background-image: 
        radial-gradient(at 10% 10%, rgba(2, 132, 199, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(59, 130, 246, 0.05) 0px, transparent 50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: profileFadeIn 0.25s ease-out;
}

@keyframes profileFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Compact Top Header Bar */
.profile-completion-header-bar {
    width: 100%;
    height: 64px;
    background: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    box-sizing: border-box;
    flex-shrink: 0;
}

.profile-completion-header-content {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-completion-logo img {
    height: 32px;
    width: auto;
    display: block;
}

.btn-header-back-login {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #64748B;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0.45rem 0.95rem;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    transition: all 0.2s ease;
}

.btn-header-back-login:hover {
    color: #0F172A;
    border-color: #CBD5E1;
    background: #F8FAFC;
}

/* Two-Column Onboarding Card Container */
.profile-completion-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    box-sizing: border-box;
}

.profile-completion-card {
    width: 100%;
    max-width: 1080px;
    background: #FFFFFF;
    border-radius: 26px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.5);
    display: flex;
    overflow: hidden;
    box-sizing: border-box;
    animation: profileCardSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes profileCardSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Visual Branded Panel (40%) */
.profile-panel-left {
    flex: 0 0 40%;
    max-width: 40%;
    background: linear-gradient(145deg, #181F3A 0%, #0F172A 70%, #1E293B 100%);
    color: #FFFFFF;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.profile-panel-left::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.profile-panel-left::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 124, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.profile-left-content {
    position: relative;
    z-index: 2;
}

.profile-brand-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38BDF8;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.profile-left-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 0 0 0.85rem 0;
}

.profile-left-desc {
    font-size: 0.92rem;
    color: #94A3B8;
    line-height: 1.6;
    margin: 0 0 2rem 0;
}

.profile-feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.profile-feature-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #E2E8F0;
}

.profile-feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #38BDF8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-left-footer {
    position: relative;
    z-index: 2;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    color: #64748B;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Right Form Panel (60%) */
.profile-panel-right {
    flex: 0 0 60%;
    max-width: 60%;
    padding: 3rem 2.75rem;
    background: #FFFFFF;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-form-header {
    margin-bottom: 1.75rem;
}

.profile-eyebrow {
    font-size: 0.74rem;
    font-weight: 800;
    color: #0284C7;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.35rem;
}

.profile-form-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.02em;
}

.profile-form-subtitle {
    font-size: 0.88rem;
    color: #64748B;
    margin: 0;
    line-height: 1.5;
}

/* Form Layout 2-Column Grid */
.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem 1.25rem;
}

.form-grid-full {
    grid-column: 1 / -1;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.profile-field label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1E293B;
    letter-spacing: 0.01em;
}

.profile-field input[type="text"],
.profile-field input[type="email"],
.profile-field input[type="tel"],
.profile-field select {
    width: 100%;
    height: 50px;
    padding: 0 1rem;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    font-size: 0.92rem;
    font-family: inherit;
    color: #0F172A;
    background: #FFFFFF;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.profile-field input:focus,
.profile-field select:focus {
    border-color: #0284C7;
    box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.12);
}

.profile-field input:disabled,
.profile-field input[readonly] {
    background: #F8FAFC;
    color: #64748B;
    border-color: #E2E8F0;
    cursor: not-allowed;
    font-weight: 600;
}

.profile-field select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.95rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Compact Chip Avatar Selector */
.compact-avatar-selector {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.25rem;
}

.avatar-option-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 0.4rem;
    border-radius: 14px;
    border: 1.5px solid #E2E8F0;
    background: #F8FAFC;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    text-align: center;
}

.avatar-option-item:hover {
    border-color: #93C5FD;
    background: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.avatar-option-item.selected-item {
    border-color: #0284C7;
    background: #F0F9FF;
    box-shadow: 0 0 0 1px #0284C7, 0 4px 14px rgba(2, 132, 199, 0.15);
}

.avatar-option-card {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #CBD5E1;
    background: #FFFFFF;
    overflow: visible;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-option-card img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-option-card .avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #FFFFFF;
}

.avatar-option-card.selected {
    border-color: #0284C7;
}

.avatar-option-card.selected::after {
    content: '✓';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #0284C7;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.avatar-option-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.01em;
}

.avatar-option-item.selected-item .avatar-option-label {
    color: #0284C7;
    font-weight: 700;
}

/* Primary Completion Action */
.btn-complete-profile {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
    border: none;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.25);
    margin-top: 0.5rem;
}

.btn-complete-profile:hover {
    background: linear-gradient(135deg, #0369A1 0%, #075985 100%);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
    transform: translateY(-2px);
}

.profile-helper-note {
    font-size: 0.8rem;
    color: #94A3B8;
    text-align: center;
    margin: 0.85rem 0 0 0;
}

/* Responsive Media Queries */
@media (max-width: 991px) {
    .profile-completion-card {
        flex-direction: column;
        max-width: 680px;
    }

    .profile-panel-left {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 2.25rem 2rem;
    }

    .profile-panel-right {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 2.25rem 2rem;
    }

    .profile-left-footer {
        display: none;
    }
}

@media (max-width: 640px) {
    .profile-completion-header-bar {
        padding: 0 1rem;
        height: 56px;
    }

    .profile-completion-body {
        padding: 1.25rem 1rem;
    }

    .profile-completion-card {
        border-radius: 20px;
    }

    .profile-panel-left {
        padding: 1.75rem 1.25rem;
    }

    .profile-left-title {
        font-size: 1.45rem;
    }

    .profile-left-desc {
        margin-bottom: 1.25rem;
    }

    .profile-panel-right {
        padding: 1.75rem 1.25rem;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .compact-avatar-selector {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.4rem;
    }

    .avatar-option-item {
        padding: 0.45rem 0.2rem;
    }

    .avatar-option-card {
        width: 38px;
        height: 38px;
    }

    .avatar-option-label {
        font-size: 0.68rem;
    }
}

@media (max-width: 440px) {
    .compact-avatar-selector {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================
   STUDENT QUIZ RESULTS PAGE STYLES (student-result.html)
   ============================================================ */

.result-hero-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 2.25rem 2.5rem;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.02);
    margin-bottom: 2rem;
    box-sizing: border-box;
}

.result-badge-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.result-status-badge {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.result-attempt-badge {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.result-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.3;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.02em;
}

.result-meta-time {
    font-size: 0.88rem;
    color: #64748B;
    margin-bottom: 1.75rem;
}

.result-score-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.result-score-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 1.15rem 0.85rem;
    text-align: center;
    transition: all 0.2s ease;
}

.result-score-box.highlight-box {
    background: #F0F9FF;
    border: 1.5px solid #BAE6FD;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
}

.result-score-lbl {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.result-score-val {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.15;
}

.result-score-val.highlight-val {
    font-size: 1.65rem;
    color: #0284C7;
}

.result-score-val.bonus-val {
    color: #059669;
}

.result-score-val.leaderboard-val {
    color: #181F3A;
}

.result-score-sub {
    display: block;
    font-size: 0.72rem;
    color: #94A3B8;
    font-weight: 500;
    margin-top: 0.3rem;
}

.result-performance-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.75rem;
}

.result-perf-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: #475569;
}

.result-perf-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.dot-correct { background: #10B981; }
.dot-wrong { background: #EF4444; }
.dot-unanswered { background: #94A3B8; }

.result-actions-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.result-review-header {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.result-review-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.01em;
}

.result-review-subtitle {
    font-size: 0.88rem;
    color: #64748B;
    margin: 0;
}

.result-questions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.res-question-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.65rem 1.85rem;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.03);
    transition: border-color 0.2s ease;
}

.res-question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #F1F5F9;
}

.res-q-meta-left {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.res-q-meta-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.res-q-number {
    font-size: 0.88rem;
    font-weight: 800;
    color: #181F3A;
}

.res-status-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}

.pill-correct {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.pill-wrong {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.pill-unanswered {
    background: #F1F5F9;
    color: #64748B;
    border: 1px solid #E2E8F0;
}

.res-speed-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: #FEF3C7;
    color: #D97706;
    border: 1px solid #FDE68A;
}

.res-q-marks {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0284C7;
}

.res-q-time {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748B;
}

.res-question-prompt {
    font-size: 1rem;
    font-weight: 600;
    color: #0F172A;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.res-question-image-wrap {
    max-width: 480px;
    margin-bottom: 1.25rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
}

.res-question-code-block {
    background: #0F172A;
    color: #F8FAFC;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.86rem;
    line-height: 1.5;
}

.res-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.res-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.15rem;
    border-radius: 12px;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.res-option-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.res-option-letter {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    flex-shrink: 0;
}

.res-option-text {
    font-weight: 500;
    line-height: 1.45;
}

.res-opt-neutral {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    color: #334155;
}

.res-opt-neutral .res-option-letter {
    background: #F1F5F9;
    color: #475569;
}

.res-opt-correct {
    background: #ECFDF5;
    border: 1.5px solid #10B981;
    color: #065F46;
    font-weight: 600;
}

.res-opt-correct .res-option-letter {
    background: #10B981;
    color: #FFFFFF;
}

.res-opt-wrong {
    background: #FEF2F2;
    border: 1.5px solid #EF4444;
    color: #991B1B;
    font-weight: 600;
}

.res-opt-wrong .res-option-letter {
    background: #EF4444;
    color: #FFFFFF;
}

.res-opt-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.res-opt-tag.tag-correct {
    background: #D1FAE5;
    color: #047857;
}

.res-opt-tag.tag-wrong {
    background: #FEE2E2;
    color: #B91C1C;
}

.res-explanation-container {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-left: 4px solid #0284C7;
    border-radius: 10px;
    padding: 1.15rem 1.25rem;
    margin-top: 1rem;
}

.res-explanation-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #0284C7;
    margin-bottom: 0.45rem;
}

.res-explanation-text {
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.6;
    margin: 0;
}

.res-solution-image-wrap {
    max-width: 480px;
    margin-top: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #CBD5E1;
}

@media (max-width: 768px) {
    .result-score-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .result-hero-card {
        padding: 1.75rem 1.25rem;
    }
    .res-question-card {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 480px) {
    .result-score-grid {
        grid-template-columns: 1fr;
    }
    .result-performance-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ============================================================
   STUDENT QUIZ HISTORY & RESULTS MODULE (Dashboard)
   ============================================================ */

.history-summary-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
}

.history-summary-item {
    text-align: center;
}

.history-sum-val {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #181F3A;
    line-height: 1.15;
}

.history-sum-val.highlight {
    color: #0284C7;
}

.history-sum-val.bonus {
    color: #059669;
}

.history-sum-lbl {
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    color: #64748B;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.quiz-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.quiz-history-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.35rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    transition: all 0.22s ease;
}

.quiz-history-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px -4px rgba(2, 132, 199, 0.1), 0 4px 12px rgba(15, 23, 42, 0.03);
    border-color: #BAE6FD;
}

.history-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.history-quiz-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.35;
    margin: 0 0 0.35rem 0;
}

.history-date-sub {
    font-size: 0.76rem;
    color: #64748B;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.history-attempt-pill {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.history-score-box-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    text-align: center;
}

.history-metric-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0F172A;
    display: block;
}

.history-metric-val.score-val {
    color: #0284C7;
}

.history-metric-val.bonus-val {
    color: #059669;
}

.history-metric-lbl {
    font-size: 0.66rem;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 2px;
    display: block;
}

.btn-history-view {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    height: 40px;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    color: #0284C7;
    font-size: 0.86rem;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-history-view:hover {
    background: #0284C7;
    border-color: #0284C7;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

@media (max-width: 640px) {
    .history-summary-strip {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .quiz-history-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   STUDENT ACADEMIC PROGRESS & LEARNING ANALYTICS (Phase 3D)
   ============================================================ */

.progress-section-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    padding: 1.5rem;
    margin-bottom: 2.25rem;
    box-sizing: border-box;
}

.progress-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.progress-metric-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.progress-metric-card:hover {
    background: #FFFFFF;
    border-color: #BAE6FD;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.progress-metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.progress-metric-lbl {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.progress-metric-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.progress-metric-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.2;
}

.progress-metric-val.highlight {
    color: #0284C7;
}

.progress-metric-val.best {
    color: #059669;
}

.progress-metric-sub {
    font-size: 0.75rem;
    color: #94A3B8;
    margin-top: 0.25rem;
}

/* Trend Panel & SVG Chart Area */
.progress-trend-panel {
    background: #FAFCFF;
    border: 1px solid #E0F2FE;
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.progress-trend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.progress-trend-title-box h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 0.2rem 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.progress-trend-title-box p {
    font-size: 0.8rem;
    color: #64748B;
    margin: 0;
}

/* Trend Status Badge */
.progress-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.progress-status-badge.improving {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.progress-status-badge.consistent {
    background: #EFF6FF;
    color: #0284C7;
    border: 1px solid #BAE6FD;
}

.progress-status-badge.revision {
    background: #FFFBEB;
    color: #D97706;
    border: 1px solid #FDE68A;
}

.progress-status-badge.preliminary {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
}

/* Responsive SVG Chart Container */
.progress-chart-wrapper {
    position: relative;
    width: 100%;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 1rem 0.75rem 0.5rem;
    box-sizing: border-box;
    overflow: hidden;
}

.progress-svg-chart {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

/* Chart Tooltip Overlay */
.progress-chart-tooltip {
    position: absolute;
    top: 10px;
    right: 12px;
    background: #181F3A;
    color: #FFFFFF;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-size: 0.76rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 10;
    max-width: 240px;
}

.progress-chart-tooltip-title {
    font-weight: 700;
    margin-bottom: 0.15rem;
    color: #38BDF8;
}

/* Recent Attempts & Secondary Analytics Strip */
.progress-lower-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.25rem;
}

.progress-subcard {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
}

.progress-subcard-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #181F3A;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.progress-recent-item {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: all 0.18s ease;
}

.progress-recent-item:hover {
    border-color: #BAE6FD;
    transform: translateX(2px);
}

.progress-recent-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.progress-recent-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-recent-meta {
    font-size: 0.72rem;
    color: #64748B;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.progress-recent-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.progress-recent-perc {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0284C7;
}

.progress-recent-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    color: #0284C7;
    text-decoration: none;
    transition: all 0.18s ease;
}

.progress-recent-link:hover {
    background: #0284C7;
    color: #FFFFFF;
}

/* Marks Breakdown Card Content */
.progress-marks-box {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
}

.progress-marks-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.progress-marks-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0F172A;
}

.progress-marks-lbl {
    font-size: 0.75rem;
    color: #64748B;
}

.progress-bar-track {
    width: 100%;
    height: 6px;
    background: #E2E8F0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284C7 0%, #38BDF8 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Responsive Breakpoints for Progress Module */
@media (max-width: 991px) {
    .progress-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .progress-lower-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .progress-metrics-grid {
        grid-template-columns: 1fr;
    }
    .progress-section-card {
        padding: 1.15rem;
    }
    .progress-trend-panel {
        padding: 1.15rem 1rem;
    }
}

/* ============================================================
   ICTONE — Student Leaderboard Component Styles
   ============================================================ */
.leaderboard-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Header & Controls */
.leaderboard-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.leaderboard-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.leaderboard-controls-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Segmented Scope Switcher */
.leaderboard-scope-toggle {
    display: inline-flex;
    background: #F1F5F9;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
}

.leaderboard-scope-btn {
    border: none;
    background: transparent;
    padding: 0.45rem 0.9rem;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s ease;
}

.leaderboard-scope-btn:hover {
    color: #0F172A;
}

.leaderboard-scope-btn.active {
    background: #FFFFFF;
    color: #0284C7;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Filter Controls */
.leaderboard-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.leaderboard-select {
    height: 36px;
    padding: 0 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1E293B;
    background-color: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.leaderboard-select:focus {
    border-color: #0284C7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.leaderboard-select:disabled {
    background-color: #F8FAFC;
    color: #94A3B8;
    cursor: not-allowed;
}

/* Current Student Highlight Card */
.leaderboard-user-card {
    background: linear-gradient(135deg, #181F3A 0%, #1E293B 100%);
    color: #FFFFFF;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(24, 31, 58, 0.18);
    position: relative;
    overflow: hidden;
}

.leaderboard-user-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.leaderboard-user-left {
    display: flex;
    align-items: center;
    gap: 1.15rem;
}

.leaderboard-user-avatar {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.leaderboard-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leaderboard-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.leaderboard-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(56, 189, 248, 0.2);
    color: #38BDF8;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    width: fit-content;
}

.leaderboard-user-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.2;
}

.leaderboard-user-grade {
    font-size: 0.78rem;
    color: #94A3B8;
}

.leaderboard-user-metrics {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.leaderboard-user-metric-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.leaderboard-user-metric-label {
    font-size: 0.7rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.leaderboard-user-metric-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #FFFFFF;
}

.leaderboard-user-rank-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(2, 132, 199, 0.25);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 12px;
    padding: 0.5rem 1.15rem;
    min-width: 76px;
}

.leaderboard-user-rank-lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #38BDF8;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.leaderboard-user-rank-val {
    font-size: 1.35rem;
    font-weight: 900;
    color: #FFFFFF;
}

/* Empty User Banner */
.leaderboard-user-empty {
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.leaderboard-user-empty-text {
    font-size: 0.85rem;
    color: #64748B;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Podium / Top 3 Cards Grid */
.leaderboard-podium-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.podium-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.podium-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.podium-card.rank-1 {
    border-color: #FCD34D;
    background: linear-gradient(180deg, #FFFDF5 0%, #FFFFFF 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
}

.podium-card.rank-2 {
    border-color: #CBD5E1;
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
}

.podium-card.rank-3 {
    border-color: #FDBA74;
    background: linear-gradient(180deg, #FFFBF7 0%, #FFFFFF 100%);
}

.podium-card.is-current {
    outline: 2px solid #0284C7;
    outline-offset: 1px;
}

.podium-badge {
    position: absolute;
    top: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 800;
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.podium-badge.rank-1 { background: #EAB308; }
.podium-badge.rank-2 { background: #94A3B8; }
.podium-badge.rank-3 { background: #F97316; }

.podium-avatar-wrap {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    margin-top: 0.4rem;
    margin-bottom: 0.75rem;
    background: #F1F5F9;
    border: 2px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.podium-card.rank-1 .podium-avatar-wrap { border-color: #FCD34D; }
.podium-card.rank-2 .podium-avatar-wrap { border-color: #CBD5E1; }
.podium-card.rank-3 .podium-avatar-wrap { border-color: #FDBA74; }

.podium-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.podium-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.podium-grade {
    font-size: 0.75rem;
    color: #64748B;
    margin-bottom: 0.65rem;
}

.podium-score-box {
    margin-top: auto;
    background: #F8FAFC;
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #E2E8F0;
}

.podium-score-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0284C7;
}

.podium-score-lbl {
    font-size: 0.68rem;
    color: #64748B;
    font-weight: 600;
}

/* Rankings Table / List */
.leaderboard-table-wrap {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
    text-align: left;
}

.leaderboard-table thead th {
    background: #F8FAFC;
    color: #64748B;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #E2E8F0;
}

.leaderboard-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #F1F5F9;
    color: #334155;
    vertical-align: middle;
}

.leaderboard-table tbody tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tbody tr:hover td {
    background-color: #F8FAFC;
}

.leaderboard-table tbody tr.is-current td {
    background-color: #F0F9FF;
}

.leaderboard-table tbody tr.is-current {
    font-weight: 600;
}

.leaderboard-rank-cell {
    font-weight: 800;
    color: #64748B;
    width: 50px;
}

.leaderboard-student-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.leaderboard-row-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.leaderboard-row-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leaderboard-row-name {
    font-weight: 700;
    color: #0F172A;
}

.leaderboard-score-highlight {
    font-weight: 800;
    color: #0284C7;
}

/* States: Loading, Empty, Error */
.leaderboard-state-card {
    background: #FFFFFF;
    border: 1px dashed #CBD5E1;
    border-radius: 12px;
    padding: 3rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.leaderboard-state-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1E293B;
}

.leaderboard-state-sub {
    font-size: 0.82rem;
    color: #64748B;
    max-width: 400px;
}

/* Skeleton Loading State */
.leaderboard-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-box {
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Media Queries */
@media (max-width: 991px) {
    .leaderboard-podium-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .leaderboard-user-card {
        padding: 1.15rem;
    }

    .leaderboard-user-metrics {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .leaderboard-header-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .leaderboard-controls-wrap {
        width: 100%;
        justify-content: space-between;
    }

    .leaderboard-podium-grid {
        grid-template-columns: 1fr;
    }

    .leaderboard-user-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .leaderboard-user-metrics {
        width: 100%;
        justify-content: space-between;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .leaderboard-user-metric-item {
        align-items: flex-start;
    }

    .leaderboard-table-wrap {
        overflow-x: auto;
    }

    .leaderboard-table {
        min-width: 540px;
    }
}

/* ============================================================
   Student LMS Resource Explorer Component (Step 9 - Phase 2)
   ============================================================ */

.student-resource-toolbar {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.student-resource-category-pills {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}

.student-resource-category-pills::-webkit-scrollbar {
    height: 4px;
}

.student-resource-category-pills::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.res-cat-btn {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.res-cat-btn:hover {
    background: #E2E8F0;
    color: #181F3A;
}

.res-cat-btn.active {
    background: #0284C7;
    color: #FFFFFF;
    border-color: #0284C7;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.student-resource-filters-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.student-resource-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.student-resource-search-wrap input {
    width: 100%;
    height: 38px;
    padding: 0 0.85rem 0 2.2rem;
    border: 1.5px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.84rem;
    font-family: inherit;
    background: #FFFFFF;
    color: #181F3A;
    outline: none;
    transition: all 0.18s ease;
}

.student-resource-search-wrap input:focus {
    border-color: #0284C7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.student-resource-selects-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.student-resource-select {
    height: 38px;
    padding: 0 1.75rem 0 0.75rem;
    border: 1.5px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    background-color: #FFFFFF;
    color: #181F3A;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 0.85rem;
    transition: border-color 0.18s ease;
}

.student-resource-select:focus {
    border-color: #0284C7;
}

@media (max-width: 768px) {
    .student-resource-filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .student-resource-search-wrap {
        width: 100%;
        min-width: 0;
    }

    .student-resource-selects-wrap {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .student-resource-select {
        width: 100%;
        font-size: 0.76rem;
        padding-left: 0.5rem;
        padding-right: 1.4rem;
    }
}

@media (max-width: 480px) {
    .student-resource-selects-wrap {
        grid-template-columns: 1fr;
    }
}

/* ── Sticky Header Anchor Scroll Margin for Student Dashboard ── */
#quizzes-section,
#results-section,
#progress-section,
#resources-section,
#leaderboard-section {
    scroll-margin-top: 85px;
}

/* ── Practical Lab Styles ── */
.lab-hero {
    padding: 7.5rem 0 3.5rem;
    position: relative;
    background: linear-gradient(180deg, var(--bg-soft-blue) 0%, var(--bg-white) 100%);
    overflow: hidden;
}

.lab-hero-content {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.lab-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1.25rem;
    line-height: 1.15;
}

.lab-hero p {
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.lab-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.lab-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.95rem;
    background: rgba(79, 124, 255, 0.08);
    border: 1px solid rgba(79, 124, 255, 0.18);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
    margin-top: 2rem;
}

.lab-card {
    background: var(--bg-white);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.lab-card:hover {
    transform: translateY(-8px);
    border-color: rgba(79, 124, 255, 0.35);
    box-shadow: var(--shadow-elevated);
}

.lab-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.lab-icon-box {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    background: var(--bg-soft-blue);
    border: 1px solid rgba(79, 124, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    transition: var(--transition-smooth);
}

.lab-card:hover .lab-icon-box {
    transform: translateY(-3px) scale(1.06);
    background: rgba(79, 124, 255, 0.14);
    box-shadow: 0 6px 16px rgba(79, 124, 255, 0.15);
}

.lab-category-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-pill);
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.lab-card h3 {
    font-size: 1.35rem;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.lab-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.lab-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

.lab-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #D97706;
    background: #FEF3C7;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.lab-status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #D97706;
}

.lab-status-badge.available {
    color: #15803D;
    background: #DCFCE7;
    border-color: rgba(34, 197, 94, 0.3);
}

.lab-status-badge.available::before {
    background: #16A34A;
}

.lab-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-blue);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-fast);
}

.lab-card:hover .lab-btn-action {
    gap: 0.65rem;
    color: var(--primary-dark);
}

/* ── How It Works Section ── */
.lab-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.lab-step-card {
    background: var(--bg-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    position: relative;
    box-shadow: var(--shadow-xs);
    transition: var(--transition-smooth);
}

.lab-step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-sm);
    border-color: rgba(79, 124, 255, 0.25);
}

.lab-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-pill);
    background: var(--primary-dark);
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
}

.lab-step-card h3 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 0.6rem;
}

.lab-step-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Homepage Practical Lab Workspace Promo Section ── */
.home-lab-section {
    padding: 5rem 0;
    background: var(--bg-white);
    position: relative;
}

.home-lab-card {
    background: linear-gradient(135deg, #0d1326 0%, #181F3A 55%, #0F172A 100%);
    border-radius: var(--radius-xl);
    padding: clamp(2rem, 4.5vw, 3.5rem);
    color: var(--text-white);
    display: grid;
    grid-template-columns: 0.95fr 1.35fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(56, 189, 248, 0.05);
}

/* Subtle tech grid & circuit background */
.home-lab-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(rgba(56, 189, 248, 0.09) 1px, transparent 1px),
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 24px 24px, 48px 48px, 48px 48px;
    opacity: 0.85;
    pointer-events: none;
}

/* Ambient glow accent */
.home-lab-card::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 50%;
    height: 140%;
    background: radial-gradient(circle, rgba(79, 124, 255, 0.18) 0%, rgba(56, 189, 248, 0.08) 45%, transparent 75%);
    pointer-events: none;
}

.home-lab-text {
    position: relative;
    z-index: 2;
}

.home-lab-eyebrow {
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.28) !important;
    color: #38BDF8 !important;
    margin-bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-lab-eyebrow .pulse-dot {
    background: #38BDF8 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
}

.home-lab-text h2 {
    color: var(--text-white);
    font-size: clamp(1.85rem, 3.2vw, 2.5rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin-bottom: 1.15rem;
}

.home-lab-text p {
    color: rgba(226, 232, 240, 0.88);
    font-size: 1.02rem;
    line-height: 1.65;
    margin-bottom: 2rem;
    max-width: 480px;
}

.home-lab-cta-wrap {
    display: flex;
    align-items: center;
}

.home-lab-cta-btn {
    background: #FFFFFF !important;
    color: #0F172A !important;
    border: 1px solid #FFFFFF !important;
    font-weight: 700;
    padding: 0.85rem 1.75rem;
    font-size: 0.95rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth), background-color 0.2s ease;
}

.home-lab-cta-btn:hover {
    background: #F8FAFC !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* ── Lab Workspace Preview (Right Column) ── */
.home-lab-visual {
    position: relative;
    z-index: 2;
    width: 100%;
}

.home-lab-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    width: 100%;
}

.home-lab-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease,
                background-color 0.25s ease,
                box-shadow 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.home-lab-item:hover {
    transform: translateY(-2.5px);
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 16px rgba(56, 189, 248, 0.15);
}

.home-lab-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.2rem;
}

.home-lab-item-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.22);
    color: #38BDF8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.home-lab-item:hover .home-lab-item-icon {
    transform: scale(1.06);
    background: rgba(56, 189, 248, 0.2);
    color: #7DD3FC;
}

.home-lab-item-tag {
    font-size: 0.7rem;
    font-weight: 600;
    font-family: 'SF Mono', Consolas, Monaco, monospace;
    color: #94A3B8;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-xs);
    letter-spacing: 0.02em;
}

.home-lab-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    letter-spacing: -0.01em;
}

.home-lab-item-desc {
    font-size: 0.78rem;
    color: #94A3B8;
    line-height: 1.35;
}

/* ── Coming Soon Modal / Toast ── */
.lab-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(24, 31, 58, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lab-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lab-modal-card {
    background: var(--bg-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-float);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.lab-modal-overlay.active .lab-modal-card {
    transform: scale(1) translateY(0);
}

.lab-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    background: #FEF3C7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D97706;
    font-size: 1.75rem;
}

.lab-modal-card h3 {
    font-size: 1.45rem;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.lab-modal-card p {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.lab-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-secondary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: var(--transition-fast);
}

.lab-modal-close:hover {
    background: var(--bg-soft-blue);
    color: var(--primary-dark);
}

/* ── Mobile & Tablet Adjustments for Lab ── */
@media (max-width: 1024px) {
    .lab-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }
    .home-lab-card {
        grid-template-columns: 1fr;
        gap: 2.25rem;
        text-align: left;
    }
    .home-lab-text p {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .lab-hero {
        padding: 6.5rem 0 2.5rem;
    }
    .lab-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .lab-steps-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .lab-card {
        padding: 1.75rem 1.5rem;
    }
    .home-lab-section {
        padding: 3.5rem 0;
    }
    .home-lab-card {
        padding: 1.75rem 1.25rem;
        border-radius: var(--radius-lg);
    }
    .home-lab-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }
    .home-lab-item {
        padding: 0.85rem 0.85rem;
    }
    .home-lab-item-title {
        font-size: 0.88rem;
    }
    .home-lab-item-desc {
        font-size: 0.74rem;
    }
}

@media (max-width: 480px) {
    .home-lab-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
    .home-lab-cta-wrap,
    .home-lab-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── Mobile Scroll & Motion Optimizations ── */
@media (max-width: 768px) {
    .reveal-left {
        transform: translateX(-18px);
    }
    .reveal-right {
        transform: translateX(18px);
    }
    .reveal-up,
    .reveal {
        transform: translateY(20px);
    }
    .reveal-scale {
        transform: scale(0.97) translateY(10px);
    }
    .reveal-stagger > * {
        transform: translateY(18px) scale(0.98);
    }
}

/* ── Accessibility: Prefers Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal,
    .reveal-up,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-stagger > *,
    .animate-fade-in-up,
    .hero-text .eyebrow,
    .hero-text h1,
    .hero-text p,
    .hero-buttons,
    .hero-countdown-wrapper,
    .hero-visual,
    .lab-card,
    .lab-modal-card {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================================
   ICTONE PRACTICAL LAB — HTML LAB WORKSPACE STYLES
   Simple W3Schools Tryit Editor Layout
   ============================================================ */

.html-lab-page {
    background-color: var(--bg-secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.html-lab-main {
    padding-top: 5.25rem;
    padding-bottom: 3rem;
    flex: 1 0 auto;
}

/* ── Workspace Header (Top Bar) ── */
.lab-workspace-header {
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.85rem 1.5rem;
    box-shadow: 0 1px 3px rgba(24, 31, 58, 0.04);
}

.lab-workspace-header-inner {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.lab-workspace-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.lab-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    transition: var(--transition-fast);
}

.lab-back-link:hover {
    color: var(--primary-dark);
    background: var(--bg-soft-blue);
    border-color: rgba(79, 124, 255, 0.3);
}

.lab-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.lab-page-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
}

.lab-tag-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    background: #DCFCE7;
    color: #15803D;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lab-page-subtitle {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin: 0;
    display: inline-block;
}

/* ── Workspace Action Toolbar ── */
.lab-workspace-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.lab-actions-divider {
    width: 1px;
    height: 24px;
    background: var(--border-medium);
    margin: 0 0.25rem;
}

.btn-lab-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: var(--bg-white);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
    user-select: none;
}

.btn-lab-action:hover {
    background: var(--bg-soft-blue);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.btn-lab-action:active {
    transform: translateY(1px);
}

.btn-lab-secondary {
    color: var(--text-muted);
}

.btn-lab-secondary:hover {
    color: var(--primary-dark);
}

.btn-lab-run {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.52rem 1.35rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #FFFFFF;
    background: #16A34A;
    border: 1px solid #15803D;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.28);
    transition: var(--transition-fast);
    font-family: inherit;
}

.btn-lab-run:hover {
    background: #15803D;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.38);
    transform: translateY(-1px);
}

.btn-lab-run:active {
    transform: translateY(1px);
}

.btn-lab-shortcut {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    margin-left: 0.25rem;
}

.btn-feedback-active {
    background: #EFF6FF !important;
    color: #2563EB !important;
    border-color: #2563EB !important;
}

/* ── Mobile Workspace Tabs ── */
.lab-mobile-tabs {
    display: none;
    margin-top: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
    gap: 0.25rem;
}

.lab-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 600;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
    position: relative;
}

.lab-tab-btn.active {
    background: #FFFFFF;
    color: var(--primary-dark);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.lab-tab-dot {
    width: 8px;
    height: 8px;
    background: #22C55E;
    border-radius: 50%;
    display: inline-block;
    animation: pulseGlow 1.5s infinite;
}

/* ── Workspace Body (W3Schools Tryit Editor Fixed Working Height) ── */
.lab-workspace-body {
    max-width: 1700px;
    margin: 1.25rem auto 0;
    height: 560px;
    display: flex;
    background: #0F172A;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    border: 1px solid var(--border-medium);
    overflow: hidden;
    position: relative;
    width: calc(100% - 3rem);
}

.lab-panel {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.lab-editor-panel {
    background: #141A30;
}

.lab-panel-header {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    background: #181F3A;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    flex: 0 0 38px;
    user-select: none;
    z-index: 3;
}

.lab-panel-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94A3B8;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.lab-panel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38BDF8;
}

.editor-lang-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: #38BDF8;
    background: rgba(56, 189, 248, 0.12);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

/* ── CodeMirror Editor Host (Fills Entire Editor Panel) ── */
.lab-editor-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    height: calc(100% - 38px - 32px);
    width: 100%;
    background: #141A30;
    position: relative;
    overflow: hidden;
}

/* CodeMirror 5 Container: Full 100% Height Without Bottom Cut-off */
.lab-editor-wrapper .CodeMirror {
    height: 100% !important;
    min-height: 100% !important;
    width: 100% !important;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    background: #141A30 !important;
    color: #E2E8F0 !important;
    cursor: text;
}

.lab-editor-wrapper .CodeMirror-scroll {
    height: 100% !important;
    min-height: 100% !important;
}

.lab-editor-wrapper .CodeMirror-gutters {
    min-height: 100% !important;
    height: 100% !important;
    background-color: #0F1426 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-right: 6px;
}

.lab-editor-wrapper .CodeMirror-linenumber {
    color: #64748B !important;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0 4px 0 6px;
}

.lab-editor-wrapper .CodeMirror-cursor {
    border-left: 2px solid #38BDF8 !important;
}

.lab-editor-wrapper .CodeMirror-selected,
.lab-editor-wrapper .CodeMirror-selectedtext {
    background: rgba(79, 124, 255, 0.35) !important;
}

.lab-editor-wrapper .CodeMirror-matchingtag {
    background: rgba(56, 189, 248, 0.25) !important;
    border-bottom: 1px solid #38BDF8;
}

.lab-editor-wrapper .CodeMirror-matchingbracket {
    color: #38BDF8 !important;
    font-weight: bold;
    border-bottom: 1px solid #38BDF8;
}

/* ── ICTONE Custom CodeMirror Dark Syntax Highlighting Theme ── */
/* DOCTYPE & Meta Declarations */
.lab-editor-wrapper .CodeMirror .cm-meta {
    color: #94A3B8 !important;
    font-weight: 600;
    font-style: italic;
}

/* HTML Tags (e.g. <html>, <head>, <body>, <h1>, <p>, <table>, <div>, etc.) */
.lab-editor-wrapper .CodeMirror .cm-tag,
.lab-editor-wrapper .cm-s-material-darker .cm-tag {
    color: #F43F5E !important; /* Vivid Coral Rose */
    font-weight: 600;
}

/* Angle Brackets (<, >, </, />) */
.lab-editor-wrapper .CodeMirror .cm-bracket,
.lab-editor-wrapper .cm-s-material-darker .cm-bracket {
    color: #94A3B8 !important;
    font-weight: 500;
}

/* HTML Attributes (e.g. class, id, style, href, src, title, lang, etc.) */
.lab-editor-wrapper .CodeMirror .cm-attribute,
.lab-editor-wrapper .cm-s-material-darker .cm-attribute {
    color: #FBBF24 !important; /* Warm Amber Gold */
    font-weight: 500;
}

/* Strings / Attribute Values (e.g. "title", "https://...", '#2563eb') */
.lab-editor-wrapper .CodeMirror .cm-string,
.lab-editor-wrapper .CodeMirror .cm-string-2,
.lab-editor-wrapper .cm-s-material-darker .cm-string,
.lab-editor-wrapper .cm-s-material-darker .cm-string-2 {
    color: #34D399 !important; /* Emerald Green */
    font-weight: 400;
}

/* HTML & CSS Comments */
.lab-editor-wrapper .CodeMirror .cm-comment,
.lab-editor-wrapper .cm-s-material-darker .cm-comment {
    color: #64748B !important; /* Muted Slate */
    font-style: italic;
}

/* CSS Properties (e.g. font-family, margin, color, padding, background) */
.lab-editor-wrapper .CodeMirror .cm-property,
.lab-editor-wrapper .cm-s-material-darker .cm-property {
    color: #38BDF8 !important; /* Sky Blue */
    font-weight: 500;
}

/* CSS Qualifiers / Classes (e.g. .highlight-card, .btn) */
.lab-editor-wrapper .CodeMirror .cm-qualifier,
.lab-editor-wrapper .cm-s-material-darker .cm-qualifier {
    color: #FBBF24 !important; /* Gold */
    font-weight: 600;
}

/* CSS & JS Keywords / Built-ins */
.lab-editor-wrapper .CodeMirror .cm-keyword,
.lab-editor-wrapper .CodeMirror .cm-builtin,
.lab-editor-wrapper .cm-s-material-darker .cm-keyword,
.lab-editor-wrapper .cm-s-material-darker .cm-builtin {
    color: #C084FC !important; /* Light Violet / Purple */
    font-weight: 600;
}

/* Numbers & Dimensions (e.g. 20px, 1.6, 4px, 100%) */
.lab-editor-wrapper .CodeMirror .cm-number,
.lab-editor-wrapper .cm-s-material-darker .cm-number {
    color: #FB923C !important; /* Warm Orange */
}

/* Atoms, Hex Colors, Booleans (e.g. #eff6ff, #2563eb, true) */
.lab-editor-wrapper .CodeMirror .cm-atom,
.lab-editor-wrapper .cm-s-material-darker .cm-atom {
    color: #A78BFA !important; /* Lilac Violet */
}

/* CSS / JS Operators & Punctuation */
.lab-editor-wrapper .CodeMirror .cm-operator,
.lab-editor-wrapper .cm-s-material-darker .cm-operator {
    color: #CBD5E1 !important;
}

.lab-editor-wrapper .CodeMirror .cm-def,
.lab-editor-wrapper .cm-s-material-darker .cm-def {
    color: #60A5FA !important; /* Blue */
}

.lab-editor-wrapper .CodeMirror .cm-variable,
.lab-editor-wrapper .CodeMirror .cm-variable-2,
.lab-editor-wrapper .cm-s-material-darker .cm-variable,
.lab-editor-wrapper .cm-s-material-darker .cm-variable-2 {
    color: #E2E8F0 !important;
}

.lab-editor-wrapper .CodeMirror .cm-error,
.lab-editor-wrapper .cm-s-material-darker .cm-error {
    color: #EF4444 !important;
    background: rgba(239, 68, 68, 0.15) !important;
}

/* Fallback textarea styling if CodeMirror CDN fails */
.lab-editor-wrapper textarea#codeEditor {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    background: #141A30;
    color: #E2E8F0;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;
    font-size: 0.92rem;
    line-height: 1.6;
    padding: 1rem;
    border: none;
    outline: none;
    resize: none;
    box-sizing: border-box;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Status Bar below Editor (Small & Compact: 32px) */
.lab-status-bar {
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    background: #0F1426;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    font-size: 0.76rem;
    color: #94A3B8;
    flex: 0 0 32px;
    overflow: hidden;
    z-index: 3;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.status-indicator-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #64748B;
}

.status-indicator-dot.status-success {
    background: #22C55E;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.status-indicator-dot.status-warning {
    background: #F59E0B;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    max-width: 65%;
}

.status-warning-pill {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Resizer Divider ── */
.lab-resizer {
    width: 6px;
    background: #1E293B;
    cursor: col-resize;
    transition: background 0.2s;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}

.lab-resizer:hover,
.lab-resizer:active {
    background: #4F7CFF;
}

.lab-resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
}

/* ── Live Preview Panel (Matching Same Height White Canvas) ── */
.lab-preview-panel {
    background: #FFFFFF;
    border-left: 1px solid var(--border-medium);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

.lab-preview-panel .lab-panel-header {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    flex: 0 0 38px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
}

.lab-preview-panel .lab-panel-label {
    color: #475569;
}

.lab-preview-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    padding: 0.25rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
}

.lab-preview-tool-btn:hover {
    background: #FFFFFF;
    color: var(--primary-dark);
    border-color: #94A3B8;
}

.lab-preview-wrapper {
    flex: 1 1 0;
    min-height: 0;
    height: 0;
    width: 100%;
    background: #FFFFFF;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lab-preview-frame {
    flex: 1 1 100%;
    min-height: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #FFFFFF;
    display: block;
}

/* ── Practice Ideas & Reference Drawers ── */
.lab-drawer {
    position: fixed;
    inset: 0;
    z-index: 1050;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.3s;
}

.lab-drawer.active {
    pointer-events: auto;
    visibility: visible;
}

.lab-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lab-drawer.active .lab-drawer-backdrop {
    opacity: 1;
}

.lab-drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 440px;
    height: 100%;
    background: #FFFFFF;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.lab-drawer.active .lab-drawer-content {
    transform: translateX(0);
}

.lab-drawer-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
}

.lab-drawer-title-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lab-drawer-icon {
    font-size: 1.5rem;
}

.lab-drawer-title-box h3 {
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin: 0;
}

.lab-drawer-title-box p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.lab-drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.lab-drawer-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-dark);
}

.lab-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Practice Idea Cards inside Drawer */
.practice-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    box-shadow: var(--shadow-xs);
    transition: var(--transition-fast);
}

.practice-card:hover {
    border-color: rgba(79, 124, 255, 0.4);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.practice-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.practice-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    background: var(--bg-soft-blue);
    color: var(--accent-blue);
    border-radius: 4px;
}

.practice-card-header h4 {
    font-size: 0.98rem;
    color: var(--primary-dark);
    margin: 0;
}

.practice-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.85rem;
}

.practice-card p code {
    background: #F1F5F9;
    color: #2563EB;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.82rem;
}

.btn-practice-insert {
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xs);
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-dark);
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
}

.btn-practice-insert:hover {
    background: var(--accent-blue);
    color: #FFFFFF;
    border-color: var(--accent-blue);
}

/* Reference Groups */
.ref-group {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.ref-group-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-blue);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.ref-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #F1F5F9;
}

.ref-item:last-child {
    border-bottom: none;
}

.ref-item code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.84rem;
    color: #0F172A;
    font-weight: 600;
}

.ref-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Expanded Live Preview Modal ── */
.lab-expand-modal-overlay {
    z-index: 1100;
}

.lab-expand-modal-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    width: 94vw;
    max-width: 1400px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-float);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.lab-expand-modal-header {
    height: 48px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
}

.lab-expand-modal-body {
    flex: 1;
    background: #FFFFFF;
    position: relative;
}

/* ── Confirmation Modal Actions ── */
.lab-modal-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ── Responsive Behavior for HTML Lab ── */
@media (max-width: 1024px) {
    .lab-page-subtitle {
        display: none;
    }
}

@media (max-width: 768px) {
    .html-lab-main {
        padding-top: 5rem;
        padding-bottom: 2rem;
    }

    .lab-workspace-header {
        padding: 0.75rem 1rem;
    }

    .lab-workspace-header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .lab-workspace-title-group {
        justify-content: space-between;
    }

    .lab-workspace-actions {
        justify-content: space-between;
        gap: 0.4rem;
    }

    .btn-lab-action span:not(.btn-lab-shortcut) {
        font-size: 0.8rem;
    }

    .btn-lab-shortcut {
        display: none;
    }

    .lab-actions-divider {
        display: none;
    }

    .lab-mobile-tabs {
        display: flex;
    }

    .lab-workspace-body {
        width: calc(100% - 2rem);
        margin: 0.75rem auto 0;
        height: 500px;
        display: block;
    }

    .lab-resizer {
        display: none;
    }

    .lab-panel {
        display: none;
        height: 100%;
        min-width: 100%;
    }

    .lab-panel.active {
        display: flex;
    }
}

/* ============================================================
   HOMEPAGE CONTENT CMS (FEATURED ADS & CLASS VIDEOS)
   ============================================================ */

/* ── 1. Featured Advertisements Slider ─────────────────────── */
.hp-ads-section {
    padding: 2.25rem 0 1.25rem;
    background: var(--bg-white);
    position: relative;
    z-index: 5;
}

.hp-ads-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.hp-ads-track-container {
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(24, 31, 58, 0.08), 0 2px 8px rgba(24, 31, 58, 0.04);
    background: var(--primary-dark);
    border: 1px solid rgba(24, 31, 58, 0.08);
}

.hp-ads-track {
    display: flex;
    width: 100%;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.hp-ad-slide {
    flex: 0 0 100%;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0F1426;
    overflow: hidden;
    user-select: none;
}

/* Image container with fixed 16:6 aspect ratio to prevent CLS */
.hp-ad-media-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 6;
    max-height: 480px;
    min-height: 200px;
    background: #0F1426;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hp-ad-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.6s var(--ease-smooth);
}

.hp-ad-slide:hover .hp-ad-img {
    transform: scale(1.015);
}

/* Optional overlay card if title, description, or button exists */
.hp-ad-overlay-card {
    position: absolute;
    bottom: 1.5rem;
    left: 1.75rem;
    max-width: 480px;
    background: rgba(15, 20, 38, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.4rem;
    color: #FFFFFF;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    z-index: 2;
    transition: transform 0.3s var(--ease-smooth);
}

.hp-ad-slide:hover .hp-ad-overlay-card {
    transform: translateY(-3px);
}

.hp-ad-tag-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hp-ad-tag {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.2);
    color: #38BDF8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.hp-ad-tag.sponsored {
    background: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
    border-color: rgba(245, 158, 11, 0.35);
}

.hp-ad-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.25;
}

.hp-ad-desc {
    font-size: 0.82rem;
    color: #CBD5E1;
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-ad-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.35rem;
    padding: 0.45rem 1.1rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #FFFFFF;
    background: var(--accent-blue);
    border-radius: var(--radius-sm);
    text-decoration: none;
    align-self: flex-start;
    transition: all 0.2s var(--ease-smooth);
    box-shadow: 0 4px 14px rgba(79, 124, 255, 0.4);
}

.hp-ad-cta-btn:hover {
    background: #3B6BF6;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(79, 124, 255, 0.6);
}

/* ── Slider Navigation Controls ── */
.hp-ads-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-dark);
    border: 1px solid rgba(24, 31, 58, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s var(--ease-smooth);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hp-ads-nav-btn:hover {
    background: #FFFFFF;
    color: var(--accent-blue);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.hp-ads-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.hp-ads-prev {
    left: -18px;
}

.hp-ads-next {
    right: -18px;
}

/* ── Pagination Dots ── */
.hp-ads-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.hp-ad-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #CBD5E1;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s var(--ease-smooth);
}

.hp-ad-dot:hover {
    background: #94A3B8;
    transform: scale(1.15);
}

.hp-ad-dot.active {
    width: 26px;
    border-radius: 9999px;
    background: var(--primary-dark);
}

/* ── 2. Class Videos Section ───────────────────────────────── */
.hp-videos-section {
    padding: 3.5rem 0 2rem;
    background: var(--bg-white);
    position: relative;
}

.hp-videos-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.35rem;
}

.hp-video-card {
    background: var(--bg-white);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s var(--ease-smooth);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    outline: none;
}

.hp-video-card:hover,
.hp-video-card:focus-visible {
    border-color: var(--accent-blue);
    transform: translateY(-6px);
    box-shadow: var(--shadow-elevated);
}

.hp-video-thumb-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0F1426;
    overflow: hidden;
}

.hp-video-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.45s var(--ease-smooth);
}

.hp-video-card:hover .hp-video-thumb-img {
    transform: scale(1.05);
}

.hp-video-play-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 20, 38, 0.3);
    transition: background 0.3s var(--ease-smooth);
}

.hp-video-card:hover .hp-video-play-badge {
    background: rgba(15, 20, 38, 0.15);
}

.hp-play-icon-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: all 0.3s var(--ease-smooth);
}

.hp-play-icon-circle svg {
    margin-left: 2px;
}

.hp-video-card:hover .hp-play-icon-circle {
    transform: scale(1.15);
    background: #FFFFFF;
    color: var(--accent-blue);
    box-shadow: 0 8px 24px rgba(79, 124, 255, 0.5);
}

.hp-video-info {
    padding: 1rem 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hp-video-category-tag {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-blue);
    background: var(--bg-soft-blue);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.45rem;
    letter-spacing: 0.02em;
}

.hp-video-card-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.35;
    margin: 0 0 0.4rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-video-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── 3. YouTube Video Player Modal ─────────────────────────── */
.hp-video-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 38, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    animation: hpFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hp-video-modal-container {
    width: 100%;
    max-width: 900px;
    background: #0F1426;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: hpModalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hpModalScale {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.hp-video-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.4rem;
    background: #181F3A;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hp-video-modal-title-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1;
}

.hp-video-modal-tag {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(56, 189, 248, 0.2);
    color: #38BDF8;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.hp-video-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-video-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #FFFFFF;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease;
    flex-shrink: 0;
    margin-left: 0.75rem;
}

.hp-video-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hp-video-player-frame-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.hp-video-player-frame-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.hp-video-modal-footer {
    padding: 0.85rem 1.4rem;
    background: #11172A;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.hp-video-modal-desc {
    font-size: 0.82rem;
    color: #94A3B8;
    margin: 0;
    line-height: 1.5;
    flex: 1;
    min-width: 200px;
}

.hp-video-modal-yt-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #38BDF8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-left: auto;
}

.hp-video-modal-yt-link:hover {
    background: rgba(56, 189, 248, 0.22);
    color: #FFFFFF;
    border-color: #38BDF8;
    transform: translateY(-1px);
}

/* ── Responsive Refinements ────────────────────────────────── */
@media (max-width: 1024px) {
    .hp-videos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
    .hp-ads-prev { left: 8px; }
    .hp-ads-next { right: 8px; }
    .hp-ad-overlay-card {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .hp-videos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .hp-ad-media-box {
        aspect-ratio: 16 / 9;
        min-height: 180px;
    }
    .hp-ad-overlay-card {
        position: relative;
        inset: auto;
        border-radius: 0;
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem;
    }
    .hp-ad-title {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hp-ads-track,
    .hp-ad-img,
    .hp-ad-overlay-card,
    .hp-video-card,
    .hp-video-thumb-img,
    .hp-play-icon-circle,
    .hp-video-modal-overlay,
    .hp-video-modal-container {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================================
   Student LMS Advertisement System (Step 4)
   ============================================================ */
.student-lms-layout {
    width: 100%;
    display: block;
}

.student-lms-layout.has-ad {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.student-lms-main-content {
    min-width: 0;
    width: 100%;
}

.student-lms-ad-rail {
    position: sticky;
    top: 85px;
    z-index: 10;
    width: 100%;
}

.student-ad-card {
    background: #FFFFFF;
    border: 1px solid rgba(24, 31, 58, 0.09);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(24, 31, 58, 0.04);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth);
}

.student-ad-card:hover {
    box-shadow: 0 8px 28px rgba(24, 31, 58, 0.08);
}

.student-ad-dismiss-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 6;
    transition: all 0.2s ease;
    padding: 0;
}

.student-ad-dismiss-btn:hover {
    background: rgba(15, 23, 42, 0.95);
    transform: scale(1.08);
    color: #38BDF8;
}

.student-ad-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.student-ad-badge.sponsored {
    background: rgba(245, 158, 11, 0.92);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.student-ad-badge.announcement {
    background: rgba(2, 132, 199, 0.92);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.student-ad-media {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #0F172A;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-ad-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s var(--ease-smooth);
}

.student-ad-card:hover .student-ad-img {
    transform: scale(1.02);
}

.student-ad-body {
    padding: 0.9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: #FFFFFF;
}

.student-ad-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #181F3A;
    margin: 0;
    line-height: 1.35;
}

.student-ad-desc {
    font-size: 0.78rem;
    color: #64748B;
    margin: 0;
    line-height: 1.45;
}

.student-ad-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.35rem;
    padding: 0.5rem 0.9rem;
    background: #0284c7;
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.student-ad-cta-btn:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

/* ── Tablet & Small Laptop (1079px and below) ───────────────── */
@media (max-width: 1079px) {
    .student-lms-layout.has-ad {
        display: flex;
        flex-direction: column;
        gap: 1.75rem;
    }

    .student-lms-ad-rail {
        position: static;
        max-width: 100%;
    }

    .student-ad-card {
        flex-direction: row;
        align-items: stretch;
        max-height: 220px;
    }

    .student-ad-media {
        width: 150px;
        height: 100%;
        min-height: 180px;
        aspect-ratio: auto;
        flex-shrink: 0;
        background: #0F172A;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.35rem;
    }

    .student-ad-img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
    }

    .student-ad-body {
        flex: 1;
        justify-content: center;
        padding: 1.25rem;
    }

    .student-ad-title {
        font-size: 1.05rem;
    }

    .student-ad-desc {
        font-size: 0.85rem;
    }

    .student-ad-cta-btn {
        align-self: flex-start;
    }
}

/* ── Mobile (640px and below) ──────────────────────────────── */
@media (max-width: 640px) {
    .student-ad-card {
        flex-direction: column;
        max-height: none;
    }

    .student-ad-media {
        width: 100%;
        height: auto;
        max-height: 300px;
        aspect-ratio: auto;
        background: #0F172A;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
    }

    .student-ad-img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 280px;
        object-fit: contain;
        object-position: center;
    }

    .student-ad-body {
        padding: 0.9rem;
    }

    .student-ad-cta-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-lab-card,
    .home-lab-item,
    .home-lab-item-icon,
    .home-lab-cta-btn,
    .student-ad-card,
    .student-ad-img,
    .student-ad-cta-btn,
    .student-ad-dismiss-btn {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================================
   STUDENT DASHBOARD - PROFILE EDIT MODAL STYLES
   ============================================================ */
#studentProfileModal.admin-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    box-sizing: border-box;
    overflow-y: auto;
}

#studentProfileModal .admin-modal {
    width: 100%;
    max-width: 520px;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}















