/* ═══════════════════════════════════════════════════════════════════════ */
/* ASTEROID DODGER - CYBERPUNK UI OVERHAUL */
/* ═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;600;700&display=swap');

:root {
    --neon-cyan: #00ffff;
    --neon-pink: #ff006e;
    --neon-purple: #bd00ff;
    --neon-blue: #0080ff;
    --neon-green: #00ff41;
    --dark-bg: #0a0e27;
    --darker-bg: #050714;
    --glass-bg: rgba(10, 14, 39, 0.85);
    --glow-cyan: 0 0 20px rgba(0, 255, 255, 0.5);
    --glow-pink: 0 0 20px rgba(255, 0, 110, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* LOADING SCREEN */
/* ═══════════════════════════════════════════════════════════════════════ */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a3e 50%, #0a0e27 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.loaded {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.loading-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 64px;
    font-weight: 900;
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.loading-text {
    display: block;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s linear infinite;
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
    letter-spacing: 8px;
}

@keyframes gradientShift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.loading-spinner {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 40px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 75%;
    height: 75%;
    top: 12.5%;
    left: 12.5%;
    border-top-color: var(--neon-purple);
    animation-duration: 2s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    border-top-color: var(--neon-pink);
    animation-duration: 1s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-message {
    font-family: 'Rajdhani', sans-serif;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.loading-bar {
    width: 400px;
    max-width: 80vw;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.loading-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px var(--neon-cyan);
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { box-shadow: 0 0 10px var(--neon-cyan); }
    50% { box-shadow: 0 0 25px var(--neon-cyan), 0 0 50px var(--neon-purple); }
    100% { box-shadow: 0 0 10px var(--neon-cyan); }
}

.loading-percentage {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    color: var(--neon-cyan);
    font-weight: 700;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.stars-background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: transparent;
    overflow: hidden;
    z-index: 1;
}

.stars-background::before,
.stars-background::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    box-shadow:
        100px 200px white, 300px 100px white, 500px 300px white,
        700px 150px white, 200px 400px white, 600px 450px white,
        150px 50px white, 450px 250px white, 750px 400px white,
        50px 350px white, 400px 500px white, 650px 50px white,
        250px 150px white, 550px 200px white, 350px 450px white;
    animation: twinkle 3s infinite;
}

.stars-background::after {
    box-shadow:
        150px 250px white, 350px 150px white, 550px 350px white,
        750px 200px white, 250px 450px white, 650px 500px white,
        200px 100px white, 500px 300px white, 800px 450px white,
        100px 400px white, 450px 550px white, 700px 100px white,
        300px 200px white, 600px 250px white, 400px 500px white;
    animation: twinkle 3s infinite 1.5s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    /* Prevent text selection on click/drag */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('https://web-runner.net/web-runner-apps/stellar-anomaly/assets//backgrounds/Asteroid_Dodger_mm.png') no-repeat center center;
    background-size: cover;
    font-family: 'Rajdhani', sans-serif;
    color: white;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 110, 0.03) 0%, transparent 50%),
        linear-gradient(180deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    z-index: -1;
}

/* Animated grid background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridScroll 20s linear infinite;
    z-index: -1;
    opacity: 0.3;
}

@keyframes gridScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* GAME CONTAINER */
/* ═══════════════════════════════════════════════════════════════════════ */

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* HUD - SCORE BOARD */
/* ═══════════════════════════════════════════════════════════════════════ */

#score-board {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
}

.hud-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
    background: rgba(0, 10, 20, 0.6);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-left: 3px solid var(--neon-cyan);
    border-radius: 2px;
}

.hud-label {
    font-size: 9px;
    font-weight: 700;
    color: rgba(0, 255, 255, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hud-value {
    font-size: 16px;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

#wave-display.hud-stat {
    border-left-color: var(--neon-pink);
}

#wave-display .hud-label {
    color: rgba(255, 0, 150, 0.7);
}

#wave-display .hud-value {
    color: var(--neon-pink);
    text-shadow: 0 0 8px rgba(255, 0, 150, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* LIVES HUD */
/* ═══════════════════════════════════════════════════════════════════════ */

#lives {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 6px;
    background: rgba(0, 10, 20, 0.6);
    backdrop-filter: blur(8px);
    border-left: 3px solid var(--neon-pink);
    border-radius: 2px;
    padding: 6px 10px;
    box-shadow: 0 0 12px rgba(255, 0, 150, 0.3);
}

#lives img {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 6px rgba(255, 0, 150, 0.6));
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* POWER-UP CONTAINER */
/* ═══════════════════════════════════════════════════════════════════════ */

#power-up-container {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 10, 20, 0.6);
    backdrop-filter: blur(8px);
    border-left: 3px solid var(--neon-green);
    border-radius: 2px;
    padding: 6px 10px;
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.3);
    z-index: 900; /* Ensure it's above canvas */
}

#pu-border {
    display: none;
}

.pu-info {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.pu-info img {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 6px rgba(0, 255, 65, 0.6));
}

.pu-info span {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

/* Shield HP Bar */
.shield-hp-bar {
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 255, 255, 0.15);
    border-radius: 1px;
    overflow: hidden;
}

.shield-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), #00ffff);
    box-shadow: 0 0 4px var(--neon-cyan);
    transition: width 0.2s ease-out;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* MAIN MENU */
/* ═══════════════════════════════════════════════════════════════════════ */

#main-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
    max-width: 95vw;
    max-height: 95vh;
    overflow: auto;
    padding-left: 100px;
    padding-right: 100px;
}

.title {
    font-size: clamp(32px, 8vw, 72px);
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: clamp(2px, 1vw, 8px);
    margin-bottom: 20px;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan); }
    50% { text-shadow: 0 0 30px var(--neon-cyan), 0 0 60px var(--neon-cyan), 0 0 90px var(--neon-cyan); }
}

.space, .dodger {
    display: block;
}

.space {
    color: var(--neon-pink);
    text-shadow:
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-pink);
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(500px, 80vw);
    max-width: 100%;
    height: 60px;
    margin: 20px auto;
    position: relative;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--neon-cyan) 20%,
        var(--neon-cyan) 80%,
        transparent 100%
    );
    position: relative;
    box-shadow:
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan);
    animation: lineGlow 2s ease-in-out infinite;
}

.divider-line::before,
.divider-line::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--neon-pink);
    box-shadow: 0 0 8px var(--neon-pink);
    animation: segmentPulse 1.5s ease-in-out infinite;
}

.divider-line::before {
    left: 15%;
    animation-delay: 0s;
}

.divider-line::after {
    right: 15%;
    animation-delay: 0.75s;
}

.divider-core {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 15px;
}

.divider-hexagon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-pink) 100%);
    clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
    position: relative;
    animation: hexagonRotate 4s linear infinite, hexagonPulse 2s ease-in-out infinite;
    box-shadow:
        0 0 20px var(--neon-cyan),
        0 0 40px var(--neon-pink),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
}

.divider-hexagon::before {
    content: '';
    position: absolute;
    inset: 3px;
    background: rgba(0, 0, 0, 0.8);
    clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
}

.divider-hexagon::after {
    content: '';
    position: absolute;
    inset: 8px;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-pink) 100%);
    clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
    animation: innerGlow 1.5s ease-in-out infinite alternate;
}

.divider-pulse {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    opacity: 0;
    animation: pulseRing 2s ease-out infinite;
}

.divider-pulse::before,
.divider-pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--neon-pink);
    border-radius: 50%;
    opacity: 0;
    animation: pulseRing 2s ease-out infinite;
}

.divider-pulse::before {
    animation-delay: 0.6s;
}

.divider-pulse::after {
    animation-delay: 1.2s;
}

@keyframes lineGlow {
    0%, 100% {
        box-shadow:
            0 0 5px var(--neon-cyan),
            0 0 10px var(--neon-cyan);
    }
    50% {
        box-shadow:
            0 0 15px var(--neon-cyan),
            0 0 30px var(--neon-cyan),
            0 0 45px var(--neon-cyan);
    }
}

@keyframes segmentPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scaleX(0.8);
    }
    50% {
        opacity: 1;
        transform: scaleX(1.2);
    }
}

@keyframes hexagonRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes hexagonPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.1) rotate(180deg);
        filter: brightness(1.5);
    }
}

@keyframes innerGlow {
    from {
        opacity: 0.5;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulseRing {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.menu-buttons {
    display: flex;
    margin-top: 40px;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.menu-button {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 3px solid var(--neon-cyan);
    color: white;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    padding: 15px 60px;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    width: 350px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    opacity: 0.3;
}

.menu-button:hover::before {
    width: 300px;
    height: 300px;
}

.menu-button:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow:
        0 0 30px var(--neon-cyan),
        0 0 60px var(--neon-cyan),
        inset 0 0 20px rgba(0, 255, 255, 0.2);
    border-color: var(--neon-pink);
}

/* Player Stats Display V2 - Compact Cards */
.player-stats-display-v2 {
    margin-top: 40px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.player-stat-card {
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.8), rgba(0, 10, 30, 0.8));
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 180px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2), inset 0 0 20px rgba(0, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.player-stat-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4), inset 0 0 25px rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stat-icon-v2 {
    font-size: 32px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    flex-shrink: 0;
}

.stat-content-v2 {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label-v2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    color: rgba(0, 255, 255, 0.7);
    letter-spacing: 1.5px;
    font-weight: 600;
}

.stat-value-v2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    color: var(--neon-cyan);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* MODE SELECT */
/* ═══════════════════════════════════════════════════════════════════════ */

#mode-select {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 1200px;
    z-index: 100;
}

#mode-select .title {
    font-size: 56px;
    margin-bottom: 50px;
}

.mode-buttons {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.mode-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 4px solid var(--neon-cyan);
    color: white;
    padding: 50px 70px;
    font-size: 24px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 350px;
    min-height: 250px;
    position: relative;
    overflow: hidden;
}

.mode-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s;
}

.mode-button:hover::before {
    transform: scale(1);
}

.mode-button:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: translateY(-10px) scale(1.05);
    box-shadow:
        0 20px 60px rgba(0, 255, 255, 0.4),
        0 0 80px rgba(0, 255, 255, 0.3),
        inset 0 0 40px rgba(0, 255, 255, 0.1);
    border-color: var(--neon-pink);
}

