/* ==========================================================================
   MONEYSHOT - CYBERPUNK FPS STYLESHEET
   ========================================================================== */

/* --- 1. GLOBAL VARIABLES & RESET --- */
:root {
    --bg-base: #050508;
    --neon-blue: #00f0ff;
    --neon-gold: #ffd700;
    --neon-purple: #b026ff;
    --neon-red: #ff003c;
    --neon-green: #39ff14;
    --glass-bg: rgba(10, 15, 25, 0.55);
    --glass-border: rgba(0, 240, 255, 0.25);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
}

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

body {
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-base);
    color: #ffffff;
    font-family: var(--font-body);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    cursor: none; /* Immersive FPS feel */
}

/* Enable cursor specifically for interactive UI layers */
#ui-layer button { cursor: pointer; }
#ui-layer input { cursor: text; }

/* Subtle CRT Scanline Overlay */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
    opacity: 0.15;
}


/* --- 2. BACKGROUND EFFECT (.cyber-grid) --- */
.cyber-grid {
    position: absolute;
    inset: -50%;
    background: 
        linear-gradient(transparent 0%, rgba(0, 240, 255, 0.08) 2%, transparent 3%),
        linear-gradient(90deg, transparent 0%, rgba(176, 38, 255, 0.08) 2%, transparent 3%);
    background-size: 60px 60px;
    z-index: 1;
    transform: perspective(600px) rotateX(60deg) translateY(-100px) translateZ(-250px);
    animation: grid-scroll 10s linear infinite;
    pointer-events: none;
}

@keyframes grid-scroll {
    0% { transform: perspective(600px) rotateX(60deg) translateY(0) translateZ(-250px); }
    100% { transform: perspective(600px) rotateX(60deg) translateY(60px) translateZ(-250px); }
}


/* --- 3. GAME CANVAS --- */
#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none; /* Let document catch mouse events */
}


/* --- 4. DYNAMIC CROSSHAIR --- */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    z-index: 90;
    pointer-events: none;
}

.crosshair .dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background-color: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green);
}

.crosshair .line {
    position: absolute;
    background-color: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
}

.crosshair .line.top { top: 0; left: 50%; transform: translateX(-50%); width: 2px; height: 12px; }
.crosshair .line.bottom { bottom: 0; left: 50%; transform: translateX(-50%); width: 2px; height: 12px; }
.crosshair .line.left { top: 50%; left: 0; transform: translateY(-50%); width: 12px; height: 2px; }
.crosshair .line.right { top: 50%; right: 0; transform: translateY(-50%); width: 12px; height: 2px; }


/* --- 5. HEADS UP DISPLAY (HUD) --- */
.hud-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    z-index: 10;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 240, 255, 0.05);
}

.hud-container.glass-panel {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hud-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    margin-bottom: 4px;
    font-weight: 600;
}

.hud-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 3px;
}


/* --- 6. MODALS & OVERLAYS --- */
#ui-layer {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.glass-overlay {
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal {
    position: absolute;
    width: 480px;
    max-width: 90%;
    padding: 50px 40px;
    border-radius: 12px;
    text-align: center;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    visibility: hidden;
}

/* Visibility State Classes */
#ui-layer.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(20px);
    pointer-events: none;
}

/* Modal Title Elements */
.glitch-wrapper {
    margin-bottom: 5px;
}

.game-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    line-height: 1.1;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    letter-spacing: 3px;
    margin-bottom: 25px;
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 4px;
    margin-bottom: 35px;
}


/* --- 7. NEON & COLOR UTILITIES --- */
.neon-gold {
    color: var(--neon-gold);
    text-shadow: 0 0 5px var(--neon-gold), 0 0 15px rgba(255, 215, 0, 0.5);
}

.neon-blue {
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue), 0 0 15px rgba(0, 240, 255, 0.5);
}

.neon-purple {
    color: var(--neon-purple);
    text-shadow: 0 0 5px var(--neon-purple), 0 0 15px rgba(176, 38, 255, 0.5);
}

.neon-red {
    color: var(--neon-red);
    text-shadow: 0 0 5px var(--neon-red), 0 0 15px rgba(255, 0, 60, 0.5);
}


/* --- 8. UI COMPONENTS (BUTTONS, INPUTS, TABLES) --- */

/* Buttons */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    position: relative;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 16px 30px;
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cyber-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    z-index: 1;
    transition: all 0.3s ease;
}

.btn-primary::before { border-color: var(--neon-blue); }
.btn-secondary::before { border-color: rgba(255, 255, 255, 0.3); }

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-primary:hover {
    color: var(--bg-base);
    text-shadow: none;
}

.btn-primary:hover::before {
    background: var(--neon-blue);
    box-shadow: 0 0 20px var(--neon-blue);
}

.btn-secondary:hover::before {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

/* Results Box */
.results-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

.result-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
}

/* Inputs */
.input-group {
    text-align: left;
    margin-bottom: 25px;
}

.input-label {
    display: block;
    font-size: 0.85rem;
    color: var(--neon-blue);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-bottom: 2px solid rgba(0, 240, 255, 0.3);
    padding: 15px;
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.5rem;
    text-align: center;
    text-transform: uppercase;
    outline: none;
    transition: all 0.3s;
}

input[type="text"]:focus {
    border-bottom-color: var(--neon-blue);
    box-shadow: 0 10px 20px -10px var(--neon-blue);
    background: rgba(0, 240, 255, 0.05);
}

.input-scanline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
    transition: width 0.3s ease;
}

input[type="text"]:focus ~ .input-scanline {
    width: 100%;
}

/* Leaderboard Table */
.table-container {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 25px;
    padding-right: 5px;
}

.table-container::-webkit-scrollbar { width: 6px; }
.table-container::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 3px; }
.table-container::-webkit-scrollbar-thumb { background: var(--neon-purple); border-radius: 3px; }

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

.leaderboard-table th {
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.5);
    padding: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-table td {
    padding: 14px 12px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.leaderboard-table tbody tr {
    transition: background 0.2s;
}

.leaderboard-table tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
}

.leaderboard-table tbody tr:hover {
    background: rgba(176, 38, 255, 0.15);
}


/* --- 9. VISUAL EFFECTS LAYER (HIT & SCORE FX) --- */
#fx-layer {
    position: absolute;
    inset: 0;
    z-index: 80;
    pointer-events: none;
    overflow: hidden;
}

.hit-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: hit-flash 0.25s ease-out forwards;
}

.hit-marker::before,
.hit-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 3px;
    background: var(--neon-red);
    box-shadow: 0 0 8px var(--neon-red);
    border-radius: 2px;
}

.hit-marker::before { transform: translate(-50%, -50%) rotate(45deg); }
.hit-marker::after { transform: translate(-50%, -50%) rotate(-45deg); }

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

.floating-score {
    position: absolute;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: float-up 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes float-up {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -65%) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, calc(-50% - 60px)) scale(1); }
}
```