/* ============================================
   NoppiGuardian — Premium Design System v2
   Silicon Valley Grade Overhaul
   ============================================ */

/* === CSS Custom Properties === */
:root {
    /* Core Palette — Deep Enchanted Forest */
    --bg-deep: #030a06;
    --bg-primary: #061210;
    --bg-secondary: #0a1f18;
    --bg-tertiary: #0e2a20;
    --bg-glass: rgba(8, 28, 18, 0.65);
    --bg-glass-heavy: rgba(6, 18, 12, 0.82);
    --bg-glass-light: rgba(14, 42, 28, 0.45);

    /* Accent Colors — Bioluminescent */
    --accent-green: #44f088;
    --accent-green-mid: #2ab866;
    --accent-green-dim: #18704a;
    --accent-green-ultra: #66ffaa;
    --accent-gold: #ffd060;
    --accent-gold-dim: #aa8830;
    --accent-amber: #f0a840;
    --accent-red: #ff4466;
    --accent-red-dim: #882233;
    --accent-blue: #44aaff;
    --accent-blue-dim: #1a5588;
    --accent-purple: #aa66ff;
    --accent-purple-dim: #553388;
    --accent-cyan: #44ffd8;
    --accent-pink: #ff66aa;

    /* Text */
    --text-primary: #e4f2e8;
    --text-secondary: rgba(228, 242, 232, 0.6);
    --text-dim: rgba(228, 242, 232, 0.28);
    --text-accent: var(--accent-green);

    /* Borders */
    --border-subtle: rgba(68, 240, 136, 0.08);
    --border-glass: rgba(68, 240, 136, 0.12);
    --border-active: rgba(68, 240, 136, 0.25);
    --border-glow: rgba(68, 240, 136, 0.4);

    /* Shadows / Glow */
    --glow-green: 0 0 20px rgba(68, 240, 136, 0.15), 0 0 60px rgba(68, 240, 136, 0.06);
    --glow-green-strong: 0 0 30px rgba(68, 240, 136, 0.35), 0 0 80px rgba(68, 240, 136, 0.12);
    --glow-gold: 0 0 20px rgba(255, 208, 96, 0.2), 0 0 60px rgba(255, 208, 96, 0.08);
    --glow-red: 0 0 24px rgba(255, 68, 102, 0.3);
    --glow-blue: 0 0 20px rgba(68, 170, 255, 0.2);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 16px 64px rgba(0, 0, 0, 0.6);

    /* Spacing */
    --sp-2xs: 2px;
    --sp-xs: 4px;
    --sp-sm: 8px;
    --sp-md: 16px;
    --sp-lg: 24px;
    --sp-xl: 32px;
    --sp-2xl: 48px;
    --sp-3xl: 64px;

    /* Radius */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --radius-full: 100px;

    /* Typography */
    --font-display: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Outfit', -apple-system, sans-serif;
    --font-serif: 'Crimson Pro', Georgia, serif;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

/* === Screen Management === */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    z-index: 1;
}

.screen.active {
    display: flex;
}

/* === Overlay === */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 3, 0.88);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.4s var(--ease-out);
}

.overlay.hidden {
    display: none;
}

.overlay-card {
    background: var(--bg-glass-heavy);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: var(--sp-xl) var(--sp-lg);
    max-width: 380px;
    width: 92%;
    text-align: center;
    animation: cardReveal 0.6s var(--ease-spring);
    box-shadow: var(--shadow-heavy), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
}