.mode-title {
    font-size: 36px;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 20px;
    text-shadow: 0 0 20px var(--neon-cyan);
}

.mode-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-family: 'Rajdhani', sans-serif;
}

.mode-features {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    text-align: left;
}

.mode-features li {
    font-size: 14px;
    color: rgba(0, 255, 255, 0.9);
    padding: 6px 0;
    font-family: 'Rajdhani', sans-serif;
    position: relative;
    padding-left: 20px;
}

.mode-features li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
    font-weight: bold;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* GAME OVER / PAUSE SCREEN */
/* ═══════════════════════════════════════════════════════════════════════ */

#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.gameover-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 70vh;
    background: rgba(0, 10, 20, 0.95);
    border: 3px solid var(--neon-pink);
    border-radius: 15px;
    box-shadow:
        0 0 50px rgba(255, 0, 150, 0.6),
        inset 0 0 30px rgba(255, 0, 150, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Paused state - changes border to orange */
#game-over.paused .gameover-container {
    border-color: #ff9500;
    box-shadow:
        0 0 50px rgba(255, 149, 0, 0.6),
        inset 0 0 30px rgba(255, 149, 0, 0.1);
}

#game-over.paused .gameover-header {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.2), rgba(255, 200, 0, 0.1));
    border-bottom-color: #ff9500;
}

#game-over.paused .gameover-header-line {
    background: linear-gradient(90deg, transparent, #ff9500, transparent);
    box-shadow: 0 0 10px #ff9500;
}

#game-over.paused #gameover-title {
    color: #ff9500;
    text-shadow: 0 0 15px #ff9500, 0 0 30px #ff9500;
}

.gameover-header {
    background: linear-gradient(135deg, rgba(255, 0, 150, 0.2), rgba(255, 0, 255, 0.1));
    padding: 20px 30px;
    border-bottom: 2px solid var(--neon-pink);
}

.gameover-header-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-pink), transparent);
    margin: 10px 0;
    box-shadow: 0 0 10px var(--neon-pink);
}

#gameover-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: var(--neon-pink);
    text-align: center;
    letter-spacing: 4px;
    margin: 0;
    text-shadow:
        0 0 15px var(--neon-pink),
        0 0 30px var(--neon-pink);
}

.gameover-content {
    padding: 30px;
}

.gameover-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gameover-stat-item {
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.2);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.gameover-stat-label {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.gameover-stat-value {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: white;
}

.gameover-stat-value.xp-value {
    color: var(--neon-cyan);
    text-shadow: 0 0 15px var(--neon-cyan);
}

.gameover-tip {
    margin: 20px 30px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.1), rgba(255, 150, 0, 0.05));
    border: 2px solid rgba(255, 200, 0, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 0 20px rgba(255, 200, 0, 0.2);
}

.tip-icon {
    font-size: 28px;
    flex-shrink: 0;
    animation: tipPulse 2s ease-in-out infinite;
}

@keyframes tipPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.tip-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.tip-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #ffc800;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 200, 0, 0.5);
}

.tip-text {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.gameover-actions {
    padding: 0 30px 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gameover-primary-btn {
    position: relative;
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    border: none;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(255, 0, 150, 0.5);
    transition: all 0.3s ease;
}

.gameover-primary-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 40px rgba(255, 0, 150, 0.8);
}

.gameover-secondary-btn {
    width: 100%;
    padding: 12px 20px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--neon-cyan);
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.gameover-secondary-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

button {
    display: inline-block;
    margin: 15px 10px;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    background: var(--glass-bg);
    color: white;
    border: 3px solid var(--neon-cyan);
    border-radius: 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

button:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow:
        0 0 30px var(--neon-cyan),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* FLOATING TEXT */
/* ═══════════════════════════════════════════════════════════════════════ */

.floating-text {
    position: absolute;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-green);
    pointer-events: none;
    text-shadow:
        0 0 10px var(--neon-green),
        0 0 20px var(--neon-green);
    animation: floatUp 2s ease-out forwards;
    opacity: 1;
    z-index: 999;
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-80px);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* UTILITY CLASSES */
/* ═══════════════════════════════════════════════════════════════════════ */

.hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* POPUPS - OPTIONS, LEADERBOARDS */
/* ═══════════════════════════════════════════════════════════════════════ */

#options-popup, #leaderboard-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 4px solid var(--neon-purple);
    border-radius: 15px;
    padding: 40px;
    z-index: 1001;
    box-shadow:
        0 0 60px rgba(189, 0, 255, 0.5),
        inset 0 0 40px rgba(189, 0, 255, 0.1);
    max-height: 85vh;
    overflow-y: auto;
}

#clear-leaderboard-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 4px solid var(--neon-pink);
    border-radius: 15px;
    padding: 40px;
    z-index: 1002;
    box-shadow:
        0 0 60px rgba(255, 0, 110, 0.5),
        inset 0 0 40px rgba(255, 0, 110, 0.1);
    text-align: center;
    min-width: 400px;
}

#clear-leaderboard-popup h2 {
    color: var(--neon-pink);
    margin-bottom: 20px;
}

#clear-leaderboard-popup p {
    color: white;
    font-size: 16px;
    margin-bottom: 25px;
    font-family: 'Rajdhani', sans-serif;
}

#options-popup {
    width: 800px;
    max-width: 90vw;
}

/* Options Tabs */
.options-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.options-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.options-tab:hover {
    color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.05);
}

.options-tab.active {
    color: var(--neon-cyan);
    border-bottom-color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.options-tab-content {
    display: none;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
}

.options-tab-content.active {
    display: block;
}

/* Guide Tab Styles */
.guide-content h3 {
    color: var(--neon-purple);
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    margin: 25px 0 15px 0;
    text-shadow: 0 0 10px var(--neon-purple);
}

.guide-content h3:first-child {
    margin-top: 0;
}

.guide-section {
    margin-bottom: 20px;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s;
}

.guide-item:hover {
    background: rgba(0, 255, 255, 0.05);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.guide-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.5));
}

.guide-icon-placeholder {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    filter: drop-shadow(0 0 8px rgba(189, 0, 255, 0.5));
}

.guide-info {
    flex: 1;
}

.guide-info strong {
    display: block;
    color: var(--neon-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    margin-bottom: 5px;
    text-shadow: 0 0 5px var(--neon-cyan);
}

.guide-info p {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Rajdhani', sans-serif;
}

.guide-info p {
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
}

.biome-tag {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(138, 43, 226, 0.2));
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 4px;
    color: var(--neon-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}

/* Credits Tab Styles */
.credits-content {
    text-align: center;
    padding: 20px;
}

.credits-content h3 {
    color: var(--neon-pink);
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    margin-bottom: 30px;
    text-shadow: 0 0 20px var(--neon-pink);
}

.credits-section {
    margin: 30px 0;
}

.credits-text {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    line-height: 1.8;
    margin: 15px 0;
}

.credits-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 40px auto;
    max-width: 400px;
}

.credits-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    color: var(--neon-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.credits-link:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

.credits-link span {
    font-size: 24px;
}

.credits-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.credits-footer p {
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
}

#leaderboard-popup {
    width: 600px;
}

h2 {
    color: var(--neon-purple);
    font-size: 42px;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 20px var(--neon-purple);
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    color: white;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.option-row span:first-child {
    font-weight: 600;
}

/* Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 240px;
    height: 10px;
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.9), rgba(189, 0, 255, 0.9));
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 999px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    margin-top: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 30%, #00ffff 70%);
    border: 2px solid rgba(0, 255, 255, 0.9);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.8), 0 0 24px rgba(189, 0, 255, 0.35);
}

input[type="range"]::-moz-range-track {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.9), rgba(189, 0, 255, 0.9));
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 30%, #00ffff 70%);
    border: 2px solid rgba(0, 255, 255, 0.9);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.8), 0 0 24px rgba(189, 0, 255, 0.35);
}

.toggle-btn {
    padding: 10px 25px;
    background: var(--glass-bg);
    border: 2px solid var(--neon-cyan);
    border-radius: 5px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px var(--neon-cyan);
}

/* Leaderboard Info Text */
.leaderboard-info {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-family: 'Rajdhani', sans-serif;
    margin: -10px 0 20px 0;
    padding: 10px 20px;
    background: rgba(138, 43, 226, 0.1);
    border-left: 3px solid var(--neon-purple);
    border-radius: 5px;
    line-height: 1.5;
}

/* Leaderboard Entries */
.leaderboard-header {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    border-bottom: 2px solid var(--neon-purple);
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 10px;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.leaderboard-entry:hover {
    background: rgba(189, 0, 255, 0.1);
    transform: translateX(5px);
}

.leaderboard-entry span {
    flex: 1;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* OPTIONS MODAL - CONTROLS SECTION */
/* ═══════════════════════════════════════════════════════════════════════ */

.controls-label {
    font-weight: 600;
    font-size: 18px;
}

.controls-row {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: flex-end;
}

.control-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.control-text p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--neon-cyan);
}

.icon-img {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
}

.center-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.main-menu-btn {
    background: var(--glass-bg);
    border: 2px solid var(--neon-cyan);
    color: white;
    padding: 12px 35px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-menu-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px var(--neon-cyan);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* ACHIEVEMENTS POPUP V2 - ENHANCED SCI-FI THEME */
/* ═══════════════════════════════════════════════════════════════════════ */

#achievements-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: linear-gradient(135deg, rgba(0, 10, 20, 0.98), rgba(0, 20, 30, 0.98));
    backdrop-filter: blur(20px);
    border: 3px solid var(--neon-green);
    border-radius: 12px;
    padding: 30px;
    z-index: 1001;
    box-shadow:
        0 0 50px rgba(0, 255, 65, 0.5),
        inset 0 0 30px rgba(0, 255, 65, 0.08);
    max-height: 85vh;
    width: 800px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    animation: achievementPopIn 0.3s ease-out forwards;
}

@keyframes achievementPopIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

#achievements-popup h2 {
    color: var(--neon-green);
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    text-align: center;
    margin: 0 0 20px 0;
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
    letter-spacing: 3px;
}

