/* ========================================
   TOEFL iBT - Shared Design System
   Version: 1.0
   ======================================== */

/* ----------------------------------------
   1. CSS Variables (Design Tokens)
   ---------------------------------------- */
:root {
    /* Core Colors */
    --primary-blue: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --accent-cyan: #06b6d4;
    
    /* Section-Specific Colors (can be overridden per section) */
    --section-primary: var(--primary-blue);
    --section-primary-dark: var(--primary-dark);
    --section-primary-light: var(--primary-light);
    --section-accent: var(--accent-cyan);
    
    /* Background Colors */
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --card-bg: #1e293b;
    --card-border: #334155;
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Section Accent Colors (for reference) */
    --reading-accent: #2563eb;    /* Blue */
    --listening-accent: #10b981;  /* Emerald */
    --speaking-accent: #f97316;   /* Orange */
    --writing-accent: #a855f7;    /* Purple */
}

/* ----------------------------------------
   2. Base Styles
   ---------------------------------------- */
* { 
    font-family: 'Inter', sans-serif; 
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 50%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* ----------------------------------------
   3. Layout Components
   ---------------------------------------- */

/* Header */
.toefl-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.toefl-header-content {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toefl-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.toefl-logo {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 16px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.05), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.toefl-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--section-primary-light), transparent);
}

.toefl-logo-icon {
    font-size: 1.875rem;
    color: var(--section-primary);
}

.toefl-logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.025em;
    margin: 0;
}

.toefl-logo-text p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

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

/* Main Layout */
.toefl-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    gap: 2rem;
}

.toefl-sidebar {
    width: 18rem;
    flex-shrink: 0;
}

.toefl-sidebar-content {
    position: sticky;
    top: 7rem;
}

.toefl-main {
    flex: 1;
}

/* ----------------------------------------
   4. Glass Card Component
   ---------------------------------------- */
.glass-frame {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.05), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.glass-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--section-primary-light), transparent);
}

.glass-frame-section {
    border-left: 4px solid var(--section-primary);
}

/* ----------------------------------------
   5. Button Components
   ---------------------------------------- */
.btn-3d {
    position: relative;
    background: linear-gradient(145deg, var(--section-primary-light) 0%, var(--section-primary) 50%, var(--section-primary-dark) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3), 
                0 8px 16px rgba(37, 99, 235, 0.2), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2), 
                inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-3d:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4), 
                0 12px 24px rgba(37, 99, 235, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-3d:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3), 
                inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-3d:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-3d-secondary {
    background: linear-gradient(145deg, #475569 0%, #334155 50%, #1e293b 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-3d-secondary:hover {
    box-shadow: 0 8px 20px rgba(71, 85, 105, 0.4), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-record {
    background: linear-gradient(145deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3), 
                0 8px 16px rgba(239, 68, 68, 0.2), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-record:hover {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4), 
                0 12px 24px rgba(239, 68, 68, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-record.recording {
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ----------------------------------------
   6. Timer Display
   ---------------------------------------- */
.timer-display {
    font-family: 'Space Grotesk', monospace;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 
                0 0 20px rgba(37, 99, 235, 0.2);
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.timer-box {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Space Grotesk', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f87171;
}

.timer-box.warning {
    animation: pulse-timer 1s infinite;
}

@keyframes pulse-timer {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

/* ----------------------------------------
   7. Module Navigation
   ---------------------------------------- */
.module-btn {
    background: linear-gradient(145deg, rgba(51, 65, 85, 0.5) 0%, rgba(30, 41, 59, 0.8) 100%);
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}

.module-btn:hover {
    border-color: var(--section-primary-light);
    color: var(--text-primary);
}

.module-btn.active {
    background: linear-gradient(145deg, var(--section-primary) 0%, var(--section-primary-dark) 100%);
    border-color: var(--section-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* ----------------------------------------
   8. Question Cards
   ---------------------------------------- */
.question-frame {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(51, 65, 85, 0.4);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.question-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--section-primary), transparent);
    opacity: 0.5;
}

/* ----------------------------------------
   9. Badges
   ---------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-blue {
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: #60a5fa;
}

.badge-green {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.badge-purple {
    background: rgba(147, 51, 234, 0.2);
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: #c084fc;
}

.badge-orange {
    background: rgba(249, 115, 22, 0.2);
    border: 1px solid rgba(249, 115, 22, 0.3);
    color: #fb923c;
}

/* Section-specific badges */
.badge-section {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--section-accent);
}

/* ----------------------------------------
   10. Status Badges
   ---------------------------------------- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.status-recording {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.status-uploading {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.status-completed {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.status-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* ----------------------------------------
   11. Question Number Badge
   ---------------------------------------- */
.q-number {
    background: linear-gradient(145deg, var(--section-primary) 0%, var(--section-primary-dark) 100%);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

/* ----------------------------------------
   12. Progress Bar
   ---------------------------------------- */
.progress-container {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    border-radius: 10px;
    padding: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.progress-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--section-primary) 0%, var(--section-accent) 100%);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer { 
    100% { left: 100%; } 
}

/* ----------------------------------------
   13. Options (Multiple Choice)
   ---------------------------------------- */
.option-3d {
    background: linear-gradient(145deg, rgba(51, 65, 85, 0.3) 0%, rgba(30, 41, 59, 0.5) 100%);
    border: 2px solid rgba(71, 85, 105, 0.3);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.option-3d:hover {
    border-color: var(--section-primary-light);
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.1) 0%, rgba(30, 41, 59, 0.6) 100%);
    transform: translateX(4px);
}

.option-3d.selected {
    border-color: var(--section-primary);
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.2) 0%, rgba(30, 41, 59, 0.8) 100%);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

.option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.option-3d.selected .option-radio {
    background: var(--section-primary);
    border-color: var(--section-primary);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.option-3d.selected .option-radio::after {
    opacity: 1;
}

/* ----------------------------------------
   14. Fill-in-the-Blank Input
   ---------------------------------------- */
.fill-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--section-primary-light);
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    padding: 0.25rem 0.5rem;
    min-width: 80px;
    transition: all 0.3s;
    font-size: 1.1em;
}

.fill-input:focus {
    outline: none;
    border-bottom-color: var(--accent-cyan);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.fill-input.correct {
    border-bottom-color: var(--success);
    color: var(--success);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.fill-input.incorrect {
    border-bottom-color: var(--error);
    color: var(--error);
}

/* ----------------------------------------
   15. Audio Player Components
   ---------------------------------------- */
.audio-player {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.audio-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--section-primary), transparent);
}

.play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--section-primary-light) 0%, var(--section-primary) 50%, var(--section-primary-dark) 100%);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4), 
                inset 0 2px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5);
}

