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

body {
    background: #000;
    overflow: hidden;
    cursor: crosshair;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

#game-container {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#hud-top {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
}

#score {
    font-size: 36px;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
    font-weight: bold;
    letter-spacing: 2px;
}

#combo {
    font-size: 28px;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00;
    font-weight: bold;
    transition: color 0.15s, text-shadow 0.15s, transform 0.1s;
}

#combo.combo-high {
    color: #ff8800;
    text-shadow: 0 0 10px #ff8800, 0 0 20px #ff8800;
}

#combo.combo-ultra {
    color: #ff4444;
    text-shadow: 0 0 10px #ff4444, 0 0 20px #ff4444, 0 0 30px #ff0000;
}

#multiplier {
    font-size: 28px;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00;
    font-weight: bold;
}

#fps {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 12px;
    font-family: monospace;
    color: #666688;
    white-space: nowrap;
    pointer-events: none;
    z-index: 30;
}

#hud-bottom {
    position: absolute;
    bottom: 20px;
    left: 30px;
    display: flex;
    gap: 24px;
    align-items: center;
}

#lives-group, #bombs-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-label {
    font-size: 12px;
    color: #666688;
    letter-spacing: 2px;
    font-weight: bold;
}

#lives, #bombs {
    font-size: 24px;
    letter-spacing: 4px;
}

#lives {
    color: #00ffff;
    text-shadow: 0 0 8px #00ffff;
}

#bombs {
    color: #ff8800;
    text-shadow: 0 0 8px #ff8800;
}

/* Start screen - semi-transparent overlay showing live arena */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
    transition: opacity 0.5s ease-out;
}

#start-screen.fading {
    opacity: 0;
    pointer-events: none;
}

/* Pause screen */
#pause-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 25;
    background: rgba(0, 0, 0, 0.6);
}

#pause-screen h1 {
    font-size: 72px;
    color: #ffffff;
    text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff, 0 0 60px #0088ff;
    letter-spacing: 12px;
    margin-bottom: 30px;
}

#pause-screen p {
    font-size: 18px;
    color: #6688aa;
    letter-spacing: 4px;
}

.pause-resume {
    cursor: pointer;
    transition: color 0.2s, text-shadow 0.2s;
    margin-bottom: 16px;
    color: #44aa44;
    letter-spacing: 4px;
    font-size: 20px;
}

.pause-resume:hover {
    color: #44ff44;
    text-shadow: 0 0 10px #44ff44, 0 0 20px #44ff44;
}

.pause-settings {
    cursor: pointer;
    transition: color 0.2s, text-shadow 0.2s;
    margin-bottom: 16px;
}

.pause-settings:hover {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
}

.pause-quit {
    cursor: pointer;
    transition: color 0.2s, text-shadow 0.2s;
    margin-bottom: 16px;
    color: #884444;
    letter-spacing: 4px;
    font-size: 18px;
}

.pause-quit:hover {
    color: #ff4444;
    text-shadow: 0 0 10px #ff4444, 0 0 20px #ff4444;
}

/* Game over screen */
#game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    background: rgba(0, 0, 0, 0.7);
    transition: opacity 1.2s ease-in;
}
#game-over.fading-in {
    opacity: 0;
    pointer-events: none;
}
#game-over.fading-in.visible {
    opacity: 1;
    pointer-events: auto;
}

#game-over h1 {
    font-size: 64px;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff, 0 0 60px #0088ff;
    letter-spacing: 8px;
    margin-bottom: 30px;
}

#game-over p {
    font-size: 20px;
    color: #aaaacc;
    margin: 8px 0;
}

/* Title container */
.title-container {
    text-align: center;
    margin-bottom: 60px;
}

.title-main {
    font-size: 96px;
    color: #ffffff;
    text-shadow:
        0 0 20px #00ffff,
        0 0 40px #00ffff,
        0 0 80px #0088ff,
        0 0 120px #0044aa;
    letter-spacing: 16px;
    font-weight: bold;
    animation: title-pulse 3s ease-in-out infinite;
}

.title-tagline {
    font-size: 18px;
    color: #6688aa;
    text-shadow: 0 0 10px rgba(0, 136, 255, 0.3);
    letter-spacing: 6px;
    margin-top: 20px;
}

