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

/* Ensure consistent box model */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Fix common browser inconsistencies */
button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    background: transparent;
    border: none;
    outline: none;
}

/* Ensure buttons are clickable */
button {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Cross-browser compatibility fixes */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

:root {
    /* Premium Color Palette - Inspired by modern design systems */
    --primary-color: #6366f1; /* Indigo 500 - More sophisticated than blue */
    --primary-dark: #4f46e5; /* Indigo 600 */
    --primary-light: #818cf8; /* Indigo 400 */
    --secondary-color: #10b981; /* Emerald 500 - More vibrant green */
    --secondary-dark: #059669; /* Emerald 600 */
    --accent-color: #f59e0b; /* Amber 500 - Warmer than red */
    --accent-dark: #d97706; /* Amber 600 */
    --warning-color: #ef4444; /* Red 500 - Cleaner red */
    --success-color: #22c55e; /* Green 500 - Fresh green */
    --info-color: #3b82f6; /* Blue 500 */
    
    /* Light Mode Colors - Sophisticated palette */
    --bg-primary: #fafbfc; /* Slightly warmer than pure white */
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8fafc; /* Very subtle blue tint */
    --bg-quaternary: #f1f5f9; /* For cards and elevated surfaces */
    --text-primary: #0f172a; /* Slate 900 - Softer than pure black */
    --text-secondary: #475569; /* Slate 600 - Better contrast */
    --text-muted: #64748b; /* Slate 500 - More readable */
    --text-subtle: #94a3b8; /* Slate 400 - For subtle text */
    --border-color: #e2e8f0; /* Slate 200 - Softer borders */
    --border-subtle: #f1f5f9; /* Slate 100 - Very subtle borders */
    --shadow-color: rgba(15, 23, 42, 0.08); /* More sophisticated shadow */
    --shadow-subtle: rgba(15, 23, 42, 0.04);
    
    /* Neutral Colors (Light Mode) - Refined slate palette */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Premium Typography System */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-family-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    
    /* Typography Scale - Harmonious sizing */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    --font-size-5xl: 3rem;      /* 48px */
    --font-size-6xl: 3.75rem;   /* 60px */
    
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;
    
    /* Spacing Scale - Harmonious 8px grid */
    --space-0: 0;
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.25rem;  /* 20px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    --space-10: 2.5rem;  /* 40px */
    --space-12: 3rem;    /* 48px */
    --space-16: 4rem;    /* 64px */
    --space-20: 5rem;    /* 80px */
    --space-24: 6rem;    /* 96px */
    --space-32: 8rem;    /* 128px */
    
    /* Border Radius - Modern, consistent system */
    --radius-none: 0;
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.375rem;  /* 6px */
    --radius-lg: 0.5rem;    /* 8px */
    --radius-xl: 0.75rem;   /* 12px */
    --radius-2xl: 1rem;     /* 16px */
    --radius-3xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;
    
    /* Premium Shadow System */
    --shadow-xs: 0 1px 2px 0 var(--shadow-subtle);
    --shadow-sm: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
    --shadow-md: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
    --shadow-lg: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -4px var(--shadow-color);
    --shadow-xl: 0 20px 25px -5px var(--shadow-color), 0 8px 10px -6px var(--shadow-color);
    --shadow-2xl: 0 25px 50px -12px var(--shadow-color);
    --shadow-inner: inset 0 2px 4px 0 var(--shadow-color);
    
    /* Transitions - Smooth and purposeful */
    --transition-none: none;
    --transition-all: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-colors: color 150ms cubic-bezier(0.4, 0, 0.2, 1), background-color 150ms cubic-bezier(0.4, 0, 0.2, 1), border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-transform: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-opacity: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-Index Scale - Proper layering system */
    --z-0: 0;
    --z-10: 10;
    --z-20: 20;
    --z-30: 30;
    --z-40: 40;
    --z-50: 50;
    --z-modal: 1000;
    --z-tooltip: 1010;
    --z-notification: 1020;
    --z-auto: auto;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --secondary-color: #008000;
        --accent-color: #ff0000;
        --gray-600: #000000;
        --gray-700: #000000;
        --gray-800: #000000;
        --gray-900: #000000;
    }
    
    .grade-btn,
    .subtest-btn,
    .option-item,
    .module-card {
        border-width: 3px;
        border-color: #000000;
        color: #000000;
    }
    
    .subtest-btn .subtest-desc,
    .module-card p {
        color: #000000;
    }
    
    .grade-btn:hover,
    .subtest-btn:hover,
    .option-item:hover {
        background-color: #ffff00;
        color: #000000;
    }
}

