/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-purple), var(--neon-cyan));
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-lime), var(--neon-cyan));
    box-shadow: 0 0 10px var(--neon-cyan);
}

/* Firefox Support */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--neon-purple) rgba(0, 0, 0, 0.2);
}

:root {
    --bg-deep: #0f0524;
    --bg-card: rgba(255, 255, 255, 0.08);
    --neon-cyan: #00f2ff;
    --neon-lime: #a2ff00;
    --neon-purple: #bc00ff;
    --neon-gold: #ffd700;
    --neon-pink: #ff007b;
    --neon-orange: #ff9d00;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    overflow: hidden;
    height: 100dvh;
    width: 100vw;
    position: fixed;
}

#app {
    height: 100%;
}

.game-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    background: radial-gradient(circle at center, var(--bg-deep) 0%, #000 100%);
    position: relative;
    overflow: hidden;
    transition: background 1.5s ease;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.hud {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 150;
    pointer-events: none;
    transition: top 0.3s ease, transform 0.3s ease;
    width: auto;
    max-width: 90%;
    will-change: transform, top;
}

@media (max-width: 600px) {
    .hud {
        top: 15px;
        width: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

#currency-pane {
    padding: 8px 12px;
    border-radius: 16px;
    pointer-events: auto;
    min-width: 140px;
}

.grid-hud {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: center;
}

.currency-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 2px 8px;
}

.main-currency {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 4px;
}

.sub-currency {
    background: transparent;
    border-radius: 8px;
    padding: 4px 6px;
}

.currency-item .label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.currency-item .value {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.value {
    font-size: 0.95rem;
    font-weight: 700;
}

/* Objective Tracker */
#objective-tracker {
    position: absolute;
    top: 160px;
    right: 15px;
    width: 180px;
    padding: 10px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
    pointer-events: auto;
    text-align: center;
    transition: top 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 600px),
(pointer: coarse) {
    #objective-tracker {
        top: 115px;
        /* Directly under Minimap */
        right: 15px;
        left: auto;
        transform: none;
        width: 140px;
        padding: 8px;
    }
}

.objective-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 600px),
(pointer: coarse) {
    .objective-label {
        font-size: 0.55rem;
    }
}

.objective-text {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.3;
    word-break: normal;
    overflow-wrap: break-word;
}

@media (max-width: 600px),
(pointer: coarse) {
    .objective-text {
        font-size: 0.6rem;
    }
}

#level-up-btn {
    display: none;
    width: 100%;
    min-height: 36px;
    margin-top: 4px;
}

/* Minimap */
#minimap {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 140px;
    height: 140px;
    border-radius: 12px;
    padding: 4px;
    z-index: 10;
    pointer-events: auto;
    transition: width 0.3s ease, height 0.3s ease, right 0.3s ease;
}

@media (max-width: 600px),
(pointer: coarse) {
    #minimap {
        width: 90px;
        height: 90px;
    }
}

#minimap-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    overflow: hidden;
}

.minimap-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.player-dot {
    background: var(--neon-cyan);
    box-shadow: 0 0 4px var(--neon-cyan);
    z-index: 3;
}

.forge-dot {
    background: var(--neon-lime);
    width: 6px;
    height: 6px;
    box-shadow: 0 0 6px var(--neon-lime);
    z-index: 2;
}

.tree-dot {
    background: rgba(162, 255, 0, 0.6);
    z-index: 1;
}

.shrine-dot {
    background: var(--neon-purple);
    width: 6px;
    height: 6px;
    box-shadow: 0 0 6px var(--neon-purple);
    z-index: 2;
    animation: shrine-dot-pulse 2s infinite;
}

@keyframes shrine-dot-pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }
}



.neon-cyan {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.neon-lime {
    color: var(--neon-lime);
    text-shadow: 0 0 10px var(--neon-lime);
}

.neon-gold {
    color: var(--neon-gold);
    text-shadow: 0 0 10px var(--neon-gold);
}

.world-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    touch-action: none;
}

