/* ============================================================
   IELTS Practice Platform — Design System
   Version: 1.0
   Inspired by: British Council, IDP, Magoosh
   ============================================================ */

/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* Primary: IOT Teal (unified branding) */
    --ielts-primary: #2FB9C3;
    --ielts-primary-hover: #27A2AC;
    --ielts-primary-light: #5DD3DB;
    --ielts-primary-subtle: #E8F8F9;
    --ielts-primary-rgb: 47, 185, 195;

    /* Secondary: Navy */
    --ielts-navy: #1B365D;
    --ielts-navy-light: #2D5F8A;
    --ielts-navy-dark: #0F1D33;
    --ielts-navy-rgb: 27, 54, 93;

    /* Accent: Gold */
    --ielts-gold: #D4A843;
    --ielts-gold-light: #F0D078;
    --ielts-gold-subtle: #FFFBEB;

    /* Section Colors */
    --section-listening: #3B82F6;
    --section-listening-bg: #EFF6FF;
    --section-reading: #10B981;
    --section-reading-bg: #ECFDF5;
    --section-writing: #8B5CF6;
    --section-writing-bg: #F5F3FF;
    --section-speaking: #F59E0B;
    --section-speaking-bg: #FFFBEB;

    /* Band Score Colors */
    --band-expert: #16A34A;
    --band-good: #2563EB;
    --band-competent: #D97706;
    --band-limited: #DC2626;

    /* Neutral Palette */
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;

    /* Surfaces */
    --bg-body: #F0F2F5;
    --bg-card: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 20px rgba(200,16,46,0.15);

    /* Animations */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --max-w: 1140px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-pill: 999px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-body);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    color: var(--gray-900);
}

h1 { font-size: 2.5rem; letter-spacing: -0.025em; }
h2 { font-size: 2rem; letter-spacing: -0.02em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 0.95rem; }

p { color: var(--gray-600); }

a {
    color: var(--ielts-primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--ielts-primary-hover); }

/* ===== NAVBAR (Dark Navy — IOT Style) ===== */
.ielts-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--ielts-navy-dark);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0.55rem 0;
    transition: all 0.3s var(--ease-out);
}

.ielts-navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    padding: 0.45rem 0;
    background: rgba(15,29,51,0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.ielts-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.ielts-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.ielts-brand:hover { color: #fff; }

.ielts-brand img {
    height: 36px;
    width: auto;
}

.ielts-brand .brand-accent {
    color: var(--ielts-gold-light);
}

.ielts-nav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ielts-nav-links a {
    text-decoration: none;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.ielts-nav-links a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.ielts-nav-links a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-weight: 600;
}

.ielts-nav-links .divider {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.15);
    margin: 0 0.15rem;
}

/* ===== NAV BUTTONS ===== */
.btn-ielts-primary {
    background: var(--ielts-primary);
    color: #fff !important;
    border-radius: var(--radius-pill);
    padding: 0.55rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    box-shadow: 0 2px 8px rgba(var(--ielts-primary-rgb), 0.3);
}

.btn-ielts-primary:hover {
    background: var(--ielts-primary-hover);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--ielts-primary-rgb), 0.4);
}

.btn-ielts-outline {
    background: transparent;
    color: var(--ielts-primary) !important;
    border: 2px solid var(--ielts-primary);
    border-radius: var(--radius-pill);
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
}

.btn-ielts-outline:hover {
    background: var(--ielts-primary);
    color: #fff !important;
    transform: translateY(-1px);
}

.btn-ielts-navy {
    background: var(--ielts-navy);
    color: #fff !important;
    border-radius: var(--radius-pill);
    padding: 0.55rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
}

.btn-ielts-navy:hover {
    background: var(--ielts-navy-light);
    color: #fff !important;
    transform: translateY(-1px);
}

.btn-ielts-ghost {
    background: transparent;
    color: var(--gray-600) !important;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-pill);
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ielts-ghost:hover {
    border-color: var(--ielts-primary);
    color: var(--ielts-primary) !important;
    background: var(--ielts-primary-subtle);
}

/* Nav-specific ghost (white text in dark navbar) */
.ielts-navbar .btn-ielts-ghost {
    color: rgba(255,255,255,0.8) !important;
    border-color: rgba(255,255,255,0.25);
}
.ielts-navbar .btn-ielts-ghost:hover {
    border-color: rgba(255,255,255,0.5);
    color: #fff !important;
    background: rgba(255,255,255,0.08);
}
.ielts-navbar .btn-ielts-primary {
    box-shadow: 0 2px 8px rgba(var(--ielts-primary-rgb), 0.4);
}