/* Title menu */
.title-menu {
    text-align: center;
}

.menu-start {
    font-size: 22px;
    color: #ffffff;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
    letter-spacing: 4px;
    animation: prompt-pulse 2s ease-in-out infinite;
}

.menu-controls {
    font-size: 14px;
    color: #445566;
    letter-spacing: 3px;
    margin-top: 16px;
}

@keyframes title-pulse {
    0%, 100% {
        text-shadow:
            0 0 20px #00ffff,
            0 0 40px #00ffff,
            0 0 80px #0088ff,
            0 0 120px #0044aa;
    }
    50% {
        text-shadow:
            0 0 30px #00ffff,
            0 0 60px #00ffff,
            0 0 100px #0088ff,
            0 0 150px #0044aa;
    }
}

@keyframes prompt-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.subtitle {
    animation: prompt-pulse 2s ease-in-out infinite;
}

.hidden {
    display: none !important;
}

#popups-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
    overflow: hidden;
}

/* Powerup HUD */
#powerups-active {
    position: absolute;
    bottom: 20px;
    right: 30px;
    display: flex;
    gap: 8px;
    pointer-events: none;
    z-index: 10;
}

.powerup-indicator {
    border: 1px solid;
    border-radius: 4px;
    padding: 4px 8px;
    min-width: 60px;
    background: rgba(0, 0, 0, 0.5);
}

.powerup-label {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 3px;
}

.powerup-bar-bg {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.powerup-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.powerup-expiring {
    animation: powerup-blink 0.3s ease-in-out infinite alternate;
}

@keyframes powerup-blink {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

.score-popup {
    position: absolute;
    font-weight: bold;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Run stats on game-over */
#run-stats {
    display: flex;
    gap: 24px;
    margin: 16px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #6688aa;
}

#run-stats .stat-label {
    color: #445566;
    font-size: 10px;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 2px;
}

#run-stats span > span:last-child {
    color: #00ffff;
    font-size: 18px;
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.4);
}

/* New high score indicator */
#new-highscore {
    font-size: 24px;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00, 0 0 40px #ff8800;
    letter-spacing: 6px;
    margin: 12px 0;
    animation: prompt-pulse 1s ease-in-out infinite;
}

/* High score tables (shared) */
#gameover-scores, #start-scores {
    font-family: 'Courier New', Courier, monospace;
    margin-top: 20px;
}

#gameover-scores h2 {
    font-size: 16px;
    color: #6688aa;
    letter-spacing: 4px;
    margin-bottom: 10px;
}

#gameover-scores-table, #start-scores-table {
    border-collapse: collapse;
    min-width: 360px;
}

#gameover-scores-table th, #start-scores-table th {
    font-size: 10px;
    color: #445566;
    letter-spacing: 2px;
    padding: 4px 12px;
    text-align: left;
    border-bottom: 1px solid #223344;
}

#gameover-scores-table td, #start-scores-table td {
    font-size: 14px;
    color: #6688aa;
    padding: 4px 12px;
}

#gameover-scores-table td:first-child, #start-scores-table td:first-child {
    color: #445566;
    text-align: right;
    padding-right: 8px;
}

#gameover-scores-table td:nth-child(2), #start-scores-table td:nth-child(2) {
    color: #00ffff;
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.3);
    text-align: right;
}

#gameover-scores-table tr.hs-current td {
    color: #ffff00;
    text-shadow: 0 0 8px rgba(255, 255, 0, 0.4);
}

#gameover-scores-table tr.hs-current td:first-child {
    color: #ffff00;
}

/* Start screen scores */
#start-scores {
    margin-top: 32px;
    opacity: 0.7;
}

#start-scores-table {
    min-width: 200px;
}

#start-scores-table td:nth-child(2) {
    text-shadow: 0 0 4px rgba(0, 255, 255, 0.2);
}

/* Tutorial overlay */
#tutorial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 50;
}

#tutorial-prompt {
    font-size: 56px;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff, 0 0 80px #0088ff;
    text-transform: uppercase;
    letter-spacing: 8px;
}

.tutorial-fade-in {
    animation: tutorialFadeIn 0.5s ease-out forwards;
}

.tutorial-fade-out {
    animation: tutorialFadeOut 0.5s ease-in forwards;
}

