/* ============================================================
   TYPE FURY — Modern Gaming UI Redesign
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;600;700&family=Share+Tech+Mono&display=swap');

:root {
    --bg-dark: #020205;
    --accent: #00f2ff; /* More vibrant Cyan */
    --accent-glow: rgba(0, 242, 255, 0.4);
    --accent2: #ff2d55; /* More vibrant Red */
    --accent2-glow: rgba(255, 45, 85, 0.4);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-dim: #64748b;
    --font-display: 'Outfit', 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --radius: 24px;
    --transition: 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

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

html, body {
    width:100%; height:100%;
    overflow:hidden;
    background: var(--bg-dark);
    color: var(--text);
    font-family: var(--font-body);
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0, 242, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 45, 85, 0.02) 0%, transparent 40%);
}

.scanlines {
    position: fixed; inset: 0; z-index: 9999;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 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, 3px 100%;
    pointer-events: none; opacity: 0.15;
}

/* ======================== UTILITIES ======================== */
.hidden { display: none !important; }
.hidden-input {
    position: absolute;
    top: -9999px; left: -9999px;
    opacity: 0; pointer-events: none;
}

/* ======================== DYNAMIC BACKGROUND ======================== */
.dynamic-bg {
    position: fixed; inset: 0;
    z-index: 0;
}
.bg-layer {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.bg-grid {
    position: absolute; inset: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 170, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 170, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.3;
}
.bg-vignette {
    position: absolute; inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 3;
}
.bg-layer.bg-main {
    background: 
        radial-gradient(circle at 50% 0%, #0a0a1a 0%, var(--bg-dark) 100%);
    animation: bgPulse 20s infinite alternate ease-in-out;
}
@keyframes bgPulse {
    0% { transform: scale(1); filter: hue-rotate(0deg); }
    100% { transform: scale(1.1); filter: hue-rotate(10deg); }
}
.bg-layer.bg-racing {
    background: url('bg_racing.png') center/cover no-repeat;
    filter: brightness(0.5) saturate(1.2);
}
.bg-layer.bg-artillery {
    background: url('bg_artillery.png') center/cover no-repeat;
    filter: brightness(0.6) hue-rotate(-10deg);
}
.bg-layer.bg-space {
    background: url('bg_space.png') center/cover no-repeat;
    filter: brightness(0.6);
}
.bg-layer.active {
    opacity: 1;
    z-index: 1;
    transform: scale(1.05);
}
.bg-overlay {
    position: absolute; inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

/* ---- Screens ---- */
.screen {
    position:fixed; inset:0;
    display:none;
    flex-direction:column;
    z-index:2;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}
.screen.active { display:flex; }

.screen::-webkit-scrollbar { width: 6px; }
.screen::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

/* ======================== MAIN MENU ======================== */
#mainMenu {
    align-items:center; justify-content:flex-start;
    padding: 80px 20px;
    background: radial-gradient(circle at 50% 0%, rgba(0, 229, 255, 0.05), transparent 70%);
}

.menu-content {
    position:relative; z-index:3;
    display:flex; flex-direction:column; align-items:center; gap:40px;
    animation: fadeScaleUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Logo */
.logo-container { position:relative; text-align:center; transform: translateZ(0); }
.logo-glow {
    position:absolute; inset: -40px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(60px); opacity:0.4;
    animation: logoGlowPulse 4s infinite alternate ease-in-out;
}
@keyframes logoGlowPulse {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 0.6; transform: scale(1.2); }
}
.logo-text {
    font-family: var(--font-display);
    font-size: min(10vw, 110px); font-weight:900;
    letter-spacing: 0.2em;
    line-height:0.9;
    position:relative;
    user-select:none;
    margin-bottom: 0.1em;
}
.logo-type { color:#fff; text-shadow: 0 0 40px rgba(255,255,255,0.2); }
.logo-fury {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 40px var(--accent-glow));
    animation: flicker 3s infinite;
}
@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
    20%, 24%, 55%, 56% { opacity: 0.7; }
}
.logo-tagline {
    font-family: var(--font-mono); font-size:12px;
    letter-spacing: 1.2em; color:var(--accent);
    margin-top:16px; opacity: 0.5;
    text-transform: uppercase;
}

/* Stats Bar */
.menu-stats-bar { display:flex; gap:20px; margin-top:10px; }
.stat-chip {
    background: #000; border: 2px solid #333;
    border-radius: 22px; padding: 14px 34px;
    display:flex; gap:16px; align-items:center;
    font-family: var(--font-display); font-size:16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-bottom: 3px solid #1a1a1a;
}
.stat-label { color:var(--text-dim); font-size: 13px; letter-spacing: 2px; }
.stat-chip:first-child .stat-value { color:var(--accent); font-weight:900; font-size: 20px; }
.stat-chip:last-child .stat-value { color:var(--accent2); font-weight:900; font-size: 20px; }

/* Mode Cards */
.mode-selector { display:flex; gap:40px; width: 100%; max-width: 1000px; justify-content: center; align-items: stretch; margin-top: 20px;}
.mode-card {
    flex: 1; min-width: 320px; padding:80px 44px;
    background: #000;
    border: 4px solid #111;
    border-radius: var(--radius);
    text-align:center; cursor:pointer;
    position:relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.9);
}
/* Border Beam Effect */
.mode-card::after {
    content:''; position:absolute; inset:0;
    border: 2px solid transparent;
    border-radius: inherit;
    background: linear-gradient(var(--bg-dark), var(--bg-dark)) padding-box,
                conic-gradient(from var(--angle), transparent 70%, var(--accent), var(--accent2), transparent) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    opacity: 0; transition: opacity 0.4s;
    pointer-events: none;
}
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes rotateBeam {
    to { --angle: 360deg; }
}

