/* Daily Snake - 2026-09-25 Sonic Waveform & Acoustic Spectrum Overdrive CSS */

:root {
    --bg-dark: #080c14;
    --bg-panel: #0e1424;
    --border-synth: #1e2942;
    --neon-cyan: #00f0ff;
    --neon-emerald: #00ff88;
    --neon-amber: #ffb700;
    --neon-purple: #d044ff;
    --neon-red: #ff3355;
    --text-primary: #e0f2fe;
    --text-muted: #64748b;
    --font-heading: 'Orbitron', 'Rajdhani', sans-serif;
    --font-sub: 'Rajdhani', 'Noto Sans SC', sans-serif;
    --font-body: 'Noto Sans SC', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-primary);
}

body {
    background-image: 
        radial-gradient(circle at 50% 30%, rgba(0, 240, 255, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(208, 68, 255, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #060910 0%, #0a0e1a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CRT Scanlines Overlay */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    ), linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.03),
        rgba(0, 255, 0, 0.01),
        rgba(0, 0, 255, 0.03)
    );
    background-size: 100% 4px, 6px 100%;
    z-index: 999;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.crt-overlay.disabled {
    opacity: 0;
}

.app-container {
    width: 100vw;
    height: 100vh;
    max-width: 1280px;
    max-height: 940px;
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 10px;
    position: relative;
}

/* Header Navbar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(14, 20, 36, 0.9);
    border: 1.5px solid rgba(0, 240, 255, 0.25);
    border-radius: 12px;
    padding: 8px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--neon-cyan);
    text-decoration: none;
    font-family: var(--font-sub);
    font-weight: 700;
    font-size: 14px;
    background: rgba(0, 240, 255, 0.08);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    transition: all 0.2s ease;
}

.back-link:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.title-group {
    display: flex;
    flex-direction: column;
}

.game-tag {
    font-family: var(--font-sub);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--neon-amber);
    text-transform: uppercase;
}

.game-title {
    font-family: var(--font-sub);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #ffffff, var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.synth-pill-btn {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--neon-emerald);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: var(--font-sub);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.synth-pill-btn:hover {
    background: var(--neon-emerald);
    color: #000;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.5);
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.icon {
    width: 20px;
    height: 20px;
}

.hidden {
    display: none !important;
}

/* Dashboard HUD */
.hud-panel {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 10px;
}

.hud-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-synth);
    border-radius: 10px;
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hud-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.4), transparent);
}

