/* ============================================================
   NEO DASH — style.css
   ============================================================ */

:root {
    --bg: #0a0a1a;
    --bg2: #0f0f2e;
    --cyan: #00fff5;
    --pink: #ff006e;
    --yellow: #ffe600;
    --green: #00ff88;
    --purple: #9d4edd;
    --text: #e0e0ff;
    --panel: rgba(10, 10, 40, 0.95);
    --border: rgba(0, 255, 245, 0.25);
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'VT323', monospace;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
}

/* ---- HEADER ---- */
#header {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
}

#logo {
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    color: var(--cyan);
    text-shadow: 0 0 12px var(--cyan);
}

#logo span {
    color: var(--pink);
    text-shadow: 0 0 12px var(--pink);
}

#header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ---- BUTTONS ---- */
.btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 7px 12px;
    border: 2px solid var(--cyan);
    background: transparent;
    color: var(--cyan);
    cursor: pointer;
    letter-spacing: 1px;
    transition: all .12s;
}

.btn:hover {
    background: var(--cyan);
    color: var(--bg);
    box-shadow: 0 0 14px var(--cyan);
}

.btn.pink {
    border-color: var(--pink);
    color: var(--pink);
}

.btn.pink:hover {
    background: var(--pink);
    color: var(--bg);
    box-shadow: 0 0 14px var(--pink);
}

.btn.yellow {
    border-color: var(--yellow);
    color: var(--yellow);
}

.btn.yellow:hover {
    background: var(--yellow);
    color: var(--bg);
    box-shadow: 0 0 14px var(--yellow);
}

/* ---- USER ---- */
#user-greeting {
    font-size: 16px;
    color: var(--green);
}

#user-greeting span {
    color: var(--yellow);
}

/* ---- GAME WRAP ---- */
#game-wrap {
    position: relative;
    width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#game-canvas {
    image-rendering: pixelated;
    display: block;
    border: 2px solid var(--border);
    box-shadow: 0 0 30px rgba(0, 255, 245, 0.1);
    cursor: pointer;
}

/* ---- SCORE BAR ---- */
#score-bar {
    width: 900px;
    display: flex;
    justify-content: space-between;
    padding: 6px 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-top: none;
}

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

.sc-label {
    font-size: 11px;
    color: rgba(200, 200, 255, .45);
    letter-spacing: 1px;
}

.sc-val {
    font-size: 22px;
    color: var(--yellow);
}

/* ---- BOTTOM BAR (skins + themes) ---- */
#bottom-bar {
    width: 900px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 20px;
    background: rgba(5, 5, 20, .9);
    border: 1px solid var(--border);
    border-top: none;
    flex-wrap: wrap;
}

.bar-label {
    font-size: 13px;
    color: rgba(200, 200, 255, .4);
    white-space: nowrap;
}

.bar-sep {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, .12);
    margin: 0 6px;
}

/* ---- SKINS ---- */
.sk {
    width: 26px;
    height: 26px;
    border: 2px solid rgba(255, 255, 255, .15);
    cursor: pointer;
    transition: transform .12s;
    flex-shrink: 0;
}

.sk:hover {
    transform: scale(1.2);
}

.sk.active {
    border: 2px solid #fff;
    box-shadow: 0 0 8px #fff;
}

/* ---- THEMES ---- */
.theme-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 6px;
    padding: 5px 8px;
    border: 2px solid rgba(255, 255, 255, .15);
    background: transparent;
    color: rgba(200, 200, 255, .5);
    cursor: pointer;
    letter-spacing: 1px;
    transition: all .12s;
    white-space: nowrap;
}

.theme-btn:hover {
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
}

.theme-btn.active {
    color: #fff;
}

/* ---- GAME OVERLAYS ---- */
.overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    z-index: 30;
    background: rgba(0, 0, 20, .65);
}

.overlay.on {
    display: flex;
}

#start-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 32px;
    color: var(--cyan);
    text-shadow: 0 0 20px var(--cyan), 0 0 40px var(--cyan);
}

#start-sub {
    font-size: 22px;
    color: var(--pink);
    text-shadow: 0 0 10px var(--pink);
}

.blink {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: rgba(200, 200, 255, .8);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0
    }
}

