:root, [data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f0f0f0;
    --bg-tertiary: #e0e0e0;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --accent: #e85d26;
    --accent-hover: #ff7840;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --border-color: #cccccc;
    --panel-bg: rgba(255, 255, 255, 0.92);
    --panel-border: rgba(0, 0, 0, 0.15);
    --shadow: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent: #e85d26;
    --accent-hover: #ff7840;
    --danger: #f85149;
    --success: #3fb950;
    --warning: #d29922;
    --border-color: #30363d;
    --panel-bg: rgba(22, 27, 34, 0.92);
    --panel-border: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

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

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

#ui-overlay > div {
    pointer-events: auto;
}

#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px var(--shadow);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}

.btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 24px var(--shadow);
    padding: 24px;
}

#menu-screen, #setup-screen, #game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hud {
    position: fixed;
    top: 0;
    right: 0;
    width: 240px;
    height: 100%;
    z-index: 20;
    background: var(--panel-bg);
    border-left: 1px solid var(--panel-border);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    scrollbar-width: thin;
}

#hud .hud-section {
    padding: 14px 16px;
    border-bottom: 1px solid var(--panel-border);
}

#hud .hud-section:last-child {
    border-bottom: none;
}

#hud .hud-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

#hud label {
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#hud input[type="range"] {
    width: 100%;
    margin-top: 4px;
}

#hud select {
    width: 100%;
}

#hud .hud-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#hud .hud-actions .btn {
    width: 100%;
    text-align: center;
}

#debug-overlay {
    position: fixed;
    top: 8px;
    right: 250px;
    background: rgba(0, 0, 0, 0.6);
    color: #0f0;
    font-family: monospace;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    z-index: 50;
    pointer-events: none;
}

input[type="range"] {
    accent-color: var(--accent);
}

select, input[type="number"] {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
}

label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== Space Invaders (Aliens) Styles ===== */

#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 30;
    pointer-events: none;
}

.crosshair-h, .crosshair-v {
    position: absolute;
    background: rgba(0, 255, 170, 0.8);
    box-shadow: 0 0 6px rgba(0, 255, 170, 0.6);
}

.crosshair-h {
    width: 20px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.crosshair-v {
    width: 2px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#aliens-hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 24px;
    pointer-events: none;
    font-family: 'Courier New', Courier, monospace;
}

#hud-score {
    font-size: 32px;
    font-weight: 700;
    color: #00ffaa;
    text-shadow: 0 0 10px rgba(0, 255, 170, 0.5), 0 0 20px rgba(0, 255, 170, 0.3);
    letter-spacing: 2px;
}

#hud-highscore {
    font-size: 18px;
    color: #888;
    text-shadow: 0 0 6px rgba(136, 136, 136, 0.3);
    letter-spacing: 1px;
}

#hud-wave {
    font-size: 16px;
    color: #00ccff;
    text-shadow: 0 0 8px rgba(0, 204, 255, 0.4);
    margin-top: 4px;
}

#hud-lives {
    font-size: 24px;
    display: flex;
    gap: 4px;
}

.life-icon {
    color: #ff3366;
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.5);
}

#hud-powerup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    font-size: 14px;
    color: #ffcc00;
    text-shadow: 0 0 8px rgba(255, 204, 0, 0.5);
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 204, 0, 0.3);
}

.aliens-menu-panel {
    text-align: center;
    min-width: 320px;
    padding: 48px 40px;
    background: rgba(2, 0, 16, 0.92);
    border: 1px solid rgba(0, 255, 170, 0.2);
}

.aliens-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 48px;
    font-weight: 700;
    color: #00ffaa;
    text-shadow: 0 0 20px rgba(0, 255, 170, 0.6), 0 0 40px rgba(0, 255, 170, 0.3);
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.aliens-subtitle {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    color: #00ccff;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.4);
    letter-spacing: 6px;
    margin-bottom: 24px;
}

.aliens-highscore {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    color: #888;
    margin-bottom: 24px;
}

