/* ========== LEARNEN EDUCATION DESIGN SYSTEM ========== */
:root {
    /* Primary Colors - Blue */
    --primary-color: #1E88E5;        /* Main Blue */
    --primary-dark: #1565C0;         /* Deep Blue */
    
    /* Secondary Colors - Light Blue */
    --secondary-color: #64B5F6;      /* Light Blue */
    --secondary-light: #90CAF9;      /* Soft Blue */
    
    /* Background Colors */
    --bg-gradient: #F5F9FF;          /* Off White Blue */
    --bg-overlay: #ffffff;           /* Pure White */
    
    /* Accent Color - Warm Yellow */
    --accent-color: #FFD54F;         /* Soft Yellow */
    
    /* System Colors */
    --tertiary-color: #FF2D55;       /* Warning/Error - Pink */
    --success-color: #30D158;        /* Success - Green */
    --warning-color: #FF9500;        /* Warning - Orange */
    
    /* Glass Effect */
    --glass-bg: #ffffff;
    --glass-border: rgba(30, 136, 229, 0.1);
    --glass-shadow: 0 2px 8px rgba(30, 136, 229, 0.1);
    --glass-backdrop: blur(20px);
    
    /* Dark Mode */
    --dark-glass-bg: #1d1d1f;
    --dark-glass-border: rgba(100, 181, 246, 0.15);
    
    /* Text Colors */
    --text-dark: #1d1d1f;            /* Dark Gray */
    --text-medium: #6e6e73;          /* Medium Gray */
    --text-light: #86868b;           /* Light Gray */
    --text-white: #ffffff;
    
    /* Shadows with Blue Tint */
    --shadow-sm: 0 2px 12px rgba(30, 136, 229, 0.08);
    --shadow-md: 0 8px 32px rgba(30, 136, 229, 0.12);
    --shadow-lg: 0 20px 60px rgba(30, 136, 229, 0.15);
    --shadow-glow: 0 0 40px rgba(30, 136, 229, 0.3);
    
    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-dark);
    line-height: 1.47059;
    overflow-x: hidden;
    position: relative;
    font-weight: 400;
    letter-spacing: -0.022em;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: 0;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== GLASS HEADER ========== */
.header {
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.header:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
}

.logo i {
    font-size: 1.8rem;
    animation: logoFloat 3s ease-in-out infinite;
    background: linear-gradient(135deg, #1E88E5, #FFD54F, #64B5F6);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoFloat 3s ease-in-out infinite, gradientShift 4s ease infinite;
    filter: drop-shadow(0 2px 4px rgba(30, 136, 229, 0.3));
}

.logo span {
    background: linear-gradient(135deg, #1E88E5, #1565C0);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
}

.logo:hover i {
    animation: logoSpin 0.6s ease, gradientShift 4s ease infinite;
    transform: scale(1.1);
}

.logo:hover span {
    animation: textPulse 0.6s ease, gradientShift 3s ease infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(-5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-3px) rotate(5deg);
    }
}

@keyframes logoSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1.1);
    }
}

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

@keyframes textPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        letter-spacing: 1px;
    }
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 8px;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-color);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 980px;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.022em;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    transition: none;
}