.hint {
    font-size: 18px;
    color: rgba(200, 200, 255, .45);
    text-align: center;
    line-height: 1.8;
}

#go-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 26px;
    color: var(--pink);
    text-shadow: 0 0 20px var(--pink);
    animation: flicker .4s infinite alternate;
}

@keyframes flicker {
    from {
        opacity: 1
    }

    to {
        opacity: .75
    }
}

#go-score-line {
    font-family: 'Press Start 2P', monospace;
    font-size: 13px;
    color: var(--yellow);
}

#go-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

#go-prompt {
    font-size: 17px;
    color: rgba(200, 200, 255, .6);
    text-align: center;
    max-width: 320px;
}

/* ---- MODALS ---- */
.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 20, .82);
    z-index: 100;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-bg.on {
    display: flex;
}

.modal {
    background: var(--bg2);
    border: 2px solid var(--cyan);
    box-shadow: 0 0 40px rgba(0, 255, 245, .2);
    padding: 30px;
    width: 420px;
    max-width: 95vw;
    position: relative;
}

.modal.pink-modal {
    border-color: var(--pink);
    box-shadow: 0 0 40px rgba(255, 0, 110, .2);
}

.modal-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
    margin-bottom: 22px;
    text-align: center;
}

.modal.pink-modal .modal-title {
    color: var(--pink);
    text-shadow: 0 0 10px var(--pink);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: var(--pink);
    font-size: 18px;
    cursor: pointer;
    font-family: 'Press Start 2P', monospace;
}

.fg {
    margin-bottom: 14px;
}

.fg label {
    display: block;
    font-size: 12px;
    color: rgba(200, 200, 255, .55);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.fg input {
    width: 100%;
    background: rgba(0, 0, 40, .8);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 9px 11px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    outline: none;
}

.fg input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 6px rgba(0, 255, 245, .3);
}

.form-btns {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.form-btns .btn {
    flex: 1;
    padding: 10px 6px;
    font-size: 7px;
}

.switch {
    text-align: center;
    margin-top: 12px;
    font-size: 15px;
    color: rgba(200, 200, 255, .4);
}

.switch a {
    color: var(--pink);
    cursor: pointer;
}

.switch a:hover {
    text-decoration: underline;
}

.fmsg {
    font-size: 14px;
    padding: 7px;
    text-align: center;
    margin-top: 8px;
    display: none;
}

.fmsg.err {
    color: var(--pink);
    border: 1px solid var(--pink);
}

.fmsg.ok {
    color: var(--green);
    border: 1px solid var(--green);
}

/* ---- LEADERBOARD ---- */
.lb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px;
}

.lb-table th {
    color: rgba(200, 200, 255, .4);
    font-size: 11px;
    padding: 5px 8px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    letter-spacing: 1px;
}

.lb-table td {
    padding: 7px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.lb-table tr:nth-child(1) td {
    color: var(--yellow);
}

.lb-table tr:nth-child(2) td {
    color: rgba(220, 220, 255, .9);
}

.lb-table tr:nth-child(3) td {
    color: rgba(200, 150, 100, .9);
}

.lb-rank {
    color: rgba(200, 200, 255, .35);
    font-size: 13px;
}

.lb-score {
    color: var(--cyan);
}

.lb-empty {
    text-align: center;
    padding: 28px;
    font-size: 18px;
    color: rgba(200, 200, 255, .4);
}

.lb-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.lb-tab {
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    padding: 6px 10px;
    border: 2px solid rgba(255, 255, 255, .15);
    background: transparent;
    color: rgba(200, 200, 255, .4);
    cursor: pointer;
}

.lb-tab.active {
    border-color: var(--pink);
    color: var(--pink);
}

.lb-loading {
    text-align: center;
    padding: 28px;
    font-size: 18px;
    color: var(--cyan);
}

/* ---- NOTIFICATION ---- */
#notif {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg2);
    border: 2px solid var(--green);
    color: var(--green);
    padding: 9px 20px;
    font-size: 16px;
    z-index: 200;
    display: none;
    box-shadow: 0 0 18px rgba(0, 255, 136, .3);
    transition: opacity .4s;
    white-space: nowrap;
}