body {
    margin: 0;
    overflow: hidden;
    background-color: #080808;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    font-family: 'Courier New', Courier, monospace;
    user-select: none;
}

/* Full View Arcade Cabinet Viewport */
#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 1280px;
    max-height: 900px;
    background: #000;
    border-radius: 8px;
    box-shadow: inset 0 0 40px #000, 0 0 50px rgba(0,255,100,0.25);
    overflow: hidden;
}

/* 3D Canvas */
canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Retro Green CRT Overlay */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    color: #0f0;
    text-shadow: 0 0 6px #0f0;
    box-sizing: border-box;
    padding: 20px;
}

.ui-text {
    position: absolute;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
}

#title-display {
    top: 20px;
    left: 20px;
}

#score-display {
    top: 20px;
    right: 20px;
    text-align: right;
}

#armor-display {
    bottom: 20px;
    left: 20px;
}

#altitude-display {
    top: 140px;
    left: 20px;
    color: #00ffff;
    text-shadow: 0 0 6px #00ffff;
}

#ammo-display {
    bottom: 20px;
    right: 20px;
    text-align: right;
}

#radar-box {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 115px;
    height: 115px;
    border: 2px solid #0f0;
    border-radius: 50%;
    background: rgba(0, 30, 0, 0.55);
    box-shadow: 0 0 10px #0f0, inset 0 0 10px #0f0;
    overflow: hidden;
}

#radar-canvas {
    width: 100%;
    height: 100%;
}

/* Crosshair Reticle */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 1px dashed rgba(0, 255, 0, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

#crosshair::before, #crosshair::after {
    content: '';
    position: absolute;
    background: #0f0;
    box-shadow: 0 0 6px #0f0;
}

#crosshair::before {
    top: 50%;
    left: -60px;
    right: -60px;
    height: 2px;
    transform: translateY(-50%);
}

#crosshair::after {
    left: 50%;
    top: -60px;
    bottom: -60px;
    width: 2px;
    transform: translateX(-50%);
}

/* SAM Lock Alert Flasher */
#samLockAlert {
    position: absolute;
    top: 22%;
    left: 50%;
    transform: translateX(-50%);
    color: #ff0055;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 12px #ff0000;
    background: rgba(40, 0, 10, 0.85);
    padding: 6px 18px;
    border: 1px solid #ff0055;
    border-radius: 4px;
    z-index: 45;
    animation: alertPulse 0.4s infinite alternate;
}

@keyframes alertPulse {
    0% { opacity: 0.3; transform: translateX(-50%) scale(0.98); }
    100% { opacity: 1.0; transform: translateX(-50%) scale(1.03); }
}

/* Damage Red Flash Vignette Overlay */
#damageFlash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,0,0,0) 40%, rgba(255,0,0,0.85) 100%);
    pointer-events: none;
    z-index: 40;
    opacity: 0;
    transition: opacity 0.12s ease-out;
}
#damageFlash.damage-flash-active { opacity:0.7; }

/* Modal Overlay & Arcade Cabinet Card */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 10, 0, 0.88);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.hidden {
    display: none !important;
}

.modal-card {
    background: #051405;
    border: 2px solid #0f0;
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.5);
    padding: 25px 35px;
    border-radius: 10px;
    text-align: center;
    max-width: 520px;
    width: 90%;
    color: #0f0;
}

.modal-card h2 {
    margin-top: 0;
    font-size: 28px;
    text-shadow: 0 0 10px #0f0;
}

/* Arcade Buttons */
.arcade-btn {
    background: #0f0;
    color: #000;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 15px;
    box-shadow: 0 0 15px #0f0;
    transition: transform 0.1s, background 0.1s;
}

.arcade-btn:hover {
    transform: scale(1.05);
    background: #55ff55;
}

.arcade-btn:active {
    transform: scale(0.95);
}