.achievements-progress {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.15), rgba(0, 200, 50, 0.15));
    border-radius: 8px;
    border: 2px solid rgba(0, 255, 65, 0.4);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2), inset 0 0 15px rgba(0, 255, 65, 0.1);
}

.achievements-progress p {
    margin: 5px 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
}

.achievements-progress span {
    color: var(--neon-green);
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
}

.xp-earned {
    color: rgba(0, 255, 255, 0.9) !important;
    margin-top: 8px !important;
}

.xp-earned span {
    color: var(--neon-cyan) !important;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6) !important;
}

.achievement-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.6), rgba(0, 10, 30, 0.6));
    border: 2px solid rgba(0, 255, 65, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 18px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.category-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.2), rgba(0, 200, 50, 0.2));
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    transform: translateY(-1px);
}

.category-btn.active {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.3), rgba(0, 200, 50, 0.3));
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4), inset 0 0 15px rgba(0, 255, 65, 0.2);
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
}

.achievements-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 5px;
    flex: 1;
    overflow-x: hidden;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.7), rgba(0, 10, 30, 0.7));
    border: 2px solid;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-item:hover {
    transform: translateX(3px);
}

.achievement-item.unlocked {
    border-color: rgba(0, 255, 65, 0.6);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3), inset 0 0 15px rgba(0, 255, 65, 0.08);
}

.achievement-item.unlocked:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.4), inset 0 0 20px rgba(0, 255, 65, 0.12);
}

.achievement-item.locked {
    border-color: rgba(68, 68, 68, 0.5);
    opacity: 0.5;
}

.achievement-item.unlocked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.15), transparent);
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.achievement-icon {
    font-size: 48px;
    min-width: 60px;
    text-align: center;
    filter: grayscale(0) drop-shadow(0 0 8px rgba(0, 255, 65, 0.6));
    transition: all 0.3s ease;
}

.achievement-item.unlocked:hover .achievement-icon {
    transform: scale(1.1);
    filter: grayscale(0) drop-shadow(0 0 12px rgba(0, 255, 65, 0.8));
}

.achievement-item.locked .achievement-icon {
    filter: grayscale(1);
    opacity: 0.4;
}

.achievement-details {
    flex: 1;
}

.achievement-name {
    font-size: 18px;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-green);
    margin-bottom: 6px;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
    letter-spacing: 0.5px;
}

.achievement-item.locked .achievement-name {
    color: rgba(153, 153, 153, 0.6);
    text-shadow: none;
}

.achievement-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
    font-family: 'Rajdhani', sans-serif;
    line-height: 1.4;
}

.achievement-item.locked .achievement-description {
    color: rgba(255, 255, 255, 0.35);
}

.achievement-xp {
    display: inline-block;
    padding: 5px 14px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3), rgba(138, 43, 226, 0.3));
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.6);
}

.achievement-item.locked .achievement-xp {
    background: rgba(68, 68, 68, 0.3);
    border-color: rgba(68, 68, 68, 0.5);
    color: rgba(153, 153, 153, 0.6);
    box-shadow: none;
    text-shadow: none;
}

.achievement-checkmark {
    font-size: 36px;
    color: var(--neon-green);
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.8);
    animation: achievementPulse 2s infinite;
    filter: drop-shadow(0 0 10px rgba(0, 255, 65, 0.6));
}

@keyframes achievementPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* SHOP POPUP */
/* ═══════════════════════════════════════════════════════════════════════ */

#shop-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000; /* Above station interior (9000) */
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-interface {
    position: relative;
    display: flex;
    width: 95%;
    max-width: 1600px;
    height: 85vh;
    gap: 20px;
}

/* Resources Display (Top Right) */
.shop-resources {
    position: absolute;
    top: -50px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 10, 20, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    z-index: 10;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border-right: 1px solid rgba(0, 255, 255, 0.3);
}

.resource-item:last-child {
    border-right: none;
}

.resource-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
}

.resource-icon {
    font-size: 16px;
}

.resource-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    color: var(--neon-cyan);
    font-weight: 900;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.shop-inventory-grid {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-left: 10px;
    border-left: 1px solid rgba(0, 255, 255, 0.3);
}

.shop-inventory-grid .resource-item {
    border-right: none;
    padding: 0 5px;
}

/* Left Panel - Shop Categories */
.shop-category-panel {
    width: 350px;
    background: rgba(0, 10, 20, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.shop-category-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

.shop-category-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    margin: 0;
    margin-bottom: 2px;
    background: rgba(0, 255, 255, 0.05);
    border: none;
    border-left: 4px solid var(--neon-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
}

.shop-category-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    transition: width 0.3s ease;
}

.shop-category-item:hover {
    background: rgba(0, 255, 255, 0.15);
    border-color: var(--neon-cyan);
    transform: translateX(5px);
}

.shop-category-item:hover::before {
    width: 8px;
}

.shop-category-item.active {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.2);
}

.category-icon-wrapper {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.category-icon {
    font-size: 14px;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.category-info {
    flex: 1;
}

.category-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 3px;
}

.category-desc {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* Right Panel - Shop Items */
.shop-items-panel {
    flex: 1;
    background: rgba(0, 10, 20, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.shop-items-content {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.shop-items-content.active {
    display: flex;
}

.shop-items-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
}

/* Upgrade & Cosmetic Filters/Tabs */
.upgrade-filters, .cosmetic-tabs {
    display: flex;
    gap: 8px;
    padding: 15px 20px;
    border-bottom: 2px solid rgba(0, 255, 255, 0.2);
    background: rgba(0, 255, 255, 0.05);
    flex-wrap: wrap;
}

.upgrade-filter-btn, .cosmetic-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 5px;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-filter-btn:hover, .cosmetic-tab-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--neon-cyan);
    transform: translateY(-2px);
}

.upgrade-filter-btn.active, .cosmetic-tab-btn.active {
    background: rgba(0, 255, 255, 0.25);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.filter-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Ship Items */
.shop-item-card {
    background: rgba(0, 20, 40, 0.6);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-left: 4px solid var(--neon-cyan);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.shop-item-card:hover:not(.locked) {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    transform: translateX(5px);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.3);
}

.shop-item-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #555;
}

.shop-item-card.equipped {
    border-left-color: var(--neon-green);
    box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.1);
}

.shop-item-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.shop-item-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--neon-cyan));
}

.shop-item-card.locked .shop-item-icon {
    filter: grayscale(1) opacity(0.4);
}

.shop-item-info {
    flex: 1;
}

.shop-item-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: var(--neon-cyan);
    margin-bottom: 4px;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.shop-item-desc {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.shop-item-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 12px 0;
    padding: 12px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 5px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.stat-row {
    display: flex;
    gap: 10px;
    align-items: center;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
}

.stat-value {
    color: var(--neon-green);
    font-weight: 700;
}

.shop-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.shop-item-cost {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-cyan);
}

.cost-separator {
    color: rgba(0, 255, 255, 0.5);
    font-size: 12px;
}