@keyframes tutorialFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes tutorialFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(1.1); }
}

/* Settings screen */
#settings-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 30;
    background: rgba(0, 0, 0, 0.85);
    overflow-y: auto;
}

#settings-screen h1 {
    font-size: 48px;
    color: #ffffff;
    text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff, 0 0 60px #0088ff;
    letter-spacing: 12px;
    margin-bottom: 30px;
}

.settings-section {
    width: 360px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.settings-section:last-of-type {
    border-bottom: none;
}

.settings-section h2 {
    font-size: 14px;
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
    letter-spacing: 6px;
    margin-bottom: 14px;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.setting-row label {
    font-size: 13px;
    color: #6688aa;
    letter-spacing: 3px;
    width: 90px;
    flex-shrink: 0;
}

.setting-value {
    font-size: 13px;
    font-family: 'Courier New', Courier, monospace;
    color: #00ffff;
    text-shadow: 0 0 4px rgba(0, 255, 255, 0.3);
    width: 48px;
    text-align: right;
    flex-shrink: 0;
}

/* Range slider styling */
.setting-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: #223344;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.setting-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00ffff;
    box-shadow: 0 0 6px #00ffff, 0 0 12px rgba(0, 255, 255, 0.4);
    cursor: pointer;
}

.setting-row input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00ffff;
    box-shadow: 0 0 6px #00ffff, 0 0 12px rgba(0, 255, 255, 0.4);
    border: none;
    cursor: pointer;
}

/* Select dropdown styling */
.setting-row select {
    flex: 1;
    background: #0a1520;
    color: #00ffff;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 2px;
    outline: none;
    cursor: pointer;
}

.setting-row select:focus {
    border-color: #00ffff;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.setting-row select option {
    background: #0a1520;
    color: #00ffff;
}

/* Controls display */
.controls-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-row {
    display: flex;
    justify-content: space-between;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    padding: 4px 0;
}

.control-row span:first-child {
    color: #6688aa;
    letter-spacing: 3px;
}

.control-row span:last-child,
.control-row .fixed-bind {
    color: #445566;
    letter-spacing: 1px;
}

.rebind-btn {
    background: transparent;
    border: 1px solid #334455;
    color: #00ffff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    letter-spacing: 2px;
    padding: 2px 12px;
    min-width: 80px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
}

.rebind-btn:hover {
    border-color: #00ffff;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.rebind-btn.rebinding {
    color: #ffff00;
    border-color: #ffff00;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.4);
    animation: prompt-pulse 1s ease-in-out infinite;
}

.settings-btn {
    background: transparent;
    border: 1px solid #334455;
    color: #6688aa;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    letter-spacing: 3px;
    padding: 6px 16px;
    margin-top: 12px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.settings-btn:hover {
    color: #00ffff;
    border-color: #00ffff;
}

.settings-close {
    font-size: 14px;
    color: #445566;
    letter-spacing: 3px;
    margin-top: 20px;
    animation: prompt-pulse 2s ease-in-out infinite;
}

/* Settings link on title screen */
.menu-settings {
    font-size: 16px;
    color: #6688aa;
    letter-spacing: 4px;
    margin-top: 12px;
    cursor: pointer;
    transition: color 0.2s, text-shadow 0.2s;
    pointer-events: auto;
}

.menu-settings:hover {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
}

/* Fullscreen link on title screen */
.menu-fullscreen {
    font-size: 16px;
    color: #6688aa;
    letter-spacing: 4px;
    margin-top: 12px;
    cursor: pointer;
    transition: color 0.2s, text-shadow 0.2s;
    pointer-events: auto;
}

.menu-fullscreen:hover {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
}

/* ── Cosmetics Panel ────────────────────────────────── */
#cosmetics-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.cosmetics-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.cosmetics-label {
    color: #888;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    width: 60px;
    text-align: right;
}

.cosmetics-selector {
    display: flex;
    gap: 6px;
}

.cosmetic-swatch {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid #333;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.cosmetic-swatch:hover {
    border-color: #888;
}

.cosmetic-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.cosmetic-swatch.locked {
    opacity: 0.3;
    cursor: default;
}

.cosmetic-swatch.locked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.4) 3px,
        rgba(0,0,0,0.4) 6px
    );
    border-radius: 2px;
}