/* === Buttons === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    background: linear-gradient(135deg, #2ab866 0%, #44f088 50%, #2ab866 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: #041a0c;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    padding: 17px 44px;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.35s var(--ease-out);
    box-shadow: 0 4px 24px rgba(68, 240, 136, 0.25), 0 0 0 1px rgba(68, 240, 136, 0.15);
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

/* Warm gradient variant inspired by premium mobile games */
.pulse-glow {
    background: linear-gradient(135deg, #2ab866 0%, #44f088 30%, #66ffaa 60%, #44f088 100%);
    background-size: 300% 300%;
    animation: gradientShift 3s ease infinite, pulseGlowAnim 2s ease-in-out infinite;
}

@keyframes pulseGlowAnim {

    0%,
    100% {
        box-shadow: 0 4px 24px rgba(68, 240, 136, 0.25), 0 0 0 1px rgba(68, 240, 136, 0.15);
    }

    50% {
        box-shadow: 0 6px 36px rgba(68, 240, 136, 0.45), 0 0 0 2px rgba(68, 240, 136, 0.25), 0 0 80px rgba(68, 240, 136, 0.1);
    }
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 40px rgba(68, 240, 136, 0.4), 0 0 0 1px rgba(68, 240, 136, 0.3);
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0) scale(0.97);
    transition-duration: 0.1s;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    background: var(--bg-glass-light);
    color: var(--accent-green);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    padding: 13px 28px;
    border: 1.5px solid var(--border-active);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(68, 240, 136, 0.1);
    border-color: var(--accent-green);
    box-shadow: var(--glow-green);
    transform: translateY(-2px);
}

.btn-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* ============================================
   SPLASH SCREEN — Cinematic
   ============================================ */
#splash-screen {
    background: var(--bg-deep);
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.splash-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Atmospheric gradient mesh */
.splash-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 80%, rgba(68, 240, 136, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(255, 208, 96, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 100% 80% at 50% 50%, rgba(10, 40, 25, 0.8) 0%, transparent 70%);
    animation: meshShift 15s ease-in-out infinite alternate;
}

.particle-field {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.splash-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at center, transparent 20%, var(--bg-deep) 85%);
}

.splash-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-lg);
    padding: var(--sp-xl);
}

/* Emblem — Triple Ring Sigil */
.splash-emblem {
    position: relative;
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--sp-md);
}

.emblem-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
}

.ring-1 {
    width: 170px;
    height: 170px;
    border-color: rgba(68, 240, 136, 0.15);
    animation: emblemSpin 25s linear infinite;
    border-style: dashed;
    border-width: 1px;
}

.ring-2 {
    width: 135px;
    height: 135px;
    border-color: rgba(255, 208, 96, 0.1);
    animation: emblemSpin 18s linear infinite reverse;
}

.ring-3 {
    width: 100px;
    height: 100px;
    border-color: rgba(68, 240, 136, 0.25);
    animation: emblemSpin 12s linear infinite;
    border-width: 1.5px;
}

.emblem-icon {
    font-size: 72px;
    filter: drop-shadow(0 0 30px rgba(68, 240, 136, 0.6)) drop-shadow(0 0 60px rgba(68, 240, 136, 0.25));
    animation: emblemFloat 4s ease-in-out infinite;
}

.splash-title {
    font-family: var(--font-display);
    font-size: 54px;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
    text-align: center;
}

.title-noppi {
    color: var(--accent-green);
    text-shadow: 0 0 40px rgba(68, 240, 136, 0.4), 0 0 80px rgba(68, 240, 136, 0.15);
}

.title-guardian {
    color: var(--accent-gold);
    text-shadow: 0 0 40px rgba(255, 208, 96, 0.3), 0 0 80px rgba(255, 208, 96, 0.1);
}

.splash-subtitle {
    font-family: var(--font-serif);
    font-size: 18px;
    font-style: italic;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
}

.splash-stats-ticker {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 10px var(--sp-lg);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-value {
    font-weight: 800;
    font-size: 15px;
    color: var(--accent-green);
}

.stat-value.blink-critical {
    color: var(--accent-red);
    animation: blinkCritical 2s ease-in-out infinite;
}

.stat-label {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.stat-divider {
    color: rgba(255, 255, 255, 0.08);
    font-size: 16px;
}

.splash-footnote {
    font-family: var(--font-serif);
    font-size: 12px;
    color: var(--text-dim);
    font-style: italic;
    margin-top: var(--sp-sm);
}

/* ============================================
   ONBOARDING — Canvas Cinematic + Overlay Content
   ============================================ */
#onboarding-screen {
    background: var(--bg-deep);
    position: relative;
    overflow: hidden;
    padding: 0;
}

#onboarding-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.onboarding-content-layer {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.onboarding-slides {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.onboard-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--ease-out);
    pointer-events: none;
}

.onboard-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.onboard-slide.exit-left {
    opacity: 0;
    transform: translateY(-30px);
}

