/**
 * @author      Mike Fairbrother <mike@fairbrother.me>
 * @copyright   2024-2026 Mike Fairbrother. All rights reserved.
 * @license     PROPRIETARY - No rights to copy, modify, distribute, or reuse
 *              any part of this code without explicit written permission from the author.
 */
/*
   Void - Cosmic Absorption Game Styles
   Game-specific styles layered on top of shared/styles.css
*/

/* ========== Root vars ========== */
:root {
    --void-bg: #05020f;
    --void-core: #8b5cf6;
    --void-glow: #a78bfa;
    --void-accent: #c084fc;
    --void-gold: #ffd93d;
    --void-nebula: #ec4899;
    --void-star: #fbbf24;
}

body {
    background: var(--void-bg);
    overscroll-behavior: none;
}

/* ========== Logo ========== */
.void-logo {
    position: relative;
    width: 120px; height: 120px;
    margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
}

.void-logo-core {
    width: 48px; height: 48px; border-radius: 50%;
    background: radial-gradient(circle, var(--void-core) 0%, #1e1b4b 70%, transparent 100%);
    box-shadow: 0 0 30px var(--void-core), 0 0 60px rgba(139,92,246,0.3);
    animation: void-pulse 2s ease-in-out infinite;
}

.void-logo-ring {
    position: absolute; border-radius: 50%;
    border: 1px solid rgba(167,139,250,0.2);
}
.void-ring-1 { width: 72px; height: 72px; animation: void-spin 6s linear infinite; }
.void-ring-2 { width: 96px; height: 96px; animation: void-spin 10s linear infinite reverse; border-color: rgba(236,72,153,0.15); }
.void-ring-3 { width: 116px; height: 116px; animation: void-spin 14s linear infinite; border-color: rgba(251,191,36,0.1); }

.void-logo-particles {
    position: absolute; inset: 0;
    animation: void-spin 20s linear infinite;
}
.void-logo-particles span {
    position: absolute; font-size: 14px; opacity: 0.5;
}
.void-logo-particles span:nth-child(1) { top: 2px; left: 50%; }
.void-logo-particles span:nth-child(2) { top: 25%; right: 0; }
.void-logo-particles span:nth-child(3) { bottom: 10%; right: 5%; }
.void-logo-particles span:nth-child(4) { bottom: 0; left: 40%; }
.void-logo-particles span:nth-child(5) { top: 30%; left: 0; }
.void-logo-particles span:nth-child(6) { top: 60%; left: 10%; }

@keyframes void-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px var(--void-core), 0 0 60px rgba(139,92,246,0.3); }
    50% { transform: scale(1.08); box-shadow: 0 0 40px var(--void-core), 0 0 80px rgba(139,92,246,0.4); }
}
@keyframes void-spin { to { transform: rotate(360deg); } }

/* ========== Title ========== */
.void-title {
    font-size: 48px; font-weight: 900; letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, var(--void-glow) 50%, var(--void-nebula) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; text-align: center; margin: 0 0 6px;
}
.void-subtitle {
    font-size: 14px; color: rgba(255,255,255,0.45); text-align: center;
    margin: 0 0 20px; font-weight: 500;
}

/* ========== Menu Stats ========== */
.void-menu-stats {
    display: flex; justify-content: center; gap: 24px; margin-bottom: 20px;
}
.void-menu-stat { text-align: center; }
.void-menu-stat-val {
    display: block; font-size: 24px; font-weight: 800; color: #fff;
}
.void-menu-stat-lbl {
    font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
    color: rgba(255,255,255,0.35); font-weight: 600;
}

.void-sound-toggle { margin-top: 12px; text-align: center; }

/* ========== HUD ========== */
.void-hud {
    position: absolute; top: 0; left: 0; right: 0; z-index: 10;
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: max(env(safe-area-inset-top, 8px), 8px) 12px 0;
    pointer-events: none;
}
.void-hud-left, .void-hud-center, .void-hud-right { text-align: center; }
.void-hud-score, .void-hud-timer {
    font-size: 22px; font-weight: 800; color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.void-hud-timer { color: var(--void-gold); }
.void-hud-tier { font-size: 20px; }
.void-hud-level {
    font-size: 11px; font-weight: 700; color: var(--void-accent);
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 2px;
}
.void-hud-label {
    font-size: 9px; text-transform: uppercase; letter-spacing: 0.8px;
    color: rgba(255,255,255,0.4); font-weight: 600;
}

/* ========== Canvas ========== */
#game-canvas {
    display: block; width: 100%; height: 100%;
    position: absolute; inset: 0;
    touch-action: none;
}