.aliens-start-btn {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    letter-spacing: 2px;
    padding: 14px 32px;
    margin-top: 12px;
    display: block;
    width: 100%;
}

.aliens-gameover-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 42px;
    font-weight: 700;
    color: #ff3366;
    text-shadow: 0 0 20px rgba(255, 51, 102, 0.6), 0 0 40px rgba(255, 51, 102, 0.3);
    letter-spacing: 4px;
    margin-bottom: 16px;
}

.aliens-final-score {
    font-family: 'Courier New', Courier, monospace;
    font-size: 28px;
    color: #00ffaa;
    text-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
    margin-bottom: 8px;
}

.aliens-new-highscore {
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    margin-bottom: 16px;
    animation: pulse-glow 1s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

.wave-announcement {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-family: 'Courier New', Courier, monospace;
    font-size: 64px;
    font-weight: 700;
    color: #00ffaa;
    text-shadow: 0 0 30px rgba(0, 255, 170, 0.8), 0 0 60px rgba(0, 255, 170, 0.4);
    letter-spacing: 6px;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wave-announcement.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

#pause-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Missile Command Styles ===== */

#missile-hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 24px;
    pointer-events: none;
    font-family: 'Courier New', Courier, monospace;
}

#missile-hud-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#missile-hud-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

#missile-hud-score {
    font-size: 32px;
    font-weight: 700;
    color: #ff6644;
    text-shadow: 0 0 10px rgba(255, 102, 68, 0.5), 0 0 20px rgba(255, 102, 68, 0.3);
    letter-spacing: 2px;
}

#missile-hud-highscore {
    font-size: 18px;
    color: #888;
    text-shadow: 0 0 6px rgba(136, 136, 136, 0.3);
    letter-spacing: 1px;
}

#missile-hud-wave {
    font-size: 16px;
    color: #ff4444;
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
    margin-top: 4px;
}

#missile-hud-powerup {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    font-weight: 700;
    color: #ffcc00;
    text-shadow: 0 0 8px rgba(255, 204, 0, 0.6);
    margin-top: 4px;
    animation: pulse-glow 0.5s ease-in-out infinite alternate;
}

#missile-hud-cities {
    font-size: 22px;
    display: flex;
    gap: 6px;
}

.city-icon {
    color: #44aaff;
    text-shadow: 0 0 8px rgba(68, 170, 255, 0.6);
    transition: color 0.3s, text-shadow 0.3s;
}

.city-icon.city-dead {
    color: #333;
    text-shadow: none;
}

#missile-hud-ammo {
    font-size: 14px;
    color: #ff8844;
    text-shadow: 0 0 6px rgba(255, 136, 68, 0.4);
    display: flex;
    gap: 12px;
}

.ammo-battery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ammo-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
}

.ammo-count {
    font-size: 16px;
    font-weight: 700;
}

.missile-menu-panel {
    text-align: center;
    min-width: 320px;
    padding: 48px 40px;
    background: rgba(8, 2, 2, 0.94);
    border: 1px solid rgba(255, 68, 68, 0.2);
}

.missile-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 48px;
    font-weight: 700;
    color: #ff4444;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.6), 0 0 40px rgba(255, 68, 68, 0.3);
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.missile-subtitle {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    color: #ff8844;
    text-shadow: 0 0 10px rgba(255, 136, 68, 0.4);
    letter-spacing: 6px;
    margin-bottom: 24px;
}

.missile-highscore {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    color: #888;
    margin-bottom: 24px;
}

.missile-start-btn {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    letter-spacing: 2px;
    padding: 14px 32px;
    margin-top: 12px;
    display: block;
    width: 100%;
}

.missile-gameover-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 42px;
    font-weight: 700;
    color: #ff3333;
    text-shadow: 0 0 20px rgba(255, 51, 51, 0.6), 0 0 40px rgba(255, 51, 51, 0.3);
    letter-spacing: 4px;
    margin-bottom: 16px;
}