/* Dark Mode Theme - Enhanced contrast palette */
[data-theme="dark"] {
    --bg-primary: #0f0f0f; /* Slightly lighter than pure black for better contrast */
    --bg-secondary: #1a1a1a; /* Dark charcoal with better contrast */
    --bg-tertiary: #262626; /* Lighter charcoal for better separation */
    --bg-quaternary: #333333; /* For elevated surfaces with better contrast */
    --text-primary: #ffffff; /* Pure white for maximum contrast */
    --text-secondary: #e5e5e5; /* High contrast secondary text */
    --text-muted: #b3b3b3; /* Better contrast muted text */
    --text-subtle: #999999; /* Improved subtle text contrast */
    --border-color: #4a4a4a; /* Better contrast borders */
    --border-subtle: #333333; /* Improved subtle borders */
    --shadow-color: rgba(0, 0, 0, 0.5); /* Stronger shadows for dark mode */
    --shadow-subtle: rgba(0, 0, 0, 0.3);
    
    /* Dark Mode Neutral Colors - Enhanced contrast palette */
    --gray-50: #1a1a1a;
    --gray-100: #2a2a2a;
    --gray-200: #404040;
    --gray-300: #555555;
    --gray-400: #777777;
    --gray-500: #999999;
    --gray-600: #bbbbbb;
    --gray-700: #dddddd;
    --gray-800: #eeeeee;
    --gray-900: #ffffff;
    
    /* Dark Mode Accent Colors - High contrast and accessible */
    --primary-color: #a78bfa; /* Lighter violet for better contrast */
    --primary-dark: #8b5cf6; /* Medium violet */
    --primary-light: #c4b5fd; /* Light violet */
    --secondary-color: #34d399; /* Brighter green for better contrast */
    --secondary-dark: #10b981; /* Darker green */
    --accent-color: #fbbf24; /* Bright amber for visibility */
    --accent-dark: #f59e0b; /* Darker amber */
    --warning-color: #fca5a5; /* Lighter red for better contrast */
    --success-color: #4ade80; /* Brighter green for better contrast */
    --info-color: #93c5fd; /* Lighter blue for better contrast */
}

/* System Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --text-primary: #ffffff;
        --text-secondary: #e2e8f0;
        --text-muted: #94a3b8;
        --border-color: #475569;
        --shadow-color: rgba(0, 0, 0, 0.3);
        
        --gray-50: #0f172a;
        --gray-100: #1e293b;
        --gray-200: #334155;
        --gray-300: #475569;
        --gray-400: #64748b;
        --gray-500: #94a3b8;
        --gray-600: #cbd5e1;
        --gray-700: #e2e8f0;
        --gray-800: #f1f5f9;
        --gray-900: #f8fafc;
        
        --primary-color: #60a5fa;
        --primary-dark: #3b82f6;
        --secondary-color: #34d399;
        --accent-color: #f87171;
    }
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: var(--transition-colors);
    letter-spacing: -0.01em; /* Slightly tighter letter spacing for modern look */
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* Header - Premium design */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--primary-light) 100%);
    color: white;
    padding: var(--space-12) 0 var(--space-16) 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
    z-index: var(--z-0);
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-2) var(--space-3);
    color: white;
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.theme-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.theme-toggle .icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: var(--space-1);
    vertical-align: middle;
}

.logo {
    font-family: var(--font-family-display);
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: var(--z-10);
}

.tagline {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-light);
    opacity: 0.95;
    letter-spacing: -0.01em;
    line-height: var(--line-height-relaxed);
    position: relative;
    z-index: var(--z-10);
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.main {
    min-height: calc(100vh - 200px);
    padding: var(--space-12) 0;
}

/* Welcome Section - Premium typography */
.welcome-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.welcome-section h2 {
    font-family: var(--font-family-display);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-6);
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: var(--line-height-tight);
}

.welcome-section p {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-normal);
    color: var(--text-secondary);
    margin-bottom: var(--space-12);
    line-height: var(--line-height-relaxed);
    letter-spacing: -0.01em;
}

