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

body {
    background: #0a0a14;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(74, 222, 128, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(239, 68, 68, 0.05) 0%, transparent 40%),
        linear-gradient(180deg, #0a0a14 0%, #12121f 100%);
    pointer-events: none;
    z-index: -1;
}

#game-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

#score-display {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    margin-bottom: 15px;
    padding: 0 10px;
}

#current-score, #high-score {
    font-size: 12px;
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
    transition: transform 0.1s, color 0.1s;
}

#current-score.flash {
    transform: scale(1.2);
    color: #fbbf24;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.8);
}

#high-score {
    color: #00fff5;
    text-shadow: 0 0 10px rgba(0, 255, 245, 0.5);
}

#canvas {
    border: 2px solid #1e1e3a;
    border-radius: 8px;
    box-shadow: 
        0 0 30px rgba(74, 222, 128, 0.1),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
    background: #0d0d1a;
}

#overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    transition: opacity 0.3s;
}

#overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

#title {
    font-size: 48px;
    color: #4ade80;
    text-shadow: 
        0 0 20px rgba(74, 222, 128, 0.8),
        0 0 40px rgba(74, 222, 128, 0.4),
        4px 4px 0 #166534;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { text-shadow: 0 0 20px rgba(74, 222, 128, 0.8), 0 0 40px rgba(74, 222, 128, 0.4), 4px 4px 0 #166534; }
    50% { text-shadow: 0 0 30px rgba(74, 222, 128, 1), 0 0 60px rgba(74, 222, 128, 0.6), 4px 4px 0 #166534; }
}

#subtitle {
    font-size: 14px;
    color: #ef4444;
    margin-bottom: 25px;
    min-height: 20px;
}

#subtitle.golden {
    color: #fbbf24;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.8);
    animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

#difficulty-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

.diff-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    padding: 10px 15px;
    border: 2px solid #2d2d4a;
    border-radius: 6px;
    background: rgba(20, 20, 40, 0.8);
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.diff-btn:hover {
    border-color: #4ade80;
    color: #4ade80;
}

.diff-btn.active {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.3);
}

#start-prompt {
    font-size: 10px;
    color: #00fff5;
    text-shadow: 0 0 10px rgba(0, 255, 245, 0.5);
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#pause-hint {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    color: #444;
    opacity: 0;
    transition: opacity 0.3s;
}

#pause-hint.visible {
    opacity: 1;
}

footer {
    position: fixed;
    bottom: 20px;
    text-align: center;
}

footer a {
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

footer a:hover {
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

@media (max-width: 480px) {
    #title {
        font-size: 32px;
    }
    
    #score-display {
        font-size: 10px;
    }
    
    #current-score, #high-score {
        font-size: 10px;
    }
    
    .diff-btn {
        font-size: 8px;
        padding: 8px 12px;
    }
    
    #start-prompt {
        font-size: 8px;
    }
}