/* banggang.css - Neon Synthwave Branding */

:root {
    /* Primary Colors (Neon Lights) */
    --neon-cyan: #00F0FF;
    --neon-orange: #FF9900;
    /* Secondary Colors (Gradients/Depth) */
    --neon-violet: #BC13FE;
    --neon-magenta: #FF0055;
    /* Background & Accents */
    --bg-navy: #050B14;
    --core-white: #FFFFFF;
}

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--bg-navy);
    /* Subtle radial gradient for depth */
    background-image: radial-gradient(circle at center, #0a1525 0%, var(--bg-navy) 100%);
    color: var(--core-white);
    margin: 0;
    /*overflow-y: auto; !* Allow body scroll for the logo + game *!*/
    /*height: 100vh;*/
    /*display: flex;*/
    /*flex-direction: column;*/
    /*align-items: center;*/
    /*justify-content: center;*/
}

/* --- External Logo Container --- */
/*.external-logo-container {*/
/*    text-align: center;*/
/*    margin-bottom: 20px;*/
/*    z-index: 100;*/
/*}*/

/*.brand-logo {*/
/*    max-width: 200px;*/
/*    height: auto;*/
/*    !* Neon Glow Filter *!*/
/*    filter:*/
/*        drop-shadow(0 0 2px var(--core-white))*/
/*        drop-shadow(0 0 8px var(--neon-cyan))*/
/*        drop-shadow(0 0 20px var(--neon-violet));*/
/*    animation: neonFlux 4s infinite alternate;*/
/*}*/

@keyframes neonFlux {
    0% { filter: drop-shadow(0 0 2px white) drop-shadow(0 0 8px var(--neon-cyan)) drop-shadow(0 0 20px var(--neon-violet)); opacity: 0.95; }
    100% { filter: drop-shadow(0 0 3px white) drop-shadow(0 0 12px var(--neon-cyan)) drop-shadow(0 0 25px var(--neon-magenta)); opacity: 1; }
}

/* --- Main Game Container --- */
#container {
    position: relative;
    width: 1280px;
    height: 720px;
    /* Glowing border aesthetic */
    border: 3px solid var(--neon-violet);
    box-shadow:
        0 0 20px rgba(188, 19, 254, 0.5),
        inset 0 0 50px rgba(5, 11, 20, 0.9);
    background: #000;
    overflow: hidden; /* Keep game contents inside */
    flex-shrink: 0; /* Prevent squishing */
}

/* --- UI Elements (HUD) --- */
#status {
    font-size: 24px;
    font-weight: 800;
    color: var(--core-white);
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 20;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0px #000, 0 0 10px var(--neon-violet), 0 0 20px var(--neon-magenta);
    pointer-events: none;
}

#ammo-display {
    font-size: 40px;
    font-weight: 900;
    text-align: center;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 20;
    pointer-events: none;
    text-transform: uppercase;
    text-shadow: 3px 3px 0 #000;
}

.ammo-cyan { color: var(--neon-cyan); text-shadow: 0 0 15px var(--neon-cyan); }
.ammo-orange { color: var(--neon-orange); text-shadow: 0 0 15px var(--neon-orange); }
.ammo-warning { color: yellow; text-shadow: 0 0 10px yellow; }
.ammo-critical { color: var(--neon-magenta); text-shadow: 0 0 15px red; animation: pulseCritical 0.8s infinite alternate; }

@keyframes pulseCritical { from { opacity: 0.7; } to { opacity: 1; text-shadow: 0 0 25px red; } }


/* --- Overlays --- */
#countdown-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: none; justify-content: center; align-items: center;
    color: var(--neon-cyan); font-family: 'Arial Black', sans-serif; font-size: 180px;
    z-index: 40; pointer-events: none;
    text-shadow: 0 0 10px var(--core-white), 0 0 30px var(--neon-cyan), 0 0 60px var(--neon-cyan);
}

#warning-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 11, 20, 0.9);
    display: flex; justify-content: center; align-items: center;
    color: var(--neon-magenta); font-family: 'Arial Black', sans-serif; font-size: 80px;
    text-transform: uppercase; text-align: center;
    opacity: 0; pointer-events: none; z-index: 30; transition: opacity 0.3s;
    text-shadow: 0 0 10px var(--core-white), 0 0 30px var(--neon-magenta), 0 0 50px red;
}

/* --- SONG SELECTION SCREEN --- */
#song-select-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 11, 20, 0.95);
    z-index: 50;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    padding-top: 20px;
    box-sizing: border-box;
}

h1.select-title {
    color: var(--core-white);
    text-transform: uppercase; letter-spacing: 8px; margin-bottom: 20px; font-size: 24px;
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-violet);
    position: relative;
}
h1.select-title::after {
    content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
    width: 100px; height: 3px; background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-violet);
}

/* Grid Scroll Wrapper */
.grid-wrapper {
    width: 100%;
    height: 100%;
    overflow-y: auto; /* Enable scrolling if too many songs */
    display: flex;
    justify-content: center;
}
/* Custom Scrollbar for Chrome/Safari */
.grid-wrapper::-webkit-scrollbar { width: 8px; }
.grid-wrapper::-webkit-scrollbar-track { background: #000; }
.grid-wrapper::-webkit-scrollbar-thumb { background: var(--neon-violet); border-radius: 4px; }

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    width: 90%;
    padding: 20px;
    padding-bottom: 60px; /* Space for debug controls */
}