/* ===== MOBILE NAV TOGGLE ===== */
.ielts-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.ielts-menu-toggle:hover {
    background: var(--gray-100);
}

/* ===== MAIN LAYOUT ===== */
.ielts-main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 80px 1.5rem 0;
}

.ielts-main.with-hero {
    padding-top: 0;
}

/* ===== CARDS ===== */
.ielts-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    transition: all 0.3s var(--ease-out);
}

.ielts-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.ielts-card-flat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
}

.glass-card {
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: var(--radius-xl);
    transition: all 0.3s var(--ease-out);
}

.glass-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ===== SECTION BADGES ===== */
.badge-listening {
    background: var(--section-listening-bg);
    color: var(--section-listening);
    border: 1px solid rgba(59,130,246,0.2);
}

.badge-reading {
    background: var(--section-reading-bg);
    color: var(--section-reading);
    border: 1px solid rgba(16,185,129,0.2);
}

.badge-writing {
    background: var(--section-writing-bg);
    color: var(--section-writing);
    border: 1px solid rgba(139,92,246,0.2);
}

.badge-speaking {
    background: var(--section-speaking-bg);
    color: var(--section-speaking);
    border: 1px solid rgba(245,158,11,0.2);
}

.ielts-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ===== BAND SCORE DISPLAY ===== */
.band-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    position: relative;
}

.band-score-circle .band-value {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    color: #fff;
}

.band-score-circle .band-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.85);
    margin-top: 0.15rem;
}