.mode-card:hover::after {
    opacity: 1;
    animation: rotateBeam 3s linear infinite;
}

.mode-card:hover, .mode-card:focus {
    transform: translateY(-16px) scale(1.03);
    background: #050505;
    box-shadow: 0 50px 120px rgba(0,0,0,1);
    outline:none;
}

/* Glass Glare sweep */
.mode-card::before {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 100%; height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: skewX(-20deg);
    transition: none;
    z-index: 1;
}
.mode-card:hover::before {
    left: 150%;
    transition: left 0.8s ease-in-out;
}

#btnRacing:hover { border-color: var(--accent); }
#btnArtillery:hover { border-color: var(--accent2); }
.artillery-img {
    filter: drop-shadow(0 0 20px rgba(188, 0, 255, 0.4)) drop-shadow(0 0 40px rgba(0, 242, 255, 0.2));
}

.mode-card-img {
    width: 130px;
    height: auto;
    margin: 0 auto 30px auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.8));
    transition: var(--transition);
}
.mode-card:hover .mode-card-img {
    transform: scale(1.15) rotate(-3deg);
}
.mode-title {
    font-family: var(--font-display); font-size: 32px; font-weight:900;
    letter-spacing:10px; margin-bottom:16px; position:relative;
    color: #fff;
    text-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}
.mode-desc {
    font-size:16px; color:var(--text-dim); line-height:1.6; position:relative;
    letter-spacing: 1.5px; text-transform: uppercase;
}

/* Main Menu Footer */
.menu-footer {
    margin-top: 40px;
    opacity: 0.6;
    transition: var(--transition);
}
.menu-footer:hover { opacity: 1; }
.footer-link {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--text-dim);
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.footer-link:hover {
    color: var(--accent);
    background: rgba(0, 242, 255, 0.05);
    border-color: rgba(0, 242, 255, 0.2);
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Terms Modal Specifics */
.terms-card {
    max-width: 800px;
    width: 90%;
}
.terms-content {
    max-height: 50vh;
    overflow-y: auto;
    text-align: left;
    padding: 20px;
    margin: 20px 0;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    font-family: var(--font-body);
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}
.terms-content::-webkit-scrollbar { width: 6px; }
.terms-content::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }
.terms-content h3 {
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 1px;
    margin: 20px 0 10px;
    text-transform: uppercase;
}
.terms-content p { margin-bottom: 15px; font-size: 15px; }