/* Holographic Song Tiles */
/* --- UPDATED TILE STYLES (Overlay Mode) --- */

/* Holographic Song Tiles */
.song-tile {
    position: relative; /* Essential for overlay positioning */
    background: #000;
    border: 2px solid var(--neon-violet);
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 350px; /* Taller to show off art */
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.song-tile:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-10px) scale(1.05);
    box-shadow:
        0 0 30px var(--neon-cyan),
        inset 0 0 20px rgba(0, 240, 255, 0.3);
    z-index: 10;
}

/* Image fills the whole card */
.song-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills box without stretching */
    filter: grayscale(40%) brightness(0.8);
    transition: all 0.4s;
}

/* On hover, bring image to full color */
.song-tile:hover .song-image {
    filter: grayscale(0%) brightness(1.1);
    transform: scale(1.1); /* Subtle zoom effect */
}

/* Placeholder if no image exists */
.song-placeholder {
    width: 100%; height: 100%;
    background: radial-gradient(circle, #2a2a2a 0%, #000 100%);
    display: flex; align-items: center; justify-content: center;
    color: var(--neon-violet); font-size: 80px;
}

/* Text Overlay - Sits at the bottom */
.tile-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Cinematic dark gradient fade */
    background: linear-gradient(to top, rgba(5,11,20, 1) 0%, rgba(5,11,20, 0.8) 60%, transparent 100%);
    padding: 20px;
    padding-top: 60px; /* Space for gradient fade */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    z-index: 2;
    transition: transform 0.3s;
}

.tile-info h3 {
    margin: 0 0 5px 0;
    font-size: 22px;
    color: var(--core-white);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px black;
}

.song-tile:hover h3 {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.tile-info p {
    margin: 0;
    font-size: 14px;
    color: #ccc;
    line-height: 1.4;
    max-height: 0; /* Hide description by default to keep art clean */
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s;
}

/* Show description on hover */
.song-tile:hover .tile-info p {
    max-height: 60px;
    opacity: 1;
    margin-top: 5px;
}

/* Scanline Effect Overlay */
.song-tile::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(transparent 0px, transparent 2px, rgba(0, 240, 255, 0.05) 3px, rgba(0, 240, 255, 0.05) 4px);
    pointer-events: none; z-index: 3; opacity: 0.5;
}

#debug-controls { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 60; color: rgba(255,255,255,0.3); font-size: 12px; }

/* --- SCOPED GAME CANVASES (Fixes Editor Overlay Issue) --- */
/* Only apply absolute positioning to canvas/video inside the game container */
#container video,
#container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- EDITOR SPECIFIC STYLES --- */
#timeline-container canvas {
    position: static;
    width: auto;       /* Allow JS to set width */
    max-width: none;   /* CRITICAL: Stops WP from squishing the canvas */
    height: 100%;
    background: #111;
    cursor: crosshair;
}
#red-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: red; opacity: 0; pointer-events: none; z-index: 10; transition: opacity 0.2s; }
#flash-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--core-white); opacity: 0; pointer-events: none; z-index: 15; mix-blend-mode: overlay; }

/* --- SCORE SCREEN (Mission Report) --- */
#score-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 11, 20, 0.95);
    z-index: 100;
    display: none; /* Hidden by default */
    flex-direction: column; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
}

.score-title {
    font-size: 60px; color: var(--neon-cyan);
    text-transform: uppercase; letter-spacing: 10px; margin-bottom: 40px;
    text-shadow: 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-violet);
    border-bottom: 2px solid var(--neon-magenta);
    padding-bottom: 10px;
}

.stat-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
    margin-bottom: 40px; text-align: center;
}

.stat-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--neon-violet);
    padding: 20px; border-radius: 8px; min-width: 200px;
}

.stat-label {
    display: block; font-size: 14px; color: #aaa; text-transform: uppercase; letter-spacing: 2px;
}

.stat-value {
    display: block; font-size: 40px; font-weight: 900; color: var(--core-white);
    text-shadow: 0 0 10px var(--neon-violet); margin-top: 5px;
}

.stat-value.highlight { color: var(--neon-orange); text-shadow: 0 0 15px var(--neon-orange); }

.final-accuracy {
    font-size: 24px; color: var(--neon-cyan); margin-top: 20px;
    text-transform: uppercase; letter-spacing: 2px;
}

.replay-btn {
    background: transparent; color: var(--neon-cyan);
    border: 2px solid var(--neon-cyan); padding: 15px 40px;
    font-size: 20px; font-weight: bold; text-transform: uppercase; letter-spacing: 2px;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 0 10px var(--neon-cyan);
}
.replay-btn:hover {
    background: var(--neon-cyan); color: #000;
    box-shadow: 0 0 30px var(--neon-cyan);
}

/* --- RHYTHM VISUALS --- */

/* The class we add to #container on the beat */
.beat-border-pulse {
    /* Hard override to force the neon flash */
    box-shadow:
        0 0 50px var(--neon-cyan),
        inset 0 0 30px rgba(0, 240, 255, 0.4) !important;
    border-color: var(--core-white) !important;
    transition: all 0.05s ease-out; /* Fast attack */
}

/* The class we add to HUD text (#ammo-display, #status) */
.beat-text-pulse {
    transform: scale(1.1);
    color: var(--neon-cyan) !important;
    text-shadow: 0 0 20px var(--neon-cyan), 0 0 40px var(--core-white) !important;
    transition: all 0.05s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}