/* 3-Reel Initials Slot Spinner Styling */
#highScoreInputArea {
    margin: 15px 0;
    padding: 10px;
    background: rgba(0, 40, 0, 0.6);
    border: 1px dashed #0f0;
    border-radius: 8px;
}

#hs-new-label {
    color: #ffff00;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 10px #ffff00;
    margin-bottom: 4px;
}

#hs-enter-label {
    color: #aaffaa;
    font-size: 12px;
    margin-bottom: 12px;
}

#spinner-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 12px 0;
}

.spinner-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #000;
    padding: 6px 10px;
    border: 2px solid #005500;
    border-radius: 8px;
}

.spinner-col.active-col {
    border-color: #00ff00;
    box-shadow: 0 0 12px #00ff00;
}

.spin-btn {
    background: #003300;
    color: #00ff00;
    border: 1px solid #00ff00;
    width: 36px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
}

.spin-btn:hover {
    background: #00aa00;
    color: #000;
}

.spin-window {
    height: 45px;
    overflow: hidden;
    margin: 6px 0;
    position: relative;
    width: 36px;
    border-top: 1px solid #00ff00;
    border-bottom: 1px solid #00ff00;
}

.spin-strip {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.15s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.spin-letter {
    height: 45px;
    line-height: 45px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #00aa00;
    opacity: 0.6;
}

.spin-letter.curr {
    color: #ffff00;
    font-size: 28px;
    opacity: 1.0;
    text-shadow: 0 0 10px #ffff00, 0 0 20px #ffaa00;
}

/* Leaderboard Board */
#highScoreBoard {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 20, 0, 0.7);
    border: 1px solid #0f0;
    border-radius: 6px;
}

#hs-board-title {
    color: #ffff00;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.hs-entry {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 3px 10px;
    color: #aaffaa;
}
.hs-entry span:last-child { color: #00ff00; }
.hs-rank-1 { color: #ffff00; }
.hs-rank-1 span:last-child { color: #ffff00; }
.hs-rank-2 { color: #00ffff; }
.hs-rank-2 span:last-child { color: #00ffff; }
.hs-rank-3 { color: #ffaa00; }
.hs-rank-3 span:last-child { color: #ffaa00; }
.hs-rank-4 { color: #88ff88; }
.hs-rank-4 span:last-child { color: #88ff88; }
.hs-empty { color:#668866; font-size:12px; text-align:center; }
.spin-strip.cb-spin-center { transition:none; transform:translateY(-90px); }
.spin-strip.cb-spin-up { transition:transform 0.12s ease; transform:translateY(-135px); }
.spin-strip.cb-spin-down { transition:transform 0.12s ease; transform:translateY(-45px); }
.missile-ready { color:#00ffff; }
.missile-reloading { color:#ffaa00; }
.stage-targets { font-size:12px; color:#aaffaa; }
.missile-display { top:20px; right:150px; text-align:right; }
.stage-display { top:13%; left:50%; transform:translateX(-50%); text-align:center; }
.stage-banner { position:absolute; top:40%; left:50%; transform:translate(-50%,-50%); color:#0f0; font-size:26px; font-weight:bold; text-shadow:0 0 15px #0f0; text-align:center; z-index:50; pointer-events:none; background:rgba(0,20,0,0.88); padding:15px 30px; border:2px solid #0f0; }
.stage-banner-sub { font-size:13px; color:#aaffaa; margin-top:4px; }
.instructions { font-size:12px; margin:15px 0; color:#88ff88; text-align:left; line-height:1.6; }
.intro-copy { font-size:13px; line-height:1.6; color:#aaffaa; }
.enemy-scout { color:#e5c178; }
.enemy-panzer { color:#ff6666; }
.enemy-sam { color:#ff0055; }
.enemy-robot { color:#00ffff; }
.game-over-title { color:#ff3333; text-shadow:0 0 10px #ff0000; }
.final-score { font-size:16px; }
.final-score-value { color:#fff; font-weight:bold; }
.save-score-btn { background:#ffff00; color:#000; box-shadow:0 0 15px #ffff00; }