.band-expert { background: linear-gradient(135deg, #16A34A, #059669); }
.band-good { background: linear-gradient(135deg, #2563EB, #1D4ED8); }
.band-competent { background: linear-gradient(135deg, #D97706, #B45309); }
.band-limited { background: linear-gradient(135deg, #DC2626, #B91C1C); }

/* ===== HERO SECTIONS ===== */
.ielts-hero {
    background: linear-gradient(135deg, var(--ielts-navy-dark) 0%, var(--ielts-navy) 40%, var(--ielts-primary) 100%);
    padding: 7rem 0 3.5rem;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.ielts-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(200,16,46,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ielts-hero::after {
    content: '';
    position: absolute;
    bottom: -25%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212,168,67,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ielts-hero h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.ielts-hero p {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* ===== FORM CONTROLS ===== */
.ielts-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--gray-800);
    background: #fff;
    transition: all 0.2s;
    outline: none;
}

.ielts-input:focus {
    border-color: var(--ielts-primary);
    box-shadow: 0 0 0 3px rgba(var(--ielts-primary-rgb), 0.1);
}

.ielts-input::placeholder {
    color: var(--gray-400);
}

/* ===== ALERTS ===== */
.ielts-alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ielts-alert.error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.ielts-alert.success {
    background: #F0FDF4;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.ielts-alert.warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.ielts-alert.info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* ===== FOOTER ===== */
.ielts-footer {
    background: var(--ielts-navy-dark);
    color: #E2E8F0;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.ielts-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
}

.ielts-footer-col h6 {
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    margin-bottom: 0.75rem;
    font-family: var(--font-display);
}

.ielts-footer-col a {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.82rem;
    padding: 0.2rem 0;
    transition: color 0.2s;
}

.ielts-footer-col a:hover { color: #fff; }

.ielts-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1.25rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ielts-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
}

.ielts-footer-disclaimer {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    font-size: 0.72rem;
    color: var(--gray-500);
    line-height: 1.6;
}

.ielts-footer-copyright {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--gray-500);
}

/* ===== ANIMATIONS ===== */
.ielts-animate {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.ielts-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bandPulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--ielts-primary-rgb), 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(var(--ielts-primary-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--ielts-primary-rgb), 0); }
}

/* ===== UTILITY CLASSES ===== */
.text-ielts { color: var(--ielts-primary) !important; }
.text-navy { color: var(--ielts-navy) !important; }
.text-gold { color: var(--ielts-gold) !important; }
.text-muted { color: var(--gray-500) !important; }
.text-dark { color: var(--gray-900) !important; }

.bg-ielts { background: var(--ielts-primary) !important; }
.bg-navy { background: var(--ielts-navy) !important; }
.bg-listening { background: var(--section-listening-bg) !important; }
.bg-reading { background: var(--section-reading-bg) !important; }
.bg-writing { background: var(--section-writing-bg) !important; }
.bg-speaking { background: var(--section-speaking-bg) !important; }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.ielts-w-full { width: 100%; }
.text-center { text-align: center; }

/* ===== RESPONSIVE — MOBILE ===== */
@media (max-width: 768px) {
    :root {
        --max-w: 100%;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .ielts-navbar .container { padding: 0 1rem; }
    .ielts-brand { font-size: 1.15rem; }
    .ielts-nav-links { display: none; }
    .ielts-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-sm);
        color: rgba(255,255,255,0.85);
    }
    .ielts-menu-toggle:hover {
        background: rgba(255,255,255,0.08);
    }

    .ielts-nav-links.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--ielts-navy-dark);
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 0.5rem 1rem 1rem;
        box-shadow: 0 12px 32px rgba(0,0,0,0.4);
        animation: slideUp 0.3s var(--ease-out);
        gap: 0;
        z-index: 999;
    }

    .ielts-nav-links.mobile-open .divider { display: none; }
    .ielts-nav-links.mobile-open li { width: 100%; }
    .ielts-nav-links.mobile-open a {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.85rem 1rem;
        border-radius: var(--radius-md);
        font-size: 0.95rem;
        color: rgba(255,255,255,0.8);
    }
    .ielts-nav-links.mobile-open a:hover {
        background: rgba(255,255,255,0.06);
        color: #fff;
    }

    .ielts-nav-links.mobile-open .btn-ielts-primary {
        border-radius: var(--radius-md);
        text-align: center;
        justify-content: center;
        margin-top: 0.25rem;
        color: #fff !important;
    }

    .ielts-hero {
        padding: 6rem 0 2.5rem;
    }

    .ielts-hero h1 {
        font-size: 1.75rem;
    }

    .ielts-main {
        padding: 70px 1rem 0;
    }

    .ielts-card {
        padding: 1.25rem;
        border-radius: var(--radius-lg);
    }

    .ielts-footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    
    .ielts-footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(var(--ielts-primary-rgb), 0.15);
    color: var(--ielts-primary);
}

/* ============================================================
   IOT (ieltsonlinetests.com) Design System
   ============================================================ */

/* ===== IOT COLOR SCHEME ===== */
:root {
    /* Map IOT Variables to Landing Page Variables for 100% Uniformity */
    --iot-teal: var(--ielts-primary);
    --iot-teal-hover: var(--ielts-primary-hover);
    --iot-teal-dark: #1A8B94;
    --iot-teal-light: var(--ielts-primary-subtle);
    --iot-teal-rgb: var(--ielts-primary-rgb);
    
    --iot-navy: var(--ielts-navy);
    --iot-navy-dark: var(--ielts-navy-dark);
    --iot-navy-darker: #0A1628;
    --iot-navy-rgb: var(--ielts-navy-rgb);
    
    --iot-green: var(--band-expert);
    --iot-orange: #EB9B3A;
    --iot-cyan-badge: #0EA5E9;
}

/* ===== IOT NAVBAR ===== */
.iot-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1050;
    background: var(--iot-navy);
    height: 56px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.iot-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}
.iot-navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
}
.iot-navbar-brand:hover { color: #fff; }
.iot-navbar-brand .iot-logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--iot-teal), #4DD0E1);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: #fff;
}
.iot-navbar-links {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}
.iot-navbar-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}
.iot-navbar-links a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.iot-navbar-links a.active { background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; }
.iot-navbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.iot-navbar-right .iot-notif-btn {
    background: none; border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem; cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    transition: all 0.2s;
    position: relative;
}
.iot-navbar-right .iot-notif-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.iot-user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--iot-teal), #4DD0E1);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.75rem;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.2);
}

/* ===== IOT SIDEBAR ===== */
.iot-page-layout {
    display: flex;
    min-height: calc(100vh - 56px);
    padding-top: 56px;
}
.iot-sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
    flex-shrink: 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
}
.iot-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.iot-sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.iot-sidebar-nav li a:hover {
    background: var(--gray-50);
    color: var(--iot-navy);
}
.iot-sidebar-nav li a.active {
    background: var(--iot-teal);
    color: #fff;
    font-weight: 600;
    border-left-color: var(--iot-teal-dark);
    border-radius: 0 8px 8px 0;
    margin-right: 1rem;
}
.iot-sidebar-nav li a i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* ===== IOT MAIN CONTENT ===== */
.iot-main-content {
    flex: 1;
    padding: 2rem 2.5rem;
    background: var(--bg-body);
    min-width: 0;
}