.btn-primary:hover {
    background: #1E88E5;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

/* ========== LIQUID GLASS HERO ========== */
.hero {
    margin-top: 80px;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    margin: 40px 20px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: var(--text-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
}

.hero-title {
    font-size: 56px;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
    letter-spacing: -0.005em;
    line-height: 1.07143;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 21px;
    margin-bottom: 2rem;
    color: var(--text-medium);
    font-weight: 400;
    letter-spacing: -0.022em;
    line-height: 1.381;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    filter: drop-shadow(0 2px 4px rgba(30, 136, 229, 0.3));
    color: var(--primary-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.btn-large {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 48px;
    font-size: 1.1rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn-large:hover {
    background: #1565C0;
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(30, 136, 229, 0.4);
}

/* ========== SKILLS SECTION ========== */
.skills-section {
    padding: 50px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

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

.skill-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.skill-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    border-radius: 20px;
    color: white;
}

.skill-icon i {
    font-size: 2.5rem;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.skill-card p {
    color: var(--text-light);
}

/* ========== TOPICS SECTION ========== */
.topics-section {
    padding: 50px 0;
    background: var(--bg-color);
}

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

.topic-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 136, 229, 0.02);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.topic-card:hover::before {
    opacity: 1;
}

.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
    border-color: rgba(30, 136, 229, 0.2);
}

.topic-header {
    background: var(--primary-color);
    color: #ffffff;
    padding: 1.5rem 1rem;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    gap: 0.5rem;
}



.topic-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.topic-icon {
    font-size: 2rem;
    line-height: 1;
    margin: 0;
}

.topic-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    word-wrap: break-word;
    max-width: 100%;
    margin: 0;
    padding: 0 0.5rem;
}

.topic-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topic-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.topic-stat {
    text-align: center;
}

.topic-stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.topic-stat-label {
    font-size: 0.85rem;
    color: var(--text-medium);
    font-weight: 500;
}

.topic-description {
    margin: 1rem 0;
    color: var(--text-medium);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.6;
}

.topic-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    margin-top: auto;
}

.skill-badge {
    padding: 0.4rem 0.8rem;
    background: rgba(30, 136, 229, 0.08);
    border: 1px solid rgba(30, 136, 229, 0.15);
    border-radius: 16px;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.skill-badge i {
    font-size: 0.75rem;
}

/* ========== PROGRESS SECTION ========== */
.progress-overview {
    max-width: 800px;
    margin: 0 auto;
}

.progress-summary-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.progress-summary-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.progress-summary-card h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.progress-summary-card p {
    color: var(--text-medium);
    margin-bottom: 2rem;
}

.overall-progress {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    margin-top: 2rem;
}

.progress-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 500;
}

/* ========== PRACTICE SECTION ========== */
.practice-section {
    padding: 50px 0;
}

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

.practice-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.practice-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.practice-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.practice-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.practice-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid rgba(30, 136, 229, 0.3);
    padding: 10px 20px;
    border-radius: 980px;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: -0.022em;
}

.btn-secondary:hover {
    background: rgba(30, 136, 229, 0.06);
    border-color: var(--primary-color);
}

/* ========== FOOTER ========== */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section p {
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
}

/* ========== FULL SCREEN TOPIC VIEW ========== */
/* Backdrop overlay */
.topic-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1999;
    animation: fadeIn 0.3s ease;
}

.topic-backdrop.active {
    display: block;
}

.topic-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-gradient);
    z-index: 2000;
    animation: slideInUp 0.4s ease;
    flex-direction: column;
}

.topic-view.active {
    display: flex;
}

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

/* Topic View Header */
.topic-view-header {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Header always visible - no auto-hide behavior */

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1rem;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.topic-view-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    margin: 0 2rem;
}

.topic-icon-large {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.topic-view-title h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.topic-view-title p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 1rem;
}

.topic-progress {
    text-align: right;
}

.topic-progress span {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.mini-progress-bar {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Topic View Layout */
.topic-view-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.topic-sidebar {
    width: 280px;
    background: var(--card-bg);
    border-right: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition-bounce);
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.sidebar-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: var(--transition);
}

.sidebar-btn:hover::before {
    transform: scaleY(1);
}

.sidebar-btn i:first-child {
    font-size: 1.4rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.sidebar-btn span {
    flex: 1;
    color: var(--text-dark);
    font-weight: 600;
}

.sidebar-btn .completed-icon {
    font-size: 1rem;
    color: var(--accent-color);
    opacity: 0;
    transition: var(--transition);
}

.sidebar-btn.completed .completed-icon {
    opacity: 1;
    animation: checkBounce 0.5s ease;
}

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

.sidebar-btn:hover {
    background: #F5F9FF;
    border-color: rgba(30, 136, 229, 0.2);
    transform: translateX(4px);
    box-shadow: none;
}

.sidebar-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.2);
}

.sidebar-btn.active::before {
    transform: scaleY(1);
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-btn.active i:first-child {
    color: var(--text-white);
    animation: iconPulse 2s ease infinite;
}

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

.sidebar-footer {
    padding: 1rem;
    border-top: 2px solid var(--border-color);
}

/* Main Content Area */
.topic-main-content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-color);
}

.tab-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Legacy modal support for other modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 20px;
    overflow: hidden;
    animation: slideUp 0.4s ease;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.modal-header {
    background: var(--primary-color);
    color: white;
    padding: 1.2rem;
    position: relative;
}

.modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 1.2rem;
}

/* ========== VOCABULARY CONTENT ========== */
.vocabulary-list {
    display: grid;
    gap: 1.5rem;
}

.vocab-item {
    background: #ffffff;
    padding: 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: var(--text-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.vocab-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transition: var(--transition);
}

.vocab-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left-color: var(--secondary-color);
}

.vocab-item:hover::before {
    width: 8px;
}

.vocab-header {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.vocab-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid rgba(30, 136, 229, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    transition: all 0.3s ease;
    background: #F5F9FF;
}

.vocab-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.3);
}