/* Grade Selection - Modern card design */
.grade-selection {
    margin-bottom: var(--space-12);
}

.grade-selection h3 {
    font-family: var(--font-family-display);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-8);
    color: var(--text-primary);
    letter-spacing: -0.01em;
    text-align: center;
}

.grade-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-4);
    max-width: 800px;
    margin: 0 auto;
}

.grade-btn {
    background: #ffffff; /* Fallback */
    background: var(--bg-secondary);
    border: 1px solid #e2e8f0; /* Fallback */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-6) var(--space-4);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: #0f172a; /* Fallback */
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-all);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.grade-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: var(--z-0);
}

.grade-btn:hover::before {
    left: 100%;
}

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

/* Dark mode hover states for grade buttons */
[data-theme="dark"] .grade-btn:hover {
    color: var(--text-primary);
    background: var(--primary-color);
}

.grade-btn:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
}

.grade-btn.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Subtest Selection - Premium card design */
.subtest-selection {
    margin-bottom: var(--space-12);
}

.subtest-selection h3 {
    font-family: var(--font-family-display);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-8);
    color: var(--text-primary);
    letter-spacing: -0.01em;
    text-align: center;
}

.subtest-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-6);
    max-width: 1000px;
    margin: 0 auto;
}

.subtest-btn {
    background: #ffffff; /* Fallback */
    background: var(--bg-secondary);
    border: 1px solid #e2e8f0; /* Fallback */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: var(--space-8) var(--space-6);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: #0f172a; /* Fallback */
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-all);
    box-shadow: var(--shadow-sm);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.subtest-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: var(--z-0);
}

.subtest-btn:hover::before {
    opacity: 0.05;
}

.subtest-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Dark mode hover states - ensure white text on dark backgrounds */
[data-theme="dark"] .subtest-btn:hover {
    color: var(--text-primary);
    background: var(--secondary-color);
}

[data-theme="dark"] .subtest-btn:hover .subtest-name,
[data-theme="dark"] .subtest-btn:hover .subtest-desc {
    color: var(--text-primary);
}

.subtest-btn:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
    border-color: var(--secondary-color);
}

.subtest-btn.selected {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.subtest-btn .subtest-name {
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-2);
    position: relative;
    z-index: var(--z-10);
    font-size: var(--font-size-xl);
    letter-spacing: -0.01em;
}

.subtest-btn .subtest-desc {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    opacity: 1;
    position: relative;
    z-index: var(--z-10);
    line-height: var(--line-height-relaxed);
}

/* Practice Options */
.practice-options {
    margin-bottom: var(--space-8);
}

.practice-options h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-6);
    color: var(--gray-900);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    max-width: 600px;
    margin: 0 auto var(--space-8);
}

.option-item {
    display: flex;
    align-items: center;
    padding: var(--space-4);
    background: #ffffff; /* Fallback */
    background: var(--bg-secondary);
    border: 2px solid #e2e8f0; /* Fallback */
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.option-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* Dark mode styling for option items */
[data-theme="dark"] .option-item {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .option-item .option-text {
    color: var(--text-primary);
}

/* Dark mode hover states for option items */
[data-theme="dark"] .option-item:hover {
    background: var(--primary-color);
    color: var(--text-primary);
}

[data-theme="dark"] .option-item:hover .option-text {
    color: var(--text-primary);
}

.option-item:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
}

.option-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    margin-right: var(--space-3);
    position: relative;
    transition: all var(--transition-fast);
}

.option-item input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.option-item input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: var(--font-size-sm);
    font-weight: bold;
}

.option-text {
    font-weight: 500;
    color: var(--text-primary);
}

/* Start Practice Button - Premium design */
.start-practice-btn {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-2xl);
    padding: var(--space-6) var(--space-12);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: var(--transition-all);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.start-practice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.start-practice-btn:hover::before {
    left: 100%;
}

.start-practice-btn:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Practice Section */
.practice-section {
    max-width: 1000px;
    margin: 0 auto;
}

.practice-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-4);
    align-items: center;
    margin-bottom: var(--space-8);
    padding: var(--space-6);
    background: #ffffff; /* Fallback */
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.practice-info h2 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.practice-info p {
    color: var(--text-primary);
    font-size: var(--font-size-lg);
}

