:root {
    --neon-pink: #ff2a6d;
    --neon-cyan: #05d9e8;
    --neon-yellow: #f9f871;
    --bg-dark: #0d0221;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 0%, #2a0e4a 0%, var(--bg-dark) 70%);
    font-family: "Courier New", "Consolas", monospace;
    font-weight: bold;
    letter-spacing: 2px;
    overflow: hidden;
}

/* Little marquee title above the cabinet, purely CSS, using the page title
   text via a data attribute would need JS -- so we just add a static one. */
body::before {
    content: "RETRO RACER";
    color: var(--neon-yellow);
    font-size: 42px;
    letter-spacing: 10px;
    margin-bottom: 24px;
    text-shadow:
        0 0 5px var(--neon-yellow),
        0 0 15px var(--neon-yellow),
        0 0 30px #ff8c00;
    animation: flicker 3s infinite;
}

canvas#gameCanvas {
    display: block;
    background: #000;
    border: 6px solid var(--neon-cyan);
    border-radius: 12px;
    box-shadow:
        0 0 10px var(--neon-cyan),
        0 0 30px var(--neon-cyan),
        0 0 60px rgba(5, 217, 232, 0.4),
        inset 0 0 20px rgba(5, 217, 232, 0.3);
    image-rendering: pixelated;
}

/* Arcade cabinet "frame" wrapper effect using a container around the canvas */
.arcade-frame {
    position: relative;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(160deg, #1a1a2e, #0d0221 70%);
    box-shadow:
        0 0 0 4px #2e2e4d,
        0 10px 30px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(255, 42, 109, 0.15);
}

/* CRT scanline overlay drawn on top of the canvas */
.arcade-frame::after {
    content: "";
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    bottom: 18px;
    border-radius: 12px;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 2px,
        transparent 4px
    );
    mix-blend-mode: overlay;
}

/* Subtle screen curvature vignette */
.arcade-frame::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    bottom: 18px;
    border-radius: 12px;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0) 60%,
        rgba(0, 0, 0, 0.55) 100%
    );
}

@keyframes flicker {
    0%, 19%, 21%, 23%, 80%, 100% { opacity: 1; }
    20%, 22% { opacity: 0.4; }
}