/* ========== Scoreboard (in-game) ========== */
.void-scoreboard {
    position: absolute; top: max(env(safe-area-inset-top, 8px), 8px);
    left: 50%; transform: translateX(-50%);
    margin-top: 52px;
    z-index: 10; pointer-events: none;
    background: rgba(5,2,15,0.6); backdrop-filter: blur(4px);
    border: 1px solid rgba(167,139,250,0.1);
    border-radius: 10px; padding: 6px 10px;
    min-width: 130px;
}
.void-sb-entry {
    display: flex; align-items: center; gap: 6px;
    padding: 2px 0; font-size: 11px; font-weight: 600;
    color: rgba(255,255,255,0.5);
}
.void-sb-pos {
    width: 14px; text-align: center; font-size: 10px;
    color: rgba(255,255,255,0.3);
}
.void-sb-name { flex: 1; }
.void-sb-score { font-variant-numeric: tabular-nums; }
.void-sb-you {
    color: #fff;
}
.void-sb-you .void-sb-pos { color: var(--void-gold); }

/* ========== Controls ========== */
.void-controls {
    position: absolute; bottom: max(env(safe-area-inset-bottom, 8px), 8px);
    right: 12px; z-index: 10;
    display: flex; gap: 6px;
}

/* ========== Overlays ========== */
.void-overlay {
    position: absolute; inset: 0; z-index: 100;
    background: rgba(5,2,15,0.85); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.void-overlay-card {
    background: linear-gradient(170deg, rgba(30,27,75,0.95) 0%, rgba(15,12,41,0.98) 100%);
    border: 1px solid rgba(167,139,250,0.15);
    border-radius: 20px; padding: 28px 24px; text-align: center;
    max-width: 320px; width: 100%;
    box-shadow: 0 8px 40px rgba(139,92,246,0.2);
}
.void-overlay-card h2 {
    font-size: 24px; font-weight: 800; color: #fff; margin: 0 0 16px;
}

/* ========== Level Complete Standings ========== */
.void-standings {
    margin-bottom: 16px;
}
.void-standing {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; font-size: 14px; font-weight: 600;
    color: rgba(255,255,255,0.5);
    border-radius: 8px; margin-bottom: 4px;
}
.void-standing span:first-child { width: 28px; text-align: center; font-size: 16px; }
.void-standing span:nth-child(2) { flex: 1; text-align: left; }
.void-standing span:last-child { font-variant-numeric: tabular-nums; }
.void-standing-you {
    background: rgba(255,217,61,0.1);
    color: #fff;
    border: 1px solid rgba(255,217,61,0.15);
}

/* ========== Help ========== */
.void-help-card { max-width: 340px; }
.void-help-items { text-align: left; margin-bottom: 16px; }
.void-help-item {
    display: flex; align-items: flex-start; gap: 10px;
    margin-bottom: 10px;
}
.void-help-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.void-help-item p {
    margin: 0; font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.5;
}
.void-help-item strong { color: #fff; }

/* ========== Game Over ========== */
.void-over-icon { font-size: 56px; margin-bottom: 8px; text-align: center; }
.void-over-title {
    font-size: 28px; font-weight: 900; color: #fff;
    text-align: center; margin: 0 0 6px;
}
.void-over-msg {
    font-size: 13px; color: rgba(255,255,255,0.45); text-align: center;
    margin-bottom: 16px;
}
.void-over-stats {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
    margin-bottom: 16px;
}
.void-over-stat {
    background: rgba(255,255,255,0.04); border-radius: 12px;
    padding: 10px 8px; text-align: center;
}
.void-over-stat-val {
    display: block; font-size: 20px; font-weight: 800; color: #fff;
}
.void-over-stat-lbl {
    font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px;
    color: rgba(255,255,255,0.35); font-weight: 600; margin-top: 2px;
}

.void-newbest {
    background: linear-gradient(135deg, var(--void-gold), #ff9f43);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 20px; font-weight: 900; text-align: center;
    margin-bottom: 12px; animation: void-pulse-text 0.8s ease-in-out infinite;
}
@keyframes void-pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ========== Screen game positioning ========== */
#screen-game { overflow: hidden; }