.timer-container {
    text-align: center;
}

.timer {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.timer-label {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Practice Content - Premium card design */
.practice-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-3xl);
    padding: var(--space-12);
    margin-bottom: var(--space-12);
    box-shadow: var(--shadow-xl);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition-all);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.practice-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
}

/* Subtest Instructions - Premium typography */
.subtest-instructions h3 {
    font-family: var(--font-family-display);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-6);
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: var(--line-height-tight);
}

.subtest-instructions p {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-normal);
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
    line-height: var(--line-height-relaxed);
    letter-spacing: -0.01em;
}

/* Practice Controls */
.practice-controls {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
}

.control-btn {
    background: var(--gray-100);
    color: #000000; /* Fallback */
    color: var(--text-primary);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.control-btn:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

/* Dark mode styling for control buttons */
[data-theme="dark"] .control-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* Dark mode hover states for control buttons */
[data-theme="dark"] .control-btn:hover {
    background: var(--primary-color);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

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

.control-btn.primary:hover {
    background: var(--primary-dark);
}

/* Scoring Panel */
.scoring-panel {
    background: #ffffff; /* Fallback */
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-8);
}

.scoring-panel h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--gray-900);
}

.score-inputs {
    display: flex;
    gap: var(--space-4);
    align-items: center;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.score-inputs label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 500;
    color: var(--text-primary);
}

.score-inputs input {
    width: 80px;
    padding: var(--space-2) var(--space-3);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
}

.score-result {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--success-color);
    text-align: center;
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

/* Educator Section */
.educator-section {
    max-width: 1000px;
    margin: 0 auto;
}

.educator-section h2 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    margin-bottom: var(--space-8);
    color: var(--gray-900);
    text-align: center;
}

.training-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.module-card {
    background: #ffffff; /* Fallback */
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-fast);
}

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

/* Dark mode hover states for module cards */
[data-theme="dark"] .module-card:hover {
    background: var(--primary-color);
    color: var(--text-primary);
}

[data-theme="dark"] .module-card:hover h3,
[data-theme="dark"] .module-card:hover p {
    color: var(--text-primary);
}

.module-card:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.module-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

.module-card p {
    color: var(--text-primary);
    margin-bottom: var(--space-6);
}

.module-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.module-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Footer - Premium design */
.footer {
    background: var(--bg-tertiary);
    padding: var(--space-12) 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

.footer-links {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.footer-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: var(--font-size-sm);
    cursor: pointer;
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--primary-dark);
}

/* Disclaimer Section */
.disclaimer-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
    text-align: left;
}

.disclaimer-section h3 {
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-4);
    text-align: center;
}

.disclaimer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.disclaimer-item {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    padding: var(--space-2) 0;
}

