/* 10 Code Test - Premium Styles */
/* Using system font stack for instant rendering without FOUT */

:root {
    /* Brand Colors (theme-independent) */
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --success: #10b981;
    --success-light: #34d399;
    --danger: #ef4444;
    --danger-light: #f87171;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --cyan: #06b6d4;
    --cyan-light: #22d3ee;

    /* Constant values */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Theme Variables */
:root {
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(148, 163, 184, 0.1);
    --border-hover: rgba(148, 163, 184, 0.2);

    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(148, 163, 184, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.05);

    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(148, 163, 184, 0.1);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);

    --gradient-bg-1: rgba(59, 130, 246, 0.12);
    --gradient-bg-2: rgba(139, 92, 246, 0.1);
    --gradient-bg-3: rgba(16, 185, 129, 0.08);

    /* Gray scale aliases */
    --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;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 24px;
    padding-bottom: 100px;
    line-height: 1.6;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Sophisticated animated background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, var(--gradient-bg-1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, var(--gradient-bg-2) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 50% 80%, var(--gradient-bg-3) 0%, transparent 50%);
    z-index: -2;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.75rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 50%, var(--primary-light) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

h1.green {
    background: linear-gradient(135deg, #059669 0%, var(--success-light) 50%, #059669 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
}

h1.red {
    background: linear-gradient(135deg, #dc2626 0%, var(--danger-light) 50%, #dc2626 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
}

h1.purple {
    background: linear-gradient(135deg, #7c3aed 0%, var(--accent-light) 50%, #7c3aed 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
}

h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-100);
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-200);
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Glass Card Base */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

/* Navigation */
.nav-container {
    text-align: center;
    margin-bottom: 2rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--gray-400);
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateX(-4px);
    box-shadow: var(--shadow-md);
}

/* Forms */
form {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Question blocks */
.question-block {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all var(--transition-base);
    position: relative;
}

.question-block::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.question-block:hover {
    border-color: rgba(96, 165, 250, 0.2);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 30px -10px rgba(59, 130, 246, 0.2);
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px -2px rgba(59, 130, 246, 0.5);
    letter-spacing: 0.02em;
}

.question-text {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Radio buttons - Premium Style */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.radio-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(96, 165, 250, 0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.radio-option:hover {
    background: var(--bg-tertiary);
    border-color: rgba(96, 165, 250, 0.25);
    transform: translateX(4px);
}

.radio-option:hover::before {
    opacity: 1;
}

.radio-option input[type="radio"] {
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-500);
    border-radius: 50%;
    margin-right: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    position: relative;
}

.radio-option input[type="radio"]::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: var(--primary-light);
    border-radius: 50%;
    transform: scale(0);
    transition: transform var(--transition-bounce);
}

.radio-option input[type="radio"]:checked {
    border-color: var(--primary-light);
    box-shadow: 0 0 12px -2px rgba(96, 165, 250, 0.5);
}

.radio-option input[type="radio"]:checked::after {
    transform: scale(1);
}

.radio-option:has(input:checked) {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: inset 0 0 20px -10px rgba(96, 165, 250, 0.3);
}

.radio-option span,
.radio-option label {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.radio-option:has(input:checked) span,
.radio-option:has(input:checked) label {
    color: var(--text-primary);
}

/* Text inputs - Premium Style */
input[type="text"],
input[type="email"],
input[type="password"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary) !important;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

/* Ensure password fields match other inputs */
input[type="password"] {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover {
    border-color: var(--border-hover);
    background: var(--bg-tertiary) !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px rgba(59, 130, 246, 0.15),
        var(--shadow-sm);
    background: var(--bg-tertiary) !important;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Override browser autofill styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-secondary) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--text-primary);
    transition: background-color 5000s ease-in-out 0s;
}

/* Checkbox - Premium Style */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.checkbox-group:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--gray-500);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    margin-top: 1px;
    position: relative;
}

.checkbox-group input[type="checkbox"]::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z'/%3E%3C/svg%3E") center/contain no-repeat;
    transform: scale(0);
    transition: transform var(--transition-bounce);
}

