/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    overflow: hidden;
    font-family: 'Courier New', 'Lucida Console', monospace;
    color: #fff;
    cursor: crosshair;
}

/* ===== CANVAS ===== */
#gameCanvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

/* ===== HUD ===== */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 24px;
    z-index: 10;
    pointer-events: none;
    font-size: 18px;
    text-shadow: 0 0 10px #0ff, 0 0 20px #0ff;
    letter-spacing: 2px;
}

.hud-players-left,
.hud-players-right {
    display: flex;
    gap: 16px;
    flex: 1;
}

.hud-players-left {
    justify-content: flex-start;
}

.hud-players-right {
    justify-content: flex-end;
}

.hud-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 110px;
    transition: opacity 0.3s;
}

.hud-label {
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

.hud-lives {
    font-size: 18px;
    filter: drop-shadow(0 0 6px #f44);
}

.hud-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 200px;
}

#score {
    color: #0ff;
    font-weight: bold;
}

#level {
    color: #ff0;
    font-weight: bold;
    text-shadow: 0 0 10px #ff0, 0 0 20px #ff0;
}

.hud-dead {
    opacity: 0.3;
}

/* ===== SCREENS (Title, GameOver, Pause) ===== */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background: radial-gradient(ellipse at center, rgba(10, 5, 30, 0.95) 0%, rgba(0, 0, 0, 0.98) 100%);
    gap: 16px;
}

.screen.hidden {
    display: none;
}

.screen h1 {
    font-size: 56px;
    letter-spacing: 6px;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbowShift 3s ease infinite;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

@keyframes rainbowShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: 18px;
    color: #aaa;
    letter-spacing: 4px;
    margin-bottom: 10px;
}

.trump-ascii {
    font-size: 36px;
    line-height: 1.2;
    margin: 10px 0;
}

.trump-ascii .hair {
    color: #ffd700;
    font-size: 42px;
    text-shadow: 0 0 15px #ffd700;
}

.trump-ascii .face {
    color: #ffcc99;
}

.instructions {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 32px;
    margin: 10px 0;
}

.instructions p {
    font-size: 16px;
    color: #ccc;
    margin: 8px 0;
    letter-spacing: 1px;
}

/* ===== GLOW BUTTON ===== */
.glow-btn {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    padding: 14px 48px;
    border: 2px solid #0ff;
    border-radius: 8px;
    background: transparent;
    color: #0ff;
    cursor: pointer;
    letter-spacing: 3px;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px #0ff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3), inset 0 0 15px rgba(0, 255, 255, 0.1);
    margin-top: 10px;
}

.glow-btn:hover {
    background: rgba(0, 255, 255, 0.15);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6), inset 0 0 30px rgba(0, 255, 255, 0.2);
    transform: scale(1.05);
}

.glow-btn:active {
    transform: scale(0.97);
}

/* ===== GAME OVER ===== */
.final-score {
    font-size: 36px;
    color: #ffd700;
    text-shadow: 0 0 15px #ffd700;
    letter-spacing: 4px;
}

.high-score {
    font-size: 20px;
    color: #0ff;
    text-shadow: 0 0 10px #0ff;
    letter-spacing: 2px;
}

#gameOverTitle {
    font-size: 64px;
}

.footer-text {
    font-size: 13px;
    color: #555;
    letter-spacing: 2px;
    margin-top: 10px;
}

/* ===== CONTINUE / SAVE ===== */
.start-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.continue-btn {
    border-color: #4ade80 !important;
    color: #4ade80 !important;
    text-shadow: 0 0 10px #4ade80 !important;
    box-shadow: 0 0 15px rgba(74,222,128,0.3), inset 0 0 15px rgba(74,222,128,0.1) !important;
    font-size: 20px !important;
}

.continue-btn:hover {
    background: rgba(74,222,128,0.15) !important;
    box-shadow: 0 0 30px rgba(74,222,128,0.6), inset 0 0 30px rgba(74,222,128,0.2) !important;
}

.saved-info {
    font-size: 13px;
    color: #4ade80;
    letter-spacing: 2px;
    text-shadow: 0 0 6px rgba(74,222,128,0.5);
    padding: 4px 16px;
    border: 1px solid rgba(74,222,128,0.2);
    border-radius: 6px;
    background: rgba(74,222,128,0.05);
}

.save-indicator {
    position: fixed;
    bottom: 16px;
    right: 16px;
    font-size: 14px;
    color: #4ade80;
    letter-spacing: 2px;
    z-index: 200;
    text-shadow: 0 0 10px #4ade80;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.save-indicator.show {
    opacity: 1;
}

/* ===== STARS BACKGROUND (CSS fallback) ===== */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(1px 1px at 10% 20%, #fff 50%, transparent 100%),
        radial-gradient(1px 1px at 30% 70%, #fff 50%, transparent 100%),
        radial-gradient(1px 1px at 50% 10%, #aaf 50%, transparent 100%),
        radial-gradient(1px 1px at 70% 40%, #fff 50%, transparent 100%),
        radial-gradient(1px 1px at 90% 80%, #ffa 50%, transparent 100%);
    z-index: -1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .screen h1 { font-size: 32px; letter-spacing: 3px; }
    #gameOverTitle { font-size: 40px; }
    .subtitle { font-size: 14px; }
    .glow-btn { font-size: 18px; padding: 12px 32px; }
    #hud { font-size: 14px; padding: 8px 12px; }
    .final-score { font-size: 28px; }
    .trump-ascii { font-size: 28px; }
    .hud-players-left,
    .hud-players-right { gap: 8px; }
    .hud-player { min-width: 80px; }
    .hud-label { font-size: 10px; }
    .hud-lives { font-size: 14px; }
}
