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

body {
    overflow: hidden;
    background: linear-gradient(135deg, #1a0a2e 0%, #16213e 50%, #0f0f23 100%);
    font-family: 'Rajdhani', sans-serif;
    user-select: none;
}

#gameCanvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.level-display {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    color: #00fff5;
    text-shadow: 0 0 20px #00fff5, 0 0 40px #00fff5;
}

.score-display {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    color: #ff00ff;
    text-shadow: 0 0 20px #ff00ff;
}

.lives-display {
    display: flex;
    gap: 8px;
}

.heart {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px #ff3366);
}

.heart.lost {
    opacity: 0.3;
    filter: grayscale(100%);
}

.current-word {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    color: #00ff88;
    text-shadow: 0 0 30px #00ff88, 0 0 60px #00ff88;
    letter-spacing: 8px;
    min-height: 60px;
}

.current-word .typed {
    color: #00fff5;
    text-shadow: 0 0 30px #00fff5;
}

.current-word .remaining {
    color: #ffffff;
    opacity: 0.8;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    pointer-events: auto;
    z-index: 100;
}

.overlay.hidden {
    display: none;
}

.title {
    font-family: 'Orbitron', monospace;
    font-size: 72px;
    font-weight: 900;
    background: linear-gradient(135deg, #00fff5, #ff00ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-bottom: 20px;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(0, 255, 245, 0.5)); }
    50% { filter: drop-shadow(0 0 50px rgba(255, 0, 255, 0.7)); }
}

.subtitle {
    font-size: 24px;
    color: #888;
    margin-bottom: 60px;
}

.menu-btn {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    padding: 16px 48px;
    margin: 12px;
    background: transparent;
    border: 2px solid #00fff5;
    color: #00fff5;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.menu-btn:hover {
    background: #00fff5;
    color: #1a0a2e;
    box-shadow: 0 0 30px #00fff5;
    transform: scale(1.05);
}

.menu-btn.secondary {
    border-color: #ff00ff;
    color: #ff00ff;
}

.menu-btn.secondary:hover {
    background: #ff00ff;
    color: #1a0a2e;
    box-shadow: 0 0 30px #ff00ff;
}

.stats {
    color: #fff;
    font-size: 20px;
    margin: 30px 0;
    text-align: center;
    line-height: 2;
}

.stats span {
    color: #00fff5;
    font-family: 'Orbitron', monospace;
}

.level-progress {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00fff5, #00ff88);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px #00fff5;
}

.instructions {
    color: #666;
    font-size: 16px;
    margin-top: 40px;
}

.credits {
    color: #888;
    font-size: 14px;
    margin-top: 20px;
    font-family: 'Orbitron', monospace;
}

.settings-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 2px solid #666;
    border-radius: 8px;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 200;
    display: none;
}

.settings-btn:hover {
    border-color: #00fff5;
    color: #00fff5;
    box-shadow: 0 0 15px rgba(0, 255, 245, 0.3);
}

.settings-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 10, 40, 0.98);
    border: 2px solid #00fff5;
    border-radius: 16px;
    padding: 40px;
    min-width: 320px;
    z-index: 400;
    box-shadow: 0 0 40px rgba(0, 255, 245, 0.2);
}

.settings-panel.hidden {
    display: none;
}

.settings-panel h2 {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    color: #00fff5;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 20px #00fff5;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-label {
    color: #fff;
    font-size: 18px;
}

.lang-toggle {
    display: flex;
    gap: 0;
    border: 2px solid #00fff5;
    border-radius: 8px;
    overflow: hidden;
}

.lang-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: #888;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: #00fff5;
    color: #1a0a2e;
}

.lang-btn:hover:not(.active) {
    background: rgba(0, 255, 245, 0.2);
}

.close-settings {
    display: block;
    width: 100%;
    margin-top: 30px;
    padding: 14px;
    background: transparent;
    border: 2px solid #ff00ff;
    color: #ff00ff;
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-settings:hover {
    background: #ff00ff;
    color: #1a0a2e;
}