/* ===== IOT STAT CARDS (My Test Performance) ===== */
.iot-stats-row {
    display: flex;
    gap: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.iot-stat-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    text-align: center;
    border-right: 1px solid var(--border-color);
    position: relative;
}
.iot-stat-card:last-child { border-right: none; }
.iot-stat-card .stat-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--gray-400);
    border: 2px solid var(--gray-200);
}
.iot-stat-card .stat-icon.active {
    color: var(--iot-teal);
    border-color: var(--iot-teal);
    background: var(--iot-teal-light);
}
.iot-stat-card .stat-label {
    font-size: 0.72rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 0.2rem;
}
.iot-stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
}

/* ===== IOT SKILL TABS ===== */
.iot-skill-tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
}
.iot-skill-tab {
    padding: 0.45rem 1.15rem;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--gray-200);
    background: #fff;
    color: var(--gray-500);
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.iot-skill-tab:hover { border-color: var(--iot-teal); color: var(--iot-teal); }
.iot-skill-tab.active {
    background: var(--iot-teal);
    color: #fff;
    border-color: var(--iot-teal);
}

/* ===== IOT CONTENT CARDS ===== */
.iot-content-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.iot-content-card-header {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.iot-content-card-header h5 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--gray-900);
}
.iot-content-card-header .view-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--iot-teal);
    text-decoration: none;
}
.iot-content-card-header .view-link:hover { text-decoration: underline; }
.iot-content-card-body {
    padding: 2rem 1.5rem;
}

/* ===== IOT EMPTY STATE ===== */
.iot-empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
}
.iot-empty-state p {
    color: var(--gray-800);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}
.iot-empty-state .sub {
    color: var(--gray-400);
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 1rem;
}
.iot-btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--ielts-primary);
    color: #fff !important;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    box-shadow: 0 4px 20px rgba(var(--ielts-primary-rgb), 0.4);
}
.iot-btn-dark:hover {
    background: var(--ielts-primary-hover);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(var(--ielts-primary-rgb), 0.5);
}

/* ===== IOT TEST HEADER ===== */
.iot-test-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 50px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 1000;
}
.iot-test-header .th-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.iot-test-header .th-left .iot-test-logo {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, #FF6B6B, #FFD93D, #6BCB77, #4D96FF);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: #fff; font-weight: 800;
}
.iot-test-header .th-left .iot-test-tools {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--gray-400);
    font-size: 0.9rem;
}
.iot-test-header .th-left .iot-test-tools button {
    background: none; border: none;
    color: var(--gray-400); cursor: pointer;
    padding: 0.3rem; font-size: 0.95rem;
    border-radius: 4px;
    transition: color 0.2s;
}
.iot-test-header .th-left .iot-test-tools button:hover { color: var(--gray-700); }
.iot-test-header .th-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.iot-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--iot-teal-light);
    color: var(--iot-teal-dark);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}
.iot-timer-badge i { font-size: 0.8rem; }
.iot-test-header .th-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.iot-test-header .th-right .btn-text-size {
    background: none; border: 1px solid var(--gray-200);
    color: var(--gray-500); cursor: pointer;
    padding: 0.3rem 0.6rem; font-size: 0.8rem;
    border-radius: 4px; font-weight: 600;
    transition: all 0.2s;
}
.iot-test-header .th-right .btn-text-size:hover {
    border-color: var(--iot-teal); color: var(--iot-teal);
}
.iot-btn-review {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: #fff; border: 1px solid var(--gray-300);
    color: var(--gray-700); padding: 0.4rem 1rem;
    border-radius: 6px; font-weight: 600; font-size: 0.82rem;
    cursor: pointer; transition: all 0.2s;
    text-decoration: none;
}
.iot-btn-review:hover { border-color: var(--iot-teal); color: var(--iot-teal); }
.iot-btn-turnin {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: var(--iot-teal); border: none;
    color: #fff; padding: 0.4rem 1rem;
    border-radius: 6px; font-weight: 600; font-size: 0.82rem;
    cursor: pointer; transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(var(--iot-teal-rgb), 0.3);
}
.iot-btn-turnin:hover {
    background: var(--iot-teal-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--iot-teal-rgb), 0.4);
}

/* ===== IOT TEST BODY ===== */
.iot-test-body {
    display: flex;
    height: calc(100vh - 100px);
    margin-top: 50px;
    overflow: hidden;
}
.iot-test-body.listening-mode {
    flex-direction: column;
}

/* Audio Player Bar */
.iot-audio-bar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}
.iot-audio-bar audio { flex: 1; height: 36px; }
.iot-audio-bar .audio-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    white-space: nowrap;
}

/* Passage Panel (Reading) */
.iot-passage-panel {
    width: 50%;
    background: #fff;
    border-right: 2px solid #e2e8f0;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}
.iot-passage-panel h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}
.iot-passage-panel .passage-text {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--gray-700);
}