.shop-item-status {
    padding: 6px 14px;
    background: rgba(0, 255, 65, 0.2);
    border: 1px solid var(--neon-green);
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.shop-item-card.equipped .shop-item-status {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* Upgrade Items (simpler layout) */
.upgrade-item-card {
    background: rgba(0, 20, 40, 0.6);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-left: 4px solid var(--neon-cyan);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upgrade-item-card:hover:not(.locked):not(.max-level) {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    transform: translateX(5px);
}

.upgrade-item-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-item-card.max-level {
    border-left-color: var(--neon-green);
    opacity: 0.7;
    cursor: default;
}

.upgrade-item-info {
    flex: 1;
}

.upgrade-item-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 3px;
}

.upgrade-item-desc {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.upgrade-level {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.upgrade-item-cost {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Cosmetic Items */
.cosmetic-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.cosmetic-card {
    background: rgba(0, 20, 40, 0.6);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.cosmetic-card:hover:not(.locked) {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.cosmetic-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.cosmetic-card.equipped {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.cosmetic-preview {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.3);
}

.cosmetic-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 5px;
}

.cosmetic-desc {
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.cosmetic-cost {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--neon-cyan);
}

/* Legacy compatibility - will be replaced with new structure */
#shop-popup h2 {
    color: var(--neon-cyan);
    text-align: center;
    margin-bottom: 25px;
}

.shop-header {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.shop-xp-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.xp-label {
    font-size: clamp(14px, 2.5vw, 20px);
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: white;
}

.xp-amount {
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px var(--neon-cyan);
}

#shop-xp-amount{
    font-size: 22px;
}

.shop-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.shop-tab {
    background: var(--glass-bg);
    border: 2px solid var(--neon-cyan);
    color: white;
    padding: clamp(8px, 1.5vw, 12px) clamp(15px, 3vw, 30px);
    font-size: clamp(12px, 2vw, 16px);
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.shop-tab:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px var(--neon-cyan);
}

.shop-tab.active {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 25px var(--neon-cyan);
    border-color: var(--neon-green);
}

.shop-content {
    min-height: 200px;
    max-height: calc(90vh - 300px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    flex: 1;
    box-sizing: border-box;
}

.shop-tab-content {
    display: none;
}

.shop-tab-content.active {
    display: block;
}

/* Ship Grid */
.shop-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.ship-item {
    background: var(--glass-bg);
    border: 2px solid;
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.ship-item.unlocked {
    border-color: var(--neon-green);
}

.ship-item.locked {
    border-color: #555;
    opacity: 0.7;
}

.ship-item.equipped {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.ship-item:hover:not(.locked) {
    transform: translateY(-5px);
    box-shadow: 0 0 35px currentColor;
}

.ship-image {
    width: 100%;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px currentColor);
}

.ship-item.locked .ship-image {
    filter: grayscale(1) opacity(0.4);
}

.ship-name {
    font-size: 16px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-cyan);
    margin-bottom: 6px;
    text-align: center;
}

.ship-description {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
    min-height: 32px;
}

.ship-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 10px;
    font-family: 'Rajdhani', sans-serif;
}

.ship-stat {
    display: flex;
    justify-content: space-between;
    color: white;
}

.ship-stat-value {
    color: var(--neon-green);
    font-weight: 700;
}

.ship-price, .upgrade-price, .cosmetic-price {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    margin-top: 8px;
}

.ship-item.locked .ship-price,
.upgrade-item.locked .upgrade-price,
.cosmetic-item.locked .cosmetic-price {
    background: #444;
}

.ship-item.unlocked .ship-price,
.upgrade-item.max-level .upgrade-price {
    background: var(--neon-green);
}

.ship-equipped-badge, .cosmetic-equipped-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--neon-cyan);
    color: var(--dark-bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}

/* Upgrades List */
.upgrade-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.upgrade-category-btn {
    background: var(--glass-bg);
    border: 2px solid var(--neon-cyan);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.upgrade-category-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px var(--neon-cyan);
}

.upgrade-category-btn.active {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 20px var(--neon-cyan);
}

.shop-items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upgrade-item {
    background: var(--glass-bg);
    border: 2px solid;
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    gap: 15px;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upgrade-item.available {
    border-color: var(--neon-cyan);
}

.upgrade-item.locked {
    border-color: #555;
    opacity: 0.6;
}

.upgrade-item.max-level {
    border-color: var(--neon-green);
}

.upgrade-item:hover:not(.locked) {
    transform: translateX(10px);
    box-shadow: 0 0 25px currentColor;
}

.upgrade-details {
    flex: 1;
}

.upgrade-name {
    font-size: 15px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-cyan);
    margin-bottom: 4px;
}

.upgrade-description {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Rajdhani', sans-serif;
    margin-bottom: 4px;
}

.upgrade-level {
    font-size: 11px;
    color: var(--neon-green);
    font-weight: 600;
}

.upgrade-price {
    min-width: 100px;
}

/* Cosmetics Section */
.cosmetic-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.cosmetic-section h3 {
    color: var(--neon-cyan);
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 15px;
    text-align: center;
}

.cosmetic-item {
    background: var(--glass-bg);
    border: 2px solid;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    text-align: center;
}

.cosmetic-item.unlocked {
    border-color: var(--neon-green);
}

.cosmetic-item.locked {
    border-color: #555;
    opacity: 0.7;
}

.cosmetic-item.equipped {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
}

.cosmetic-item:hover:not(.locked) {
    transform: translateY(-5px);
    box-shadow: 0 0 30px currentColor;
}

.cosmetic-preview {
    width: 100%;
    height: 40px;
    margin-bottom: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trail-preview {
    background: linear-gradient(90deg, transparent, var(--preview-color), transparent);
}

.bullet-preview {
    display: flex;
    gap: 10px;
}

.bullet-sample {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--preview-color);
    box-shadow: 0 0 10px var(--preview-color);
}

.cosmetic-name {
    font-size: 13px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-cyan);
    margin-bottom: 4px;
}

.cosmetic-description {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Rajdhani', sans-serif;
    margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* LEVEL SELECT */
/* ═══════════════════════════════════════════════════════════════════════ */

#level-select {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Screen Fade Transition */
#screen-fade {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: black;
    z-index: 11000; /* Above everything */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

#screen-fade.active {
    opacity: 1;
    pointer-events: all;
}

#endless-briefing {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95); /* Dark overlay like shop */
    z-index: 9001;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Briefing Interface Container */
.briefing-interface {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    width: 95%;
    max-width: 1600px;
    height: 85vh;
    gap: 20px;
    z-index: 9001
}

/* Endless Resources Display (Top Right) */
.endless-resources {
    position: absolute;
    top: -50px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 10, 20, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    z-index: 10;
}

/* Left Panel - Mission List */
.mission-list-panel {
    width: 350px;
    background: rgba(0, 10, 20, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 20px;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    background: rgba(0, 255, 255, 0.05);
}

.panel-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px var(--neon-cyan);
    margin: 0;
    letter-spacing: 2px;
}

.header-line {
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), transparent);
    margin-top: 10px;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.mission-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
}

.mission-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 8px;
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-left: 4px solid var(--neon-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.mission-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    transition: width 0.3s ease;
}

.mission-item:hover:not(.locked) {
    background: rgba(0, 255, 255, 0.15);
    border-color: var(--neon-cyan);
    transform: translateX(5px);
}

.mission-item:hover:not(.locked)::before {
    width: 8px;
}

.mission-item.selected {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--neon-cyan);
    box-shadow:
        inset 0 0 20px rgba(0, 255, 255, 0.2),
        0 0 20px rgba(0, 255, 255, 0.3);
}

.mission-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #333;
}

.mission-item.locked .mission-icon {
    color: #555;
}

.mission-item.completed {
    border-left-color: var(--neon-green);
}

.mission-item.completed::before {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

.mission-icon {
    font-size: 24px;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    min-width: 30px;
    text-align: center;
}

.mission-info {
    flex: 1;
}

.mission-number {
    font-size: 10px;
    color: var(--neon-cyan);
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.mission-title {
    font-size: 14px;
    color: white;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
}

.mission-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Rajdhani', sans-serif;
    margin-top: 4px;
}

.mission-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

.mission-status-indicator.available {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

.mission-status-indicator.locked {
    background: #555;
}

.mission-status-indicator.coming-soon {
    background: #777;
    box-shadow: none;
}

.mission-item.coming-soon {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    cursor: default;
    border-left-color: rgba(255, 255, 255, 0.15);
}

.mission-coming-soon {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    letter-spacing: 1px;
    font-family: 'Orbitron', sans-serif;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.back-btn {
    margin: 15px;
    padding: 12px 20px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--neon-cyan);
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.back-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateX(-5px);
}

.btn-icon {
    font-size: 16px;
}

/* Right Panel - Mission Briefing */
.mission-briefing-panel {
    flex: 1;
    background: rgba(0, 10, 20, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.briefing-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.briefing-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
    color: var(--neon-cyan);
    opacity: 0.3;
}

.briefing-placeholder p {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
}

.mission-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 2px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
}

.briefing-text {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    text-align: justify;
}

.objective-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 0, 255, 0.1);
    border: 2px solid rgba(255, 0, 255, 0.3);
    border-left: 4px solid var(--neon-pink);
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.objective-icon {
    color: var(--neon-pink);
    font-size: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-item {
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.2);
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    font-size: 10px;
    color: var(--neon-cyan);
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 16px;
    color: white;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
}

.stat-value.status-completed {
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.stat-value.status-available {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.stat-value.status-locked {
    color: #888;
}

.launch-btn {
    position: relative;
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
    border: none;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.launch-btn:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 50px rgba(0, 255, 255, 0.8),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
}

.launch-btn:active {
    transform: scale(0.98);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: btnGlowSlide 3s infinite;
}

@keyframes btnGlowSlide {
    0% { left: -100%; }
    100% { left: 100%; }
}

.btn-text {
    position: relative;
    z-index: 1;
}

.launch-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.endless-perks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.endless-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Unlock Cost Section */
.unlock-cost-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 0, 110, 0.1);
    border: 2px solid var(--neon-pink);
    border-radius: 8px;
}

.unlock-cost-section h3 {
    color: var(--neon-pink);
    font-size: 16px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cost-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.cost-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 10, 20, 0.6);
    border: 1px solid rgba(255, 0, 110, 0.3);
    border-radius: 4px;
}

.cost-item .cost-icon {
    font-size: 20px;
}

.cost-item .cost-amount {
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.cost-item.insufficient {
    border-color: rgba(255, 0, 0, 0.5);
    background: rgba(255, 0, 0, 0.1);
}

.cost-item.sufficient {
    border-color: rgba(0, 255, 0, 0.3);
}

.secondary-action-btn {
    position: relative;
    padding: 14px 30px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--neon-cyan);
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.secondary-action-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.secondary-action-btn .btn-icon {
    font-size: 18px;
}

.endless-perk {
    padding: 12px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    border-left: 3px solid var(--neon-cyan);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* VICTORY SCREEN */
/* ═══════════════════════════════════════════════════════════════════════ */

#victory-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.victory-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 550px;
    max-height: 80vh;
    background: rgba(0, 10, 20, 0.95);
    border: 3px solid var(--neon-green);
    border-radius: 15px;
    box-shadow:
        0 0 50px rgba(0, 255, 65, 0.6),
        inset 0 0 30px rgba(0, 255, 65, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    animation: victoryPulse 2s ease-in-out infinite;
}

@keyframes victoryPulse {
    0%, 100% {
        box-shadow: 0 0 40px rgba(0, 255, 65, 0.5), inset 0 0 20px rgba(0, 255, 65, 0.1);
    }
    50% {
        box-shadow: 0 0 70px rgba(0, 255, 65, 0.8), inset 0 0 40px rgba(0, 255, 65, 0.15);
    }
}

.victory-header {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.2), rgba(0, 255, 255, 0.1));
    padding: 20px 30px;
    border-bottom: 2px solid var(--neon-green);
    position: relative;
}

.victory-header-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
    margin: 10px 0;
    box-shadow: 0 0 10px var(--neon-green);
}

.victory-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: var(--neon-green);
    text-align: center;
    letter-spacing: 4px;
    margin: 0;
    text-shadow:
        0 0 15px var(--neon-green),
        0 0 30px var(--neon-green);
}

.victory-content {
    padding: 25px 30px;
}

.victory-mission-info {
    text-align: center;
    margin-bottom: 20px;
}

.victory-mission-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin: 0 0 10px 0;
    letter-spacing: 2px;
}

.victory-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(0, 255, 65, 0.15);
    border: 2px solid var(--neon-green);
    border-radius: 20px;
}

.status-icon {
    font-size: 16px;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.status-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--neon-green);
    letter-spacing: 1px;
}

.victory-stars-section {
    text-align: center;
    margin-bottom: 20px;
    padding: 18px 0;
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
}

.stars-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.stars-container {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.victory-star {
    font-size: 36px;
    color: var(--neon-green);
    text-shadow: 0 0 15px var(--neon-green);
    animation: starFloat 2s ease-in-out infinite;
    display: inline-block;
}

.victory-star:nth-child(2) {
    animation-delay: 0.2s;
}

.victory-star:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes starFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.1); }
}

.victory-star.unearned {
    color: #444;
    text-shadow: none;
    animation: none;
    opacity: 0.3;
}

.victory-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.victory-stat-item {
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.2);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.victory-stat-item.full-width {
    grid-column: 1 / -1;
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.3);
}

