/* XenoKash.css - Digital Vault Field */
:root {
    --primary: #00ff9f;
    --kash: #ffcc00;
    --bg: #050505;
    --panel: rgba(10, 10, 10, 0.95);
    --player-color: #00ff9f;
    --bank: #00f2ff;
    --hacker: #ff3e3e;
    --stamina: #00ff9f;
}

body, html {
    margin: 0; padding: 0; height: 100%;
    background: var(--bg);
    color: white; font-family: 'Space Mono', monospace;
    overflow: hidden;
    
    /* --- HIGH-CONTRAST NEON ANIMATED BACKGROUND --- */
    background: linear-gradient(135deg, #000000, #001a0f, #00331f, #000000);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
    position: relative;
}

/* Layer 2: Intense Neon Pulse Overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 255, 159, 0.15) 0%, transparent 70%);
    animation: neonPulse 4s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}

/* Layer 3: High-Visibility STATIC Grid - LOCKED TO SCREEN */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 159, 0.8) 2px, transparent 2px),
        linear-gradient(90deg, rgba(0, 255, 159, 0.8) 2px, transparent 2px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
    box-shadow: inset 0 0 100px rgba(0, 255, 159, 0.2);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes neonPulse {
    0% { 
        opacity: 0.3;
        background: radial-gradient(circle at center, rgba(0, 255, 159, 0.1) 0%, transparent 80%);
    }
    100% { 
        opacity: 1;
        background: radial-gradient(circle at center, rgba(0, 255, 159, 0.25) 0%, transparent 60%);
    }
}

/* --- STAMINA BAR UI --- */
#stamina-container {
    width: 120px;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 10px;
    border: 1px solid rgba(0, 255, 159, 0.2);
    border-radius: 0px;
    overflow: hidden;
}
#stamina-fill {
    width: 100%;
    height: 100%;
    background: var(--stamina);
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--stamina);
}

/* --- LOADOUT / MENU --- */
#loadout-screen {
    position: fixed; inset: 0;
    background: radial-gradient(circle at center, rgba(0, 20, 12, 0.9) 0%, #000 100%);
    z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center;
}

.menu-card {
    background: var(--panel); border: 2px solid var(--primary);
    padding: 30px; width: 600px; text-align: center;
    box-shadow: 0 0 40px rgba(0, 255, 159, 0.3);
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: left;
    margin-top: 20px;
}

.info-panel {
    background: rgba(0, 255, 159, 0.08);
    border: 1px solid #00ff9f33;
    padding: 10px;
    font-size: 11px;
    color: #00ff9f;
    line-height: 1.6;
}

.selection-row { display: flex; justify-content: space-around; margin: 10px 0; }
.option { 
    padding: 10px; border: 1px solid #333; cursor: pointer; font-size: 12px; transition: 0.3s;
    color: #555;
}
.option.active { border-color: var(--primary); color: white; box-shadow: 0 0 15px var(--primary); }

.play-btn {
    background: var(--primary); color: black; border: none;
    padding: 15px 40px; font-family: inherit; font-weight: bold;
    cursor: pointer; letter-spacing: 2px; margin-top: 20px;
    width: 100%;
    box-shadow: 0 0 20px var(--primary);
}

/* --- MINIMAP UI --- */
#minimap-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 200px;
    height: 200px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid var(--primary);
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.3);
}

#minimap-canvas {
    width: 100%;
    height: 100%;
}

/* --- THE PLAYER (SPRITE) --- */
#player {
    position: absolute; width: 34px; height: 44px;
    z-index: 100;
}

.hacker-head { 
    width: 20px; height: 20px; background: #fff; margin: 0 auto; 
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    position: relative;
}
.hacker-head::after { content: ""; position: absolute; top: 8px; left: 4px; width: 12px; height: 2px; background: #000; }

.hacker-body { 
    width: 30px; height: 24px; background: var(--player-color); 
    margin: 2px auto; clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
    position: relative;
    box-shadow: 0 0 20px var(--player-color);
}

.walking { animation: bob 0.2s infinite alternate; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-4px); } }

/* --- GAME WORLD --- */
#game-container { position: relative; width: 100vw; height: 100vh; display: none; }
#world { position: absolute; inset: 0; }

/* Grid is now static in the background overlay above, this is for objects */
#grid-bg {
    position: absolute; width: 10000px; height: 10000px;
    pointer-events: none;
    transform: translate(-5000px, -5000px);
}

/* --- VAULTS --- */
.vault {
    position: absolute; width: 45px; height: 45px;
    background: rgba(0,0,0,0.9);
    display: flex; align-items: center; justify-content: center;
    font-size: 8px; color: #444; 
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
    border: 1px solid #333;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-image: url('https://img.icons8.com/nolan/64/safe.png');
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
}

.vault.bank { border: 2px solid var(--bank); box-shadow: 0 0 20px var(--bank); filter: hue-rotate(180deg); }
.vault.hacker { border: 2px solid var(--hacker); box-shadow: 0 0 20px var(--hacker); filter: hue-rotate(300deg); }

.vault-visible {
    animation: vaultPulse 2s infinite ease-in-out, popIn 0.4s ease-out;
}

@keyframes vaultPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 25px var(--primary); }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* VAULT OPENED / MARKER SYSTEM */
.vault.opened { 
    border-color: #ff3e3e; 
    opacity: 0.6; 
    animation: none; 
    transform: scale(0.8); 
    background-image: none; 
    clip-path: none; 
    border-radius: 50%; 
}
.vault.opened::before {
    content: "X";
    color: #ff3e3e;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px #ff3e3e;
}

/* --- MATH MODAL --- */
#math-modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: #000; border: 2px solid var(--primary); padding: 30px;
    display: none; z-index: 2000; text-align: center;
    box-shadow: 0 0 60px rgba(0, 255, 159, 0.4);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translate(-50%, -80%); opacity: 0; }
    to { transform: translate(-50%, -50%); opacity: 1; }
}

#math-input { 
    background: #111; border: 2px solid var(--primary); color: white; 
    padding: 10px; width: 120px; text-align: center; outline: none; 
    font-family: 'Space Mono', monospace; font-size: 24px; margin-top: 15px;
    box-shadow: inset 0 0 10px rgba(0, 255, 159, 0.2);
}

.kash-popup {
    position: absolute;
    font-weight: bold;
    pointer-events: none;
    z-index: 1000;
    color: var(--kash);
    text-shadow: 0 0 10px var(--kash);
    animation: kashFloat 0.8s ease-out forwards;
}

@keyframes kashFloat {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-60px) scale(1.5); opacity: 0; }
}

#leaderboard-ui {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--primary);
    padding: 10px;
    font-size: 10px;
    width: 150px;
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.3);
}

.lb-entry {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #00ff9f22;
}