/* ── Name Modal ────────────────────────────────────── */
#name-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 35;
}

.name-modal-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
}

.name-modal-box {
    text-align: center;
    padding: 40px;
}

.name-modal-box h2 {
    font-size: 24px;
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    letter-spacing: 6px;
    margin-bottom: 24px;
}

#name-input {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #00ffff;
    color: #00ffff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    letter-spacing: 3px;
    padding: 10px 16px;
    width: 260px;
    text-align: center;
    outline: none;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

#name-input::placeholder {
    color: #334455;
    text-transform: none;
}

#name-input:focus {
    box-shadow: 0 0 16px rgba(0, 255, 255, 0.4);
}

#name-error {
    color: #ff4444;
    font-size: 11px;
    letter-spacing: 1px;
    margin-top: 8px;
}

.name-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

/* ── Action Buttons (shared) ──────────────────────── */
.action-btn {
    background: transparent;
    border: 1px solid #00ffff;
    color: #00ffff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    letter-spacing: 3px;
    padding: 8px 24px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.action-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.3);
}

.action-btn-dim {
    border-color: #334455;
    color: #6688aa;
}

.action-btn-dim:hover {
    border-color: #6688aa;
    background: rgba(100, 130, 170, 0.1);
    box-shadow: 0 0 8px rgba(100, 130, 170, 0.2);
}

/* ── Game Over Additions ──────────────────────────── */
#gameover-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 12px 0;
}

#global-rank {
    font-size: 18px;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
    letter-spacing: 3px;
    font-family: 'Courier New', Courier, monospace;
    margin: 6px 0;
}

/* ── Daily Challenge Button ───────────────────────── */
.daily-btn {
    background: transparent;
    border: 1px solid #ffcc00;
    color: #ffcc00;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    letter-spacing: 3px;
    padding: 8px 24px;
    margin-top: 12px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, text-shadow 0.2s;
}

.daily-btn:hover {
    background: rgba(255, 204, 0, 0.1);
    box-shadow: 0 0 16px rgba(255, 204, 0, 0.3);
    text-shadow: 0 0 10px #ffcc00;
}

/* ── Daily Header HUD ─────────────────────────────── */
#daily-header {
    position: absolute;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.6);
    letter-spacing: 4px;
    z-index: 12;
    pointer-events: none;
    white-space: nowrap;
}

/* ── Leaderboard Panel ────────────────────────────── */
#leaderboard-panel {
    margin-top: 16px;
    text-align: center;
    opacity: 0.85;
}

#leaderboard-tabs {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-bottom: 8px;
}

.lb-tab {
    background: transparent;
    border: 1px solid #334455;
    color: #6688aa;
    font-family: 'Courier New', Courier, monospace;
    font-size: 10px;
    letter-spacing: 2px;
    padding: 4px 12px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.lb-tab:hover {
    color: #00ffff;
    border-color: #00ffff;
}

.lb-tab.active {
    color: #00ffff;
    border-color: #00ffff;
    box-shadow: 0 0 6px rgba(0, 255, 255, 0.2);
}

#leaderboard-table {
    border-collapse: collapse;
    min-width: 340px;
    margin: 0 auto;
    font-family: 'Courier New', Courier, monospace;
}

#leaderboard-table th {
    font-size: 10px;
    color: #445566;
    letter-spacing: 2px;
    padding: 3px 10px;
    text-align: left;
    border-bottom: 1px solid #223344;
}

#leaderboard-table td {
    font-size: 12px;
    color: #6688aa;
    padding: 2px 10px;
}

#leaderboard-table td:first-child {
    color: #445566;
    text-align: right;
    padding-right: 6px;
}

#leaderboard-table td:nth-child(3) {
    color: #00ffff;
    text-shadow: 0 0 4px rgba(0, 255, 255, 0.2);
    text-align: right;
}

#leaderboard-loading, #leaderboard-empty {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: #445566;
    letter-spacing: 2px;
    margin-top: 8px;
}

/* ── Wave Mode Button ────────────────────────────── */
.wave-btn {
    background: transparent;
    border: 1px solid #ff44cc;
    color: #ff44cc;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    letter-spacing: 3px;
    padding: 8px 24px;
    margin-top: 8px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, text-shadow 0.2s;
}