.victory-stat-label {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.victory-stat-value {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: white;
}

.victory-stat-value.xp-value {
    font-size: 26px;
    color: var(--neon-green);
    text-shadow: 0 0 12px var(--neon-green);
}

.victory-actions {
    padding: 0 30px 25px 30px;
}

.victory-primary-btn {
    position: relative;
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
    border: none;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.5);
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.victory-primary-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.8);
}

.victory-secondary-buttons {
    display: flex;
    gap: 12px;
}

.victory-secondary-btn {
    flex: 1;
    padding: 12px 16px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--neon-cyan);
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.victory-secondary-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* VICTORY SCREEN V2 - COMPACT DESIGN */
.victory-container-v2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    background: linear-gradient(135deg, rgba(0, 10, 20, 0.98), rgba(0, 20, 30, 0.98));
    border: 2px solid var(--neon-green);
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.5), inset 0 0 30px rgba(0, 255, 65, 0.08);
    padding: 20px;
    animation: victorySlideIn 0.4s ease-out;
}

@keyframes victorySlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.victory-header-v2 {
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
}

.victory-status-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 255, 65, 0.2);
    border: 1px solid var(--neon-green);
    border-radius: 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--neon-green);
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-shadow: 0 0 8px var(--neon-green);
}

.victory-mission-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0 0 10px 0;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.victory-stars-inline {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.victory-star-v2 {
    font-size: 24px;
    color: var(--neon-green);
    text-shadow: 0 0 12px var(--neon-green);
    transition: all 0.3s ease;
}

.victory-star-v2.unearned {
    color: rgba(255, 255, 255, 0.2);
    text-shadow: none;
}

.victory-stats-compact {
    margin-bottom: 18px;
}

.victory-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.victory-stat-row:nth-child(2) {
    grid-template-columns: 1fr;
}

.victory-stat-compact {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}

.victory-stat-compact.xp-stat {
    background: rgba(138, 43, 226, 0.1);
    border-color: var(--neon-purple);
}

.stat-label-compact {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: var(--neon-cyan);
    letter-spacing: 1px;
    margin-bottom: 4px;
    opacity: 0.8;
}

.stat-value-compact {
    display: block;
    font-family: 'Rajdhani', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.xp-highlight {
    color: var(--neon-purple);
    text-shadow: 0 0 10px var(--neon-purple);
}

.perfect-highlight {
    color: #00ff41 !important;
    text-shadow: 0 0 10px #00ff41;
    font-weight: 700;
}

.victory-rewards-section {
    background: rgba(0, 10, 20, 0.6);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 18px;
}

.rewards-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--neon-green);
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 10px;
}

.rewards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px;
}

.reward-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.6));
    flex-shrink: 0;
}

.reward-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.reward-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: var(--neon-cyan);
    letter-spacing: 0.5px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reward-amount {
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.victory-actions-v2 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.victory-btn-primary-v2 {
    position: relative;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.2), rgba(0, 255, 255, 0.2));
    border: 2px solid var(--neon-green);
    border-radius: 6px;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.victory-btn-primary-v2:hover {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.3), rgba(0, 255, 255, 0.3));
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

.victory-actions-secondary {
    display: flex;
    gap: 10px;
}

.victory-btn-secondary-v2 {
    flex: 1;
    padding: 10px 16px;
    background: rgba(0, 255, 255, 0.08);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 6px;
    color: var(--neon-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.victory-btn-secondary-v2:hover {
    background: rgba(0, 255, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* OBJECTIVE HUD */
/* ═══════════════════════════════════════════════════════════════════════ */

#objective-hud {
    position: absolute;
    top: 100px;
    left: 15px;
    background: rgba(0, 10, 20, 0.5);
    backdrop-filter: blur(8px);
    border-left: 3px solid var(--neon-purple);
    padding: 8px 12px;
    border-radius: 2px;
    max-width: 280px;
    font-family: 'Orbitron', sans-serif;
}

.objective-label {
    font-size: 9px;
    font-weight: 700;
    color: rgba(189, 0, 255, 0.7);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.phase-history {
    margin-bottom: 6px;
}

.phase-history-item {
    color: rgba(0, 255, 100, 0.6);
    font-size: 10px;
    line-height: 1.4;
    margin-bottom: 2px;
}

.phase-history-item::before {
    content: '✔ ';
    color: rgba(0, 255, 100, 0.8);
    font-weight: bold;
}

.objective-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.objective-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.objective-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.objective-progress-fill {
    height: 100%;
    background: var(--neon-purple);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--neon-purple);
}

.objective-counter {
    color: var(--neon-purple);
    font-size: 11px;
    font-weight: 900;
    text-shadow: 0 0 8px rgba(189, 0, 255, 0.5);
    min-width: 50px;
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* XP BAR */
/* ═══════════════════════════════════════════════════════════════════════ */

#xp-bar-container {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 220px;
    background: rgba(0, 10, 20, 0.5);
    backdrop-filter: blur(8px);
    border-left: 3px solid var(--neon-cyan);
    border-radius: 2px;
    padding: 6px 10px;
    font-family: 'Orbitron', sans-serif;
}

.xp-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.xp-level {
    font-size: 9px;
    font-weight: 700;
    color: rgba(0, 255, 255, 0.7);
    letter-spacing: 1px;
}

.xp-amount {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.xp-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: var(--neon-cyan);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* EVENT NOTIFICATION - Combo/Level Up/etc */
/* ═══════════════════════════════════════════════════════════════════════ */

#event-notification {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 10, 20, 0.7);
    backdrop-filter: blur(8px);
    border-left: 4px solid;
    padding: 10px 24px;
    border-radius: 2px;
    z-index: 999;
    animation: eventSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 20px currentColor;
}

@keyframes eventSlideIn {
    0% {
        transform: translate(-50%, -80px);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.event-text {
    font-size: 16px;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px currentColor;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* ACHIEVEMENT UNLOCK NOTIFICATION */
/* ═══════════════════════════════════════════════════════════════════════ */

.achievement-notification {
    position: fixed;
    top: 20px;
    right: -350px;
    width: 300px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--neon-green);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.5s ease,
                top 0.3s ease-out;
}

.achievement-notification-content {
    display: flex;
    gap: 12px;
    align-items: center;
}

.achievement-notification-icon {
    font-size: 48px;
    min-width: 50px;
    text-align: center;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.achievement-notification-text {
    flex: 1;
}

.achievement-notification-title {
    font-size: 10px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-green);
    margin-bottom: 3px;
    text-shadow: 0 0 8px var(--neon-green);
}

.achievement-notification-name {
    font-size: 16px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: white;
    margin-bottom: 5px;
}

.achievement-notification-xp {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 8px var(--neon-cyan);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* ITEM DROP NOTIFICATIONS (LEFT SIDE) */
/* ═══════════════════════════════════════════════════════════════════════ */

.item-drop-notification {
    position: fixed;
    left: -350px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.4s ease,
                top 0.3s ease-out;
}

.item-drop-notification.show {
    left: 20px;
    opacity: 1;
}

.item-drop-content {
    display: flex;
    gap: 15px;
    align-items: center;
}

.item-drop-icon {
    font-size: 48px;
    min-width: 50px;
    text-align: center;
    animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.9));
    }
}

.item-drop-text {
    flex: 1;
}

.item-drop-name {
    font-size: 16px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: #ffd700;
    margin-bottom: 5px;
    text-shadow: 0 0 8px #ffd700;
}

.item-drop-quantity {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #ffd700, #ff8800);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    font-family: 'Orbitron', sans-serif;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* SCROLLBAR STYLING */
/* ═══════════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 6px;
    box-shadow: 0 0 10px var(--neon-cyan);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-pink), var(--neon-purple));
    box-shadow: 0 0 20px var(--neon-pink);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* TUTORIAL OVERLAY */
/* ═══════════════════════════════════════════════════════════════════════ */

#tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
    pointer-events: auto;
}

.tutorial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
}

.tutorial-box {
    position: relative;
    z-index: 10001;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 3px solid var(--neon-cyan);
    border-radius: 20px;
    padding: 40px;
    max-width: 700px;
    width: 90%;
    box-shadow:
        0 0 40px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.05);
    animation: slideInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInScale {
    0% {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.tutorial-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    color: var(--neon-cyan);
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 0 0 20px var(--neon-cyan);
    letter-spacing: 3px;
}

.tutorial-content {
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    text-align: left;
}

.tutorial-content p {
    margin: 15px 0;
}

.tutorial-content strong {
    color: var(--neon-cyan);
    font-weight: 700;
}

.tutorial-content ul {
    list-style: none;
    padding-left: 0;
    margin: 15px 0;
}

.tutorial-content li {
    padding: 8px 0 8px 25px;
    position: relative;
}

.tutorial-content li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
    font-weight: bold;
}

.tutorial-highlight {
    display: inline-block;
    background: rgba(0, 255, 255, 0.15);
    border: 1px solid var(--neon-cyan);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--neon-cyan);
    font-weight: bold;
}

.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid rgba(0, 255, 255, 0.2);
    padding-top: 20px;
    margin-top: 20px;
}

.tutorial-hint {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.tutorial-countdown {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px var(--neon-cyan);
    min-width: 80px;
    text-align: right;
}

.tutorial-controls {
    display: flex;
    gap: 30px;
    margin: 25px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.tutorial-control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.tutorial-control-item p {
    margin: 0;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
}

.tutorial-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
}

/* Spotlight effect for highlighting UI elements during tutorial */
.tutorial-spotlight {
    position: relative;
    z-index: 10000 !important;
    animation: tutorialGlow 1.2s ease-in-out infinite;
}

.tutorial-spotlight::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 3px solid var(--neon-cyan);
    border-radius: 4px;
    pointer-events: none;
    animation: tutorialOutline 1.2s ease-in-out infinite;
    z-index: -1;
}

@keyframes tutorialGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px var(--neon-cyan))
                drop-shadow(0 0 35px var(--neon-cyan))
                brightness(1.3);
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 35px var(--neon-cyan))
                drop-shadow(0 0 60px var(--neon-cyan))
                brightness(1.6);
        transform: scale(1.08);
    }
}