.hud-top-bar {
    display:flex; gap:10px; padding:10px;
    z-index:100; position:absolute; 
    top: 10px; left: 0; right: 0;
    justify-content: center;
    align-items: center;
    width: 100%;
    pointer-events: none;
}
.hud-item { 
    background: rgba(15, 15, 25, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 20px; border-radius: 12px;
    display:flex; flex-direction:column; align-items:center; gap:2px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    min-width: 80px; justify-content: center;
    pointer-events: auto;
    position: relative; overflow: hidden;
    transition: all 0.3s ease;
}
.hud-item::after {
    content:''; position:absolute; top:-50%; left:-50%; width:200%; height:200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.03), transparent);
    transform: rotate(45deg);
    animation: sheen 6s infinite;
}
@keyframes sheen {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.hud-label { color:#fff; font-size:10px; font-weight: 900; font-family: var(--font-display); letter-spacing: 2px; opacity: 0.4; text-transform: uppercase; }
.hud-val { color:var(--accent); font-size:22px; font-weight:900; font-family: var(--font-display); line-height: 1; }

/* Subtle Glows for Stats */
.hud-item:has(#artScore), .hud-item:has(#galScore) { box-shadow: 0 10px 40px rgba(251, 192, 45, 0.15); border-color: rgba(251, 192, 45, 0.2); }
.hud-item:has(#artWave), .hud-item:has(#galWave) { box-shadow: 0 10px 40px rgba(0, 229, 255, 0.15); border-color: rgba(0, 229, 255, 0.2); }
.hud-item:has(#artWPM), .hud-item:has(#galWPM) { box-shadow: 0 10px 40px rgba(255, 45, 85, 0.15); border-color: rgba(255, 45, 85, 0.2); }

.hud-back {
    background: rgba(255,45,85,0.1); border: 2px solid #ff2d55;
    width: 42px; height: 42px; border-radius: 50%;
    cursor:pointer; font-size:18px;
    color:#ff2d55; transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display:flex; align-items:center; justify-content:center;
    box-shadow: 0 0 20px rgba(255,45,85,0.4);
    pointer-events: auto;
    margin-left: 10px;
    animation: breatheDanger 3s infinite;
}
@keyframes breatheDanger {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255,45,85,0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(255,45,85,0.6); }
}
.hud-back:hover { background: #ff2d55; color:#fff; transform: scale(1.15) rotate(90deg); }

/* Stats Colors */
#artScore, #galScore { color: #fbc02d; }
#artWave, #galWave { color: #00e5ff; }
#artWPM, #galWPM { color: #ff2d55; }
#artLives, #galLives { color: #ff2d55; text-shadow: 0 0 10px rgba(255,45,85,0.5); }
#racingAccStr { color: #fbc02d; }
#racingLvlStr { color: #00e5ff; }
#racingWPMStr { color: #ff2d55; }

/* ======================== BUTTONS ======================== */
.fury-btn {
    display:inline-block; padding:16px 48px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text); 
    font-family:var(--font-display);
    font-size:14px; font-weight:700; letter-spacing:3px;
    border-radius: var(--radius); cursor:pointer;
    transition: var(--transition);
    user-select:none;
    text-transform:uppercase;
    backdrop-filter: blur(10px);
}
.fury-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-2px);
}
.fury-btn.secondary {
    background: transparent;
}
.fury-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}

/* ======================== RACING MODE ======================== */
#racingScreen { background: transparent; overflow:hidden; }
#racingCanvas { position:absolute; inset:0; width:100%; height:100%; z-index:1; object-fit: cover; }

.racing-hud-new {
    position:absolute; inset:0; z-index:10; pointer-events:none;
    display:flex; flex-direction:column; justify-content:space-between;
}

.hud-top {
    display:flex; justify-content:space-between; align-items:center;
    padding: 24px 48px; width: 100%; gap: 15px;
}
.time-box, .pos-box, .level-box, .words-box {
    background: #000; border: 2px solid #333;
    color: #fff; padding: 12px 28px;
    border-radius: 22px; font-size: 24px; font-weight: 900;
    font-family: var(--font-display);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex; align-items: baseline; gap: 8px;
    min-height: 54px; /* Fix heights for racing hud items */
}
.level-box span span, .pos-box span span {
    color: #00f2ff; /* Level value color */
}
.words-box span span {
    color: #ff2d55; /* Words value color */
}
.pos-box span span {
    color: #ffeb3b; /* Position value color */
}
.progress-box {
    flex-grow: 1; margin: 0 20px;
    background: #111; border: 1px solid #333;
    height: 38px; border-radius: 8px;
    position: relative; overflow: hidden;
    box-shadow: inset 0 4px 10px rgba(0,0,0,0.8);
}
.progress-track {
    position: absolute; inset: 0;
    display: flex; align-items: center; padding: 0 5px;
}
.track-car-dot {
    position: absolute; width: 24px; height: 10px;
    border-radius: 2px; box-shadow: 0 0 5px rgba(255,255,255,0.2);
    transition: left 0.1s linear;
}

.hud-bottom {
    display:flex; justify-content:center; align-items:flex-end;
    padding-bottom: 60px; width: 100%; position:relative; pointer-events:auto;
}
.word-container {
    display:flex; gap: 8px;
    padding: 12px;
}
.word-char {
    width: 60px; height: 74px;
    background: #fff;
    color: #000;
    font-size: 42px; font-weight: 900;
    font-family: var(--font-display);
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    transition: 0.1s;
    border: 2px solid #ccc;
}
.word-char.current {
    background: #ff2d55; /* Red highlight */
    color: #fff;
    border-color: #ff2d55;
    transform: scale(1.05);
}
.word-char.typed {
    background: #eee;
    color: #bbb;
}

.audio-btn {
    position: absolute; bottom: 40px; right: 40px;
    background: #000; color: #fff;
    padding: 16px 32px; border-radius: 40px;
    border: 2px solid var(--accent); cursor: pointer;
    font-weight: 900; font-family: var(--font-display);
    letter-spacing: 2px;
    transition: var(--transition);
    user-select:none;
}
.audio-btn:hover {
    background: var(--accent); color: #000;
    box-shadow: 0 0 30px var(--accent-glow);
}

/* ======================== ARTILLERY MODE — SIMPLE NEON-GLOW UI ================ */
#artilleryScreen { background: #050505; overflow:hidden; }
#artilleryCanvas { position:absolute; inset:0; width:100%; height:100%; z-index:1; object-fit: cover; }

.artillery-hud {
    position:absolute; inset:0; z-index:10; pointer-events:none;
    display:flex; flex-direction:column; align-items: center;
    padding: 20px;
}

/* ======================== NEON LEAK VISUAL SYSTEM ======================== */
#artilleryScreen { 
    background: #020205; 
    overflow:hidden;
    perspective: 1000px;
}