#game-world {
    position: absolute;
    width: 2000px;
    height: 2000px;
    transform: translate(0, 0);
    background-color: #0a041a;
    background-image: radial-gradient(circle at 2px 2px, rgba(188, 0, 255, 0.1) 1px, transparent 0);
    background-size: 50px 50px;
    box-shadow: inset 0 0 200px 150px rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(188, 0, 255, 0.1);
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.layer-1 {
    background: radial-gradient(circle at 20% 30%, rgba(0, 242, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(188, 0, 255, 0.05) 0%, transparent 40%);
}

.character {
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 5;
    transform-origin: center bottom;
    transition: transform 0.1s ease-out;
}

.char-sprite {
    font-size: 32px;
    text-align: center;
    filter: drop-shadow(0 0 10px var(--neon-cyan));
    animation: bounce 1s infinite ease-in-out;
}

.pet-wisp {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-cyan);
    z-index: 6;
    pointer-events: none;
    transition: transform 0.1s linear;
}

.char-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.light-forge {
    position: absolute;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: filter 0.3s, transform 0.3s;
    transform-origin: center center;
}

.forge-glow {
    position: absolute;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(162, 255, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: forge-pulse 2s infinite ease-in-out;
}

.forge-icon {
    font-size: 64px;
    filter: drop-shadow(0 0 20px var(--neon-lime));
}

.forge-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--neon-lime);
    margin-top: 8px;
    text-shadow: 0 0 10px var(--neon-lime);
}

.shrine-icon {
    font-size: 54px;
    filter: drop-shadow(0 0 20px var(--neon-purple));
}

.shrine-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(188, 0, 255, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    animation: shrine-pulse 2s infinite ease-in-out;
}

@keyframes shrine-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes forge-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.source-tree {
    position: absolute;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: filter 0.3s, transform 0.3s;
    transform-origin: center center;
}

.harvest-particle {
    position: absolute;
    pointer-events: none;
    font-size: 14px;
    z-index: 6;
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.sell-particle {
    position: absolute;
    pointer-events: none;
    font-size: 16px;
    z-index: 6;
    color: var(--neon-lime);
    filter: drop-shadow(0 0 8px var(--neon-lime));
}

.tree-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(162, 255, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: tree-pulse 4s infinite ease-in-out;
}

.tree-icon {
    font-size: 48px;
    filter: drop-shadow(0 0 15px var(--neon-lime));
}

@keyframes tree-pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.star-tree-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: tree-pulse 3s infinite ease-in-out;
}

.star-tree-icon {
    font-size: 54px;
    filter: drop-shadow(0 0 20px var(--neon-gold));
    animation: star-pulse 2s infinite ease-in-out;
}

@keyframes star-pulse {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Dynamic Floating Joystick */
#joystick-zone {
    position: fixed;
    width: 100px;
    height: 100px;
    z-index: 100;
    touch-action: none;
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.1s ease-out;
}

#joystick-zone.active {
    opacity: 0.6;
}

#joystick-base {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid var(--glass-border);
}

#joystick-stick {
    position: absolute;
    width: 40px;
    height: 40px;
    background: white;
    box-shadow: 0 0 15px var(--neon-cyan);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.actions {
    position: absolute;
    top: 10px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
    pointer-events: none;
}

.nav-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    pointer-events: auto;
    font-size: 1.4rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px),
(pointer: coarse) {
    .nav-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

.nav-btn:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.25);
}

#build-toggle {
    width: auto;
    border-radius: 20px;
    padding: 0 12px;
    gap: 6px;
    font-size: 1rem;
}

#tether-count {
    font-size: 0.7rem;
    font-weight: bold;
    opacity: 0.9;
}

.sub-currency .value {
    font-size: 0.85rem;
}