.disclaimer-item strong {
    color: var(--primary-color);
    font-weight: var(--font-weight-semibold);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-3);
    }
    
    .logo {
        font-size: var(--font-size-3xl);
    }
    
    .tagline {
        font-size: var(--font-size-base);
    }
    
    .grade-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .subtest-buttons {
        grid-template-columns: 1fr;
    }
    
    .practice-header {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
    
    .practice-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .score-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .training-modules {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-stats {
        grid-template-columns: 1fr;
    }
    
    .disclaimer-section {
        padding: var(--space-4);
        margin-bottom: var(--space-6);
    }
    
    .disclaimer-section h3 {
        font-size: var(--font-size-base);
    }
    
    .disclaimer-item {
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 480px) {
    .grade-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-stats {
        grid-template-columns: 1fr;
    }
    
    /* Enhanced touch targets for mobile */
    button,
    .grade-btn,
    .subtest-btn {
        min-height: 44px;
        min-width: 44px;
        padding: var(--space-3) var(--space-4);
    }
    
    /* Improve readability on small screens */
    body {
        font-size: 16px; /* Prevents iOS zoom on input focus */
    }
    
    h1, .logo {
        font-size: var(--font-size-2xl);
    }
    
    h2 {
        font-size: var(--font-size-xl);
    }
    
    h3 {
        font-size: var(--font-size-lg);
    }
    
    /* Stack controls vertically */
    .practice-controls,
    .score-inputs {
        flex-direction: column;
        width: 100%;
    }
    
    .practice-controls button {
        width: 100%;
    }
    
    /* Full-width inputs on mobile */
    input[type="number"],
    input[type="text"],
    textarea {
        width: 100%;
        font-size: 16px; /* Prevents zoom on focus */
    }
    
    /* Improve spacing in modals */
    .modal-content {
        max-width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

/* Cross-browser button reset */
button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Cross-browser input styling */
input, select, textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* Cross-browser scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Firefox scrollbar - limited browser support */
* {
    /* scrollbar-width: thin; */ /* Not supported by Chrome < 121, Safari, Safari on iOS, Samsung Internet */
    /* scrollbar-color: var(--border-color) var(--bg-tertiary); */ /* Not supported by Chrome < 121, Safari, Safari on iOS, Samsung Internet */
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .timer {
        font-size: var(--font-size-5xl);
    }
}

/* Educator Modal Styles */
.educator-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.modal-content {
    background: #ffffff; /* Fallback */
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    margin: var(--space-4);
    box-shadow: var(--shadow-lg);
}

.educator-content h3 {
    margin-top: 0;
    color: var(--gray-900);
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-6);
}

.guide-section, .error-types, .error-patterns {
    margin-bottom: var(--space-6);
}

.guide-section h4, .error-types h4, .error-patterns h4 {
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-3);
}

.guide-section ul, .error-types ul, .error-patterns ul {
    margin-left: var(--space-6);
    color: var(--text-primary);
}

.scoring-practice {
    background: var(--gray-50);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
}

.sample-response {
    margin-bottom: var(--space-4);
}

.sample-response h4 {
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.scoring-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-3);
    margin: var(--space-4) 0;
}

.scoring-inputs input {
    padding: var(--space-2);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
}

.scoring-result {
    background: var(--primary-color);
    color: white;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    text-align: center;
    font-weight: 600;
    margin-top: var(--space-4);
}

.close-modal {
    background: var(--gray-600);
    color: white;
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: var(--font-size-base);
    margin-top: var(--space-6);
    width: 100%;
}

.close-modal:hover {
    background: var(--gray-700);
}

/* Theme transitions - Smooth and sophisticated */
* {
    transition: var(--transition-colors);
}

/* Enhanced focus states for better accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* High contrast focus states for better visibility */
@media (prefers-contrast: high) {
    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
        outline: 4px solid var(--primary-color);
        outline-offset: 4px;
        box-shadow: 0 0 0 2px var(--primary-color);
    }
}

/* Premium hover effects */
.grade-btn,
.subtest-btn,
.option-item,
.module-card {
    position: relative;
    overflow: hidden;
}

/* Subtle animation for interactive elements */
@keyframes subtle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.grade-btn:hover,
.subtest-btn:hover {
    animation: subtle-pulse 0.6s ease-in-out;
}

/* Transform Utility Classes */
.transform-hover {
    transform: translateY(-2px);
    transition: transform var(--transition-fast);
}

.transform-hover:hover {
    transform: translateY(-4px);
}

.transform-hover-subtle {
    transform: translateY(-1px);
    transition: transform var(--transition-fast);
}

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

/* Utility classes */
.hidden {
    display: none;
}

.show {
    display: block;
}

