/* CYBER STRIKE 2D - TACTICAL STYLESHEET */
:root {
    --bg-dark: #080c14;
    --bg-card: rgba(14, 21, 37, 0.88);
    --bg-card-hover: rgba(22, 33, 58, 0.95);
    --border-cyan: #00f0ff;
    --accent-cyan: #00f0ff;
    --accent-blue: #0077ff;
    --accent-red: #ff2a55;
    --accent-gold: #ffb700;
    --accent-green: #00ff66;
    --text-primary: #e6f1ff;
    --text-muted: #7a8c9e;
    --font-heading: 'Orbitron', -apple-system, sans-serif;
    --font-body: 'Rajdhani', -apple-system, sans-serif;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-primary);
}

/* Screen Management */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    overflow: hidden;
}

.screen.active {
    display: flex;
}

/* ==========================================================================
   MAIN MENU STYLING
   ========================================================================== */
#main-menu {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #10192b 0%, #060911 100%);
    position: relative;
    padding: 2rem;
}

.menu-background-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.12) 0%, rgba(0,0,0,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.menu-container {
    max-width: 1200px;
    width: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.menu-header {
    text-align: center;
}

.logo-tag {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 4px;
    color: var(--accent-cyan);
    margin-bottom: 0.25rem;
}

.glitch-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 6px;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5), 0 0 40px rgba(0, 240, 255, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Menu Grid Layout */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
}

.menu-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    padding: 1.25rem;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s;
}

.menu-card:hover {
    border-color: rgba(0, 240, 255, 0.5);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

/* Setting Controls */
.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.button-group {
    display: flex;
    gap: 0.5rem;
}

.button-group.grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.btn-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 0.6rem 0.8rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-toggle:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--accent-cyan);
}

.btn-toggle.active {
    background: var(--accent-cyan);
    color: #000;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.btn-toggle.nightmare.active {
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
    box-shadow: 0 0 12px rgba(255, 42, 85, 0.6);
}

/* Slider */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* Map Selector */
.map-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.map-card {
    display: flex;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.map-card:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: var(--accent-cyan);
}

.map-card.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.map-preview {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.map-industrial { background-color: #2b3542; background-image: radial-gradient(#3a495b 2px, transparent 2px); background-size: 8px 8px; }
.map-cyber { background-color: #0b1a2e; background-image: linear-gradient(0deg, #16325c 1px, transparent 1px), linear-gradient(90deg, #16325c 1px, transparent 1px); background-size: 10px 10px; }
.map-desert { background-color: #3b2e1e; background-image: radial-gradient(#57452e 3px, transparent 3px); background-size: 12px 12px; }

.map-info h3 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.map-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
}

/* Loadout Option & Stats Comparison Bars */
.loadout-selector {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.loadout-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.loadout-option:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.08);
}

.loadout-option.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.w-icon {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    width: 60px;
}

.w-detail h4 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: #fff;
}

.stat-mini-bars {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

.stat-mini-bars span {
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.stat-mini-bars i.fill {
    display: inline-block;
    height: 4px;
    background: var(--accent-cyan);
    border-radius: 2px;
    min-width: 20px;
}

/* Menu Actions & CTA */
.menu-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.btn-primary-large {
    position: relative;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
    border: none;
    color: #000;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 3px;
    padding: 1rem 3.5rem;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.btn-primary-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.7);
}

.controls-hint {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.controls-hint kbd {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-weight: bold;
    margin: 0 2px;
}

/* ==========================================================================
   GAMEPLAY SCREEN & HUD OVERLAY
   ========================================================================== */
#game-screen {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
    cursor: crosshair;
}

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

#hud-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem;
}

/* Top Status Bar */
.hud-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.team-score {
    background: rgba(10, 15, 25, 0.85);
    border: 2px solid;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(5px);
}

.blue-score { border-color: var(--accent-blue); box-shadow: 0 0 15px rgba(0, 119, 255, 0.3); }
.red-score { border-color: var(--accent-red); box-shadow: 0 0 15px rgba(255, 42, 85, 0.3); }

.score-label {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.score-val {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
}

.blue-score .score-label, .blue-score .score-val { color: var(--accent-cyan); }
.red-score .score-label, .red-score .score-val { color: var(--accent-red); }

.match-center {
    text-align: center;
    background: rgba(10, 15, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    backdrop-filter: blur(5px);
}

.match-mode-tag {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--accent-cyan);
    letter-spacing: 2px;
}

.match-timer {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 900;
    color: #fff;
}

.target-score {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: bold;
}

/* Killfeed */
.killfeed-container {
    position: absolute;
    top: 5.5rem;
    right: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    max-height: 200px;
    overflow: hidden;
}

.kill-entry {
    background: rgba(10, 15, 25, 0.85);
    border-right: 3px solid var(--accent-cyan);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideInRight 0.3s ease-out;
}

.kill-killer { color: var(--accent-cyan); font-weight: bold; }
.kill-killer.red { color: var(--accent-red); }
.kill-weapon { color: var(--accent-gold); font-size: 0.75rem; }
.kill-victim { color: #fff; }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Killstreak Popup Banner */
.streak-banner-popup {
    position: absolute;
    top: 22%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 6px;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(255, 183, 0, 0.8), 0 0 40px rgba(255, 42, 85, 0.6);
    pointer-events: none;
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s;
    z-index: 50;
}

.streak-banner-popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Vignette & Prompts */
#damage-vignette {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    box-shadow: inset 0 0 100px rgba(255, 0, 0, 0);
    transition: box-shadow 0.15s ease-out;
    pointer-events: none;
}

#low-health-warning {
    position: absolute;
    top: 32%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-red);
    letter-spacing: 4px;
    opacity: 0;
    transition: opacity 0.3s;
    text-shadow: 0 0 15px rgba(255, 42, 85, 0.8);
}