.sub-currency .label {
    font-size: 0.5rem;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.overlay-content {
    width: 100%;
    max-height: 85vh;
    border-radius: 30px 30px 0 0;
    padding: 24px;
    overflow-y: auto;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay.active .overlay-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}

.close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

header {
    margin-bottom: 20px;
}

header h2 {
    font-size: 1.5rem;
    color: var(--neon-purple);
    text-shadow: 0 0 10px rgba(188, 0, 255, 0.5);
}

/* Shop Tabs */
.shop-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tab-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: white;
    border-bottom-color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.tab-btn[data-currency="starFragments"].active {
    border-bottom-color: var(--neon-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.setting-item label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.upgrade-card {
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cosmetic-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.cosmetic-card {
    padding: 16px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, border 0.2s;
}

/* Screen Shake */
.shake {
    animation: screen-shake 0.3s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes screen-shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* UI Pop/Pulse */
.pulses {
    animation: ui-pop 0.3s ease-out;
}

@keyframes ui-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Combo UI */
#combo-container {
    position: absolute;
    top: 160px;
    /* Moved down from 100px */
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    padding: 10px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 100;
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
    transition: top 0.3s ease;
}

@media (max-width: 600px) {
    #combo-container {
        top: 130px;
        /* Moved up from 220px to prevent being too low */
    }
}

.combo-info {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.combo-multiplier {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.combo-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.combo-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

#combo-fill {
    height: 100%;
    width: 100%;
    background: var(--neon-cyan);
    box-shadow: 0 0 8px var(--neon-cyan);
    transition: width 0.1s linear;
}

#frenzy-indicator {
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
    animation: frenzy-pulse 0.5s infinite;
}

@keyframes frenzy-pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Main Menu Premium Redesign */
#main-menu.overlay {
    align-items: center;
    background: radial-gradient(circle at center, #1a0b2e 0%, #06020d 100%);
    z-index: 3000;
    overflow: hidden;
}

#menu-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
    background:
        radial-gradient(2px 2px at 20px 30px, var(--neon-cyan), rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 40px 70px, var(--neon-lime), rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 50px 160px, var(--neon-purple), rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 130px 80px, var(--neon-cyan), rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 160px 120px, var(--neon-lime), rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: menu-bg-drift 40s linear infinite;
}

@keyframes menu-bg-drift {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 1000px 1000px;
    }
}

.main-menu-content {
    max-width: 500px;
    width: 90%;
    text-align: center;
    padding: 50px 30px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow:
        0 0 50px rgba(0, 0, 0, 0.8),
        inset 0 0 30px rgba(188, 0, 255, 0.1);
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.menu-logo {
    width: 140px;
    height: 140px;
    margin: 0 auto 10px;
    filter: drop-shadow(0 0 25px rgba(0, 242, 255, 0.6));
    animation: logo-float 4s ease-in-out infinite;
}

@keyframes logo-float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    50% {
        transform: translateY(-15px) rotate(2deg) scale(1.05);
    }
}

.game-title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 3.5rem;
    margin: 0;
    background: linear-gradient(135deg, #fff 20%, var(--neon-cyan) 50%, var(--neon-lime) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
    line-height: 0.9;
    text-shadow: 0 10px 30px rgba(0, 242, 255, 0.3);
    position: relative;
}

.game-title::after {
    content: 'Lush Harvest';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    z-index: -1;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
}

.game-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 10px;
    font-weight: 500;
}

.menu-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.primary-menu-btn {
    background: linear-gradient(135deg, var(--neon-purple), #8a2be2);
    border: none;
    height: 60px;
    border-radius: 12px;
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.primary-menu-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(188, 0, 255, 0.4);
}

.primary-menu-btn .btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s;
}

.primary-menu-btn:hover .btn-shine {
    left: 150%;
}

.pulse-btn {
    animation: menu-btn-pulse 2s infinite;
}

@keyframes menu-btn-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(188, 0, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(188, 0, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(188, 0, 255, 0);
    }
}

.secondary-menu-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 50px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.secondary-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.menu-footer-card {
    padding: 15px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 10px;
}

.version-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--neon-cyan);
    opacity: 0.8;
    letter-spacing: 1px;
}

.creator-info {
    font-size: 0.85rem;
    margin-top: 4px;
}

.creator-info span {
    font-weight: 800;
    background: linear-gradient(to right, var(--neon-cyan), var(--neon-lime));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 0.65rem;
    opacity: 0.5;
    margin-top: 8px;
}