.play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.audio-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    margin: 1rem 0;
}

.audio-bar {
    width: 4px;
    background: linear-gradient(180deg, var(--section-primary-light), var(--section-accent));
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.audio-bar:nth-child(1) { height: 20%; animation-delay: 0s; }
.audio-bar:nth-child(2) { height: 40%; animation-delay: 0.1s; }
.audio-bar:nth-child(3) { height: 60%; animation-delay: 0.2s; }
.audio-bar:nth-child(4) { height: 80%; animation-delay: 0.3s; }
.audio-bar:nth-child(5) { height: 100%; animation-delay: 0.4s; }
.audio-bar:nth-child(6) { height: 80%; animation-delay: 0.5s; }
.audio-bar:nth-child(7) { height: 60%; animation-delay: 0.6s; }
.audio-bar:nth-child(8) { height: 40%; animation-delay: 0.7s; }
.audio-bar:nth-child(9) { height: 20%; animation-delay: 0.8s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

.audio-player.playing .audio-bar {
    animation-play-state: running;
}

.audio-player:not(.playing) .audio-bar {
    animation-play-state: paused;
    opacity: 0.3;
}

.transcript-box {
    background: rgba(15, 23, 42, 0.6);
    border-left: 4px solid var(--section-primary);
    padding: 1rem 1.25rem;
    border-radius: 0 12px 12px 0;
    margin-top: 1rem;
    font-style: italic;
    color: var(--text-secondary);
}

/* ----------------------------------------
   16. Modals
   ---------------------------------------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 16px;
    padding: 2rem;
    max-width: 32rem;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-icon {
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, var(--section-primary) 0%, var(--section-accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
}

/* ----------------------------------------
   17. Writing Components
   ---------------------------------------- */
.writing-textarea {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 41, 59, 0.4) 100%);
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s;
    width: 100%;
    min-height: 150px;
}

.writing-textarea:focus {
    outline: none;
    border-color: var(--section-primary);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
}

.word-counter {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 0.5rem;
}

.word-counter.warning { color: var(--warning); }
.word-counter.success { color: var(--success); }

.word-box {
    background: linear-gradient(145deg, rgba(51, 65, 85, 0.5) 0%, rgba(30, 41, 59, 0.8) 100%);
    border: 2px solid rgba(71, 85, 105, 0.4);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: grab;
    transition: all 0.2s;
    user-select: none;
    display: inline-block;
    margin: 0.25rem;
}

.word-box:hover {
    border-color: var(--section-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.word-box.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.sentence-builder {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 41, 59, 0.4) 100%);
    border: 2px dashed rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.sentence-builder.drag-over {
    border-color: var(--section-primary);
    background: rgba(59, 130, 246, 0.1);
}

/* ----------------------------------------
   18. Speaking Components
   ---------------------------------------- */
.recording-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 20px;
    color: #f87171;
    font-weight: 600;
    font-size: 0.875rem;
}

.recording-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: blink 1s infinite;
}

.upload-progress {
    width: 100%;
    height: 4px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--section-primary), var(--section-accent));
    transition: width 0.3s ease;
    width: 0%;
}

.interviewer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--section-primary), var(--section-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* ----------------------------------------
   19. Utility Classes
   ---------------------------------------- */
.hidden { display: none !important; }

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

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

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-white { color: white; }
.text-slate-300 { color: var(--text-secondary); }
.text-slate-400 { color: var(--text-muted); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.w-full { width: 100%; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.ml-12 { margin-left: 3rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.sticky { position: sticky; }
.top-28 { top: 7rem; }

.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* ----------------------------------------
   20. Scrollbar Styles
   ---------------------------------------- */
::-webkit-scrollbar { 
    width: 8px; 
}

::-webkit-scrollbar-track { 
    background: var(--dark-bg); 
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--section-primary), var(--section-accent));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--section-primary-light), var(--section-accent));
}

/* ----------------------------------------
   21. Responsive Adjustments
   ---------------------------------------- */
@media (max-width: 1024px) {
    .toefl-container {
        flex-direction: column;
    }
    
    .toefl-sidebar {
        width: 100%;
        order: 2;
    }
    
    .toefl-sidebar-content {
        position: static;
    }
    
    .toefl-main {
        order: 1;
    }
}

@media (max-width: 640px) {
    .toefl-header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .toefl-brand {
        width: 100%;
        justify-content: center;
    }
    
    .timer-display {
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
    }
    
    .glass-frame {
        padding: 1rem;
    }
}