.vocab-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vocab-word {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.vocab-phonetic {
    color: var(--primary-color);
    font-style: italic;
    font-weight: 500;
    font-size: 1.1rem;
}

.vocab-type {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

.vocab-audio-btn {
    background: var(--primary-color);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-md), 0 0 20px rgba(30, 136, 229, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vocab-audio-btn:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(30, 136, 229, 0.4);
}

.vocab-audio-btn:active {
    transform: scale(1.05);
}

.vocab-meaning {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.6;
}

.vocab-example {
    color: var(--text-medium);
    font-style: italic;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    background: rgba(30, 136, 229, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.vocab-related {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.related-word {
    background: rgba(30, 136, 229, 0.08);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-color);
    border: 1px solid rgba(30, 136, 229, 0.2);
    transition: var(--transition);
}

.related-word:hover {
    background: rgba(30, 136, 229, 0.15);
    transform: translateY(-2px);
}

/* ========== AUDIO POPUP ========== */
.audio-popup {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 3000;
    animation: slideInRight 0.4s ease;
}

.audio-popup.active {
    display: block;
}

.audio-popup-content {
    background: white;
    padding: 1.2rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 350px;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.audio-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #1d1d1f;
    font-weight: 600;
    line-height: 1.4;
}

.audio-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.audio-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    font-weight: 500;
}

.audio-btn:hover {
    background: #1565C0;
    transform: translateX(5px);
}

.audio-progress {
    width: 100%;
    height: 6px;
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

/* ========== EXERCISE STYLES ========== */
.exercise-section {
    margin-bottom: 2rem;
}

.exercise-title {
    font-size: 1.4rem;
    color: var(--text-dark);
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.exercise-title i {
    color: var(--primary-color);
    filter: drop-shadow(0 2px 4px rgba(30, 136, 229, 0.3));
}

.exercise-description {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.question-card {
    background: #ffffff;
    padding: 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.question-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.question-text {
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.15rem;
    line-height: 1.6;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-btn {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-weight: 400;
    color: var(--text-dark);
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--primary-color);
    opacity: 0.1;
    transition: var(--transition);
}

.option-btn:hover::before {
    width: 100%;
}

.option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(30, 136, 229, 0.1);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.option-btn.correct {
    border-color: var(--accent-color);
    background: rgba(48, 209, 88, 0.15);
    box-shadow: 0 0 20px rgba(48, 209, 88, 0.2);
}

.option-btn.incorrect {
    border-color: var(--tertiary-color);
    background: rgba(255, 45, 85, 0.1);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== QUIZ STYLES ========== */
.quiz-progress {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.progress-text {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.5s ease;
}

.quiz-question {
    margin-bottom: 2rem;
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin-right: 1rem;
    font-weight: 600;
}

.option-btn.selected {
    border-color: var(--primary-color);
    background: rgba(30, 136, 229, 0.1);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.answer-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.correct-feedback {
    background: rgba(48, 209, 88, 0.1);
    border-left: 4px solid #30D158;
    color: #30D158;
    display: block;
}

.incorrect-feedback {
    background: rgba(255, 45, 85, 0.1);
    border-left: 4px solid #FF2D55;
    color: #FF2D55;
    display: block;
}

.quiz-summary {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    margin-top: 2rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    margin: 2rem auto;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.score-total {
    font-size: 1.2rem;
    color: var(--text-light);
}

.score-message {
    font-size: 1.3rem;
    margin: 1.5rem 0;
}

/* ========== LISTENING STYLES ========== */
.vocab-audio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.vocab-audio-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.vocab-audio-card:hover {
    border-color: var(--primary-color);
    background: rgba(30, 136, 229, 0.05);
    transform: translateY(-4px);
}

.vocab-audio-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.vocab-audio-card span {
    font-weight: 500;
    color: var(--secondary-color);
}

/* ========== SPEAKING STYLES ========== */
.exercise-time {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin: 1rem 0;
    font-weight: 500;
    color: var(--tertiary-color);
}

.pronunciation-words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1rem 0;
}

.word-btn {
    background: var(--tertiary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.word-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ========== READING STYLES ========== */
.reading-passage {
    background: rgba(0, 0, 0, 0.02);
}

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

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

.comprehension-item {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 12px;
}

.answer-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-top: 0.8rem;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: var(--transition);
}

.answer-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ========== WRITING STYLES ========== */
.writing-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.8;
    resize: vertical;
    transition: var(--transition);
}

.writing-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.word-count-info {
    background: rgba(30, 136, 229, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin: 1rem 0;
    color: var(--secondary-color);
    font-weight: 500;
}

.example-box {
    background: var(--bg-color);
    padding: 1.2rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--tertiary-color);
}

.example-box strong {
    color: var(--secondary-color);
}

.writing-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.word-counter {
    background: var(--bg-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    color: var(--tertiary-color);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        display: none;
        z-index: 999;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-link {
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .header-actions .btn-primary {
        display: none;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .audio-popup {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .audio-popup-content {
        min-width: auto;
        width: 100%;
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .tabs {
        overflow-x: auto;
    }
    
    .vocab-audio-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .passage-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .writing-tools {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Topic View Responsive - Compact Header */
    .topic-view-header {
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding: 0.4rem 0.75rem;
        min-height: 50px;
    }
    
    .back-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
        min-width: auto;
    }
    
    .topic-view-title {
        margin: 0 0.5rem;
        flex: 1;
    }
    
    .topic-icon-large {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        border-radius: 10px;
    }
    
    .topic-view-title h1 {
        font-size: 0.95rem;
        line-height: 1.2;
        font-weight: 600;
    }
    
    .topic-view-title p {
        display: none; /* Hide subtitle on mobile */
    }
    
    .topic-progress {
        display: none; /* Hide progress bar on mobile to save space */
    }
    
    .topic-view-layout {
        flex-direction: column;
    }
    
    .topic-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        max-height: none;
        height: auto;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        z-index: 90;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Compact horizontal tabs on mobile */
    .sidebar-nav {
        display: flex !important;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.5rem 0.75rem;
        gap: 0.4rem;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    
    .sidebar-nav::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }
    
    .sidebar-btn {
        min-width: auto;
        flex-shrink: 0;
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        display: inline-flex !important;
        visibility: visible !important;
        border-radius: 20px;
        gap: 0.4rem;
        font-weight: 500;
    }
    
    .sidebar-btn span {
        display: none; /* Hide text, show icon only on mobile */
    }
    
    .sidebar-btn i:first-child {
        font-size: 1.1rem;
        margin: 0;
    }
    
    .sidebar-btn .completed-icon {
        display: none; /* Hide checkmark on mobile */
    }
    
    .sidebar-btn.active {
        padding: 0.4rem 0.75rem;
    }
    
    .sidebar-btn span {
        font-size: 0.85rem;
        display: inline !important;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .topic-main-content {
        padding-top: 0;
        overflow-y: auto;
    }
    
    .tab-content-wrapper {
        padding: 1rem;
    }
    
    /* FORCE SHOW SIDEBAR ON MOBILE - HIGHEST PRIORITY */
    aside.topic-sidebar {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }
    
    nav.sidebar-nav {
        display: flex !important;
        visibility: visible !important;
    }
    
    button.sidebar-btn {
        display: inline-flex !important;
        visibility: visible !important;
    }
}

/* ========== FORM STYLES ========== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.btn-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    background: var(--primary-color);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(30, 136, 229, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-large:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(30, 136, 229, 0.5);
}

.btn-large:active {
    transform: translateY(-2px) scale(1.02);
}

/* ========== EXERCISE MODAL STYLES ========== */
#exerciseModal .modal-content {
    max-width: 900px;
}

.exercise-description {
    background: rgba(0, 0, 0, 0.03);
    padding: 1.2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}
/* ========== GAP-FILL STYLES ========== */
.word-bank {
    margin: 20px 0;
    padding: 20px;
    background: #F5F9FF;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-dark);
    font-weight: 600;
}

.word-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin: 6px;
    background: var(--primary-color);
    color: white;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(30, 136, 229, 0.3);
    letter-spacing: -0.022em;
}

.word-chip:hover {
    background: #1E88E5;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(30, 136, 229, 0.4);
}

.word-type-badge {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.word-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.gap-fill-instructions {
    padding: 16px 20px;
    margin-bottom: 15px;
    background: #F5F9FF;
    border-radius: 12px;
    color: var(--text-medium);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
}

.gap-fill-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--text-dark);
    font-weight: 600;
}

.result-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-perfect {
    padding: 15px;
    background: rgba(48, 209, 88, 0.15);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
}

.result-score {
    padding: 12px 15px;
    background: rgba(30, 136, 229, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 1rem;
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* ========== ORDERING STYLES ========== */
.ordering-items {
    margin: 15px 0;
}

.ordering-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(143, 161, 177, 0.3);
    border-radius: 8px;
    cursor: move;
    transition: all 0.3s ease;
}

.ordering-item:hover {
    background: rgba(30, 136, 229, 0.1);
    border-color: var(--primary-color);
}

.ordering-number {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
}

.ordering-text {
    flex: 1;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
}

.ordering-item .fa-grip-vertical {
    color: var(--text-light);
    font-size: 18px;
}

/* ========== COLLOCATIONS STYLES ========== */
.collocations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.collocation-card {
    position: relative;
    padding: 25px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.collocation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 136, 229, 0.05);
    opacity: 0;
    transition: var(--transition);
}

.collocation-card:hover::before {
    opacity: 1;
}

.collocation-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(30, 136, 229, 0.4);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(30, 136, 229, 0.2);
}

.collocation-phrase {
    color: var(--primary-color);
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.collocation-phrase .fa-quote-left {
    font-size: 16px;
    opacity: 0.7;
    color: var(--secondary-color);
}

.collocation-meaning {
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.8;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.collocation-card .vocab-audio-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    padding: 0;
}

/* ========== FLASHCARDS STYLES ========== */
.flashcard-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

#flashcard-counter {
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: var(--shadow-sm);
    min-width: 80px;
    text-align: center;
}

.flashcard-container {
    perspective: 1000px;
    margin: 30px auto;
    width: 500px;
    height: 400px;
    position: relative;
}

.flashcard {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flashcard-front {
    background: #ffffff;
    transform: rotateY(0deg);
}

.flashcard-back {
    background: #ffffff;
    transform: rotateY(180deg);
}

.flashcard-image {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
}

.flashcard-word {
    color: var(--text-dark);
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.flashcard-phonetic {
    color: var(--text-medium);
    font-size: 20px;
    font-style: italic;
    text-shadow: none;
    position: relative;
    z-index: 10;
}

.flashcard-type {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flashcard-meaning {
    color: var(--text-dark);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.flashcard-example {
    color: var(--text-medium);
    font-size: 16px;
    font-style: italic;
    text-align: center;
    line-height: 1.6;
}

.flashcard-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* ========== RESPONSIVE DESIGN ========== */
/* ========== RESPONSIVE DESIGN ========== */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .topics-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Desktop (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .topics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet Landscape (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .topics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .container {
        padding: 0 40px;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .hero-title {
        font-size: 44px;
    }
    
    .hero-subtitle {
        font-size: 19px;
    }
    
    .container {
        padding: 0 30px;
    }
}

/* Mobile (max 767px) */
@media (max-width: 767px) {
    .topics-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero {
        padding: 40px 20px;
        margin: 40px 10px 20px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 17px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .topic-card {
        border-radius: 16px;
    }
    
    .topic-header {
        height: 160px;
        padding: 1.5rem 1rem;
    }
    
    .topic-icon {
        font-size: 2rem;
    }
    
    .topic-title {
        font-size: 1.15rem;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .overall-progress {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .collocations-grid {
        grid-template-columns: 1fr;
    }
    
    .flashcard-container {
        width: 100%;
        height: 350px;
    }
    
    .topic-view-layout {
        flex-direction: column;
    }
    
    .topic-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 1rem;
    }
    
    .sidebar-btn {
        min-width: 120px;
    }
    
    /* Level Test Responsive */
    .test-intro-card {
        padding: 2rem 1.5rem;
    }
    
    .test-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .level-test-content {
        padding: 1.5rem;
        max-height: 95vh;
    }
    
    .test-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .test-header h2 {
        font-size: 1.3rem;
    }
    
    .test-timer {
        font-size: 1.2rem;
        padding: 0.4rem 1rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .option-text {
        font-size: 1rem;
    }
    
    .test-navigation {
        flex-wrap: wrap;
    }
    
    .test-navigation button {
        flex: 1 1 45%;
    }
    
    .result-details {
        flex-direction: column;
        gap: 1rem;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
        border-width: 6px;
    }
    
    .score-number {
        font-size: 2rem;
    }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .topic-header {
        height: 150px;
        padding: 1rem;
    }
    
    .topic-icon {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .topic-title {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .btn-primary, .btn-secondary {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .flashcard-container {
        height: 300px;
    }
    
    .practice-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .collocations-grid {
        grid-template-columns: 1fr;
    }
    
    .flashcard-container {
        height: 300px;
    }
    
    .flashcard-word {
        font-size: 32px;
    }
    
    .flashcard-meaning {
        font-size: 20px;
    }
}

.gap-fill-passage {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-dark);
    font-weight: 400;
    margin: 20px 0;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    letter-spacing: -0.022em;
}

.gap-fill-tip {
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(143, 161, 177, 0.1);
    border-radius: 6px;
    color: var(--tertiary-color);
    font-size: 14px;
    font-style: italic;
}

.gap-fill-tip .fa-lightbulb {
    color: var(--primary-color);
    margin-right: 5px;
}

/* ========== LIQUID GLASS GLOBAL EFFECTS ========== */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
    background-clip: content-box;
}

/* Loading animation for images */
img {
    transition: var(--transition);
}

img:hover {
    transform: scale(1.05);
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Utility glass classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.glass-dark {
    background: var(--dark-glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--dark-glass-border);
}

/* Shimmer effect for loading */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    background: rgba(255, 255, 255, 0.3);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse glow effect */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: var(--shadow-md), 0 0 20px rgba(30, 136, 229, 0.3);
    }
    50% {
        box-shadow: var(--shadow-lg), 0 0 40px rgba(30, 136, 229, 0.6);
    }
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Fade in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease;
}

/* Scale in animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Slide animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease;
}

/* ========== GAP FILL INTERACTIVE ========== */
.blank-slot {
    display: inline-block;
    min-width: 120px;
    padding: 6px 14px;
    margin: 0 4px;
    background: #ffffff;
    border: 1.5px dashed rgba(30, 136, 229, 0.4);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.blank-slot:hover {
    background: #F5F9FF;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.blank-number {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.blank-hint {
    color: var(--warning-color);
    font-weight: 600;
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.9;
}

.blank-content {
    color: var(--text-dark);
    font-weight: 800;
    margin-left: 5px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.blank-slot.filled {
    background: #e8f4fd;
    border-style: solid;
    border-color: var(--primary-color);
}

.blank-slot.correct {
    background: #e8f5e9;
    border-color: var(--accent-color);
    animation: correctBounce 0.5s ease;
}

.blank-slot.incorrect {
    background: #ffebee;
    border-color: var(--tertiary-color);
    animation: shake 0.5s ease;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.word-chip.selected {
    background: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(48, 209, 88, 0.5);
}

.gap-fill-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* ========== ORDERING INTERACTIVE ========== */
.ordering-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(30, 136, 229, 0.2);
    border-radius: 12px;
    cursor: grab;
    transition: var(--transition);
    user-select: none;
}

.ordering-item:active {
    cursor: grabbing;
}

.ordering-item:hover {
    background: rgba(30, 136, 229, 0.08);
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.ordering-hint {
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.3);
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 15px;
    color: var(--text-medium);
    font-size: 0.95rem;
}

.ordering-hint i {
    color: var(--warning-color);
    margin-right: 5px;
}

.ordering-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.ordering-result {
    margin-top: 1.5rem;
}

.ordering-feedback {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.ordering-feedback h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.ordering-feedback ul {
    list-style: none;
    padding: 0;
}

.ordering-feedback li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    font-weight: 500;
}

.ordering-feedback li:last-child {
    border-bottom: none;
}

.hint-text {
    color: var(--warning-color);
    font-size: 0.9rem;
    font-style: italic;
}

.result-perfect {
    background: rgba(48, 209, 88, 0.15);
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    animation: pulseGlow 1.5s ease infinite;
}

.result-score {
    background: rgba(30, 136, 229, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.hint-box {
    background: rgba(255, 149, 0, 0.1);
    border: 2px solid var(--warning-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

.hint-box strong {
    color: var(--warning-color);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 10px;
}

.hint-box ol {
    margin-left: 20px;
    color: var(--text-dark);
    font-weight: 500;
}

.hint-box li {
    padding: 5px 0;
    line-height: 1.6;
}

/* Word chip dragging state */
.word-chip.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.word-chip.used {
    opacity: 0.4;
    text-decoration: line-through;
    pointer-events: none;
    filter: grayscale(0.5);
}

/* Improved blank slot states */
.blank-slot.filled .blank-content {
    animation: fillIn 0.3s ease;
}

@keyframes fillIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Ordering item states after checking */
.ordering-item.correct-order {
    background: rgba(48, 209, 88, 0.1);
    border-color: var(--accent-color);
    animation: correctBounce 0.5s ease;
}

.ordering-item.incorrect-order {
    background: rgba(255, 45, 85, 0.1);
    border-color: var(--tertiary-color);
    animation: shake 0.5s ease;
}

/* Ordering feedback improvements */
.feedback-correct {
    background: rgba(48, 209, 88, 0.08);
    padding: 10px 12px !important;
    border-radius: 8px;
    margin: 8px 0 !important;
    border-left: 3px solid var(--accent-color) !important;
}

.feedback-incorrect {
    background: rgba(255, 45, 85, 0.08);
    padding: 10px 12px !important;
    border-radius: 8px;
    margin: 8px 0 !important;
    border-left: 3px solid var(--tertiary-color) !important;
}

/* ========== LEVEL TEST STYLES ========== */
.level-test-section {
    padding: 4rem 0;
    background: var(--bg-color);
}

.level-test-intro {
    max-width: 800px;
    margin: 0 auto;
}

.test-intro-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.test-intro-card > i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.test-intro-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.test-intro-card > p {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.test-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 15px;
}

.test-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.test-info-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Level Test Modal */
.level-test-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.level-test-modal.active {
    display: flex;
}

.level-test-content {
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.test-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-color);
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.test-close-btn:hover {
    background: var(--tertiary-color);
    color: white;
    transform: rotate(90deg);
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.test-header h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin: 0;
}

.test-timer {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    background: rgba(30, 136, 229, 0.1);
    border-radius: 10px;
}

.test-progress-bar {
    position: relative;
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.test-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    transition: width 0.3s ease;
}

.test-progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-medium);
}

.test-question-container {
    min-height: 400px;
    margin-bottom: 2rem;
}

.test-question {
    animation: fadeInUp 0.3s ease;
}

.question-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.question-audio {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(30, 136, 229, 0.05);
    border-radius: 12px;
    border-left: 3px solid var(--primary-color);
}

.audio-play-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.audio-play-btn:hover {
    background: #1565C0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.audio-play-btn i {
    font-size: 1.1rem;
}

.question-type,
.question-level {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.question-type {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-color);
}

.question-level {
    background: rgba(48, 209, 88, 0.1);
    color: var(--accent-color);
}

.question-text {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.option-label:hover {
    border-color: var(--primary-color);
    background: rgba(30, 136, 229, 0.05);
    transform: translateX(5px);
}

.option-label.selected {
    border-color: var(--primary-color);
    background: rgba(30, 136, 229, 0.1);
}

.option-label input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    cursor: pointer;
}

.option-text {
    flex: 1;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.test-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* Level Result Card */
.level-result-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.5s ease;
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-header i {
    font-size: 3rem;
    color: #FFD54F;
    margin-bottom: 1rem;
}

.result-header h3 {
    font-size: 2rem;
    color: var(--text-dark);
    margin: 0;
}

.result-score {
    text-align: center;
    margin-bottom: 2rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 8px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.level-badge {
    display: inline-block;
    padding: 0.5rem 2rem;
    border-radius: 25px;
    background: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem;
}

.level-name {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin: 0.5rem 0 0;
}

.result-details {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 12px;
}

.result-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.result-stat i {
    color: var(--primary-color);
}

.result-breakdown {
    margin: 2rem 0;
}

.result-breakdown h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.level-breakdown {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.level-label {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 40px;
}

.level-bar {
    flex: 1;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.level-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    transition: width 0.5s ease;
}

.level-score {
    font-weight: 600;
    color: var(--text-medium);
    min-width: 50px;
    text-align: right;
}

.result-section {
    margin: 2rem 0;
}

.result-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.result-section h4 i {
    color: var(--primary-color);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.tag-success {
    background: rgba(48, 209, 88, 0.1);
    color: var(--accent-color);
}

.tag-warning {
    background: rgba(255, 159, 10, 0.1);
    color: #FFD54F;
}

.recommendations-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommendations-list li {
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-color);
    border-radius: 10px;
    border-left: 3px solid var(--primary-color);
    color: var(--text-dark);
}

.recommendations-list li:before {
    content: "✓";
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

.result-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.result-actions button {
    flex: 1;
}

.result-good {
    background: rgba(30, 136, 229, 0.15);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.result-low {
    background: rgba(255, 149, 0, 0.15);
    border: 2px solid var(--warning-color);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--warning-color);
}

.feedback-tip {
    background: rgba(30, 136, 229, 0.05);
    border: 1px dashed var(--primary-color);
    border-radius: 8px;
    padding: 10px;
    margin-top: 15px;
    text-align: center;
    color: var(--text-medium);
    font-size: 0.95rem;
    font-style: italic;
}

/* ===== Modern Result Modal ===== */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.result-modal.active {
    display: flex;
}

.result-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.result-modal-content {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
}

.result-modal-content::-webkit-scrollbar {
    width: 8px;
}

.result-modal-content::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.result-modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.result-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-dark);
    transition: all 0.3s ease;
    z-index: 10;
}

.result-modal-close:hover {
    background: rgba(255, 59, 48, 0.1);
    color: #FF2D55;
    transform: rotate(90deg);
}

/* Result Hero Section */
.result-hero {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    padding: 50px 30px 40px;
    text-align: center;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

.result-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: float 20s linear infinite;
}

.result-icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s ease infinite;
    position: relative;
}

.result-icon-wrapper i {
    font-size: 50px;
    color: white;
}

.result-hero h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.result-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
}

/* Score Section */
.result-score-section {
    padding: 40px 30px;
    text-align: center;
    background: linear-gradient(to bottom, #f8f9fa, white);
}

.score-ring-wrapper {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    position: relative;
}

.score-ring {
    transform: rotate(-90deg);
}

.score-ring-bg {
    stroke: #e0e0e0;
}

.score-ring-fill {
    stroke: url(#scoreGradient);
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.score-ring.animate .score-ring-fill {
    stroke-dashoffset: var(--score-offset, 283);
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.score-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.score-label {
    font-size: 0.9rem;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

.level-badge-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    box-shadow: 0 10px 30px rgba(30, 136, 229, 0.3);
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.stat-info {
    text-align: left;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-medium);
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Result Details */
.result-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 30px;
}

.result-panel {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 25px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.result-panel:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(30, 136, 229, 0.1);
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title i {
    color: var(--primary-color);
}

/* Level Progress */
.level-progress-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.level-progress-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.level-badge-small {
    min-width: 50px;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    color: white;
}

.level-badge-small.level-A1 { background: #30D158; }
.level-badge-small.level-A2 { background: #34c759; }
.level-badge-small.level-B1 { background: #90CAF9; }
.level-badge-small.level-B2 { background: #64B5F6; }
.level-badge-small.level-C1 { background: #1E88E5; }
.level-badge-small.level-C2 { background: #1565C0; }

.level-progress-bar {
    flex: 1;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.65, 0, 0.35, 1);
    width: 0;
}

.level-progress-item.animate .level-progress-fill {
    width: var(--progress-width, 0);
}

.level-progress-text {
    min-width: 45px;
    text-align: right;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Strength & Weakness Tags */
.strength-tags, .weakness-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.strength-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.2);
    transition: transform 0.2s ease;
}

.strength-tag:hover {
    transform: translateY(-2px);
}

.weakness-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.2);
    transition: transform 0.2s ease;
}

.weakness-tag:hover {
    transform: translateY(-2px);
}

/* Recommendations */
.result-recommendations {
    padding: 30px;
    background: linear-gradient(to bottom, white, #f8f9fa);
}

.recommendations-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 25px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.recommendations-title i {
    color: #FFD54F;
    font-size: 1.5rem;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.recommendation-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.recommendation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.recommendation-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(30, 136, 229, 0.15);
    transform: translateY(-4px);
}

.recommendation-number {
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.recommendation-text {
    flex: 1;
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 15px;
    padding: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline {
    padding: 16px 32px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 136, 229, 0.3);
}

.btn-primary-gradient {
    padding: 16px 32px;
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(30, 136, 229, 0.4);
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(30, 136, 229, 0.5);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .result-modal {
        padding: 10px;
    }
    
    .result-modal-content {
        border-radius: 20px;
        max-height: 95vh;
    }
    
    .result-hero {
        padding: 40px 20px 30px;
    }
    
    .result-hero h2 {
        font-size: 1.5rem;
    }
    
    .result-icon-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .result-icon-wrapper i {
        font-size: 40px;
    }
    
    .score-ring-wrapper {
        width: 160px;
        height: 160px;
    }
    
    .score-number {
        font-size: 2.5rem;
    }
    
    .level-badge-large {
        font-size: 1.2rem;
        padding: 12px 24px;
    }
    
    .result-stats {
        gap: 20px;
    }
    
    .result-details-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .recommendations-grid {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
        padding: 20px;
    }
    
    .btn-outline, .btn-primary-gradient {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Submit Loading Animation ===== */
#submitLoadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.95) 0%, rgba(21, 101, 192, 0.95) 100%);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#submitLoadingOverlay.active {
    opacity: 1;
}

.submit-loading-content {
    text-align: center;
    animation: slideUpBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.submit-loading-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s ease infinite;
    position: relative;
}

.submit-loading-icon::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    animation: ripple 1.5s ease infinite;
}

.submit-loading-icon i {
    font-size: 60px;
    color: white;
    animation: bounce 1s ease infinite;
}

.submit-loading-text {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.submit-loading-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.submit-loading-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    animation: dotPulse 1.4s ease infinite;
}

.submit-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.submit-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.1);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}