.missile-final-score {
    font-family: 'Courier New', Courier, monospace;
    font-size: 28px;
    color: #ff6644;
    text-shadow: 0 0 10px rgba(255, 102, 68, 0.5);
    margin-bottom: 8px;
}

.missile-new-highscore {
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    margin-bottom: 16px;
    animation: pulse-glow 1s ease-in-out infinite alternate;
}

.missile-wave-announcement {
    color: #ff4444;
    text-shadow: 0 0 30px rgba(255, 68, 68, 0.8), 0 0 60px rgba(255, 68, 68, 0.4);
}

.bonus-tally {
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Courier New', Courier, monospace;
    font-size: 22px;
    font-weight: 700;
    color: #ffcc44;
    text-shadow: 0 0 12px rgba(255, 204, 68, 0.6);
    text-align: center;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    line-height: 1.8;
}

.bonus-tally.show {
    opacity: 1;
}

.highscore-table {
    font-family: 'Courier New', Courier, monospace;
    margin: 16px 0;
    width: 100%;
}

.highscore-table table {
    width: 100%;
    border-collapse: collapse;
}

.highscore-table .hs-header {
    font-size: 14px;
    color: #ff4444;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.4);
}

.highscore-table th {
    font-size: 11px;
    color: #666;
    letter-spacing: 1px;
    padding: 2px 0;
    text-align: left;
    border-bottom: 1px solid rgba(255, 68, 68, 0.15);
}

.highscore-table th:last-child {
    text-align: right;
}

.highscore-table td {
    font-size: 14px;
    padding: 3px 0;
    color: #aa8866;
}

.highscore-table td:first-child {
    color: #666;
    width: 24px;
}

.highscore-table td:nth-child(2) {
    color: #ff8844;
    letter-spacing: 3px;
}

.highscore-table td:last-child {
    text-align: right;
    color: #ffcc44;
}

.highscore-table tr.hs-current {
    background: rgba(255, 204, 0, 0.08);
}

.highscore-table tr.hs-current td {
    color: #ffcc00;
    text-shadow: 0 0 6px rgba(255, 204, 0, 0.4);
}

.highscore-table .hs-empty {
    font-size: 13px;
    color: #444;
    text-align: center;
    padding: 12px 0;
}

.initials-prompt {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #ff8844;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-shadow: 0 0 8px rgba(255, 136, 68, 0.4);
}

.initials-input-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.initial-char {
    width: 42px;
    height: 52px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.06);
    border: 2px solid rgba(255, 136, 68, 0.4);
    outline: none;
    caret-color: #ff8844;
    text-shadow: 0 0 8px rgba(255, 204, 0, 0.5);
}

.initial-char:focus {
    border-color: #ff8844;
    background: rgba(255, 136, 68, 0.1);
    box-shadow: 0 0 12px rgba(255, 136, 68, 0.3);
}

/* --- Landing (index.html): match aliens / missile menu aesthetics --- */

body.arcade-body {
    font-family: 'Courier New', Courier, monospace;
    background: #050508;
    color: #e6edf3;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    height: auto;
}

.arcade-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 85% 55% at 50% -15%, rgba(0, 255, 170, 0.09), transparent 52%),
        radial-gradient(ellipse 75% 45% at 110% 85%, rgba(255, 68, 68, 0.07), transparent 48%),
        radial-gradient(ellipse 65% 40% at -10% 90%, rgba(0, 204, 255, 0.06), transparent 42%),
        #050508;
}

.arcade-container {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px 64px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.arcade-header {
    text-align: center;
    margin-bottom: 48px;
}

.arcade-logo {
    font-size: clamp(32px, 8vw, 48px);
    font-weight: 700;
    color: #00ffaa;
    text-shadow: 0 0 20px rgba(0, 255, 170, 0.6), 0 0 40px rgba(0, 255, 170, 0.3);
    letter-spacing: 4px;
    margin-bottom: 8px;
    line-height: 1.2;
}

.arcade-logo-accent {
    color: #ff4444;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.6), 0 0 40px rgba(255, 68, 68, 0.3);
}

.arcade-tagline {
    font-size: 14px;
    color: #00ccff;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.4);
    letter-spacing: 6px;
    text-transform: uppercase;
}

.arcade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    flex: 1;
    align-content: start;
}

