* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --error-gradient: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    --bg-gradient: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* Navbar */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.nav-brand .logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 15px;
}

.nav-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-btn:hover, .nav-btn.active {
    background: var(--glass-bg);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 40px;
    padding: 60px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-weight: 400;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-stats span {
    background: var(--glass-bg);
    padding: 15px 25px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Live Stats */
.live-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 15px;
}

.stat-card span {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
    margin-bottom: 5px;
}

.stat-card label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
}

/* Typing Interface */
.typing-interface {
    background: var(--card-bg);
    border-radius: 30px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.text-display {
    min-height: 160px;
    padding: 40px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 20px;
    margin-bottom: 30px;
    border-left: 6px solid #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.6rem;
    line-height: 1.6;
    position: relative;
}

.quote-container {
    max-width: 800px;
}

.quote-text {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 400;
    color: var(--text-primary);
    display: block;
    margin-bottom: 15px;
}

.author {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.8;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-wrapper {
    position: relative;
}

#userInput {
    width: 100%;
    padding: 25px 30px;
    font-size: 1.6rem;
    font-family: 'Poppins', monospace;
    border: 3px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#userInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

#userInput:disabled {
    background: #f8fafc;
    cursor: not-allowed;
}

.keyboard-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 10px;
}

.control-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-outline {
    padding: 18px 35px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.btn-primary.large {
    padding: 22px 50px;
    font-size: 1.2rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.5