.neon-flow-hud {
    position: absolute;
    top: 40px; right: 60px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 100;
}

.neon-wpm-pulsar {
    font-family: var(--font-display);
    font-size: 84px; font-weight: 900;
    color: #fff;
    text-shadow: 0 0 30px rgba(0, 242, 255, 0.6);
    line-height: 0.8;
    animation: pulsar 2s infinite alternate ease-in-out;
}

@keyframes pulsar {
    0% { transform: scale(1); opacity: 0.8; filter: blur(0px); }
    100% { transform: scale(1.1); opacity: 1; filter: blur(1px); }
}

.neon-wpm-label {
    font-family: var(--font-mono);
    font-size: 14px; letter-spacing: 6px;
    color: var(--accent); opacity: 0.6;
    margin-top: 10px;
}

.neon-combo-meter {
    margin-top: 20px;
    font-family: var(--font-mono);
    font-size: 16px; letter-spacing: 2px;
    color: var(--accent2);
    text-transform: uppercase;
}

/* Vertical System Stability (Replacing Lives) */
.neon-level-indicator {
    position: absolute;
    left: 60px; top: 15%; bottom: 15%;
    width: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.neon-level-fill {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 100%;
    background: linear-gradient(to top, var(--accent2), #ffeb3b, var(--accent));
    transition: height 0.3s ease;
    box-shadow: 0 0 15px var(--accent-glow);
}

.art-layer-hud {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 20;
    font-family: var(--font-mono);
    color: #fff;
}

.art-corner-stats.tl {
    position: absolute; top: 40px; left: 100px;
    display: flex; flex-direction: column;
}

.art-title-raw {
    font-family: var(--font-display);
    font-size: 14px; letter-spacing: 3px;
    text-transform: uppercase; opacity: 0.4;
}

.art-val-raw {
    font-family: var(--font-display);
    font-size: 24px; font-weight: 900;
    color: var(--text);
}

.art-location-tag {
    position: absolute; bottom: 40px; left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 14px; letter-spacing: 8px;
    color: var(--accent); opacity: 0.5;
}

.art-abort-raw {
    position: absolute; bottom: 40px; right: 60px;
    font-family: var(--font-mono);
    font-size: 12px; letter-spacing: 2px;
    cursor: pointer; pointer-events: auto;
    display: flex; align-items: center; gap: 15px;
    opacity: 0.4; transition: 0.3s;
}

.art-abort-raw:hover { opacity: 1; color: var(--accent2); }

.art-abort-x-raw {
    border: 1px solid var(--accent2);
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
}

/* Bubbles & Floating Words */
.neon-word-bubble {
    position: absolute;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 40px;
    font-family: var(--font-mono);
    font-size: 20px; font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* ======================== RESULT SCREENS ======================== */
.result-overlay {
    position: fixed; inset: 0; z-index: 50;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(10px);
    opacity: 0; pointer-events: none;
    transition: opacity var(--transition);
}
.result-overlay.show {
    opacity: 1; pointer-events: auto;
}

/* Responsive HUD for Artillery */
@media (max-width: 768px) {
    .art-hud-simple {
        gap: 8px; padding-top: 5px;
    }
    .art-box {
        min-width: 70px; padding: 6px 12px;
    }
    .art-val-small {
        font-size: 18px;
    }
    .art-progress-container {
        width: 90%; bottom: 20px;
    }
}
.result-card {
    background: rgba(15, 15, 25, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 60px; text-align: center;
    min-width: 450px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    transform: translateY(30px) scale(0.95);
    transition: transform var(--transition);
}
.result-overlay.show .result-card {
    transform: translateY(0) scale(1);
}

.result-title {
    font-family: var(--font-display);
    font-size: 32px; font-weight: 900;
    letter-spacing: 4px; color: #fff;
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.result-stats {
    display: flex; flex-direction: column; gap: 20px;
    margin-bottom: 50px;
}

.rs {
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--font-mono); font-size: 20px;
    padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.rs span:first-child { color: var(--text-dim); text-transform: uppercase; letter-spacing: 2px; font-size: 14px;}
.rs span:last-child { color: var(--accent); font-weight: bold; font-size: 28px; text-shadow: 0 0 15px var(--accent-glow);}

.result-actions {
    display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
}

.art-target-word {
    position: fixed; bottom: 40px; left: 0; right: 0;
    display: flex; gap: 8px; justify-content: center;
    padding: 15px 20px;
    width: 100%;
    overflow: visible;
}
.art-target-word .word-char {
    flex: 0 1 auto;
    width: 60px; max-width: 6.5vw; height: 75px; 
    background: rgba(255, 255, 255, 0.05); /* Match Galaxy Ops style for consistency */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: clamp(20px, 4vw, 42px); font-weight: 900;
    color: var(--text-dim); text-transform: uppercase;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.art-target-word .word-char.typed {
    background: var(--accent); color: #000; border-color: var(--accent);
    box-shadow: 0 0 25px var(--accent-glow);
    animation: charPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.art-target-word .word-char.current {
    box-shadow: 0 0 20px #ff2d55;
    transform: scale(1.1);
}

.art-start-overlay {
    position:absolute; inset:0; z-index:20;
    display:flex; align-items:center; justify-content:center;
    background: rgba(0,0,0,0.85); backdrop-filter:blur(15px);
}
.art-start-card {
    background: #000;
    border: 2px solid #333;
    border-radius: var(--radius); padding: 50px;
    text-align:center; width: 100%; max-width: 500px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
}
.art-start-title {
    font-family: var(--font-display); font-size: 32px; font-weight: 900;
    letter-spacing: 4px; color: #fff; margin-bottom: 40px;
}

/* ======================== ANIMATIONS ======================== */
@keyframes fadeScaleUp {
    from { opacity:0; transform: scale(0.9) translateY(40px); }
    to { opacity:1; transform: scale(1) translateY(0); }
}

@keyframes shakeAnim {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}
/* ======================== NEON LEVEL UP ALERTS ======================== */
.neon-levelup-alert {
    position: absolute;
    top: 40%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.neon-levelup-alert.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: drop-shadow(0 0 30px var(--accent-glow));
}

.alert-glitch-text {
    font-family: var(--font-display);
    font-size: 80px; font-weight: 900;
    color: #fff;
    text-shadow: 3px 3px #ff2d55, -3px -3px #00f2ff;
    letter-spacing: 15px;
    margin: 0;
}

.alert-subtext {
    font-family: var(--font-mono);
    font-size: 18px; color: var(--accent);
    letter-spacing: 5px; margin-top: 10px;
    text-transform: uppercase;
    opacity: 0.8;
}

@keyframes neonPulse {
    0%, 100% { filter: brightness(1); transform: scale(1); }
    50% { filter: brightness(1.5); transform: scale(1.05); }
}

.shake { animation: shakeAnim 0.3s ease; }

/* ======================== GALAXY MODE ======================== */
#galaxyScreen { background: transparent; overflow: hidden; }
#galaxyCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; object-fit: cover; }

.galaxy-hud {
    position: absolute; inset: 0;
    pointer-events: none;
    display: flex; flex-direction: column;
    justify-content: space-between;
    padding: 30px;
}
#galLives { color: #ff2d55; text-shadow: 0 0 10px rgba(255,45,85,0.5); }

.hud-top-bar > * { pointer-events: auto; }
.galaxy-bottom-hud {
    display: flex; justify-content: center; align-items: flex-end;
    padding-bottom: 60px; pointer-events: auto;
}

.galaxy-typing-container {
    display: flex; gap: 10px; justify-content: center;
    padding: 20px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

.galaxy-typing-container .word-char {
    flex: 0 1 auto;
    width: 64px; max-width: 7vw; height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: clamp(24px, 5vw, 48px); font-weight: 900;
    color: var(--text-dim); text-transform: uppercase;
    transition: all 0.1s ease;
    box-sizing: border-box;
}

.galaxy-typing-container .word-char.current {
    background: rgba(0, 242, 255, 0.1);
    border: 2px solid var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
    transform: scale(1.1);
}

.galaxy-typing-container .word-char.typed {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
    animation: charPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes charPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); filter: brightness(1.5); }
    100% { transform: scale(1); }
}

.galaxy-typing-container .word-char.error {
    background: var(--accent2);
    border-color: var(--accent2);
    color: #fff;
    box-shadow: 0 0 15px var(--accent2-glow);
    animation: shakeAnim 0.2s infinite;
}

/* --- Galaxy HUD Simple Redesign --- */
.art-header-simple {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 15px;
    width: 100%;
    pointer-events: none;
    z-index: 100;
}

.art-box {
    background: rgba(15, 15, 25, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    pointer-events: auto;
    min-width: 100px;
    transition: transform 0.3s ease;
}

.art-box:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.art-label-small {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    font-weight: 900;
    font-family: var(--font-display);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.art-val-small {
    font-size: 20px;
    font-weight: 900;
    font-family: var(--font-display);
    line-height: 1.1;
}

.art-hearts-simple {
    color: #ff2d55;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(255, 45, 85, 0.5);
    line-height: 1;
}

.art-close-simple {
    margin-left: auto;
    background: rgba(255, 45, 85, 0.1);
    border: 1px solid #ff2d55;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff2d55;
    font-size: 20px;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 15px rgba(255, 45, 85, 0.3);
}

.art-close-simple:hover {
    background: #ff2d55;
    color: #fff;
    transform: rotate(90deg) scale(1.15);
    box-shadow: 0 0 30px rgba(255, 45, 85, 0.6);
}

.galaxy-img {
    filter: drop-shadow(0 0 20px var(--accent-glow));
}
