/* =======================================================================
   GLOBAL UI STYLES
   Dark theme + neon techno aesthetic for photon/laser environment
======================================================================= */
body {
    margin: 0;
    background: #050508;
    color: #fff;
    font-family: "Segoe UI", "Roboto Mono", monospace;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Main game wrapper */
#game-container {
    position: relative;
    box-shadow: 0 0 40px rgba(0, 200, 255, 0.2);
    border: 1px solid #333;
}

/* Canvas where all rendering happens */
canvas {
    display: block;
    background: #0b0b14;
    cursor: crosshair;
}

/* =======================================================================
   HUD OVERLAY (UI layered above canvas)
======================================================================= */
.ui-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    padding: 20px;
}

/* Top HUD bar */
.hud-top {
    display: flex;
    justify-content: space-between;
    text-shadow: 0 0 5px cyan;
}

/* Level tag text */
.level-tag {
    font-size: 12px;
    color: #aaa;
}

/* Stats panel on right side */
.stats-panel {
    background: rgba(0,20,40,0.5);
    border-right: 2px solid cyan;
    padding: 10px;
    min-width: 170px;
    pointer-events: auto;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin: 3px 0;
}

/* Divider line inside stat panel */
.stat-divider {
    height: 1px;
    background: #333;
    margin: 6px 0;
}

/* Bottom buttons */
.hud-bottom {
    display: flex;
    gap: 20px;
    justify-content: center;
    pointer-events: auto;
}

/* Button design */
button {
    background: rgba(0,30,50,.8);
    border: 1px solid cyan;
    padding: 9px 22px;
    color: cyan;
    text-transform: uppercase;
    cursor: pointer;
    transition: .25s;
}
button:hover { background: cyan; color:#000; box-shadow:0 0 12px cyan; }
button:active { transform: scale(.95); }

/* =======================================================================
   WIN OVERLAY
======================================================================= */
#win-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    background: rgba(0,0,0,.92);
    padding: 40px;
    border: 1px solid #0f0;
    box-shadow: 0 0 40px rgba(0,255,0,.3);
    opacity: 0;
    pointer-events: none;
    transition: .4s;
    min-width: 300px;
    text-align: center;
}
#win-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.btn-group { display:flex; gap:12px; justify-content:center }