/* Slide bottom content card — frosted glass */
.slide-bottom-content {
    width: 100%;
    padding: var(--sp-xl) var(--sp-lg) var(--sp-lg);
    background: linear-gradient(to top,
            rgba(3, 10, 6, 0.98) 0%,
            rgba(3, 10, 6, 0.95) 40%,
            rgba(3, 10, 6, 0.8) 65%,
            rgba(3, 10, 6, 0.4) 85%,
            transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-md);
    text-align: center;
    min-height: 40%;
}

/* Slide Badges — Premium category labels */
.slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.danger-badge {
    background: rgba(255, 68, 102, 0.12);
    border: 1px solid rgba(255, 68, 102, 0.2);
    color: var(--accent-red);
    box-shadow: 0 0 20px rgba(255, 68, 102, 0.08);
    animation: badgePulse 3s ease-in-out infinite;
}

.guardian-badge {
    background: rgba(68, 240, 136, 0.1);
    border: 1px solid rgba(68, 240, 136, 0.2);
    color: var(--accent-green);
    box-shadow: 0 0 20px rgba(68, 240, 136, 0.08);
}

.social-badge {
    background: rgba(68, 170, 255, 0.1);
    border: 1px solid rgba(68, 170, 255, 0.2);
    color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(68, 170, 255, 0.08);
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 68, 102, 0.08);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 68, 102, 0.2);
    }
}

.slide-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: -1px;
    line-height: 1.1;
}

.slide-text {
    font-size: 16px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.7;
    max-width: 360px;
}

.slide-text strong {
    color: var(--accent-red);
    font-weight: 700;
}

.slide-source {
    font-size: 11px;
    color: var(--text-dim);
    font-style: italic;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.onboard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-md) var(--sp-lg) var(--sp-lg);
    position: relative;
    z-index: 2;
    background: rgba(3, 10, 6, 0.95);
    pointer-events: auto;
}

.onboard-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    transition: all 0.4s var(--ease-spring);
    cursor: pointer;
}

.dot.active {
    background: var(--accent-green);
    width: 28px;
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(68, 240, 136, 0.5);
}

/* Sound toggle button */
.btn-sound {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    z-index: 15;
    transition: all 0.25s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-sound:hover {
    background: rgba(68, 240, 136, 0.08);
    border-color: var(--border-active);
}

/* ============================================
   GAME SCREEN — Immersive Arena
   ============================================ */
#game-screen {
    background: var(--bg-deep);
    flex-direction: column;
}

/* === Top HUD — Premium Glassmorphism === */
.game-hud-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px var(--sp-md) 10px var(--sp-md);
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border-bottom: 1px solid var(--border-glass);
    z-index: 10;
    flex-shrink: 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.hud-tree-status {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 8px 4px 4px;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.hud-tree-status:hover {
    background: rgba(68, 240, 136, 0.06);
}

.tree-portrait {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portrait-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--accent-green);
    animation: emblemSpin 8s linear infinite;
    box-shadow: 0 0 12px rgba(68, 240, 136, 0.2);
}

.portrait-emoji {
    font-size: 24px;
    filter: drop-shadow(0 0 6px rgba(68, 240, 136, 0.3));
}

.tree-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tree-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.tree-state {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
}

.state-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green), 0 0 2px var(--accent-green);
    animation: statePulse 2s ease-in-out infinite;
}

.state-text {
    color: var(--accent-green);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Vital Bars — Refined */
.hud-vitals {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    max-width: 140px;
    margin: 0 var(--sp-md);
}

.vital-bar {
    display: flex;
    align-items: center;
    gap: 5px;
}

.vital-icon {
    font-size: 13px;
    width: 18px;
    text-align: center;
}

.vital-track {
    flex: 1;
    height: 7px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.vital-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green-dim), var(--accent-green));
    border-radius: 3px;
    transition: width 0.6s var(--ease-out);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
}

.vital-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12));
    border-radius: 3px;
}

.vital-fill.shield {
    background: linear-gradient(90deg, var(--accent-blue-dim), var(--accent-blue));
}

.vital-val {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 24px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Resource Pills — Premium */
.hud-resources {
    display: flex;
    gap: 8px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-glass);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.res-icon {
    font-size: 14px;
}

.res-val {
    font-weight: 800;
    font-size: 14px;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* === Wave Banner === */
.wave-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-md);
    padding: 6px var(--sp-md);
    background: linear-gradient(90deg, transparent 5%, rgba(255, 68, 102, 0.06) 50%, transparent 95%);
    border-bottom: 1px solid rgba(255, 68, 102, 0.08);
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.5s var(--ease-spring);
}