/* Resize Handle */
.iot-resize-handle {
    width: 6px;
    background: #e2e8f0;
    cursor: col-resize;
    flex-shrink: 0;
    transition: background 0.2s;
    position: relative;
}
.iot-resize-handle:hover,
.iot-resize-handle.dragging { background: var(--iot-teal); }
.iot-resize-handle::after {
    content: '⋮';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--gray-400);
    font-size: 1rem;
}

/* Questions Panel */
.iot-questions-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    background: #fff;
}

/* Question Group Header */
.iot-q-group-header {
    margin-bottom: 1rem;
}
.iot-q-group-title {
    color: var(--iot-teal);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.iot-listen-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: color 0.2s;
}
.iot-listen-btn:hover { color: var(--iot-teal); }
.iot-q-group-instruction {
    color: #b91c1c;
    font-style: italic;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}
.iot-q-group-instruction b {
    font-weight: 700;
    color: #dc2626;
    text-transform: uppercase;
}

/* Question Card */
.iot-q-card {
    margin-bottom: 1.5rem;
}
.iot-q-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.iot-q-badge {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--iot-teal);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}
.iot-q-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-800);
}

/* MCQ Options */
.iot-q-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.75rem;
}
.iot-q-option {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.iot-q-option:hover { background: var(--gray-50); }
.iot-q-option input[type="radio"],
.iot-q-option input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--iot-teal);
    margin-top: 0.15rem;
    cursor: pointer;
    flex-shrink: 0;
}
.iot-q-option label {
    cursor: pointer;
    font-size: 0.92rem;
    color: var(--gray-700);
    line-height: 1.5;
}

/* Fill in the blank inline input */
.iot-fill-input {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0 0.15rem;
}
.iot-fill-input .fill-num {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--iot-teal);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}
.iot-fill-input input[type="text"] {
    border: none;
    border-bottom: 2px solid var(--gray-300);
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    color: var(--gray-800);
    width: 140px;
    background: transparent;
    outline: none;
    transition: border-color 0.2s;
}
.iot-fill-input input[type="text"]:focus {
    border-color: var(--iot-teal);
}
.iot-fill-input input[type="text"].filled {
    border-color: var(--iot-teal);
    color: var(--iot-teal-dark);
}

/* ===== IOT TEST FOOTER (Bottom Nav) ===== */
.iot-test-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 50px;
    background: var(--iot-navy-darker);
    display: flex;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
}
.iot-footer-parts {
    display: flex;
    height: 100%;
    flex-shrink: 0;
}
.iot-footer-part {
    display: flex;
    align-items: center;
    height: 100%;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.iot-footer-part-label {
    padding: 0 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s;
    height: 100%;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border-right: 1px solid rgba(255,255,255,0.06);
}
.iot-footer-part-label:hover { color: rgba(255,255,255,0.8); }
.iot-footer-part-label.active { color: #fff; background: rgba(255,255,255,0.06); }
.iot-footer-part-questions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0 0.5rem;
    height: 100%;
}
.iot-footer-part-info {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    padding: 0 0.5rem;
    white-space: nowrap;
}
.iot-fq-node {
    width: 28px; height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    transition: all 0.15s;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.35);
    border: 1px solid transparent;
}
.iot-fq-node:hover {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}
.iot-fq-node.answered {
    border-color: var(--iot-teal);
    color: var(--iot-teal);
    background: rgba(47,185,195,0.08);
}
.iot-fq-node.active {
    background: var(--iot-teal);
    color: #fff;
    border-color: var(--iot-teal);
}
.iot-fq-node.answered.active {
    background: var(--iot-teal);
    color: #fff;
}
.iot-footer-nav-arrows {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 1rem;
    flex-shrink: 0;
}
.iot-nav-arrow {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.iot-nav-arrow:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}
.iot-nav-arrow.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ===== IOT RESPONSIVE ===== */
@media (max-width: 768px) {
    .iot-sidebar { display: none; }
    .iot-main-content { padding: 1.5rem 1rem; }
    .iot-stats-row { flex-wrap: wrap; }
    .iot-stat-card { min-width: 33%; }
    .iot-test-body { flex-direction: column !important; }
    .iot-passage-panel { width: 100% !important; height: 40vh; border-right: none; border-bottom: 2px solid #e2e8f0; }
    .iot-resize-handle { display: none; }
    .iot-questions-panel { padding: 1rem; }
    .iot-footer-part-label { padding: 0 0.5rem; font-size: 0.65rem; }
    .iot-fq-node { width: 24px; height: 24px; font-size: 0.65rem; }
}