@keyframes tutorialOutline {
    0%, 100% {
        box-shadow: 0 0 25px rgba(0, 255, 255, 0.8),
                    0 0 50px rgba(0, 255, 255, 0.5),
                    inset 0 0 20px rgba(0, 255, 255, 0.3);
        opacity: 0.8;
    }
    50% {
        box-shadow: 0 0 45px rgba(0, 255, 255, 1),
                    0 0 80px rgba(0, 255, 255, 0.8),
                    inset 0 0 35px rgba(0, 255, 255, 0.6);
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* RESPONSIVE ADJUSTMENTS */
/* ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .title {
        font-size: 48px;
    }

    .mode-button {
        min-width: 280px;
        padding: 40px 50px;
    }

    .level-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* PILOT SPEECH BUBBLE */
/* ═══════════════════════════════════════════════════════════════════════ */

.pilot-speech-bubble {
    position: absolute;
    background: rgba(10, 14, 39, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 15px;
    padding: 12px 20px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
    transform: translate(-50%, 0);
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.5),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pilot-speech-bubble.show {
    opacity: 1;
    animation: speechFloat 2s ease-in-out infinite;
}

.pilot-speech-bubble.hidden {
    opacity: 0;
}

/* Speech bubble tail pointing down to ship */
.pilot-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--neon-cyan);
}

.pilot-speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(10, 14, 39, 0.95);
    z-index: 1;
}

@keyframes speechFloat {
    0%, 100% {
        transform: translate(-50%, 0px);
    }
    50% {
        transform: translate(-50%, -5px);
    }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* ENHANCED TRANSITIONS & POLISH */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Smooth fade-in for game elements */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* UI containers start invisible and will fade in during intro */
#lives, #score-board, #power-up-container, #xp-bar-container, #objective-hud, #wave-display {
    opacity: 0;
    transform: translateY(20px);
    transition: none; /* Disable transitions initially */
}

/* After fade-in is triggered, enable smooth transitions */
#lives.fade-in, #score-board.fade-in, #power-up-container.fade-in,
#xp-bar-container.fade-in, #objective-hud.fade-in, #wave-display.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* Pulse animation for important elements */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Glow effect for active elements */
.glow {
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan), 0 0 30px var(--neon-cyan);
    }
    to {
        text-shadow: 0 0 20px var(--neon-cyan), 0 0 30px var(--neon-cyan), 0 0 40px var(--neon-cyan), 0 0 50px var(--neon-cyan);
    }
}

/* Screen shake animation */
@keyframes shake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-2px, 2px) rotate(-1deg); }
    20% { transform: translate(2px, -2px) rotate(1deg); }
    30% { transform: translate(-2px, -2px) rotate(-1deg); }
    40% { transform: translate(2px, 2px) rotate(1deg); }
    50% { transform: translate(-2px, 2px) rotate(-1deg); }
    60% { transform: translate(2px, -2px) rotate(1deg); }
    70% { transform: translate(-2px, -2px) rotate(-1deg); }
    80% { transform: translate(2px, 2px) rotate(1deg); }
    90% { transform: translate(-2px, 2px) rotate(-1deg); }
}

/* Slide-in animations */
@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Improved button hover effects */
.menu-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.4);
}

.menu-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

/* Score board enhancements */
#score-board {
    transition: all 0.3s ease;
}

#score-board p {
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Damage flash effect */
@keyframes damageFlash {
    0% { filter: brightness(1); }
    50% { filter: brightness(2) hue-rotate(20deg); }
    100% { filter: brightness(1); }
}

.damage-flash {
    animation: damageFlash 0.3s ease-out;
}

/* Victory screen enhancement */
#victory-screen:not(.hidden) {
    animation: victorySlideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

@keyframes victorySlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Star animation */
.star {
    display: inline-block;
    transition: all 0.3s ease;
}

.star:hover {
    transform: scale(1.2) rotate(15deg);
    text-shadow: 0 0 20px currentColor;
}

/* Floating animation for powerups UI */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.pu-info {
    transition: all 0.2s ease;
}

.pu-info:hover {
    transform: scale(1.1);
}

/* Mission transition overlay */
.mission-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, rgba(0,255,255,0.1) 0%, rgba(10,14,39,1) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 999;
}

.mission-transition.active {
    opacity: 1;
}

/* ---------- MODAL (GENERIC) ---------- */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1200;
}

.modal.hidden {
    display: none;
}

.modal-content {
    width: 90%;
    max-width: 520px;
    background: rgba(0, 10, 20, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 12px;
    padding: 28px 26px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.25);
    text-align: center;
}

.modal-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--neon-cyan);
    margin: 0 0 14px 0;
    letter-spacing: 1px;
}

.modal-content p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin: 0;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 22px;
}

.main-menu-btn.secondary {
    background: transparent;
    border-color: var(--neon-cyan);
    color: white;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* GALAXY MAP SCREEN */
/* ═══════════════════════════════════════════════════════════════════════ */

#galaxy-map-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000814;
    z-index: 1000;
    overflow: hidden;
}

#galaxy-map-screen.hidden {
    display: none;
}

#galaxyCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
}

#galaxyCanvas:active {
    cursor: grabbing;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* SECTOR DETAILS PANEL V2 - COMPACT */
/* ═══════════════════════════════════════════════════════════════════════ */

.galaxy-sector-panel {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    width: 380px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    overflow: visible;
    animation: slideInRight 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1100;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.galaxy-sector-panel.hidden {
    display: none;
}

/* V2 Container */
.sector-panel-v2 {
    background: linear-gradient(135deg, rgba(0, 10, 20, 0.98), rgba(0, 20, 30, 0.98));
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.4), inset 0 0 25px rgba(0, 255, 255, 0.08);
    padding: 18px;
    max-height: 85vh;
    overflow: visible;
}

/* Header */
.sector-header-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.sector-name-v2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--neon-cyan);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.sector-close-v2 {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s ease;
    line-height: 1;
}

.sector-close-v2:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
    transform: rotate(90deg);
}

/* Info Grid */
.sector-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.sector-info-item {
    background: rgba(0, 20, 40, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    color: rgba(0, 255, 255, 0.7);
    letter-spacing: 1.5px;
    font-weight: 600;
}

.info-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    color: #ffffff;
    font-weight: 600;
}

/* Intel Section */
.sector-intel-v2 {
    background: rgba(0, 0, 0, 0.4);
    border-left: 3px solid var(--neon-cyan);
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.intel-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    color: var(--neon-cyan);
    margin-bottom: 8px;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.intel-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin: 0;
}

/* Rewards Section */
.sector-rewards-v2 {
    margin-bottom: 15px;
    display: none;
}

.sector-rewards-v2[style*="display: block"],
.sector-rewards-v2:not([style*="display: none"]) {
    display: block;
}

.rewards-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    color: rgba(255, 215, 0, 0.9);
    margin-bottom: 10px;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.rewards-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.reward-item-v2 {
    background: rgba(0, 20, 40, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reward-icon-v2 {
    font-size: 24px;
    flex-shrink: 0;
}

.reward-info-v2 {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.reward-label-v2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.reward-amount-v2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: var(--neon-green);
    font-weight: 700;
}

/* Leaderboards Section */
.sector-leaderboards-v2 {
    margin-bottom: 15px;
    display: none;
}

.sector-leaderboards-v2[style*="display: block"],
.sector-leaderboards-v2:not([style*="display: none"]) {
    display: block;
}

.leaderboard-grid {
    background: rgba(0, 20, 40, 0.7);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 6px;
    padding: 12px;
}

.leaderboard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.leaderboard-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    color: rgba(255, 215, 0, 0.9);
    font-weight: 600;
}

.leaderboard-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    color: var(--neon-green);
    font-weight: 700;
}

/* Action Button */
.sector-action-v2 {
    position: relative;
    width: 100%;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-blue) 100%);
    border: none;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4);
}

.sector-action-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.6);
}

.sector-action-v2:active {
    transform: translateY(0);
}

.sector-action-v2:disabled {
    background: linear-gradient(135deg, #555555 0%, #333333 100%);
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.sector-action-v2 .btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: btnGlowMove 3s linear infinite;
}

@keyframes btnGlowMove {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.sector-action-v2 .btn-text {
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* CONTROLS HELP OVERLAY */
/* ═══════════════════════════════════════════════════════════════════════ */

.galaxy-controls-help {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1100;
}

.control-hint {
    padding: 8px 16px;
    background: rgba(10, 14, 39, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 6px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.control-hint strong {
    color: var(--neon-cyan);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* BACK BUTTON */
/* ═══════════════════════════════════════════════════════════════════════ */

.galaxy-back-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    padding: 14px 28px;
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.9) 0%, rgba(20, 24, 49, 0.9) 100%);
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
    z-index: 1100;
}

.galaxy-back-btn:hover {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-blue) 100%);
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.4);
}

.galaxy-back-btn:active {
    transform: translateY(0);
}

.galaxy-back-btn .btn-icon {
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.galaxy-back-btn:hover .btn-icon {
    transform: translateX(-4px);
}

/* Dock at Station Button */
.galaxy-dock-btn {
    position: fixed;
    bottom: 90px;
    left: 30px;
    right: auto;
    padding: 14px 28px;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.15) 0%, rgba(255, 100, 0, 0.15) 100%);
    border: 2px solid #ff8c00;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #ff8c00;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.2);
    z-index: 1000;
}

.galaxy-dock-btn:hover {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6600 100%);
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 140, 0, 0.4);
}

.galaxy-dock-btn:active {
    transform: translateY(0);
}

.galaxy-dock-btn .btn-icon {
    display: inline-block;
    margin-right: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* COLLAPSIBLE INVENTORY PANEL */
/* ═══════════════════════════════════════════════════════════════════════ */

.galaxy-inventory-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    height: 50px;
    padding: 0 20px;
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.95) 0%, rgba(20, 24, 49, 0.95) 100%);
    border: 2px solid var(--neon-cyan);
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
}

.galaxy-inventory-toggle:hover {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-blue) 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.5);
}

.galaxy-inventory-toggle:active {
    transform: scale(0.95);
}

.galaxy-inventory-toggle .toggle-icon {
    display: block;
    line-height: 1;
    font-size: 16px;
}