/* Staggered Animations */
.main-menu-content>* {
    opacity: 0;
    transform: translateY(20px);
    animation: menu-fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes menu-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-header {
    animation-delay: 0.1s;
}

.menu-actions {
    animation-delay: 0.3s;
}

.menu-footer-card {
    animation-delay: 0.5s;
}

@media (max-width: 600px) {
    .game-title {
        font-size: 2.8rem;
    }

    .menu-logo {
        width: 100px;
        height: 100px;
    }
}

.main-menu-content {
    max-width: 500px;
    width: 85%;
    text-align: center;
    padding: 60px 40px;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 60px rgba(0, 242, 255, 0.3);
}

.cosmetic-card.equipped {
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

.cosmetic-icon {
    font-size: 48px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.cosmetic-btn {
    width: 100%;
    margin-top: auto;
}

.upgr.nav-btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background: var(--neon-purple);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.upgrade-btn {
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: var(--neon-purple);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.upgrade-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.bag-full {
    animation: alert-shake 0.5s infinite;
}

@keyframes alert-shake {

    0%,
    50%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    75% {
        transform: translateX(2px);
    }
}

.obstacle-rock {
    position: absolute;
    font-size: 50px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.8));
    transform: translate(-50%, -50%);
    z-index: 2;
}

.obstacle-vine {
    position: absolute;
    font-size: 60px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.8));
    transform: translate(-50%, -50%);
    z-index: 2;
}

.rock-dot {
    width: 6px;
    height: 6px;
    background: #555;
    border-radius: 50%;
}

.vine-dot {
    width: 8px;
    height: 8px;
    background: #252;
    border-radius: 50%;
}

.tether-line {
    stroke: var(--neon-cyan);
    stroke-width: 4;
    stroke-dasharray: 10 10;
    animation: tether-flow 1s linear infinite;
    opacity: 0.6;
    filter: drop-shadow(0 0 5px var(--neon-cyan));
}

@keyframes tether-flow {
    0% {
        stroke-dashoffset: 20;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

/* Combat & Spirits */
#burst-zone {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 80px;
    height: 80px;
    z-index: 1000;
    display: none;
    /* Shown on touch */
}

.is-touch #burst-zone {
    display: block;
}

/* Hide burst button when any menu is open */
body:has(.overlay:not(.hidden)) #burst-zone {
    display: none !important;
}

#burst-btn {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#burst-cooldown-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--neon-cyan);
    opacity: 0.3;
    transform: translateY(100%);
    transition: transform 0.1s linear;
}

.void-spirit {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #4b0082 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(4px);
    z-index: 4;
    animation: spirit-float 3s ease-in-out infinite;
}

.spirit-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #bc00ff;
    border-radius: 50%;
    box-shadow: 0 0 15px #bc00ff;
}

/* Spirit Types */
.spirit-creeper {
    filter: blur(2px) drop-shadow(0 0 10px var(--neon-cyan));
    background: radial-gradient(circle, #004d4d 0%, transparent 70%);
}

.spirit-creeper .spirit-core {
    background: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan);
}

.spirit-flare {
    filter: blur(2px) drop-shadow(0 0 15px var(--neon-gold));
    background: radial-gradient(circle, #8b4513 0%, transparent 70%);
}

.spirit-flare .spirit-core {
    background: var(--neon-gold);
    box-shadow: 0 0 20px var(--neon-gold);
    animation: flare-core-pulse 0.5s infinite alternate;
}

@keyframes flare-core-pulse {
    from {
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        transform: translate(-50%, -50%) scale(1.4);
    }
}

.spirit-shade {
    filter: grayscale(1) invert(1) blur(1px);
    background: radial-gradient(circle, #000 0%, transparent 80%);
    opacity: 0.8;
}

.spirit-shade .spirit-core {
    background: #444;
    box-shadow: 0 0 10px #fff;
    border: 1px solid #fff;
    animation: shade-jitter 0.1s infinite;
}

@keyframes shade-jitter {
    0% {
        transform: translate(-50%, -50%) translate(0, 0);
    }

    25% {
        transform: translate(-50%, -50%) translate(2px, -2px);
    }

    50% {
        transform: translate(-50%, -50%) translate(-2px, 2px);
    }

    75% {
        transform: translate(-50%, -50%) translate(1px, 1px);
    }
}

.spirit-shred {
    width: 20px;
    height: 20px;
    filter: blur(2px);
}

.spirit-shred .spirit-core {
    width: 6px;
    height: 6px;
}

/* Effects */
.flare-pulse {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: flare-pulse-expand 1s ease-out forwards;
    pointer-events: none;
    z-index: 5;
}

@keyframes flare-pulse-expand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
        border-width: 4px;
    }

    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
        border-width: 1px;
    }
}