.arcade-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    background: rgba(6, 4, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.arcade-card:hover {
    transform: translateY(-4px);
}

.arcade-card--aliens {
    background: rgba(2, 0, 16, 0.92);
    border: 1px solid rgba(0, 255, 170, 0.2);
}

.arcade-card--aliens:hover {
    border-color: rgba(0, 255, 170, 0.45);
    box-shadow: 0 0 28px rgba(0, 255, 170, 0.12), 0 8px 32px rgba(0, 0, 0, 0.55);
}

.arcade-card--missile {
    background: rgba(8, 2, 2, 0.94);
    border: 1px solid rgba(255, 68, 68, 0.2);
}

.arcade-card--missile:hover {
    border-color: rgba(255, 68, 68, 0.45);
    box-shadow: 0 0 28px rgba(255, 68, 68, 0.1), 0 8px 32px rgba(0, 0, 0, 0.55);
}

.arcade-card-glow {
    position: absolute;
    inset: -40%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.arcade-card--aliens .arcade-card-glow {
    background: radial-gradient(circle at 50% 0%, rgba(0, 255, 170, 0.14), transparent 55%);
}

.arcade-card--missile .arcade-card-glow {
    background: radial-gradient(circle at 50% 0%, rgba(255, 68, 68, 0.14), transparent 55%);
}

.arcade-card:hover .arcade-card-glow {
    opacity: 1;
}

.arcade-card-content {
    position: relative;
    z-index: 1;
    padding: 32px 28px;
    backdrop-filter: blur(8px);
}

.arcade-card-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.12));
}

.arcade-card--aliens .arcade-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #00ffaa;
    text-shadow: 0 0 12px rgba(0, 255, 170, 0.5);
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.arcade-card--missile .arcade-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #ff4444;
    text-shadow: 0 0 12px rgba(255, 68, 68, 0.5);
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.arcade-card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #888;
    margin-bottom: 20px;
}

.arcade-card--aliens .arcade-card-play {
    font-size: 16px;
    font-weight: 700;
    color: #00ccff;
    text-shadow: 0 0 8px rgba(0, 204, 255, 0.4);
    letter-spacing: 2px;
}

.arcade-card--missile .arcade-card-play {
    font-size: 16px;
    font-weight: 700;
    color: #ff8844;
    text-shadow: 0 0 8px rgba(255, 136, 68, 0.4);
    letter-spacing: 2px;
}

.arcade-footer {
    text-align: center;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.arcade-footer-text {
    font-size: 14px;
    color: #666;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.arcade-donate-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    transition: background 0.2s, border-color 0.2s;
}

.arcade-donate-btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

/* ===== Minesweeper card on home page ===== */

.arcade-card--mines {
    background: rgba(10, 8, 2, 0.94);
    border: 1px solid rgba(255, 170, 34, 0.22);
}

.arcade-card--mines:hover {
    border-color: rgba(255, 170, 34, 0.5);
    box-shadow: 0 0 28px rgba(255, 170, 34, 0.12), 0 8px 32px rgba(0, 0, 0, 0.55);
}

.arcade-card--mines .arcade-card-glow {
    background: radial-gradient(circle at 50% 0%, rgba(255, 170, 34, 0.16), transparent 55%);
}

.arcade-card--mines .arcade-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffaa22;
    text-shadow: 0 0 12px rgba(255, 170, 34, 0.5);
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.arcade-card--mines .arcade-card-play {
    font-size: 16px;
    font-weight: 700;
    color: #ffd066;
    text-shadow: 0 0 8px rgba(255, 208, 102, 0.4);
    letter-spacing: 2px;
}

/* ===== Minesweeper game styles ===== */

#mines-hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 24px;
    pointer-events: none;
    font-family: 'Courier New', Courier, monospace;
}