.wave-banner.visible {
    opacity: 1;
    transform: translateY(0);
}

.wave-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 4px;
    color: rgba(255, 68, 102, 0.5);
}

.wave-number {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent-red);
    text-shadow: 0 0 20px rgba(255, 68, 102, 0.4);
    font-variant-numeric: tabular-nums;
}

.wave-threat {
    font-size: 12px;
    color: var(--accent-amber);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* === Game Arena — The Living Canvas === */
.game-arena {
    flex: 1;
    position: relative;
    overflow: hidden;
    /* Multi-layer atmospheric background */
    background:
        radial-gradient(ellipse 80% 70% at 50% 55%, rgba(14, 42, 28, 0.9), transparent),
        radial-gradient(ellipse 40% 30% at 50% 50%, rgba(68, 240, 136, 0.03), transparent),
        radial-gradient(ellipse 100% 100% at 50% 100%, rgba(6, 18, 12, 1), transparent),
        var(--bg-deep);
}

.game-arena::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 200px at 20% 30%, rgba(68, 240, 136, 0.02), transparent),
        radial-gradient(circle 150px at 80% 70%, rgba(255, 208, 96, 0.015), transparent);
    pointer-events: none;
    z-index: 1;
    animation: ambientShift 20s ease-in-out infinite alternate;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    z-index: 2;
}

/* === Guardian Dock — Compact Single Row === */
.guardian-dock {
    flex-shrink: 0;
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border-top: 1px solid var(--border-glass);
    padding: 8px var(--sp-sm) 10px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
}

.dock-row {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.dock-guardians {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: center;
    flex: 1;
}

.dock-guardians::-webkit-scrollbar {
    display: none;
}

.guardian-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 6px 8px 4px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    min-width: 48px;
    font-family: var(--font-display);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.guardian-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-green);
    opacity: 0;
    transition: opacity 0.3s;
}

.guardian-card:hover,
.guardian-card.selected {
    border-color: var(--border-glow);
    background: rgba(68, 240, 136, 0.08);
    box-shadow: 0 4px 16px rgba(68, 240, 136, 0.12), 0 0 0 1px rgba(68, 240, 136, 0.1);
    transform: translateY(-3px);
}

.guardian-card:hover::before,
.guardian-card.selected::before {
    opacity: 1;
}

.guardian-card.selected {
    border-color: var(--accent-green);
    box-shadow: 0 4px 20px rgba(68, 240, 136, 0.2), 0 0 0 1px rgba(68, 240, 136, 0.3);
}

.guardian-card.disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(0.5);
}

/* Individual guardian card accents */
.guardian-card[data-guardian="gibbon"]::before {
    background: var(--accent-green);
}

.guardian-card[data-guardian="ibis"]::before {
    background: var(--accent-gold);
}

.guardian-card[data-guardian="cobra"]::before {
    background: var(--accent-purple);
}

.guardian-card[data-guardian="elephant"]::before {
    background: var(--accent-amber);
}

.guardian-card[data-guardian="butterfly"]::before {
    background: var(--accent-cyan);
}

.guardian-card[data-guardian="ibis"]:hover,
.guardian-card[data-guardian="ibis"].selected {
    border-color: rgba(255, 208, 96, 0.3);
    background: rgba(255, 208, 96, 0.06);
    box-shadow: 0 4px 16px rgba(255, 208, 96, 0.1);
}

.guardian-card[data-guardian="cobra"]:hover,
.guardian-card[data-guardian="cobra"].selected {
    border-color: rgba(170, 102, 255, 0.3);
    background: rgba(170, 102, 255, 0.06);
    box-shadow: 0 4px 16px rgba(170, 102, 255, 0.1);
}

.guardian-card[data-guardian="elephant"]:hover,
.guardian-card[data-guardian="elephant"].selected {
    border-color: rgba(240, 168, 64, 0.3);
    background: rgba(240, 168, 64, 0.06);
    box-shadow: 0 4px 16px rgba(240, 168, 64, 0.1);
}