.tree-slowed .tree-icon,
.tree-slowed .star-tree-icon {
    filter: grayscale(1) brightness(0.5) drop-shadow(0 0 10px #ff4444) !important;
    animation: tree-shudder 0.1s infinite;
}

@keyframes tree-shudder {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(1px);
    }
}

@keyframes spirit-float {

    0%,
    100% {
        transform: scale(1) translate(0, 0);
    }

    50% {
        transform: scale(1.2) translate(5px, -5px);
    }
}

.radiant-burst {
    position: absolute;
    border: 4px solid white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 30px var(--neon-cyan);
    transform: translate(-50%, -50%);
}

@media (max-width: 400px) {
    .hud {
        gap: 8px;
        left: 10px;
        right: 10px;
    }

    .stat-card {
        padding: 8px 10px;
        flex: 1;
    }

    .stat-card .value {
        font-size: 1rem;
    }
}

/* Astral Forge / Tech Tree */
.astral-nebula {
    background: #0d041a !important;
    /* Fully opaque */
    border: none !important;
    max-height: 100vh !important;
    height: 100vh !important;
    width: 100vw !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    opacity: 1 !important;
}

#astral-panel .close-btn {
    display: none;
    /* Restricted access flow */
}

.astral-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.spark-balance {
    padding: 10px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tech-tree {
    position: relative;
    width: 100%;
    flex-grow: 1;
    /* Fill the remainig screen space */
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    overflow: hidden;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(188, 0, 255, 0.2);
    margin: 0;
}

.astral-node {
    width: 120px;
    height: auto;
    min-height: 90px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
    padding: 5px;
}

.astral-node.locked {
    opacity: 0.3;
    filter: grayscale(1);
    cursor: not-allowed;
}

.astral-node.available {
    border-color: var(--neon-purple);
    box-shadow: 0 0 10px rgba(188, 0, 255, 0.3);
}

.astral-node.purchased {
    background: rgba(188, 0, 255, 0.2);
    border-color: var(--neon-purple);
    box-shadow: 0 0 20px var(--neon-purple);
}

.astral-node:hover:not(.locked) {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

.node-title {
    font-size: 0.65rem;
    text-align: center;
    line-height: 1.1;
    font-weight: bold;
    margin-top: 6px;
    color: white;
}

.node-desc {
    font-size: 0.5rem;
    text-align: center;
    line-height: 1.1;
    opacity: 0.8;
    margin-top: 4px;
    max-width: 90%;
}

.astral-actions {
    margin-top: auto;
}

@media (max-width: 600px) {
    .tech-tree {
        height: calc(100vh - 200px);
    }

    .astral-node {
        width: 60px;
        height: 60px;
    }
}

/* Boost System Styles */
.boost-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 10px;
}

.boost-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.boost-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.upgrade-card h3 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--text-main);
}

.boost-info h3 {
    font-size: 1rem;
    margin: 0;
    color: #fff;
}

.boost-info p {
    font-size: 0.8rem;
    margin: 3px 0 0;
    color: var(--text-muted);
}

.boost-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.boost-btn {
    min-width: 100px;
    height: 36px;
    font-size: 0.85rem;
}

#buff-container {
    position: absolute;
    top: 70px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 160;
    pointer-events: none;
}

.buff-bubble {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 128, 0.3);
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    transition: all 0.3s ease;
    width: fit-content;
    will-change: transform, opacity;
}

.buff-bubble .icon {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 5px currentColor);
}

.buff-bubble .timer {
    color: var(--neon-lime);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
    #buff-container {
        top: 75px;
        gap: 6px;
    }

    .buff-bubble {
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.75rem;
        gap: 6px;
    }

    .buff-bubble .name {
        display: none;
        /* Hide name for minimalist bubble mode */
    }
}

#ad-progress {
    box-shadow: 0 0 10px var(--neon-lime);
}