#mines-hud-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#mines-hud-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

#mines-hud-timer {
    font-size: 32px;
    font-weight: 700;
    color: #ffd066;
    text-shadow: 0 0 10px rgba(255, 208, 102, 0.5), 0 0 20px rgba(255, 170, 34, 0.3);
    letter-spacing: 2px;
}

#mines-hud-difficulty {
    font-size: 14px;
    color: #ffaa22;
    text-shadow: 0 0 6px rgba(255, 170, 34, 0.4);
    letter-spacing: 3px;
}

#mines-hud-mines {
    font-size: 22px;
    font-weight: 700;
    color: #ff7744;
    text-shadow: 0 0 8px rgba(255, 119, 68, 0.4);
    letter-spacing: 2px;
}

#mines-hud-help {
    font-size: 11px;
    color: #888;
    letter-spacing: 1px;
    text-transform: uppercase;
    max-width: 360px;
    text-align: right;
    line-height: 1.5;
}

.mines-menu-panel {
    text-align: center;
    min-width: 360px;
    max-width: 480px;
    padding: 44px 40px;
    background: rgba(10, 8, 2, 0.94);
    border: 1px solid rgba(255, 170, 34, 0.22);
}

.mines-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 44px;
    font-weight: 700;
    color: #ffaa22;
    text-shadow: 0 0 20px rgba(255, 170, 34, 0.6), 0 0 40px rgba(255, 170, 34, 0.3);
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.mines-subtitle {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    color: #ffd066;
    text-shadow: 0 0 10px rgba(255, 208, 102, 0.4);
    letter-spacing: 6px;
    margin-bottom: 20px;
}

.mines-blurb {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #aaa;
    line-height: 1.6;
    letter-spacing: 1px;
    margin-bottom: 28px;
}

.mines-difficulty-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.mines-diff-btn {
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: rgba(20, 16, 6, 0.85);
    border: 1px solid rgba(255, 170, 34, 0.25);
    color: #ffd066;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    letter-spacing: 2px;
}

.mines-diff-btn:hover {
    background: rgba(40, 28, 8, 0.95);
    border-color: rgba(255, 170, 34, 0.6);
    transform: translateY(-1px);
}

.mines-diff-btn:active {
    transform: translateY(0);
}

.mines-diff-label {
    font-size: 18px;
    font-weight: 700;
    color: #ffaa22;
    text-shadow: 0 0 8px rgba(255, 170, 34, 0.5);
    margin-bottom: 4px;
}

.mines-diff-meta {
    font-size: 11px;
    color: #aaa;
    letter-spacing: 2px;
}

.mines-action-btn {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    letter-spacing: 2px;
    padding: 12px 28px;
    margin-top: 10px;
    display: block;
    width: 100%;
}

.mines-gameover-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 16px;
}

.mines-result-win {
    color: #44ff99;
    text-shadow: 0 0 20px rgba(68, 255, 153, 0.6), 0 0 40px rgba(68, 255, 153, 0.3);
}

.mines-result-lose {
    color: #ff3333;
    text-shadow: 0 0 20px rgba(255, 51, 51, 0.6), 0 0 40px rgba(255, 51, 51, 0.3);
}

.mines-final-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: 'Courier New', Courier, monospace;
    margin: 6px 0;
    padding: 0 6px;
}

.mines-final-label {
    font-size: 13px;
    color: #888;
    letter-spacing: 3px;
}

.mines-final-time {
    font-size: 26px;
    color: #ffd066;
    text-shadow: 0 0 10px rgba(255, 208, 102, 0.5);
    letter-spacing: 2px;
}

.mines-final-difficulty {
    font-size: 18px;
    color: #ffaa22;
    text-shadow: 0 0 8px rgba(255, 170, 34, 0.4);
    letter-spacing: 3px;
}

.mines-new-best {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.6);
    margin: 12px 0;
    letter-spacing: 3px;
    animation: pulse-glow 1s ease-in-out infinite alternate;
}