.galaxy-inventory-toggle .toggle-text {
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.galaxy-inventory-panel {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 400px;
    max-height: 400px;
    background: rgba(0, 10, 20, 0.98);
    border: 2px solid var(--neon-cyan);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    z-index: 1060;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    overflow: hidden;
}

.galaxy-inventory-panel.expanded {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
}

.galaxy-inventory-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.galaxy-inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
}

.galaxy-inventory-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    letter-spacing: 2px;
}

.galaxy-inventory-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    line-height: 1;
}

.galaxy-inventory-close-btn:hover {
    color: #ff4444;
    transform: scale(1.2);
}

.galaxy-inventory-resources {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 20, 40, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
}

.galaxy-inventory-resources .resource-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border-right: 1px solid rgba(0, 255, 255, 0.3);
}

.galaxy-inventory-resources .resource-item:last-child {
    border-right: none;
}

.galaxy-inventory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 20, 40, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.galaxy-inventory-grid .resource-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 40, 80, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.galaxy-inventory-grid .resource-item:hover {
    background: rgba(0, 60, 120, 0.6);
    border-color: var(--neon-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 255, 255, 0.2);
}

.galaxy-inventory-grid::-webkit-scrollbar {
    width: 8px;
}

.galaxy-inventory-grid::-webkit-scrollbar-track {
    background: rgba(0, 20, 40, 0.4);
    border-radius: 4px;
}

.galaxy-inventory-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 4px;
}

.galaxy-inventory-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* NOTIFICATION TOAST */
/* ═══════════════════════════════════════════════════════════════════════ */

.galaxy-notification {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 40px;
    background: rgba(10, 14, 39, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    box-shadow:
        0 0 40px rgba(0, 255, 255, 0.5),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: 2000;
    animation: notificationAppear 0.3s ease-out, notificationPulse 2s ease-in-out infinite;
}

.galaxy-notification.hidden {
    display: none;
}

.galaxy-notification.success {
    border-color: var(--neon-green);
    box-shadow:
        0 0 40px rgba(0, 255, 65, 0.5),
        inset 0 0 20px rgba(0, 255, 65, 0.1);
}

.galaxy-notification.warning {
    border-color: var(--neon-pink);
    box-shadow:
        0 0 40px rgba(255, 0, 110, 0.5),
        inset 0 0 20px rgba(255, 0, 110, 0.1);
}

.galaxy-notification.info {
    border-color: var(--neon-purple);
    box-shadow:
        0 0 40px rgba(189, 0, 255, 0.5),
        inset 0 0 20px rgba(189, 0, 255, 0.1);
}

@keyframes notificationAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes notificationPulse {
    0%, 100% {
        box-shadow:
            0 0 40px rgba(0, 255, 255, 0.5),
            inset 0 0 20px rgba(0, 255, 255, 0.1);
    }
    50% {
        box-shadow:
            0 0 60px rgba(0, 255, 255, 0.7),
            inset 0 0 30px rgba(0, 255, 255, 0.2);
    }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* RESPONSIVE ADJUSTMENTS */
/* ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .galaxy-sector-panel {
        width: calc(100% - 40px);
        right: 20px;
        max-height: 70vh;
    }

    .galaxy-controls-help {
        top: 10px;
        left: 10px;
    }

    .control-hint {
        font-size: 11px;
        padding: 6px 12px;
    }

    .galaxy-back-btn {
        bottom: 20px;
        left: 20px;
        padding: 12px 24px;
        font-size: 12px;
    }

    .galaxy-dock-btn {
        bottom: 70px;
        left: 20px;
        right: auto;
        padding: 12px 20px;
        font-size: 12px;
    }

    .galaxy-notification {
        width: calc(100% - 40px);
        padding: 16px 24px;
        font-size: 16px;
    }

    .galaxy-inventory-toggle {
        bottom: 20px;
        right: 20px;
        height: 45px;
        padding: 0 15px;
        gap: 8px;
    }

    .galaxy-inventory-toggle .toggle-icon {
        font-size: 20px;
    }

    .galaxy-inventory-toggle .toggle-text {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .galaxy-inventory-panel {
        width: calc(100% - 80px);
        bottom: 80px;
        right: 20px;
        max-height: 60vh;
    }

    .galaxy-inventory-content {
        padding: 15px;
    }

    .galaxy-inventory-title {
        font-size: 16px;
    }

    .galaxy-inventory-grid {
        max-height: 150px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* SCROLLBAR STYLING FOR SECTOR PANEL */
/* ═══════════════════════════════════════════════════════════════════════ */

.sector-panel-content::-webkit-scrollbar {
    width: 8px;
}

.sector-panel-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.sector-panel-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
    border-radius: 4px;
}

.sector-panel-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-purple) 0%, var(--neon-pink) 100%);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* SPACE STATION INTERIOR VIEW */
/* ═══════════════════════════════════════════════════════════════════════ */

#station-interior-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0a0e27;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#station-interior-view.hidden {
    display: none;
}

#station-poi-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Point of Interest (POI) styling */
.station-poi {
    position: absolute;
    cursor: pointer;
    transform: translate(-50%, -50%);
    z-index: 100;
    transition: all 0.3s ease;
}

.station-poi:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

.station-poi:hover .poi-dot {
    transform: scale(1.3);
    box-shadow:
        0 0 30px rgba(255, 255, 255, 1),
        0 0 60px rgba(255, 255, 255, 0.8),
        0 0 90px rgba(255, 255, 255, 0.6);
}

.station-poi:hover .poi-dot::before {
    border-width: 4px;
    opacity: 1;
}

.station-poi:hover .poi-pulse {
    animation: poi-pulse-hover 1.5s ease-in-out infinite;
}

@keyframes poi-pulse-hover {
    0% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Red POI hover effects */
.poi-red:hover .poi-dot {
    box-shadow:
        0 0 30px rgba(255, 0, 110, 1),
        0 0 60px rgba(255, 0, 110, 0.8),
        0 0 90px rgba(255, 0, 110, 0.6);
}

.poi-dot {
    position: relative;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 1);
    border-radius: 50%;
    margin: 0 auto;
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(255, 255, 255, 0.6),
        0 0 60px rgba(255, 255, 255, 0.4);
    animation: poi-dot-pulse 2s ease-in-out infinite;
    z-index: 3;
}

/* Pulsating ring around the dot */
.poi-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: poi-ring-pulse 2s ease-in-out infinite;
}

/* Outer wave pulse */
.poi-pulse {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: poi-pulse-animation 2s ease-in-out infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

@keyframes poi-dot-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.9;
    }
}

@keyframes poi-ring-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.3;
    }
}

@keyframes poi-pulse-animation {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

/* Red POI variant for exit */
.poi-red .poi-dot {
    background: rgba(255, 0, 110, 1);
    box-shadow:
        0 0 20px rgba(255, 0, 110, 0.8),
        0 0 40px rgba(255, 0, 110, 0.6),
        0 0 60px rgba(255, 0, 110, 0.4);
}

.poi-red .poi-dot::before {
    border-color: rgba(255, 0, 110, 0.8);
}

.poi-red .poi-pulse {
    background: radial-gradient(circle, rgba(255, 0, 110, 0.3) 0%, transparent 70%);
}

/* White POI variant (default) */
.poi-white .poi-dot {
    background: rgba(255, 255, 255, 1);
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(255, 255, 255, 0.6),
        0 0 60px rgba(255, 255, 255, 0.4);
}

.poi-white .poi-dot::before {
    border-color: rgba(255, 255, 255, 0.8);
}

.poi-white .poi-pulse {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
}

/* Cyan POI variant for endless missions */
.poi-cyan .poi-dot {
    background: rgba(0, 255, 255, 1);
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.8),
        0 0 40px rgba(0, 255, 255, 0.6),
        0 0 60px rgba(0, 255, 255, 0.4);
}

.poi-cyan .poi-dot::before {
    border-color: rgba(0, 255, 255, 0.8);
}

.poi-cyan .poi-pulse {
    background: radial-gradient(circle, rgba(0, 255, 255, 0.3) 0%, transparent 70%);
}

.poi-cyan:hover .poi-dot {
    box-shadow:
        0 0 30px rgba(0, 255, 255, 1),
        0 0 60px rgba(0, 255, 255, 0.8),
        0 0 90px rgba(0, 255, 255, 0.6);
}

.poi-icon {
    position: relative;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(189, 0, 255, 0.2));
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    box-shadow: var(--glow-cyan), inset 0 0 20px rgba(0, 255, 255, 0.2);
    margin: 0 auto;
    transition: all 0.3s ease;
}

.station-poi:hover .poi-icon {
    border-color: var(--neon-pink);
    box-shadow: var(--glow-pink), inset 0 0 20px rgba(255, 0, 110, 0.3);
    transform: rotate(10deg);
}

.poi-label {
    margin-top: 10px;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.station-poi:hover .poi-label {
    color: var(--neon-pink);
    text-shadow: 0 0 15px rgba(255, 0, 110, 0.9);
    opacity: 1;
    transform: translateY(0);
}

/* Exit Station Button - HIDDEN (using POI instead) */
.exit-station-btn {
    display: none; /* Using POI dot instead */
    position: absolute;
    bottom: 40px;
    right: 40px;
    padding: 16px 32px;
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.2), rgba(189, 0, 255, 0.2));
    border: 2px solid var(--neon-pink);
    border-radius: 8px;
    color: var(--neon-pink);
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: var(--glow-pink);
    transition: all 0.3s ease;
    z-index: 200;
}

.exit-station-btn:hover {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.4), rgba(189, 0, 255, 0.4));
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.8);
    transform: translateY(-2px);
}

.exit-station-btn:active {
    transform: translateY(0);
}


/* ═══════════════════════════════════════════════════════════════════════
   CODEX SYSTEM STYLES
   ═══════════════════════════════════════════════════════════════════════ */

/* Codex Overlay */
#codex-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 12000;
}

/* Codex Modal */
#codex-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95vw;
    max-width: 1800px;
    height: 90vh;
    z-index: 12001;
}

.codex-container {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.98), rgba(0, 10, 30, 0.98));
    border: 2px solid #00ffff;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3), inset 0 0 60px rgba(0, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

