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

body {
    background-color: #010206;
    color: #00f6ff;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 15px;
    overflow: hidden;
}

.arcade-cabinet {
    position: relative;
    background-color: #030814;
    border: 4px solid #00a8ff;
    box-shadow: 0 0 25px rgba(0, 168, 255, 0.45), inset 0 0 25px rgba(0, 0, 0, 0.95);
    border-radius: 12px;
    padding: 16px;
    max-width: 840px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.arcade-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 8px;
}

.game-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 5px;
    color: #00f6ff;
    text-shadow: 0 0 10px #00f6ff, 0 0 20px rgba(0, 246, 255, 0.6);
}

.hud-panel {
    display: flex;
    gap: 20px;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hud-label {
    font-size: 10px;
    letter-spacing: 1px;
    color: #0077aa;
}

.hud-value {
    font-size: 18px;
    font-weight: bold;
    color: #e0f7ff;
    text-shadow: 0 0 6px #00f6ff;
}

.canvas-container {
    position: relative;
    width: 800px;
    height: 520px;
    background-color: #000206;
    border: 3px solid #00f6ff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 45px rgba(0, 0, 0, 0.95), 0 0 15px rgba(0, 246, 255, 0.35);
    cursor: crosshair;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* CRT Vector Scanlines Overlay */
.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.22) 0px,
        rgba(0, 0, 0, 0.22) 1.5px,
        transparent 1.5px,
        transparent 3px
    ), radial-gradient(circle at center, transparent 65%, rgba(0, 0, 0, 0.65) 100%);
    mix-blend-mode: multiply;
}

.overlay-screen {
    position: absolute;
    inset: 0;
    background: rgba(0, 4, 12, 0.88);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 20;
    text-align: center;
    padding: 20px;
}

.overlay-screen.hidden {
    display: none;
}

.overlay-title {
    font-size: 42px;
    font-weight: bold;
    letter-spacing: 6px;
    color: #00f6ff;
    text-shadow: 0 0 12px #00f6ff, 0 0 30px #0088cc;
    margin-bottom: 15px;
}

.overlay-subtitle {
    font-size: 16px;
    color: #70e4ff;
    letter-spacing: 2px;
    margin-bottom: 25px;
    animation: blink 1.2s infinite alternate;
}

.overlay-instructions {
    font-size: 13px;
    color: #cceeff;
    line-height: 1.8;
    max-width: 480px;
}

@keyframes blink {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

.controls-legend {
    margin-top: 10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #70e4ff;
    padding: 0 8px;
}

.key-badge {
    background: #002244;
    border: 1px solid #00f6ff;
    border-radius: 3px;
    padding: 2px 6px;
    color: #ffffff;
    font-weight: bold;
}

@media (max-width: 840px) {
    .canvas-container {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
    }
}
