/* =========================================
   NEON VAPORWAVE THEME - FINAL VERSION
   ========================================= */

   :root {
    --neon-pink: #ff2a6d;
    --neon-cyan: #05d9e8;
    --deep-purple: #2a0066;
    --dark-bg: #010a12;
    --grid-line: rgba(5, 217, 232, 0.15);
    --gold: #ffd700;
}

body {
    background: linear-gradient(135deg, var(--deep-purple), var(--dark-bg));
    font-family: 'Orbitron', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: white;
    overflow: hidden;
}

/* Scanline Overlay */
body::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: repeating-linear-gradient(
        0deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15) 1px,
        transparent 1px, transparent 2px
    );
    pointer-events: none;
    z-index: 0;
}

/* Layout Container */
.main-layout {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* --- GAME SECTION --- */
.game-wrapper {
    text-align: center;
}

.header h1 {
    margin: 0;
    font-size: 56px;
    letter-spacing: 4px;
    color: white;
    text-shadow: 
        0 0 5px #fff,
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-pink);
}

.header p {
    color: var(--neon-cyan);
    margin-bottom: 5px;
    letter-spacing: 2px;
    font-size: 14px;
    text-shadow: 0 0 5px var(--neon-cyan);
}

/* Timer & Attempts */
.status-bar {
    display: flex;
    justify-content: space-between;
    width: 500px;
    margin: 0 auto 10px auto;
    font-weight: bold;
}

#timer-display {
    font-size: 28px;
    color: var(--neon-pink);
    text-shadow: 0 0 8px var(--neon-pink);
}

#attempts-display {
    font-size: 18px;
    color: white;
    align-self: flex-end;
    margin-bottom: 5px;
}

/* Game Canvas Container */
#game-container {
    position: relative;
    box-shadow: 0 0 15px var(--neon-cyan), inset 0 0 30px rgba(5, 217, 232, 0.2);
    border: 2px solid var(--neon-cyan);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.9);
}

canvas {
    display: block;
    cursor: crosshair;
}

/* --- SIDEBAR (LEADERBOARD) --- */
.sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.panel h3 {
    margin-top: 0;
    color: white;
    border-bottom: 1px solid var(--neon-cyan);
    padding-bottom: 10px;
    text-shadow: 0 0 5px var(--neon-cyan);
    font-size: 18px;
}

#avg-time-display {
    font-size: 36px;
    text-align: center;
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold);
    margin: 10px 0;
}

.score-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

.score-row span:nth-child(2) {
    color: var(--neon-pink);
}

/* --- OVERLAYS --- */
.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(42, 0, 102, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.hidden {
    display: none !important;
}

#win-overlay h2, #locked-overlay h2 {
    font-size: 32px;
    color: white;
    text-shadow: 0 0 10px white;
    margin-bottom: 10px;
}

#locked-overlay h2 {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

/* Input Form */
#submit-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

input {
    background: black;
    border: 2px solid var(--neon-pink);
    color: white;
    padding: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    text-align: center;
    text-transform: uppercase;
    width: 150px;
    outline: none;
    box-shadow: 0 0 10px var(--neon-pink);
}

button {
    background: transparent;
    color: var(--neon-pink);
    border: 2px solid var(--neon-pink);
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    box-shadow: 0 0 8px var(--neon-pink);
    transition: 0.2s;
}

button:hover:not(:disabled) {
    background: var(--neon-pink);
    color: white;
    box-shadow: 0 0 20px var(--neon-pink);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #666;
    color: #666;
    box-shadow: none;
}