.hud-label {
    font-family: var(--font-sub);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.hud-value {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-top: 2px;
}

.neon-cyan {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.neon-emerald {
    color: var(--neon-emerald);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.neon-amber {
    color: var(--neon-amber);
    text-shadow: 0 0 10px rgba(ff, 183, 0, 0.5);
}

.neon-purple {
    color: var(--neon-purple);
    text-shadow: 0 0 10px rgba(208, 68, 255, 0.5);
}

.neon-red {
    color: var(--neon-red);
    text-shadow: 0 0 10px rgba(255, 51, 85, 0.5);
}

.wave-state-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wave-symbol {
    font-size: 20px;
    color: var(--neon-emerald);
}

/* Equalizer Skill Bar */
.eq-gauge-container {
    background: var(--bg-panel);
    border: 1px solid var(--border-synth);
    border-radius: 10px;
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eq-label-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eq-title {
    font-family: var(--font-sub);
    font-size: 12px;
    font-weight: 700;
    color: var(--neon-amber);
    display: flex;
    align-items: center;
    gap: 6px;
}

.eq-icon {
    width: 16px;
    height: 16px;
}

.eq-status {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.eq-bar-track {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 183, 0, 0.3);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.eq-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-emerald), var(--neon-amber));
    box-shadow: 0 0 12px var(--neon-amber);
    border-radius: 6px;
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.eq-bar-fill.ready {
    background: linear-gradient(90deg, var(--neon-amber), #ffffff, var(--neon-purple));
    animation: eqPulse 0.6s infinite alternate ease-in-out;
}

@keyframes eqPulse {
    0% { opacity: 0.8; box-shadow: 0 0 8px var(--neon-amber); }
    100% { opacity: 1; box-shadow: 0 0 20px var(--neon-purple); }
}

.eq-segments {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.eq-segments span {
    width: 2px;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

/* Main Game Stage Area */
.game-stage {
    flex: 1;
    position: relative;
    background: #050810;
    border: 2px solid rgba(0, 240, 255, 0.3);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 8px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Stage Overlay (Start Screen) */
.stage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 12, 20, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    transition: opacity 0.3s ease;
}

.stage-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-card {
    text-align: center;
    max-width: 480px;
    padding: 30px;
    background: rgba(14, 20, 36, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    position: relative;
}

.overlay-card h2 {
    font-family: var(--font-sub);
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(90deg, #ffffff, var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-family: var(--font-heading);
    font-size: 11px;
    color: var(--neon-emerald);
    letter-spacing: 2px;
}

.start-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin: 10px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feat-icon {
    font-size: 18px;
    color: var(--neon-amber);
    width: 24px;
    text-align: center;
}

.synth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sub);
    font-weight: 700;
    font-size: 15px;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.primary-btn {
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-emerald));
    color: #000;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.7);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.control-hints-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Mobile Touch Controls */
.mobile-controls {
    display: none;
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
    z-index: 15;
}

@media (max-width: 768px), (pointer: coarse) {
    .mobile-controls {
        display: flex;
    }
}

.dpad {
    position: relative;
    width: 130px;
    height: 130px;
    pointer-events: auto;
}

.dpad-btn {
    position: absolute;
    width: 42px;
    height: 42px;
    background: rgba(14, 20, 36, 0.85);
    border: 1.5px solid rgba(0, 240, 255, 0.4);
    color: var(--neon-cyan);
    font-size: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    touch-action: manipulation;
}

.dpad-btn:active {
    background: var(--neon-cyan);
    color: #000;
}

.dpad-btn.up { top: 0; left: 44px; }
.dpad-btn.down { bottom: 0; left: 44px; }
.dpad-btn.left { top: 44px; left: 0; }
.dpad-btn.right { top: 44px; right: 0; }

.mobile-skill {
    pointer-events: auto;
}

.skill-trigger-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-amber), var(--neon-purple));
    border: 2px solid #fff;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 183, 0, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.skill-trigger-btn.disabled {
    opacity: 0.4;
    filter: grayscale(1);
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.skill-btn-title {
    font-family: var(--font-sub);
    font-size: 13px;
    font-weight: 900;
}

.skill-btn-sub {
    font-family: var(--font-heading);
    font-size: 9px;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-card {
    background: var(--bg-panel);
    border: 2px solid var(--neon-cyan);
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

.help-modal-card {
    max-width: 540px;
    text-align: left;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-synth);
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.close-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.close-icon-btn:hover {
    color: #fff;
}

.help-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.help-section h3 {
    font-family: var(--font-sub);
    font-size: 15px;
    color: var(--neon-cyan);
    margin-bottom: 8px;
}

.help-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.help-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
}

.badge {
    display: inline-block;
    font-family: var(--font-sub);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 11px;
}

.note-sine { background: rgba(0, 255, 136, 0.2); color: var(--neon-emerald); }
.note-square { background: rgba(255, 183, 0, 0.2); color: var(--neon-amber); }
.note-saw { background: rgba(208, 68, 255, 0.2); color: var(--neon-purple); }
.note-sub { background: rgba(255, 51, 85, 0.2); color: var(--neon-red); }

.final-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin: 16px 0;
}

.stat-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-synth);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.box-label {
    font-family: var(--font-sub);
    font-size: 10px;
    color: var(--text-muted);
}

.box-val {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.new-record-banner {
    background: linear-gradient(90deg, var(--neon-amber), #fff);
    color: #000;
    font-family: var(--font-sub);
    font-weight: 900;
    font-size: 13px;
    padding: 6px;
    border-radius: 6px;
    margin-bottom: 14px;
    animation: flashBanner 1s infinite alternate;
}

@keyframes flashBanner {
    0% { transform: scale(0.98); }
    100% { transform: scale(1.02); }
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .game-title {
        font-size: 14px;
    }
    .game-tag {
        font-size: 9px;
    }
    .hud-value {
        font-size: 16px;
    }
    .hud-label {
        font-size: 9px;
    }
    .help-grid {
        grid-template-columns: 1fr;
    }
}