/* Bottom Action Bar */
.bottom-bar-container {
    position: absolute;
    bottom: max(20px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 110;
    pointer-events: none;
    width: auto;
}

.bottom-bar {
    display: flex;
    gap: 12px;
    padding: 10px 18px;
    border-radius: 30px;
    pointer-events: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bottom-bar .nav-btn {
    width: auto;
    height: 44px;
    padding: 0 16px;
    border-radius: 22px;
    font-size: 0.9rem;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-label {
    font-weight: 600;
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    .btn-label {
        display: none;
    }

    .bottom-bar .nav-btn {
        width: 48px;
        height: 48px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }

    .bottom-bar-container {
        width: calc(100% - 32px);
        bottom: max(16px, env(safe-area-inset-bottom));
    }

    .bottom-bar {
        width: 100%;
        padding: 8px;
        gap: 0;
        justify-content: space-around;
        border-radius: 32px;
        border: 1.5px solid rgba(255, 255, 255, 0.2);
        background: rgba(15, 5, 36, 0.85);
        /* Premium deep biome theme */
        backdrop-filter: blur(20px);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    }

    .btn-icon {
        font-size: 1.4rem;
        /* Prominent icons for touch */
    }
}

/* Warp & Transition Effects */
#warp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 5000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

#warp-overlay.flashing {
    animation: warp-flash 0.8s ease-out forwards;
    visibility: visible;
}

@keyframes warp-flash {
    0% {
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

#biome-toast {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4500;
    pointer-events: none;
    text-align: center;
    opacity: 0;
    filter: drop-shadow(0 0 20px var(--neon-cyan));
}

#biome-toast.show {
    animation: toast-reveal 3s ease-in-out forwards;
}

#biome-toast h1 {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    margin: 0;
    background: linear-gradient(to bottom, #fff, var(--neon-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

#biome-toast p {
    font-size: 1.2rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 5px;
}

@keyframes toast-reveal {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.player-warp {
    animation: player-scale-warp 0.8s ease-in-out forwards;
}

@keyframes player-scale-warp {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(3);
        filter: brightness(3) blur(2px);
    }

    100% {
        transform: scale(1);
    }
}

/* Tether Glitch Effect */
@keyframes tether-glitch {
    0% {
        opacity: 0.3;
        stroke-width: 2;
    }

    50% {
        opacity: 0.8;
        stroke-width: 4;
        stroke: #fff;
    }

    100% {
        opacity: 0.3;
        stroke-width: 2;
    }
}

.glitch {
    animation: tether-glitch 0.2s infinite;
}

/* Sentinels */
.sentinel {
    transition: transform 0.1s linear;
    animation: sentinel-float 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--neon-cyan));
    font-size: 20px;
}

@keyframes sentinel-float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.1);
    }
}

/* Remnant Pulse */
.remnant-pulse {
    animation: remnant-pulse-anim 2s infinite;
    transform-origin: center;
}

@keyframes remnant-pulse-anim {
    0% {
        transform: scale(0.8);
        opacity: 0.2;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.6;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.2;
    }
}

/* Active Build Mode */
.nav-btn.active-mode {
    border-color: var(--neon-lime);
    box-shadow: 0 0 15px var(--neon-lime);
    animation: active-mode-pulse 1s infinite alternate;
}

@keyframes active-mode-pulse {
    from {
        opacity: 0.8;
    }

    to {
        opacity: 1;
        box-shadow: 0 0 25px var(--neon-lime);
    }
}

/* ============================================================
   DESKTOP ENHANCEMENTS (Screens > 800px)
   ============================================================ */
