@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(135deg, #1a0033 0%, #330066 50%, #1a0033 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 100%),
        repeating-linear-gradient(
            0deg,
            rgba(255, 0, 255, 0.03) 0px,
            transparent 2px,
            transparent 4px
        );
    pointer-events: none;
}

.crt {
    position: relative;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

.game-container {
    background: linear-gradient(180deg, #0a0015 0%, #1a0030 100%);
    border: 4px solid #00ffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow:
        0 0 30px rgba(0, 255, 255, 0.5),
        0 0 60px rgba(255, 0, 255, 0.3),
        inset 0 0 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.game-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(0, 255, 255, 0.1) 0%,
        transparent 70%
    );
    animation: pulse 4s ease-in-out infinite;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 24px;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.8);
    animation: glow 2s ease-in-out infinite;
    letter-spacing: 2px;
}

.year {
    color: #ffff00;
    -webkit-text-fill-color: #ffff00;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
}

@keyframes glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.score-display, .streak-display {
    text-align: center;
}

.score-label, .streak-label {
    font-size: 10px;
    color: #00ffff;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.score-value, .streak-value {
    font-size: 28px;
    color: #ff00ff;
    text-shadow: 0 0 15px rgba(255, 0, 255, 0.8);
}

.streak-value {
    color: #ffff00;
    text-shadow: 0 0 15px rgba(255, 255, 0, 0.8);
}

#gameCanvas {
    width: 100%;
    height: 600px;
    background: linear-gradient(180deg, #ff6b9d 0%, #c060ff 50%, #4a90e2 100%);
    border: 3px solid #ff00ff;
    border-radius: 10px;
    cursor: pointer;
    display: block;
    box-shadow:
        0 0 20px rgba(255, 0, 255, 0.4),
        inset 0 0 30px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 5;
}

.instructions {
    text-align: center;
    margin-top: 20px;
    position: relative;
    z-index: 10;
}

.instruction-text {
    font-size: 16px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    margin-bottom: 8px;
    animation: blink 1.5s ease-in-out infinite;
}

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

.instruction-subtext {
    font-size: 10px;
    color: #ff00ff;
    letter-spacing: 2px;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #00ffff;
    border-radius: 10px;
    position: relative;
    z-index: 10;
}

.stat {
    text-align: center;
}

.stat-label {
    font-size: 10px;
    color: #00ffff;
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 16px;
    color: #ffff00;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        transparent 1px,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 3px
    );
    z-index: 1000;
    animation: scanline-move 8s linear infinite;
}

@keyframes scanline-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

/* Responsive design */
@media (max-width: 768px) {
    .logo {
        font-size: 16px;
    }

    .score-value, .streak-value {
        font-size: 20px;
    }

    #gameCanvas {
        height: 400px;
    }

    .instruction-text {
        font-size: 12px;
    }
}