.guardian-card[data-guardian="butterfly"]:hover,
.guardian-card[data-guardian="butterfly"].selected {
    border-color: rgba(68, 255, 216, 0.3);
    background: rgba(68, 255, 216, 0.06);
    box-shadow: 0 4px 16px rgba(68, 255, 216, 0.1);
}

.gc-emoji {
    font-size: 26px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s var(--ease-spring);
}

.guardian-card:hover .gc-emoji {
    transform: scale(1.15);
}

.gc-cost {
    font-size: 10px;
    font-weight: 800;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 1px;
}

.res-icon-sm {
    font-size: 9px;
}

/* === Dock Action Buttons — Compact flanking buttons === */
.btn-dock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 10px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
    min-width: 56px;
    flex-shrink: 0;
}

.dock-btn-icon {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dock-btn-icon svg {
    width: 18px;
    height: 18px;
}

.dock-btn-label {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.btn-guard {
    background: linear-gradient(135deg, #881122, #cc2244);
    color: #ffccdd;
    box-shadow: 0 3px 16px rgba(255, 68, 102, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-guard:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 68, 102, 0.35);
    color: #ffffff;
}

.btn-guard:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.btn-support {
    background: linear-gradient(135deg, #113366, #2266aa);
    color: #bbddff;
    box-shadow: 0 3px 16px rgba(68, 170, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-support:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(68, 170, 255, 0.3);
    color: #ffffff;
}

/* ============================================
   WAVE COMPLETE / TREE FALLEN — Overlays
   ============================================ */
.result-emblem {
    font-size: 64px;
    margin-bottom: var(--sp-md);
    animation: resultReveal 0.8s var(--ease-spring);
    filter: drop-shadow(0 4px 20px rgba(255, 208, 96, 0.3));
}

.result-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 900;
    margin-bottom: var(--sp-lg);
    letter-spacing: -0.5px;
}

.fallen-title {
    color: var(--accent-red);
    text-shadow: 0 0 30px rgba(255, 68, 102, 0.3);
}

.fallen-emblem {
    filter: drop-shadow(0 4px 20px rgba(255, 68, 102, 0.4));
    animation: heartbreak 1.5s ease-in-out;
}

.fallen-text {
    font-family: var(--font-serif);
    color: var(--text-secondary);
    margin-bottom: var(--sp-lg);
    font-style: italic;
    font-size: 15px;
    line-height: 1.6;
}

.fallen-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: var(--sp-lg);
    padding: var(--sp-md);
    background: rgba(68, 240, 136, 0.04);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.rstat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.rstat-val {
    font-size: 24px;
    font-weight: 900;
    color: var(--accent-green);
    text-shadow: 0 0 15px rgba(68, 240, 136, 0.3);
}

.rstat-label {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.result-lore {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: var(--sp-lg);
    padding: var(--sp-md);
    border-left: 2px solid var(--accent-green-dim);
    text-align: left;
    line-height: 1.6;
    background: rgba(68, 240, 136, 0.02);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ============================================
   SAVE YOUR SANCTUARY — Registration Prompt
   ============================================ */
.register-card {
    max-width: 380px;
    text-align: center;
}

.register-emblem {
    font-size: 56px;
    margin-bottom: var(--sp-sm);
    animation: resultReveal 0.8s var(--ease-spring);
    filter: drop-shadow(0 4px 24px rgba(68, 240, 136, 0.25));
}

.register-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: var(--sp-sm);
    background: linear-gradient(135deg, var(--accent-green), #88ffbb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.register-subtitle {
    font-family: var(--font-serif);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--sp-lg);
}

/* Telegram one-tap button */
.btn-register-tg {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(135deg, #229ED9 0%, #1a7ab5 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.btn-register-tg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(34, 158, 217, 0.3);
}

.btn-register-tg:active {
    transform: translateY(0);
}

.reg-tg-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.reg-tg-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reg-tg-label {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}

.reg-tg-sublabel {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* Divider */
.reg-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.reg-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-glass);
}

.reg-divider-text {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Registration form fields */
.reg-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.reg-field {
    text-align: left;
}

.reg-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.reg-optional {
    font-weight: 400;
    text-transform: none;
    color: var(--text-dim);
    letter-spacing: 0;
}

.reg-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.reg-input::placeholder {
    color: var(--text-dim);
    font-style: italic;
}

.reg-input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(68, 240, 136, 0.08), 0 0 16px rgba(68, 240, 136, 0.06);
}

.reg-input.error {
    border-color: var(--accent-red);
    animation: shake 0.4s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

.btn-register {
    margin-top: 4px;
    width: 100%;
}

/* Ghost button (Continue as Guest) */
.btn-ghost {
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 20px;
    transition: color 0.3s;
    letter-spacing: 0.3px;
}

.btn-ghost:hover {
    color: var(--text-secondary);
}

.reg-guest-note {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
    opacity: 0.6;
}

/* ============================================
   BIOMETRICS PANEL — Data Visualization
   ============================================ */
.bio-card {
    max-width: 400px;
    text-align: left;
}

.bio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-lg);
}

.bio-header h2 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.bio-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: var(--sp-lg);
}

.bio-item {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    grid-template-rows: auto auto;
    gap: 3px var(--sp-sm);
    align-items: center;
}

.bio-icon {
    grid-row: 1 / 3;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.bio-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.bio-val {
    font-size: 12px;
    font-weight: 800;
    color: var(--accent-green);
    text-align: right;
}

.bio-bar {
    grid-column: 2 / 4;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.bio-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green-dim), var(--accent-green));
    border-radius: 3px;
    transition: width 1s var(--ease-out);
    position: relative;
}

.bio-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15));
}