@media (min-width: 801px) {

    /* Overlay Transformation: Bottom-sheet to Centered Modal */
    .overlay {
        align-items: center;
        /* Center vertically on desktop */
        padding: 20px;
    }

    .overlay-content {
        max-width: 720px;
        width: 100%;
        height: auto;
        min-height: 400px;
        max-height: 85vh;
        border-radius: 24px;
        /* Fully rounded on desktop */
        margin: 0 auto;
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(188, 0, 255, 0.1);
        transform: translateY(30px) scale(0.96);
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    }

    .overlay.active .overlay-content {
        transform: translateY(0) scale(1);
    }

    /* Grid Layout for Menus */
    .upgrade-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding-bottom: 20px;
    }

    .cosmetic-list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }

    /* Desktop HUD Spacing */
    .hud {
        top: 20px;
        gap: 20px;
    }

    #minimap {
        top: 20px;
        right: 20px;
        width: 240px;
        height: 240px;
        border-color: rgba(0, 242, 255, 0.2);
    }

    #objective-tracker {
        top: 280px;
        /* Under larger minimap (20 + 240 + 20 gap) */
        right: 20px;
        width: 240px;
        padding: 15px;
        background: rgba(255, 255, 255, 0.05);
    }

    /* Premium Hover States */
    .nav-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.2);
    }

    .upgrade-card {
        transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
        border: 1px solid transparent;
        padding: 16px 20px;
        /* More horizontal breathing room */
    }

    .upgrade-card>div {
        flex: 1;
        min-width: 0;
        /* Critical for text wrapping in flexbox */
        padding-right: 15px;
        text-align: left;
    }

    .upgrade-card h3 {
        font-size: 1rem;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .upgrade-card p {
        font-size: 0.82rem;
        line-height: 1.4;
        color: var(--text-muted);
    }

    .upgrade-btn {
        flex-shrink: 0;
        /* Don't squash the button */
        min-width: 100px;
    }

    .upgrade-card:hover {
        background: rgba(255, 255, 255, 0.12);
        transform: translateY(-2px);
        border-color: rgba(188, 0, 255, 0.3);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .cosmetic-card:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: scale(1.05);
        border-color: var(--neon-cyan);
    }

    /* Scrollbar Styling for Desktop */
    .overlay-content::-webkit-scrollbar {
        width: 8px;
    }

    .overlay-content::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 10px;
    }

    .overlay-content::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }

    .overlay-content::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    /* Hide Mobile Joysticks on Desktop */
    #joystick-zone,
    #burst-zone {
        display: none !important;
    }
}

/* Spirit Theme Classes */
.spirit-creeper {
    filter: blur(2px) drop-shadow(0 0 10px var(--neon-cyan));
    background: radial-gradient(circle, #004d4d 0%, transparent 70%);
}

.spirit-creeper .spirit-core {
    background: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan);
}

.spirit-flare {
    filter: blur(2px) drop-shadow(0 0 15px var(--neon-gold));
    background: radial-gradient(circle, #8b4513 0%, transparent 70%);
}

.spirit-flare .spirit-core {
    background: var(--neon-gold);
    box-shadow: 0 0 20px var(--neon-gold);
    animation: flare-core-pulse 1s ease-in-out infinite alternate;
}

@keyframes flare-core-pulse {
    from {
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        transform: translate(-50%, -50%) scale(1.4);
    }
}

.spirit-shade {
    filter: blur(1px);
    background: radial-gradient(circle, #000 0%, transparent 80%);
    opacity: 0.8;
}

.spirit-shade .spirit-core {
    background: #444;
    box-shadow: 0 0 10px #fff;
    border-radius: 0;
    animation: shade-jitter 0.1s infinite;
}

@keyframes shade-jitter {
    0% { transform: translate(-50%, -50%) translate(0, 0); }
    25% { transform: translate(-50%, -50%) translate(2px, -2px); }
    50% { transform: translate(-50%, -50%) translate(-2px, 2px); }
    75% { transform: translate(-50%, -50%) translate(1px, 1px); }
}

.spirit-shred {
    width: 20px;
    height: 20px;
    filter: blur(2px);
}

.spirit-shred .spirit-core {
    width: 6px;
    height: 6px;
    background: #fff;
    box-shadow: 0 0 8px #fff;
}

.flare-pulse {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--neon-gold);
    box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.2);
    transform: translate(-50%, -50%);
    animation: flare-pulse-expand 1.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    pointer-events: none;
    z-index: 5;
}

@keyframes flare-pulse-expand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
        border-width: 4px;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
        border-width: 1px;
    }
}

.tree-slowed .tree-icon,
.tree-slowed .star-tree-icon {
    filter: grayscale(1) brightness(0.5) drop-shadow(0 0 10px #ff4444) !important;
    animation: tree-shudder 0.1s infinite;
}

@keyframes tree-shudder {
    0% { transform: translateX(0); }
    50% { transform: translateX(1px); }
}