/* Modern Typing Speed Test Styles */

/* Screen reader only content */
.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;
}

/* CSS Variables for consistent theming */
:root {
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-light: #ffffff;
    --bg-dark: #0f172a;
    --surface-light: #f8fafc;
    --surface-dark: #1e293b;
    
    --text-light: #0f172a;
    --text-dark: #f1f5f9;
    --text-muted-light: #64748b;
    --text-muted-dark: #94a3b8;
    
    --border-light: #e2e8f0;
    --border-dark: #334155;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

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

html {
    scroll-behavior: smooth;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-dark);
    overflow-x: hidden;
}

body.light-theme {
    background: linear-gradient(135deg, #f0f9ff, #e0e7ff);
    color: var(--text-light);
}

body.dark-theme {
    background: linear-gradient(135deg, var(--bg-dark), #1e1b4b);
    color: var(--text-dark);
}

/* Typography improvements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }

p {
    line-height: 1.75;
    color: inherit;
    opacity: 0.9;
}

/* Container and layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

.page {
    display: none;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page.active {
    display: block;
}

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

/* Modern navbar */
.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    padding: 1rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 1.5rem;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-image {
    height: 2.5rem;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

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

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

.nav-btn {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-md);
}

.auth-section {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Modern cards */
.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
    overflow-x: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* Hero section improvements */
.hero-section {
    margin-bottom: 4rem;
    padding: 3rem 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 70vh;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-color) 50%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.75;
    color: inherit;
}

.hero-start-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: var(--radius-2xl);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.025em;
}

.hero-start-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;
}

.hero-start-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.4);
}

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

.btn-icon {
    margin-right: 0.5rem;
    display: inline-block;
    animation: pulse 2s infinite;
}

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

