:root {
    --bg-color: #0c0014;
    --neon-pink: #ff00ff;
    --neon-blue: #00ffff;
    --neon-yellow: #ffff00;
    --text-color: #f0f0f0;
    --font-main: 'VT323', monospace;
}

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

body {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('diggy_arcade.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-color);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CRT Effects */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 100%),
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 100%, 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    z-index: 11;
    pointer-events: none;
    animation: scanline 10s linear infinite;
}

@keyframes scanline {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 100%;
    }
}

.arcade-container {
    width: 90vw;
    max-width: 800px;
    height: 90vh;
    border: 4px solid var(--neon-blue);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 1.5rem var(--neon-blue),
        inset 0 0 1rem var(--neon-blue);
    border-radius: 1rem;
    position: relative;
}

header {
    text-align: center;
}

.header-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.neon-button {
    background: transparent;
    border: 2px solid var(--neon-blue);
    color: var(--neon-blue);
    font-family: var(--font-main);
    font-size: 1rem;
    padding: 0.4rem 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    box-shadow: 0 0 0.5rem var(--neon-blue);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.neon-button.extra-large {
    font-size: 2rem;
    padding: 1rem 2rem;
    margin-top: 2rem;
}

.mute-position {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 20;
}

.neon-button:hover {
    background: var(--neon-blue);
    color: var(--bg-color);
    box-shadow: 0 0 1.5rem var(--neon-blue);
}

.neon-button.muted {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    box-shadow: 0 0 0.5rem var(--neon-pink);
}

.neon-button.muted:hover {
    background: var(--neon-pink);
    color: var(--bg-color);
    box-shadow: 0 0 1.5rem var(--neon-pink);
}

.neon-text {
    font-size: 5rem;
    color: var(--neon-pink);
    text-shadow: 0 0 0.5rem var(--neon-pink),
        0 0 1rem var(--neon-pink),
        0 0 2rem var(--neon-pink);
    letter-spacing: 0.5rem;
}

.neon-text.large {
    font-size: 8rem;
}

.blink {
    animation: blink 1s step-end infinite;
    font-size: 1.5rem;
    color: var(--neon-yellow);
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.game-selection {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.game-item {
    font-size: 2.5rem;
    text-decoration: none;
    color: var(--text-color);
    padding: 1rem 2rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.game-item .selector {
    opacity: 0;
    margin-right: 1rem;
    color: var(--neon-yellow);
}

.game-item.selected {
    color: var(--neon-blue);
    text-shadow: 0 0 1rem var(--neon-blue);
    transform: scale(1.1);
}

.game-item.selected .selector {
    opacity: 1;
    animation: selectorBlink 0.5s step-end infinite;
}

@keyframes selectorBlink {
    50% {
        opacity: 0;
    }
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 1.5rem;
    border-top: 2px solid var(--neon-blue);
    padding-top: 1rem;
}

.stats {
    display: flex;
    flex-direction: column;
}

.controls-hint {
    text-align: right;
    color: #888;
}

/* Screen Flicker */
body::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 12;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% {
        opacity: 0.27861;
    }

    5% {
        opacity: 0.34769;
    }

    10% {
        opacity: 0.23604;
    }

    15% {
        opacity: 0.90626;
    }

    20% {
        opacity: 0.18128;
    }

    25% {
        opacity: 0.83891;
    }

    30% {
        opacity: 0.65583;
    }

    35% {
        opacity: 0.57807;
    }

    40% {
        opacity: 0.26559;
    }

    45% {
        opacity: 0.84693;
    }

    50% {
        opacity: 0.96019;
    }

    55% {
        opacity: 0.08594;
    }

    60% {
        opacity: 0.20313;
    }

    65% {
        opacity: 0.71988;
    }

    70% {
        opacity: 0.53455;
    }

    75% {
        opacity: 0.37288;
    }

    80% {
        opacity: 0.71428;
    }

    85% {
        opacity: 0.70419;
    }

    90% {
        opacity: 0.7003;
    }

    95% {
        opacity: 0.36108;
    }

    100% {
        opacity: 0.24387;
    }
}

/* Splash Screen */
.splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.splash-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footnote {
    font-size: 1.8rem;
    color: var(--neon-yellow);
    margin-top: 2.5rem;
    font-style: italic;
    letter-spacing: 0.1rem;
    opacity: 0.8;
}