.wave-btn:hover {
    background: rgba(255, 68, 204, 0.1);
    box-shadow: 0 0 16px rgba(255, 68, 204, 0.3);
    text-shadow: 0 0 10px #ff44cc;
}

/* ── Wave Header HUD ─────────────────────────────── */
#wave-header {
    position: absolute;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #ff44cc;
    text-shadow: 0 0 10px rgba(255, 68, 204, 0.6);
    letter-spacing: 4px;
    z-index: 12;
    pointer-events: none;
    white-space: nowrap;
}

/* ── Wave Announce Overlay ───────────────────────── */
#wave-announce {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 72px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff, 0 0 60px #0088ff;
    letter-spacing: 12px;
    z-index: 18;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

#wave-announce.wave-announce-in {
    opacity: 1;
    animation: waveAnnounceIn 0.5s ease-out forwards;
}

#wave-announce.wave-announce-boss {
    color: #ff4444;
    text-shadow: 0 0 20px #ff4444, 0 0 40px #ff0000, 0 0 60px #cc0000;
}

@keyframes waveAnnounceIn {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ── Boss HP Bar ─────────────────────────────────── */
#boss-hp-bar {
    position: absolute;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.4);
    border-radius: 3px;
    overflow: hidden;
    z-index: 12;
    pointer-events: none;
}

#boss-hp-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ff8844);
    border-radius: 3px;
    transition: width 0.15s linear;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}

/* ── Wave Number HUD ─────────────────────────────── */
#wave-number {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    color: #ff44cc;
    text-shadow: 0 0 8px rgba(255, 68, 204, 0.5);
    letter-spacing: 4px;
    z-index: 12;
    pointer-events: none;
    white-space: nowrap;
}

/* ── Accessibility Toggle Buttons ────────────────── */
.toggle-btn {
    background: transparent;
    border: 1px solid #334455;
    color: #6688aa;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    letter-spacing: 2px;
    padding: 4px 16px;
    min-width: 60px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.toggle-btn:hover {
    border-color: #00ffff;
    color: #00ffff;
}

.toggle-btn.toggle-on {
    color: #00ffff;
    border-color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.2);
}

/* ── Achievements Button (title screen) ──────────── */
.menu-achievements {
    font-size: 16px;
    color: #ccaa00;
    letter-spacing: 4px;
    margin-top: 12px;
    cursor: pointer;
    transition: color 0.2s, text-shadow 0.2s;
    pointer-events: auto;
}

.menu-achievements:hover {
    color: #ffcc00;
    text-shadow: 0 0 10px #ffcc00, 0 0 20px #ffcc00;
}

/* ── Achievements Screen ─────────────────────────── */
#achievements-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 30;
    background: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
    padding: 40px 20px;
}

#achievements-screen h1 {
    font-size: 48px;
    color: #ffffff;
    text-shadow: 0 0 20px #ffcc00, 0 0 40px #ffcc00;
    letter-spacing: 12px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

#achievements-summary {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #ffcc00;
    text-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
    letter-spacing: 3px;
    margin-bottom: 24px;
    flex-shrink: 0;
}

#achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    max-width: 900px;
    width: 100%;
    padding-bottom: 20px;
}

.ach-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #223344;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.4);
    transition: border-color 0.2s;
}

.ach-item.ach-unlocked {
    border-color: #ffcc00;
    background: rgba(255, 204, 0, 0.05);
}

.ach-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.ach-item:not(.ach-unlocked) .ach-icon {
    filter: grayscale(1);
    opacity: 0.4;
}

.ach-info {
    flex: 1;
    min-width: 0;
}

.ach-name {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #ffffff;
    letter-spacing: 2px;
    margin-bottom: 2px;
}

.ach-item:not(.ach-unlocked) .ach-name {
    color: #6688aa;
}

.ach-desc {
    font-size: 11px;
    color: #445566;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.ach-progress-bar {
    width: 100%;
    height: 3px;
    background: #223344;
    border-radius: 2px;
    overflow: hidden;
}

.ach-progress-fill {
    height: 100%;
    background: #ffcc00;
    border-radius: 2px;
    transition: width 0.3s;
}

.ach-item.ach-unlocked .ach-progress-fill {
    background: #ffcc00;
    box-shadow: 0 0 6px rgba(255, 204, 0, 0.4);
}