/* Theme-specific adjustments */
[data-theme="dark"] .practice-content {
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .modal-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .scoring-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .footer {
    background: var(--bg-tertiary);
    border-top-color: var(--border-color);
}

/* Ensure text remains readable in all themes */
[data-theme="dark"] .welcome-section p,
[data-theme="dark"] .practice-info p,
[data-theme="dark"] .timer-label,
[data-theme="dark"] .control-btn,
[data-theme="dark"] .footer p,
[data-theme="dark"] .module-card p,
[data-theme="dark"] .guide-section h4,
[data-theme="dark"] .guide-section ul,
[data-theme="dark"] .sample-response h4 {
    color: var(--text-primary);
}

/* Additional dark mode contrast improvements */
[data-theme="dark"] .grade-btn,
[data-theme="dark"] .subtest-btn,
[data-theme="dark"] .option-item,
[data-theme="dark"] .module-card {
    border-color: var(--border-color);
}

[data-theme="dark"] .grade-btn:hover,
[data-theme="dark"] .subtest-btn:hover,
[data-theme="dark"] .option-item:hover,
[data-theme="dark"] .module-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

/* Ensure proper contrast for interactive elements in dark mode */
[data-theme="dark"] .letter-item,
[data-theme="dark"] .word-item {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .letter-item:hover,
[data-theme="dark"] .word-item:hover {
    background: var(--primary-color);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

/* Keyboard Navigation Styles */
.keyboard-navigation *:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.keyboard-navigation button:focus,
.keyboard-navigation input:focus,
.keyboard-navigation select:focus,
.keyboard-navigation textarea:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* High Contrast Mode */
.high-contrast {
    --primary-color: #0000ff;
    --secondary-color: #008000;
    --accent-color: #ff0000;
    --text-primary: #000000;
    --text-secondary: #000000;
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --border-color: #000000;
    --shadow-color: rgba(0, 0, 0, 0.8);
}

.high-contrast .grade-btn,
.high-contrast .subtest-btn,
.high-contrast .option-item,
.high-contrast .module-card {
    border-width: 3px;
    border-color: #000000;
    color: #000000;
    background: #ffffff;
}

.high-contrast .grade-btn:hover,
.high-contrast .subtest-btn:hover,
.high-contrast .option-item:hover,
.high-contrast .module-card:hover {
    background-color: #ffff00;
    color: #000000;
    border-color: #000000;
}

.high-contrast .practice-content {
    border: 3px solid #000000;
    background: #ffffff;
}

.high-contrast .letter-item,
.high-contrast .word-item {
    border: 3px solid #000000;
    background: #ffffff;
    color: #000000;
}

.high-contrast .letter-item:hover,
.high-contrast .word-item:hover {
    background: #ffff00;
    color: #000000;
}

/* Font Size Controls */
.font-size-small {
    --font-size-base: 0.875rem;
    --font-size-lg: 1rem;
    --font-size-xl: 1.125rem;
    --font-size-2xl: 1.25rem;
    --font-size-3xl: 1.5rem;
    --font-size-4xl: 1.875rem;
    --font-size-5xl: 2.25rem;
}

.font-size-large {
    --font-size-base: 1.125rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.375rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
}

.font-size-extra-large {
    --font-size-base: 1.25rem;
    --font-size-lg: 1.375rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 1.75rem;
    --font-size-3xl: 2.25rem;
    --font-size-4xl: 2.75rem;
    --font-size-5xl: 3.5rem;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
    
    .grade-btn:hover,
    .subtest-btn:hover,
    .option-item:hover,
    .module-card:hover {
        transform: none;
    }
}

/* Settings and Progress Panels */
.settings-section,
.progress-section {
    max-width: 1000px;
    margin: 0 auto;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.settings-card,
.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
}

.settings-card h3,
.stat-card h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.setting-item label {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin-right: var(--space-4);
}

.setting-item select,
.setting-item input[type="number"] {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.stat-card p {
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
}

.stat-card span {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

/* Session History */
.session-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    transition: var(--transition-fast);
}

.session-item:hover {
    background: var(--bg-quaternary);
    border-color: var(--primary-color);
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.session-title {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.session-date {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.session-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--space-2);
    font-size: var(--font-size-sm);
}

.session-stat {
    text-align: center;
    padding: var(--space-2);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.session-stat-label {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.session-stat-value {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-top: var(--space-1);
}

/* Grade Performance Chart */
.grade-performance {
    display: grid;
    gap: var(--space-3);
}

.grade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.grade-item:hover {
    background: var(--bg-quaternary);
    border-color: var(--primary-color);
}

.grade-name {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.grade-stats {
    display: flex;
    gap: var(--space-4);
    font-size: var(--font-size-sm);
}

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

.grade-stat-label {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.grade-stat-value {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-top: var(--space-1);
}

/* Dark mode adjustments for settings */
[data-theme="dark"] .settings-card,
[data-theme="dark"] .stat-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .setting-item {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .setting-item select,
[data-theme="dark"] .setting-item input[type="number"] {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .session-item {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .session-item:hover {
    background: var(--bg-quaternary);
}

[data-theme="dark"] .grade-item {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .grade-item:hover {
    background: var(--bg-quaternary);
}

/* Print styles */
@media print {
    .header,
    .footer,
    .practice-controls,
    .scoring-panel,
    .settings-section,
    .progress-section {
        display: none;
    }
    
    .practice-content {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
    
    body {
        background: white;
        color: black;
    }
}