/* Hand-drawn typewriter styling */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.typewriter-container {
    position: relative;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.typewriter-drawing {
    max-width: 100%;
    height: auto;
    max-height: 600px;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.typewriter-drawing:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.typewriter-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation: glow 4s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes glow {
    from {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

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

/* Hero Image Containers with alternating shadow effects */
.hero-image-container {
    position: relative;
    max-width: 500px;
    width: 100%;
    animation: float 6s ease-in-out infinite;
    transition: all 0.4s ease;
}

.hero-image-container:hover {
    transform: translateY(-10px) scale(1.02);
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-2xl);
    display: block;
    transition: all 0.3s ease;
}

/* With Shadow Effect */
.hero-image-container.with-shadow .hero-img {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 
                0 10px 30px rgba(79, 70, 229, 0.3),
                0 0 80px rgba(124, 58, 237, 0.2);
}

.hero-image-container.with-shadow:hover .hero-img {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 
                0 15px 40px rgba(79, 70, 229, 0.4),
                0 0 100px rgba(124, 58, 237, 0.3);
}

/* Without Shadow Effect - Clean look */
.hero-image-container.no-shadow .hero-img {
    box-shadow: none;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.hero-image-container.no-shadow:hover .hero-img {
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

/* Alternating animation delay for variety */
.page:nth-child(odd) .hero-image-container {
    animation-delay: 0s;
}

.page:nth-child(even) .hero-image-container {
    animation-delay: 1s;
}

/* Page Hero Sections - Smaller than main hero */
.page-hero {
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.page-hero .hero-title {
    font-size: 2.5rem;
}

.page-hero .hero-subtitle {
    font-size: 1.1rem;
}

/* Features section */
.features-section {
    margin: 5rem 0;
    text-align: center;
}

.features-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-xl);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

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

.feature-card p {
    opacity: 0.9;
    line-height: 1.75;
    color: inherit;
}

/* Modern buttons */
.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.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;
}

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

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

.btn.active {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: scale(1.05);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Typing test area */
.typing-area {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-light);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow: hidden;
}

.dark-theme .typing-area {
    background: rgba(30, 41, 59, 0.95);
    color: var(--text-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.text-display {
    font-size: 1.25rem;
    line-height: 2;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: var(--radius-lg);
    min-height: 8rem;
    font-family: var(--font-mono);
    border: 1px solid var(--border-light);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    display: block;
}

.dark-theme .text-display {
    background: #1e293b;
    border-color: var(--border-dark);
}

.char {
    display: inline;
    transition: all 0.1s ease;
    word-break: break-word;
}

.char.correct {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.char.incorrect {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--error-color);
}

.char.current {
    background-color: var(--primary-color);
    color: white;
    animation: blink 1s infinite;
    border-radius: 2px;
}

.input-area {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-family: var(--font-mono);
    background: white;
    transition: all 0.3s ease;
    resize: none;
    min-height: 3rem;
}

.dark-theme .input-area {
    background: var(--surface-dark);
    border-color: var(--border-dark);
    color: var(--text-dark);
}

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

/* Statistics display */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem 1rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    display: block;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Modal improvements */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem;
    border-radius: var(--radius-2xl);
    text-align: center;
    max-width: 32rem;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Form styles */
.auth-form {
    max-width: 25rem;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: inherit;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Team member cards */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.team-member {
    background: rgba(255, 255, 255, 0.08);
    padding: 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-member:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-xl);
}

.member-avatar {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-lg);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 50%;
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Achievements and recent tests */
.achievements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.achievement {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-xl);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.achievement:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
}

.achievement-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

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

.recent-test-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-test-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

.test-date {
    font-size: 0.875rem;
    opacity: 0.7;
    margin-bottom: 0.75rem;
}

.test-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

/* Setup page styles */
.setup-header {
    text-align: center;
    margin-bottom: 3rem;
}

.setup-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.setup-header p {
    font-size: 1.125rem;
    opacity: 0.8;
}

.test-setup {
    display: grid;
    gap: 3rem;
}

.setup-section h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.setup-description {
    margin-bottom: 1.5rem;
    opacity: 0.8;
    font-size: 0.95rem;
}

.difficulty-buttons,
.timer-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.difficulty-buttons .btn,
.timer-buttons .btn {
    flex: 1;
    min-width: 150px;
    flex-direction: column;
    padding: 1.5rem 1rem;
    text-align: center;
}

.difficulty-label,
.timer-label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: block;
}

.difficulty-desc,
.timer-desc {
    font-size: 0.8rem;
    opacity: 0.8;
    display: block;
}

.setup-preview {
    margin: 2.5rem 0;
    text-align: center;
}

.preview-text {
    background: rgba(255, 255, 255, 0.08);
    padding: 2rem;
    border-radius: var(--radius-lg);
    font-family: var(--font-mono);
    font-size: 1rem;
    line-height: 1.75;
    margin-top: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.setup-actions {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 3rem;
}

.setup-actions .btn {
    flex: 1;
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Test info badges */
.test-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.difficulty-badge,
.timer-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Test actions */
.test-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: clamp(2rem, 4vw, 3rem);
    }
    
    .typewriter-container {
        transform: scale(0.8);
    }
    
    .typewriter-drawing {
        max-height: 300px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .nav-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .nav-links {
        order: 1;
        justify-content: center;
    }
    
    .auth-section {
        order: 2;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo-image {
        height: 2rem;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-start-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
    
    .typewriter-container {
        transform: scale(0.7);
    }
    
    .typewriter-drawing {
        max-height: 250px;
    }
    
    .setup-actions {
        flex-direction: column;
    }
    
    .difficulty-buttons,
    .timer-buttons {
        flex-direction: column;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 2rem;
        margin: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content {
        min-height: 50vh;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .achievements {
        grid-template-columns: 1fr;
    }
    
    .test-info {
        flex-direction: column;
        align-items: center;
    }
    
    .test-actions {
        flex-direction: column;
    }
    
    .typewriter-container {
        transform: scale(0.6);
    }
    
    .typewriter-drawing {
        max-height: 200px;
    }
    
    .hero-image-container {
        max-width: 100%;
        margin-top: 2rem;
    }
    
    .page-hero .hero-content {
        flex-direction: column;
    }
    
    .page-hero .hero-text {
        text-align: center;
    }
}

/* Dark theme specific adjustments */
.dark-theme .feature-card {
    background: rgba(255, 255, 255, 0.05);
}

.dark-theme .team-member {
    background: rgba(255, 255, 255, 0.05);
}

.dark-theme .achievement {
    background: rgba(255, 255, 255, 0.05);
}

.dark-theme .recent-test-card {
    background: rgba(255, 255, 255, 0.05);
}

.dark-theme .stat-item {
    background: rgba(255, 255, 255, 0.05);
}

/* Print styles */
@media print {
    .navbar,
    .theme-toggle,
    .hero-start-btn,
    .test-actions,
    .setup-actions {
        display: none;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Focus and accessibility improvements */
.btn:focus,
.nav-btn:focus,
.theme-toggle:focus,
.input-area:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .typewriter {
        animation: none;
    }
    
    .key {
        animation: none;
    }
    
    .btn-icon {
        animation: none;
    }
}