.checkbox-group input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-color: transparent;
    box-shadow: 0 2px 10px -2px rgba(59, 130, 246, 0.5);
}

.checkbox-group input[type="checkbox"]:checked::after {
    transform: scale(1);
}

.checkbox-group span,
.checkbox-group label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    line-height: 1.5;
}

/* Buttons - Premium Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    box-shadow:
        0 4px 15px -3px rgba(59, 130, 246, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px -5px rgba(59, 130, 246, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow:
        0 4px 15px -3px rgba(16, 185, 129, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px -5px rgba(16, 185, 129, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    box-shadow:
        0 4px 15px -3px rgba(239, 68, 68, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px -5px rgba(239, 68, 68, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Progress indicator - Premium Style */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2.5rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
}

.progress-step {
    display: flex;
    align-items: center;
}

.progress-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    transition: all var(--transition-base);
    position: relative;
}

.progress-dot.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-color: transparent;
    color: white;
    box-shadow:
        0 0 20px -5px rgba(59, 130, 246, 0.6),
        0 0 0 4px rgba(59, 130, 246, 0.2);
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 20px -5px rgba(59, 130, 246, 0.6), 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 20px -5px rgba(59, 130, 246, 0.6), 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 20px -5px rgba(59, 130, 246, 0.6), 0 0 0 0 rgba(59, 130, 246, 0); }
}

.progress-dot.completed {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 15px -5px rgba(16, 185, 129, 0.5);
}

.progress-dot.completed::after {
    content: '✓';
    font-size: 1rem;
}

.progress-line {
    width: 60px;
    height: 3px;
    background: var(--gray-700);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.progress-line.completed {
    background: var(--success);
}

.progress-line.completed::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s ease-in-out infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Alert boxes - Premium Style */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: var(--warning-light);
}

.alert-warning::before {
    background: linear-gradient(180deg, var(--warning) 0%, var(--warning-light) 100%);
}

.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger-light);
}

.alert-error::before {
    background: linear-gradient(180deg, var(--danger) 0%, var(--danger-light) 100%);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--success-light);
}

.alert-success::before {
    background: linear-gradient(180deg, var(--success) 0%, var(--success-light) 100%);
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--primary-light);
}

.alert-info::before {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
}

/* Results styling - Premium Style */
.result-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

.result-card.correct::before {
    background: linear-gradient(180deg, var(--success) 0%, var(--success-light) 100%);
    box-shadow: 0 0 20px -5px var(--success);
}

.result-card.incorrect::before {
    background: linear-gradient(180deg, var(--danger) 0%, var(--danger-light) 100%);
    box-shadow: 0 0 20px -5px var(--danger);
}

.result-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.result-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.result-status.correct {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: var(--success-light);
    box-shadow: 0 0 15px -5px rgba(16, 185, 129, 0.3);
}

.result-status.incorrect {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: var(--danger-light);
    box-shadow: 0 0 15px -5px rgba(239, 68, 68, 0.3);
}

/* Score display - Premium Style */
.score-display {
    text-align: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(160deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: var(--radius-xl);
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.score-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.5), transparent);
}

.score-display::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
}