.hud-center-prompt {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--accent-gold);
    background: rgba(0,0,0,0.75);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    border: 1px solid var(--accent-gold);
    display: none;
}

/* Bottom Bar: Vitals, Hotbar, Ammo */
.hud-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.player-vitals {
    background: rgba(10, 15, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.8rem 1.25rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 280px;
    backdrop-filter: blur(5px);
}

.vital-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.vital-icon { font-size: 0.9rem; width: 20px; text-align: center; }

.bar-outer {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.bar-inner {
    height: 100%;
    border-radius: 5px;
    transition: width 0.15s ease-out;
}

.health-bar-fill { background: linear-gradient(90deg, #ff2a55, #ff6b8b); box-shadow: 0 0 8px #ff2a55; }
.armor-bar-fill { background: linear-gradient(90deg, #0077ff, #00f0ff); box-shadow: 0 0 8px #00f0ff; }
.stamina-bar-fill { background: linear-gradient(90deg, #00ff66, #b3ff00); box-shadow: 0 0 8px #00ff66; }

.vital-text {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    width: 70px;
    text-align: right;
}

/* Weapon Hotbar */
.weapon-hotbar {
    display: flex;
    gap: 0.4rem;
    background: rgba(10, 15, 25, 0.85);
    padding: 0.4rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
}

.hotbar-slot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 64px;
    transition: all 0.2s;
}

.hotbar-slot.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.slot-num {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    color: var(--accent-cyan);
}

.slot-name {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: bold;
}

/* Ammo Display */
.ammo-display {
    background: rgba(10, 15, 25, 0.85);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-align: right;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.weapon-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--accent-cyan);
}

.ammo-numbers {
    font-family: var(--font-heading);
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.3rem;
}

.ammo-current {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
}

.ammo-divider {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.ammo-reserve {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: bold;
}

/* Minimap */
.minimap-wrapper {
    position: absolute;
    bottom: 5.5rem;
    right: 1.25rem;
    background: rgba(10, 15, 25, 0.9);
    border: 2px solid rgba(0, 240, 255, 0.4);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

#minimap-canvas {
    display: block;
}

/* ==========================================================================
   MODAL OVERLAYS (Scoreboard, Pause, GameOver)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(4, 7, 13, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-overlay.active {
    display: flex;
}

/* Scoreboard Modal */
.scoreboard-container {
    background: var(--bg-card);
    border: 1px solid var(--accent-cyan);
    border-radius: 8px;
    padding: 1.5rem;
    width: 850px;
    max-width: 90vw;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.2);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent-cyan);
    text-align: center;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.scoreboard-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.team-header {
    font-family: var(--font-heading);
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.blue-table .team-header { background: rgba(0, 119, 255, 0.3); color: var(--accent-cyan); }
.red-table .team-header { background: rgba(255, 42, 85, 0.3); color: var(--accent-red); }

.score-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-heading);
    font-size: 0.85rem;
}

.score-table th, .score-table td {
    padding: 0.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.score-table th { color: var(--text-muted); font-size: 0.75rem; }
.score-table tr.is-player { background: rgba(0, 240, 255, 0.15); color: #fff; font-weight: bold; }

/* Pause Modal */
.pause-container {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 2rem;
    width: 400px;
    text-align: center;
}

.pause-container h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    letter-spacing: 3px;
}

.pause-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.btn-modal {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.8rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal:hover {
    background: var(--accent-cyan);
    color: #000;
}

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

.setting-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
}

/* Game Over Modal */
.gameover-container {
    background: var(--bg-card);
    border: 2px solid var(--accent-cyan);
    border-radius: 10px;
    padding: 2.5rem;
    width: 650px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.3);
}

.victory-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 4px;
    background: var(--accent-cyan);
    color: #000;
    padding: 0.3rem 1.5rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.gameover-container h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.match-summary-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.8rem 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--accent-cyan);
}

.stat-lbl {
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--text-muted);
}

.gameover-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: bold;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}