.bio-fill.heart {
    background: linear-gradient(90deg, #882255, #ff66aa);
}

.bio-fact {
    font-family: var(--font-serif);
    font-size: 13px;
    color: var(--text-dim);
    padding: var(--sp-md);
    background: rgba(255, 255, 255, 0.015);
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--accent-green-dim);
    line-height: 1.6;
}

.bio-fact-source {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-dim);
}

/* ============================================
   ABOUT THE ROSEWOOD — Educational Overlay
   ============================================ */
.btn-about {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.btn-about:hover {
    background: rgba(68, 240, 136, 0.08);
    border-color: var(--border-active);
    transform: scale(1.08);
    box-shadow: var(--glow-green);
}

.about-card {
    max-width: 420px;
    width: 94%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.about-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-lg) var(--sp-lg) var(--sp-md);
    border-bottom: 1px solid var(--border-glass);
    flex-shrink: 0;
}

.about-header h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, var(--accent-green), #88ffbb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-scroll {
    overflow-y: auto;
    padding: var(--sp-md) var(--sp-lg) var(--sp-lg);
    scrollbar-width: thin;
    scrollbar-color: rgba(68, 240, 136, 0.15) transparent;
}

.about-scroll::-webkit-scrollbar {
    width: 4px;
}

.about-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.about-scroll::-webkit-scrollbar-thumb {
    background: rgba(68, 240, 136, 0.15);
    border-radius: 2px;
}

.about-section {
    margin-bottom: var(--sp-lg);
}

.about-section:last-child {
    margin-bottom: 0;
}

/* Species Banner */
.about-species-banner {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-md);
    background: rgba(68, 240, 136, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.species-emoji {
    font-size: 36px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.species-info {
    flex: 1;
    min-width: 120px;
}

.species-name {
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--accent-gold);
    line-height: 1.3;
}

.species-local {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
}

.species-status-badge {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 5px 10px;
    background: rgba(255, 68, 102, 0.1);
    border: 1px solid rgba(255, 68, 102, 0.25);
    border-radius: var(--radius-full);
    color: var(--accent-red);
    animation: badgePulse 3s ease-in-out infinite;
}

/* Section titles */
.about-section-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--sp-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.section-icon {
    font-size: 18px;
}

/* Text paragraphs */
.about-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--sp-sm);
}

.about-text:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

.about-text em {
    font-family: var(--font-serif);
    color: var(--accent-gold);
}

/* Stat Grid */
.about-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: var(--sp-md) 0;
}

.about-stat {
    text-align: center;
    padding: var(--sp-sm) 6px;
    background: rgba(255, 208, 96, 0.04);
    border: 1px solid rgba(255, 208, 96, 0.1);
    border-radius: var(--radius-sm);
}

.about-stat-val {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 0 0 15px rgba(255, 208, 96, 0.25);
}