.score-value {
    font-size: clamp(3rem, 10vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.score-label {
    color: var(--gray-400);
    font-size: 1.1rem;
    margin-top: 0.75rem;
    font-weight: 500;
}

.score-display.pass {
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.score-display.pass::before {
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.5), transparent);
}

.score-display.pass .score-value {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.score-display.fail {
    background: linear-gradient(160deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.score-display.fail::before {
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.5), transparent);
}

.score-display.fail .score-value {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Form groups */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-200);
    margin-bottom: 0.625rem;
    font-size: 0.95rem;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Rules box - Premium Style */
.rules-box {
    background: linear-gradient(160deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.75rem 0;
    position: relative;
}

.rules-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 3px 0 0 3px;
}

.rules-box h3 {
    color: var(--primary-light);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rules-box ul {
    color: var(--gray-300);
    padding-left: 1.25rem;
    font-size: 0.95rem;
}

.rules-box li {
    margin-bottom: 0.625rem;
    line-height: 1.5;
}

.rules-box li::marker {
    color: var(--primary);
}

/* Question counter */
.question-counter {
    text-align: center;
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

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

::-webkit-scrollbar-track {
    background: var(--gray-900);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-700);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

/* Responsive */
@media (max-width: 640px) {
    body {
        padding: 16px;
        padding-bottom: 80px;
    }

    form {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
    }

    .progress-bar {
        padding: 0.75rem 1rem;
    }

    .progress-line {
        width: 32px;
    }

    .progress-dot {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }

    .question-block {
        padding: 1.25rem;
    }

    .radio-option {
        padding: 0.875rem 1rem;
    }

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

    .score-display {
        padding: 2rem 1.5rem;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }

/* Type Selector */
.type-selector {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.type-selector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.type-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.type-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.type-card:visited,
.type-card:link,
.type-card:active {
    color: inherit;
    text-decoration: none;
}

.type-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    transition: all var(--transition-base);
}

.type-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.type-card.phonetic::before {
    background: linear-gradient(180deg, #06b6d4 0%, #22d3ee 100%);
}

.type-card.phonetic:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: var(--shadow-lg), 0 0 30px -10px rgba(6, 182, 212, 0.3);
}

.type-card.code-to-meaning::before {
    background: linear-gradient(180deg, #8b5cf6 0%, #a78bfa 100%);
}

.type-card.code-to-meaning:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: var(--shadow-lg), 0 0 30px -10px rgba(139, 92, 246, 0.3);
}

.type-card.meaning-to-code::before {
    background: linear-gradient(180deg, #f59e0b 0%, #fbbf24 100%);
}

.type-card.meaning-to-code:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: var(--shadow-lg), 0 0 30px -10px rgba(245, 158, 11, 0.3);
}

.type-card.mixed::before {
    background: linear-gradient(180deg, #ec4899 0%, #f472b6 100%);
}

.type-card.mixed:hover {
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: var(--shadow-lg), 0 0 30px -10px rgba(236, 72, 153, 0.3);
}

.type-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.type-content {
    flex: 1;
}

.type-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-100);
    margin-bottom: 0.375rem;
}

.type-description {
    font-size: 0.875rem;
    color: var(--gray-400);
    line-height: 1.4;
}

.type-arrow {
    font-size: 1.5rem;
    color: var(--gray-500);
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.type-card:hover .type-arrow {
    color: var(--gray-200);
    transform: translateX(4px);
}

@media (max-width: 640px) {
    .type-card {
        padding: 1.25rem;
        gap: 1rem;
    }

    .type-icon {
        width: 44px;
        height: 44px;
        font-size: 1.75rem;
    }

    .type-title {
        font-size: 1rem;
    }

    .type-description {
        font-size: 0.8rem;
    }
}

/* Certificate Banner */
.certificate-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.15) 0%, rgba(229, 193, 88, 0.1) 100%);
    border: 2px solid rgba(201, 162, 39, 0.4);
    border-radius: var(--radius-xl);
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.certificate-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a227, #e5c158, #c9a227, transparent);
}

.certificate-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.certificate-content {
    flex: 1;
}

.certificate-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e5c158;
    margin-bottom: 0.25rem;
}

.certificate-description {
    font-size: 0.9rem;
    color: var(--gray-400);
}

.certificate-btn {
    background: linear-gradient(135deg, #c9a227 0%, #e5c158 100%) !important;
    color: #1e293b !important;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    white-space: nowrap;
    box-shadow: 0 4px 15px -3px rgba(201, 162, 39, 0.4);
}

.certificate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -3px rgba(201, 162, 39, 0.5);
}

@media (max-width: 640px) {
    .certificate-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        gap: 1rem;
    }

    .certificate-btn {
        width: 100%;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-hover);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    transition: transform 0.3s ease;
}

@media (max-width: 640px) {
    .theme-toggle {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