/* Header */
.codex-header {
    padding: 20px 30px;
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.1), transparent);
    border-bottom: 1px solid #00ffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.codex-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    color: #00ffff;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    letter-spacing: 3px;
}

.codex-progress {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: #00ffff;
    opacity: 0.7;
}

.codex-close-btn {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: #ff0000;
    font-size: 24px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.codex-close-btn:hover {
    background: rgba(255, 0, 0, 0.4);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

/* Main Content Layout */
.codex-content {
    flex: 1;
    display: grid;
    grid-template-columns: 250px 350px 1fr;
    gap: 2px;
    background: #00ffff;
    overflow: hidden;
}

/* Categories (Left Panel) */
.codex-categories {
    background: rgba(0, 10, 20, 0.95);
    padding: 10px;
    overflow-y: auto;
}

.codex-category-btn {
    padding: 15px;
    margin-bottom: 8px;
    background: rgba(0, 20, 40, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s;
    display: grid;
    grid-template-columns: 30px 1fr auto;
    gap: 10px;
    align-items: center;
    position: relative;
}

.codex-category-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.codex-category-btn.active {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.category-icon {
    text-align: center;
}

.category-name {
    font-family: 'Orbitron', monospace;
    font-size: 13px;
    color: #00ffff;
    letter-spacing: 1px;
}

.category-count {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: rgba(0, 255, 255, 0.6);
}

/* Category Unread Indicator */
.codex-category-unread-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff6b00;
    color: white;
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.6);
    animation: pulse-unread 2s infinite;
}

@keyframes pulse-unread {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 107, 0, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 0, 0.8);
        transform: scale(1.05);
    }
}

/* Entries (Middle Panel) */
.codex-entries {
    background: rgba(0, 15, 30, 0.95);
    padding: 10px;
    overflow-y: auto;
}

.codex-entry-item {
    padding: 15px;
    margin-bottom: 8px;
    background: rgba(0, 20, 40, 0.6);
    border-left: 3px solid rgba(0, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.codex-entry-item:hover {
    background: rgba(0, 255, 255, 0.1);
    border-left-color: #00ffff;
}

.codex-entry-item.active {
    background: rgba(0, 255, 255, 0.15);
    border-left-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.codex-entry-item.locked {
    opacity: 0.4;
    cursor: default;
}

.codex-entry-item.locked:hover {
    background: rgba(0, 20, 40, 0.6);
    border-left-color: rgba(0, 255, 255, 0.3);
}

.codex-entry-title {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: #00ffff;
    margin-bottom: 5px;
}

.codex-entry-item.locked .codex-entry-title {
    color: rgba(255, 255, 255, 0.3);
}

.codex-entry-title::before {
    content: '▸ ';
    color: #00ffff;
}

.codex-entry-item.locked .codex-entry-title::before {
    content: '🔒 ';
}

.codex-entry-unlock {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: rgba(0, 255, 255, 0.5);
}

.codex-entry-item.locked .codex-entry-unlock {
    color: rgba(255, 255, 255, 0.3);
}

/* Entry Unread Indicator */
.codex-unread-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: #ff6b00;
    border: 2px solid rgba(255, 107, 0, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 107, 0, 0.8);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 8px rgba(255, 107, 0, 0.8);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 107, 0, 1);
        transform: scale(1.1);
    }
}

/* Viewer (Right Panel) */
.codex-viewer {
    background: rgba(0, 10, 20, 0.95);
    padding: 30px;
    overflow-y: auto;
}

#codex-entry-content {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #00ffff;
}

.codex-placeholder {
    text-align: center;
    padding: 100px 20px;
}

.codex-placeholder p {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    color: rgba(0, 255, 255, 0.3);
    margin: 10px 0;
}

.codex-hint {
    font-size: 14px !important;
    color: rgba(0, 255, 255, 0.2) !important;
}

/* Entry Content Styling */
.codex-entry {
    color: rgba(255, 255, 255, 0.9);
}

.codex-entry h3 {
    font-family: 'Orbitron', monospace;
    color: #00ffff;
    font-size: 20px;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.codex-entry h4 {
    font-family: 'Orbitron', monospace;
    color: #00ffff;
    font-size: 16px;
    margin: 25px 0 10px 0;
}

.codex-entry p {
    margin: 15px 0;
    color: rgba(255, 255, 255, 0.85);
}

.codex-entry strong {
    color: #00ffff;
}

.codex-entry em {
    color: rgba(0, 255, 255, 0.7);
    font-style: italic;
}

/* Ship Display Section */
.codex-ship-display {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    margin: 20px 0 30px 0;
    padding: 20px;
    background: rgba(0, 40, 60, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
}

.codex-ship-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.4));
}

.codex-ship-stats h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    letter-spacing: 2px;
    color: rgba(0, 255, 255, 0.8);
}

.stat-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    font-family: 'Courier New', monospace;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.stat-value {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 700;
}

.stat-value.stat-high {
    color: #00ff88;
}

.stat-value.stat-low {
    color: #ff6b6b;
}

/* Biome Image Row - Single Centered */
.codex-biome-images {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 40, 60, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
}

.codex-biome-img {
    width: 100%;
    max-width: 500px;
    height: 200px;
    object-fit: cover;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    filter: brightness(0.8) saturate(1.2);
    transition: all 0.3s;
}

.codex-biome-img:hover {
    filter: brightness(1) saturate(1.4);
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.codex-biome-img-placeholder {
    width: 100%;
    max-width: 500px;
    height: 200px;
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.6), rgba(0, 40, 60, 0.6));
    border: 2px dashed rgba(0, 255, 255, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 255, 255, 0.3);
    font-family: 'Orbitron', monospace;
    font-size: 12px;
}

/* Locked Entry Placeholder */
.codex-locked-text {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.2);
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    letter-spacing: 5px;
}

/* Codex Unlock Notification (Slides in from right like achievements) */
.codex-unlock-notification {
    position: fixed;
    top: 20px;
    right: -350px;
    width: 320px;
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.95), rgba(0, 40, 60, 0.95));
    backdrop-filter: blur(20px);
    border: 2px solid #00ffff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
    z-index: 15000;
    opacity: 0;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.5s ease,
                top 0.3s ease-out;
}

.codex-unlock-content {
    display: flex;
    gap: 15px;
    align-items: center;
}

.codex-unlock-icon {
    font-size: 48px;
    min-width: 50px;
    text-align: center;
    animation: codex-bounce 1s infinite;
}

@keyframes codex-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.codex-unlock-text {
    flex: 1;
}

.codex-unlock-title {
    font-size: 11px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: #00ffff;
    margin-bottom: 5px;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
    letter-spacing: 2px;
}

.codex-unlock-name {
    font-size: 16px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: white;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Scrollbar Styling */
.codex-categories::-webkit-scrollbar,
.codex-entries::-webkit-scrollbar,
.codex-viewer::-webkit-scrollbar {
    width: 8px;
}

.codex-categories::-webkit-scrollbar-track,
.codex-entries::-webkit-scrollbar-track,
.codex-viewer::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.codex-categories::-webkit-scrollbar-thumb,
.codex-entries::-webkit-scrollbar-thumb,
.codex-viewer::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 4px;
}

.codex-categories::-webkit-scrollbar-thumb:hover,
.codex-entries::-webkit-scrollbar-thumb:hover,
.codex-viewer::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}


/* Codex Button (Galaxy Map) */
.codex-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 15px 30px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(0, 200, 200, 0.2));
    border: 2px solid #00ffff;
    border-radius: 5px;
    color: #00ffff;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    z-index: 100;
    letter-spacing: 2px;
}

.codex-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.4), rgba(0, 200, 200, 0.4));
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
    transform: translateY(-2px);
}

.codex-btn:active {
    transform: translateY(0);
}


/* ═══════════════════════════════════════════════════════════════════════
   GAME ENDING MODAL
   ═══════════════════════════════════════════════════════════════════════ */

#ending-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 15000;
    backdrop-filter: blur(10px);
}

#ending-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 800px;
    z-index: 15001;
    animation: endingSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes endingSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.ending-container {
    background: linear-gradient(135deg, rgba(10, 20, 40, 0.98), rgba(5, 10, 25, 0.98));
    border: 2px solid #00ffff;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.4), inset 0 0 80px rgba(0, 255, 255, 0.05);
    padding: 40px;
    overflow: hidden;
    position: relative;
}

.ending-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.1) 0%, transparent 50%);
    animation: endingGlow 3s ease-in-out infinite;
}

@keyframes endingGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Header */
.ending-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.ending-glow-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.ending-title {
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    color: #00ffff;
    text-align: center;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    letter-spacing: 6px;
    margin: 0;
    white-space: nowrap;
}

/* Content */
.ending-content {
    position: relative;
    z-index: 1;
}

.ending-message {
    text-align: center;
    margin-bottom: 30px;
}

.ending-subtitle {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    color: #00ffff;
    margin: 0 0 20px 0;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.ending-text {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin: 0;
}

.highlight-boss {
    color: #ff00ff;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 0, 255, 0.6);
}

/* Postgame Section */
.ending-postgame {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.postgame-title {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    color: #00ffff;
    text-align: center;
    margin: 0 0 20px 0;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.postgame-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.postgame-list li {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    line-height: 1.6;
}

.postgame-list li:last-child {
    border-bottom: none;
}

.postgame-list strong {
    color: #00ffff;
}

/* Footer */
.ending-footer {
    text-align: center;
    margin: 30px 0 20px 0;
}

.ending-credits {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.heart {
    color: #ff0066;
    font-size: 18px;
    animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.2);
    }
    20%, 40% {
        transform: scale(1);
    }
}

/* Button */
.ending-btn {
    position: relative;
    display: block;
    margin: 0 auto;
    padding: 18px 60px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(0, 200, 200, 0.2));
    border: 2px solid #00ffff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.ending-btn .btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.ending-btn:hover .btn-glow {
    left: 100%;
}

.ending-btn .btn-text {
    position: relative;
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    color: #00ffff;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.ending-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.4), rgba(0, 200, 200, 0.4));
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
    transform: translateY(-3px);
}

.ending-btn:active {
    transform: translateY(0);
}