.about-stat-label {
    font-size: 9px;
    color: var(--text-dim);
    margin-top: 4px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

/* Wildlife Grid */
.about-wildlife-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: var(--sp-sm);
}

.wildlife-item {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.wildlife-item:hover {
    background: rgba(68, 240, 136, 0.03);
    border-color: var(--border-active);
}

.wildlife-emoji {
    font-size: 24px;
    flex-shrink: 0;
}

.wildlife-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.wildlife-info strong {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.wildlife-status {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.wildlife-status.critical {
    background: rgba(255, 68, 102, 0.1);
    border: 1px solid rgba(255, 68, 102, 0.2);
    color: var(--accent-red);
}

.wildlife-status.endangered {
    background: rgba(255, 160, 60, 0.1);
    border: 1px solid rgba(255, 160, 60, 0.2);
    color: #ffa03c;
}

.wildlife-status.vulnerable {
    background: rgba(255, 208, 96, 0.1);
    border: 1px solid rgba(255, 208, 96, 0.2);
    color: var(--accent-gold);
}

/* Quote block */
.about-quote {
    padding: var(--sp-md);
    background: rgba(68, 240, 136, 0.03);
    border-left: 3px solid var(--accent-green-dim);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: var(--sp-md);
}

.about-quote p {
    font-family: var(--font-serif);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
    margin: 0;
}

.about-quote-source {
    display: block;
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 6px;
    font-style: normal;
}

/* Game section highlight */
.about-game-section {
    padding: var(--sp-md);
    background: rgba(68, 240, 136, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
}

/* Sources */
.about-sources {
    padding: var(--sp-md);
    background: rgba(255, 255, 255, 0.015);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.about-source-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.about-source-text {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.5;
    opacity: 0.7;
}

/* ============================================
   ANIMATIONS — Refined & Layered
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes emblemSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes emblemFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes blinkCritical {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

@keyframes threatOrbit {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }

    25% {
        transform: translateY(-12px) rotate(5deg);
        opacity: 1;
    }

    50% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }

    75% {
        transform: translateY(8px) rotate(-5deg);
        opacity: 0.9;
    }
}

@keyframes guardianFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes handPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }
}

@keyframes connectionPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes statePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

@keyframes resultReveal {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-30deg);
    }

    50% {
        transform: scale(1.2) rotate(10deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes heartbreak {

    0%,
    100% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.2) rotate(-8deg);
    }

    30% {
        transform: scale(0.9) rotate(8deg);
    }

    45% {
        transform: scale(1.1) rotate(-4deg);
    }

    60% {
        transform: scale(0.95) rotate(4deg);
    }

    75% {
        transform: scale(1.05);
    }
}

@keyframes meshShift {
    0% {
        transform: scale(1) rotate(0deg);
    }

    100% {
        transform: scale(1.1) rotate(3deg);
    }
}

@keyframes ambientShift {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Splash particles — Fireflies */
.splash-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: fireflyRise linear infinite;
    pointer-events: none;
}

@keyframes fireflyRise {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0) scale(0);
    }

    5% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: translateY(-50vh) translateX(20px);
    }

    95% {
        opacity: 0.1;
    }

    100% {
        opacity: 0;
        transform: translateY(-100vh) translateX(-10px) scale(0.5);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 360px) {
    .splash-title {
        font-size: 42px;
    }

    .splash-stats-ticker {
        gap: 8px;
        padding: 8px 12px;
    }

    .stat-value {
        font-size: 13px;
    }

    .guardian-card {
        padding: 6px 10px 4px;
        min-width: 60px;
    }

    .gc-emoji {
        font-size: 24px;
    }

    .game-hud-top {
        padding: 8px 10px;
    }
}

@media (min-width: 768px) {
    .splash-title {
        font-size: 60px;
    }

    .splash-emblem {
        width: 180px;
        height: 180px;
    }

    .emblem-icon {
        font-size: 72px;
    }

    .ring-1 {
        width: 180px;
        height: 180px;
    }

    .ring-2 {
        width: 146px;
        height: 146px;
    }

    .ring-3 {
        width: 112px;
        height: 112px;
    }

    .guardian-card {
        min-width: 80px;
        padding: 10px 16px 8px;
    }

    .gc-emoji {
        font-size: 32px;
    }
}