:root {
    --primary: #1E3A8A;
    --primary-light: #3B82F6;
    --primary-dark: #1E40AF;
    --accent: #F59E0B;
    --accent-hover: #D97706;
    --bg-dark: #0B1120;
    --bg-light: #F8FAFC;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --white: #FFFFFF;

    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body.dark-theme {
    --primary: #60A5FA;
    --primary-light: #93C5FD;
    --primary-dark: #2563EB;
    --accent: #FBBF24;
    --accent-hover: #F59E0B;
    --bg-dark: #020617;
    --bg-light: #0B1220;
    --text-main: #F1F5F9;
    --text-muted: #CBD5E1;
    --white: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

body.bg-light {
    background-color: var(--bg-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utilities */
.text-accent {
    color: var(--accent);
}

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

.text-gradient {
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-gradient:hover {
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

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

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

.btn-submit {
    background-color: var(--accent);
    color: var(--white);
}

.btn-submit:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 40px;
}

.logo-icon img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.logo:hover .logo-icon img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
}

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

/* Dropdown logic */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 180px;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 0.5rem 0;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 0.75rem 1.5rem !important;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    text-align: left;
    width: 100%;
}

.dropdown-content a:hover {
    background-color: #F1F5F9;
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem;
}

.theme-toggle-btn {
    background: transparent;
    border: 1px solid rgba(100, 116, 139, 0.35);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    color: var(--primary);
}

.theme-toggle-floating {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.9);
    color: #E2E8F0;
    border-color: rgba(148, 163, 184, 0.55);
}

.theme-toggle-floating:hover {
    background: rgba(30, 41, 59, 0.95);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 8rem 5% 4rem;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top right, #e0e7ff 0%, #ffffff 50%);
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #DBEAFE;
    color: var(--primary-dark);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    width: fit-content;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.stats-container {
    display: flex;
    gap: 3rem;
}

.stat-box h3 {
    font-size: 2rem;
    color: var(--primary);
}

.stat-box p {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}

.hero-graphics {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: absolute;
    animation: float 6s ease-in-out infinite;
    z-index: 2;
}

.glass-card i {
    font-size: 2rem;
}

.glass-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

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

.card-1 {
    top: 25%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    bottom: 25%;
    right: 10%;
    animation-delay: 3s;
}

.abstract-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(59, 130, 246, 0.3);
    top: 10%;
    right: 5%;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(245, 158, 11, 0.3);
    bottom: 10%;
    left: 15%;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Features */
.features-section {
    padding: 6rem 5%;
    background-color: var(--bg-light);
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: #E2E8F0;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: #EFF6FF;
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

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

/* CTA */
.cta-section {
    padding: 6rem 5%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: var(--bg-dark);
    color: var(--white);
    padding: 3rem 5%;
    text-align: center;
}

body.dark-theme .navbar,
body.dark-theme .test-section,
body.dark-theme .feature-card,
body.dark-theme .glass-card,
body.dark-theme .q-item,
body.dark-theme .admin-table-container,
body.dark-theme .modal-content {
    background-color: #111827;
    border-color: #1F2937;
}

body.dark-theme .progress-bar-container,
body.dark-theme .info-box,
body.dark-theme .badge,
body.dark-theme .dropdown-content,
body.dark-theme .question-block .reading-q1 {
    background-color: #1F2937;
    border-color: #334155;
}

body.dark-theme {
    background: radial-gradient(circle at top right, #0f1f3b 0%, #0b1220 45%, #070d18 100%);
    color: var(--text-main);
}

body.dark-theme .hero {
    background: radial-gradient(circle at top right, #17294e 0%, #0b1220 55%, #070d18 100%);
}

body.dark-theme .hero-subtitle,
body.dark-theme .section-header p,
body.dark-theme .feature-card p,
body.dark-theme .cta-content p,
body.dark-theme #progressText,
body.dark-theme .instructions,
body.dark-theme .stat-box p {
    color: var(--text-muted);
}

body.dark-theme .hero-title,
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6,
body.dark-theme p,
body.dark-theme li,
body.dark-theme label,
body.dark-theme .nav-links a {
    color: var(--text-main);
}

body.dark-theme .nav-links a.active,
body.dark-theme .nav-links a:hover {
    color: var(--primary-light);
}

body.dark-theme .navbar {
    background-color: rgba(11, 18, 32, 0.88);
    border-bottom: 1px solid #1E293B;
}

body.dark-theme .test-nav {
    border-bottom: 1px solid #1E293B;
}

body.dark-theme .logo {
    color: #E2E8F0;
}

body.dark-theme .badge {
    color: #BFDBFE;
}

body.dark-theme .btn-primary {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #F8FAFC;
}

body.dark-theme .btn-primary:hover {
    background: linear-gradient(135deg, #60A5FA, #3B82F6);
}

body.dark-theme .btn-outline {
    border-color: #60A5FA;
    color: #BFDBFE;
}

body.dark-theme .btn-outline:hover {
    background-color: #2563EB;
    color: #F8FAFC;
}

body.dark-theme .hero-actions .btn-white {
    background-color: #1E293B;
    color: #E2E8F0;
    border: 1px solid #334155;
}

body.dark-theme .hero-actions .btn-white:hover {
    background-color: #334155;
}

body.dark-theme .feature-card,
body.dark-theme .test-section,
body.dark-theme .q-item,
body.dark-theme .admin-table-container,
body.dark-theme .modal-content,
body.dark-theme .glass-card {
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.45);
}

body.dark-theme .feature-icon {
    background-color: #1E293B;
    color: #93C5FD;
}

body.dark-theme .section-title {
    border-bottom-color: #1E293B;
}

body.dark-theme .question-block h3,
body.dark-theme .section-title h2 {
    color: #BFDBFE;
}

body.dark-theme .q-item label:hover {
    background-color: #1E293B;
}

body.dark-theme .full-input,
body.dark-theme .word-input,
body.dark-theme .inline-input,
body.dark-theme .writing-area,
body.dark-theme .reg-form-container input {
    background-color: #0F172A !important;
    color: #E2E8F0 !important;
    border-color: #334155 !important;
}

body.dark-theme .full-input::placeholder,
body.dark-theme .word-input::placeholder,
body.dark-theme .inline-input::placeholder,
body.dark-theme .writing-area::placeholder,
body.dark-theme .reg-form-container input::placeholder {
    color: #94A3B8;
}

body.dark-theme .progress-bar-container {
    background-color: #1E293B;
}

body.dark-theme .progress-bar {
    background: linear-gradient(90deg, #60A5FA, #3B82F6);
}

body.dark-theme footer {
    background-color: #020617;
    border-top: 1px solid #1E293B;
}

body.dark-theme .reading-container .passage,
body.dark-theme .reading-passages {
    background: #1E293B;
    color: #E2E8F0;
    border-left-color: var(--accent);
}

body.dark-theme .btn-white {
    background-color: #1E293B;
    color: #E2E8F0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* ----------------TEST PAGE STYLES---------------- */

.test-nav {
    border-bottom: 1px solid #E2E8F0;
}

.test-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 300px;
}

.progress-bar-container {
    flex-grow: 1;
    height: 8px;
    background-color: #E2E8F0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary);
    width: 25%;
    /* initial wide */
    transition: width 0.5s ease;
}

#progressText {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.test-container {
    max-width: 800px;
    margin: 8rem auto 4rem;
    padding: 0 1.5rem;
}

.test-header {
    text-align: center;
    margin-bottom: 3rem;
}

.test-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

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

.test-section {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: none;
    animation: fadeIn 0.4s ease;
}

.test-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #F1F5F9;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: 1.5rem;
    color: var(--text-main);
}

.points-badge {
    background-color: #FEF3C7;
    color: #B45309;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.question-block {
    margin-bottom: 2.5rem;
}

.question-block h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.q-item {
    background: #F8FAFC;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #E2E8F0;
}

.q-item p {
    font-weight: 500;
    margin-bottom: 1rem;
}

.q-item label {
    display: block;
    margin-bottom: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.q-item label:hover {
    background-color: #E0E7FF;
}

.q-item input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: var(--primary);
}

.reading-text {
    line-height: 2;
    font-size: 1.1rem;
}

.inline-input {
    border: none;
    border-bottom: 2px solid var(--primary);
    background: transparent;
    padding: 0.25rem 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    width: 120px;
    outline: none;
    text-align: center;
}

.inline-input:focus {
    border-bottom-color: var(--accent);
}

.fill-blanks p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.word-input {
    border: none;
    border-bottom: 2px solid var(--primary);
    background: transparent;
    font-family: inherit;
    font-size: 1.1rem;
    width: 60px;
    outline: none;
    padding: 0 0.2rem;
    letter-spacing: 2px;
}

.reading-container .passage {
    background: #FFEDD5;
    padding: 1.5rem;
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    color: #431407;
}

.reading-container p {
    margin-bottom: 1rem;
}

.reading-container p:last-child {
    margin-bottom: 0;
}

.writing-area {
    width: 100%;
    padding: 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.writing-area:focus {
    border-color: var(--primary);
}

.instructions {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.info-box {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.info-box i {
    color: var(--primary);
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

.form-actions {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E2E8F0;
}

.form-actions.flex-between {
    display: flex;
    justify-content: space-between;
}

.form-actions.right {
    display: flex;
    justify-content: flex-end;
}

.success-icon {
    font-size: 5rem;
    color: #10B981;
    margin-bottom: 2rem;
    background: #ecfdf5;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 2.5rem;
    box-shadow: 0 10px 25px -10px rgba(16, 185, 129, 0.4);
    animation: scaleCheck 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleCheck {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#section-result h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

#section-result p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.result-card-inner {
    padding: 1rem;
}

.note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 1rem;
}

/* ----------------ADMIN PANEL STYLES---------------- */
.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-container {
    padding: 3rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

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

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.stat-card .value {
    font-size: 2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-main);
}

.admin-table-container {
    width: 100%;
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #E2E8F0;
}

.admin-table th {
    background: #F8FAFC;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.admin-table tr:hover {
    background: #F8FAFC;
}

.badge-score {
    background: #DBEAFE;
    color: #1E40AF;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
}

.view-btn {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    background: none;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 1rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.sec-title {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.reg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.reg-form-container .input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reg-form-container label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.reg-form-container input {
    padding: 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.reg-form-container input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Add a custom style for "full-input" class matching standard inputs */
.full-input {
    border: none;
    border-bottom: 2px solid var(--primary);
    background: transparent;
    padding: 0.25rem 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.full-input:focus {
    border-bottom-color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
        justify-content: space-between;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        text-align: center;
        box-shadow: var(--shadow-md);
        border-bottom: 2px solid var(--primary);
        z-index: 999;
        animation: slideDown 0.3s ease-out;
    }

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

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* On mobile, make it look like a regular nav link */
    #takeTestBtn {
        background: transparent;
        color: var(--text-main);
        box-shadow: none;
        padding: 0;
        width: auto;
        margin-top: 0;
        font-weight: 500;
        font-family: 'Inter', sans-serif;
    }

    #takeTestBtn:hover {
        background: transparent;
        color: var(--primary);
        transform: none;
    }

    .badge {
        margin: 0 auto 1.5rem;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 6rem 5% 3rem;
        min-height: auto;
    }

    .hero-graphics {
        display: none;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        max-width: 100%;
        font-size: 1.1rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .stats-container {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        margin-top: 2rem;
    }

    .stat-box h3 {
        font-size: 1.25rem;
    }

    .stat-box p {
        font-size: 0.7rem;
    }

    .test-nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 4%;
        gap: 1rem;
    }

    .test-nav .logo {
        font-size: 1.1rem;
        gap: 0.4rem;
    }

    .test-nav .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        border-radius: 6px;
    }

    .test-progress {
        width: auto;
        flex-grow: 1;
        gap: 0.5rem;
    }

    #progressText {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .test-container {
        margin: 7rem auto 2rem;
        padding: 0 4%;
    }

    .test-section {
        padding: 1.25rem 1rem;
    }

    .inline-input,
    .word-input {
        width: 80px;
        font-size: 0.9rem;
    }

    .q-item {
        padding: 1rem;
    }

    .q-item label {
        font-size: 0.9rem;
    }

    .question-block .fill-blanks div,
    .reg-grid {
        grid-template-columns: 1fr !important;
    }

    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .form-actions button,
    .form-actions a {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Admin styles for mobile */
    .admin-nav {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .dashboard-container {
        padding: 1.5rem 5%;
    }

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

    .admin-table-container {
        padding: 0;
        border-radius: var(--border-radius);
        overflow-x: auto;
    }

    .admin-table {
        display: table;
        white-space: nowrap;
        width: 100%;
        min-width: 600px;
    }

    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .login-card {
        padding: 2rem;
        width: 90%;
    }

    .listening-audio {
        display: none !important;
    }
}

/* Secure Listening Player */
.edu-audio-player {
    background: var(--white);
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

body.dark-theme .edu-audio-player {
    background: #111827;
    border-color: #1F2937;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.edu-audio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.edu-audio-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edu-audio-attempts {
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
    background: #EFF6FF;
    color: #1E40AF;
    border-radius: 999px;
    font-weight: 600;
}

body.dark-theme .edu-audio-attempts {
    background: #1E293B;
    color: #93C5FD;
}

.edu-audio-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.edu-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.edu-play-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.edu-play-btn:disabled {
    background: #CBD5E1;
    cursor: not-allowed;
    opacity: 0.6;
}

body.dark-theme .edu-play-btn:disabled {
    background: #334155;
}

.edu-audio-track-container {
    flex-grow: 1;
    position: relative;
}

.edu-audio-track {
    height: 6px;
    background: #E2E8F0;
    border-radius: 3px;
    overflow: hidden;
}

body.dark-theme .edu-audio-track {
    background: #334155;
}

.edu-audio-progress {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
}

.edu-audio-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    display: flex;
    justify-content: space-between;
}

/* Countdown Overlay */
.edu-countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
}

.edu-countdown-text {
    color: white;
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

.edu-audio-player.disabled {
    opacity: 0.7;
}

.edu-audio-message {
    font-size: 0.85rem;
    margin-top: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.edu-audio-message.error { color: #EF4444; }
.edu-audio-message.info { color: var(--primary); }