:root {
    --orbit-radius: 95px;
    --theme-color: #22c55e;
    --theme-color-hover: #4ade80;
    --theme-color-glow: rgba(34, 197, 94, 0.12);
    --theme-color-glow-heavy: rgba(34, 197, 94, 0.35);
    --panel-bg: rgba(10, 22, 14, 0.65);
    --border-color: rgba(34, 197, 94, 0.2);
    --glow-color: rgba(34, 197, 94, 0.5);
    --accent-gradient: linear-gradient(135deg, #22c55e, #10b981);
}
@media (min-width: 640px) {
    :root {
        --orbit-radius: 125px;
    }
}
@media (min-width: 768px) {
    :root {
        --orbit-radius: 175px;
    }
}

/* Pantalla de Carga Premium */
#loading-overlay {
    background: radial-gradient(circle at center, rgba(10, 6, 18, 1) 0%, rgba(4, 2, 8, 1) 100%);
}
.bg-radial-glow {
    background: radial-gradient(circle at center, var(--theme-color-glow-heavy, rgba(34, 197, 94, 0.35)) 0%, transparent 70%);
}
.animate-pulse-slow {
    animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse-slow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .7; transform: scale(0.98); }
}

/* Temas Dinámicos */
body[data-theme="forest"] {
    --theme-color: #22c55e;
    --theme-color-hover: #4ade80;
    --theme-color-glow: rgba(34, 197, 94, 0.12);
    --theme-color-glow-heavy: rgba(34, 197, 94, 0.35);
    --panel-bg: rgba(10, 22, 14, 0.65);
    --border-color: rgba(34, 197, 94, 0.2);
    --glow-color: rgba(34, 197, 94, 0.5);
    --accent-gradient: linear-gradient(135deg, #22c55e, #10b981);
}
body[data-theme="cosmic"] {
    --theme-color: #a855f7;
    --theme-color-hover: #c084fc;
    --theme-color-glow: rgba(168, 85, 247, 0.12);
    --theme-color-glow-heavy: rgba(168, 85, 247, 0.35);
    --panel-bg: rgba(18, 10, 28, 0.65);
    --border-color: rgba(168, 85, 247, 0.2);
    --glow-color: rgba(168, 85, 247, 0.5);
    --accent-gradient: linear-gradient(135deg, #a855f7, #ec4899);
}
body[data-theme="fire"] {
    --theme-color: #ef4444;
    --theme-color-hover: #f87171;
    --theme-color-glow: rgba(239, 68, 68, 0.12);
    --theme-color-glow-heavy: rgba(239, 68, 68, 0.35);
    --panel-bg: rgba(26, 8, 8, 0.65);
    --border-color: rgba(239, 68, 68, 0.2);
    --glow-color: rgba(239, 68, 68, 0.5);
    --accent-gradient: linear-gradient(135deg, #ef4444, #f97316);
}
body[data-theme="cyber"] {
    --theme-color: #06b6d4;
    --theme-color-hover: #22d3ee;
    --theme-color-glow: rgba(6, 182, 212, 0.12);
    --theme-color-glow-heavy: rgba(6, 182, 212, 0.35);
    --panel-bg: rgba(4, 15, 24, 0.65);
    --border-color: rgba(6, 182, 212, 0.2);
    --glow-color: rgba(6, 182, 212, 0.5);
    --accent-gradient: linear-gradient(135deg, #06b6d4, #3b82f6);
}
body[data-theme="sakura"] {
    --theme-color: #ec4899;
    --theme-color-hover: #f472b6;
    --theme-color-glow: rgba(236, 72, 153, 0.12);
    --theme-color-glow-heavy: rgba(236, 72, 153, 0.35);
    --panel-bg: rgba(26, 8, 20, 0.65);
    --border-color: rgba(236, 72, 153, 0.2);
    --glow-color: rgba(236, 72, 153, 0.5);
    --accent-gradient: linear-gradient(135deg, #ec4899, #f43f5e);
}
body[data-theme="nebula"] {
    --theme-color: #8b5cf6;
    --theme-color-hover: #a78bfa;
    --theme-color-glow: rgba(139, 92, 246, 0.12);
    --theme-color-glow-heavy: rgba(139, 92, 246, 0.35);
    --panel-bg: rgba(14, 8, 28, 0.65);
    --border-color: rgba(139, 92, 246, 0.2);
    --glow-color: rgba(139, 92, 246, 0.5);
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #d946ef);
}
body[data-theme="ocean"] {
    --theme-color: #0ea5e9;
    --theme-color-hover: #38bdf8;
    --theme-color-glow: rgba(14, 165, 233, 0.12);
    --theme-color-glow-heavy: rgba(14, 165, 233, 0.35);
    --panel-bg: rgba(4, 16, 26, 0.65);
    --border-color: rgba(14, 165, 233, 0.2);
    --glow-color: rgba(14, 165, 233, 0.5);
    --accent-gradient: linear-gradient(135deg, #0ea5e9, #14b8a6);
}
body[data-theme="amber"] {
    --theme-color: #f59e0b;
    --theme-color-hover: #fbbf24;
    --theme-color-glow: rgba(245, 158, 11, 0.12);
    --theme-color-glow-heavy: rgba(245, 158, 11, 0.35);
    --panel-bg: rgba(24, 16, 4, 0.65);
    --border-color: rgba(245, 158, 11, 0.2);
    --glow-color: rgba(245, 158, 11, 0.5);
    --accent-gradient: linear-gradient(135deg, #f59e0b, #eab308);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000;
    color: white;
    overflow: hidden;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

.h-dvh {
    height: 100vh;
    height: 100dvh;
}

.smooth-scroll {
    -webkit-overflow-scrolling: touch;
}

body.bg-gradient-animate,
body[data-theme="forest"].bg-gradient-animate {
    background: radial-gradient(circle at 50% 50%, #0c1f13 0%, #000000 100%);
    background-size: 200% 200%;
    animation: gradientMove 30s ease infinite;
}

body[data-theme="cosmic"].bg-gradient-animate {
    background: linear-gradient(125deg, #030008, #18032d, #070011, #25023d, #000000);
    background-size: 300% 300%;
    animation: cosmicNebula 20s ease-in-out infinite;
}

body[data-theme="fire"].bg-gradient-animate {
    background: radial-gradient(circle at 50% 50%, #290505 0%, #000000 100%);
    background-size: 200% 200%;
    animation: gradientMove 30s ease infinite;
}

body[data-theme="cyber"].bg-gradient-animate {
    background: radial-gradient(circle at 50% 50%, #02121f 0%, #000000 100%);
    background-size: 200% 200%;
    animation: gradientMove 30s ease infinite;
}

body[data-theme="sakura"].bg-gradient-animate {
    background: radial-gradient(circle at 50% 50%, #240513 0%, #000000 100%);
    background-size: 200% 200%;
    animation: gradientMove 30s ease infinite;
}

body[data-theme="nebula"].bg-gradient-animate {
    background: radial-gradient(circle at 50% 50%, #110524 0%, #000000 100%);
    background-size: 200% 200%;
    animation: gradientMove 30s ease infinite;
}

body[data-theme="ocean"].bg-gradient-animate {
    background: radial-gradient(circle at 50% 50%, #031422 0%, #000000 100%);
    background-size: 200% 200%;
    animation: gradientMove 30s ease infinite;
}

body[data-theme="amber"].bg-gradient-animate {
    background: radial-gradient(circle at 50% 50%, #1e1102 0%, #000000 100%);
    background-size: 200% 200%;
    animation: gradientMove 30s ease infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 50% 50%;
    }

    50% {
        background-position: 50% 60%;
    }

    100% {
        background-position: 50% 50%;
    }
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6), 0 0 15px var(--theme-color-glow);
    transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Mapeos de Colores de Temas Dinámicos para Integración Completa */
.text-green-400, .text-green-500, .group-hover\:text-green-400:hover {
    color: var(--theme-color) !important;
}
.text-green-300, .hover\:text-green-300:hover {
    color: var(--theme-color-hover) !important;
}
.bg-green-600, .bg-green-500, .bg-green-500\/10 {
    background-color: var(--theme-color) !important;
}
.bg-green-600:hover, .bg-green-500:hover, .hover\:bg-green-500:hover {
    background-color: var(--theme-color-hover) !important;
}
.border-green-500, .border-green-500\/20, .border-green-500\/30, .border-green-500\/50, .border-green-400\/30 {
    border-color: var(--border-color) !important;
}
.bg-green-950\/20, .bg-green-900\/10, .bg-green-600\/20 {
    background-color: var(--theme-color-glow) !important;
}
.accent-green-500 {
    accent-color: var(--theme-color) !important;
}
.theme-accent-gradient {
    background: var(--accent-gradient) !important;
}

.glass-button {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-button:active:not(:disabled) {
    transform: scale(0.98);
}

.glass-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1) brightness(0.7);
}

.item-affordable {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 20px var(--theme-color-glow) !important;
    z-index: 10;
    cursor: pointer;
}

.item-affordable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0%;
    background: var(--accent-gradient);
    border-radius: 4px 0 0 4px;
    transition: height 0.3s ease;
}

.item-affordable:hover::before {
    height: 100%;
}

.item-affordable:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--theme-color-glow-heavy), inset 0 0 10px rgba(255, 255, 255, 0.05) !important;
    border-color: var(--theme-color) !important;
}

.building-icon-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.item-affordable:hover .building-icon-container {
    background: var(--theme-color-glow-heavy) !important;
    border-color: var(--theme-color) !important;
    box-shadow: 0 0 12px var(--theme-color-glow);
    transform: scale(1.08);
}

@media (hover: none) {
    .item-affordable:hover {
        transform: none;
        box-shadow: 0 4px 20px var(--theme-color-glow) !important;
    }
    .item-affordable:hover::before {
        height: 0%;
    }
    .item-affordable:hover .building-icon-container {
        transform: none;
    }
}

.item-expensive {
    opacity: 0.45;
    filter: grayscale(0.9);
    border: 1px solid rgba(255, 255, 255, 0.02) !important;
    background: rgba(0, 0, 0, 0.25) !important;
    cursor: not-allowed;
}

.tab-panel-container {
    background-color: var(--panel-bg) !important;
    border-left: 1px solid var(--border-color);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

.tab-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    height: calc(100% - 14px);
    margin: 7px 0;
    padding: 0 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.tab-btn:hover:not(.tab-active) {
    background: rgba(255, 255, 255, 0.03);
    color: #fff !important;
}

.tab-active {
    background: var(--theme-color-glow-heavy) !important;
    border: 1px solid var(--border-color) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px var(--theme-color-glow) !important;
    text-shadow: 0 0 8px var(--theme-color);
}

.theme-text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-box {
    background: rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-box:hover {
    border-color: var(--border-color) !important;
    box-shadow: 0 4px 15px var(--theme-color-glow) !important;
    transform: translateY(-1px);
}

/* Custom premium scrollbar style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
    transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--theme-color);
}

.plant-shake {
    animation: shake 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes shake {
    0% {
        transform: rotate(0deg) scale(0.92);
        filter: brightness(1.2) drop-shadow(0 0 15px var(--glow-color));
    }
    30% {
        transform: rotate(3deg) scale(1.08);
        filter: brightness(1.3) drop-shadow(0 0 25px var(--theme-color));
    }
    60% {
        transform: rotate(-2deg) scale(0.97);
    }
    85% {
        transform: rotate(1deg) scale(1.01);
    }
    100% {
        transform: rotate(0deg) scale(1);
        filter: brightness(1);
    }
}

/* Structured Background and Orbit Animation Elements */
.cursor-orbit-ring {
    position: absolute;
    width: 0;
    height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
    animation: spinOrbit 45s linear infinite;
}
@keyframes spinOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.orbiting-cursor {
    position: absolute;
    font-size: 20px;
    pointer-events: none;
    transform: translate(var(--cx), var(--cy)) rotate(var(--rot));
    animation: cursorTap 1.5s ease-in-out infinite;
    animation-delay: var(--delay);
    transform-origin: center;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    z-index: 20;
}
@keyframes cursorTap {
    0%, 100% { transform: translate(var(--cx), var(--cy)) rotate(var(--rot)) scale(1); }
    50% { transform: translate(calc(var(--cx) * 0.85), calc(var(--cy) * 0.85)) rotate(var(--rot)) scale(0.85); }
}

.falling-drop {
    position: absolute;
    font-size: 14px;
    pointer-events: none;
    top: -5%;
    animation: fallDrop 4s linear infinite;
    animation-delay: var(--delay);
    left: var(--x);
}
@keyframes fallDrop {
    0% { top: -5%; opacity: 0; transform: scale(0.7); }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { top: 105%; opacity: 0; transform: scale(0.5); }
}

.flying-bee {
    position: absolute;
    font-size: 18px;
    pointer-events: none;
    left: var(--x);
    top: var(--y);
    animation: flyBee 6s ease-in-out infinite;
    animation-delay: var(--delay);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}
@keyframes flyBee {
    0%, 100% { transform: translate(0, 0) scaleX(1); }
    25% { transform: translate(30px, -15px) scaleX(1); }
    50% { transform: translate(60px, 0px) scaleX(-1); }
    75% { transform: translate(30px, 15px) scaleX(-1); }
}

.flying-alien {
    position: absolute;
    font-size: 22px;
    pointer-events: none;
    left: var(--x);
    top: var(--y);
    animation: flyAlien 10s ease-in-out infinite;
    animation-delay: var(--delay);
    filter: drop-shadow(0 0 10px rgba(16b,85,247,0.4));
}
@keyframes flyAlien {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(60px, -20px) rotate(15deg); }
}

.ground-building {
    position: absolute;
    bottom: var(--y);
    left: var(--x);
    font-size: var(--size, 22px);
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    animation: breatheGround 4s ease-in-out infinite;
    animation-delay: var(--delay);
}
@keyframes breatheGround {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.sky-orbital {
    position: absolute;
    top: var(--y);
    left: var(--x);
    font-size: var(--size, 26px);
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
    animation: driftSky 8s ease-in-out infinite;
    animation-delay: var(--delay);
}
@keyframes driftSky {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(10px, 8px) rotate(8deg); }
}

.matrix-rain {
    position: absolute;
    top: -10%;
    left: var(--x);
    color: #22c55e;
    font-family: monospace;
    font-size: 9px;
    pointer-events: none;
    white-space: nowrap;
    writing-mode: vertical-rl;
    opacity: 0.12;
    animation: fallMatrix 8s linear infinite;
    animation-delay: var(--delay);
}
@keyframes fallMatrix {
    0% { top: -20%; }
    100% { top: 110%; }
}

.glowing-nebula {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,197,94,0.12) 0%, rgba(34,197,94,0) 75%);
    pointer-events: none;
    left: var(--x);
    top: var(--y);
    transform: translate(-50%, -50%);
    animation: pulseNebula 12s ease-in-out infinite;
    animation-delay: var(--delay);
}
@keyframes pulseNebula {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.7; }
}

.float-up {
    animation: floatUpFade 1.2s ease-out forwards;
}

@keyframes floatUpFade {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }

    15% {
        transform: translateY(-15px) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translateY(-80px) scale(0.9);
        opacity: 0;
    }
}

.event-item {
    position: absolute;
    cursor: pointer;
    z-index: 100;
    display: none;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent;
}

.golden-sun {
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, #fffbeb 0%, #f59e0b 40%, transparent 80%);
    border-radius: 50%;
    filter: drop-shadow(0 0 20px #f59e0b);
    animation: sunPulse 2s infinite alternate, sunRotate 20s linear infinite;
    transition: transform 0.2s;
}

.golden-sun:active {
    transform: scale(0.9);
}

body[data-theme="cosmic"] .golden-sun {
    background: radial-gradient(circle, #fdf4ff 0%, #a855f7 40%, transparent 80%);
    filter: drop-shadow(0 0 20px #c084fc);
    animation: cosmicStarPulse 2s infinite alternate, sunRotate 25s linear infinite;
}

@keyframes cosmicStarPulse {
    from {
        opacity: 0.8;
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    }
    to {
        opacity: 1;
        box-shadow: 0 0 45px rgba(192, 132, 252, 0.8);
    }
}

@keyframes sunPulse {
    from {
        opacity: 0.8;
        box-shadow: 0 0 20px #f59e0b
    }

    to {
        opacity: 1;
        box-shadow: 0 0 40px #f59e0b
    }
}

@keyframes sunRotate {
    from {
        transform: rotate(0deg)
    }

    to {
        transform: rotate(360deg)
    }
}

.dew-drop {
    width: 40px;
    height: 55px;
    background: radial-gradient(circle at 35% 25%, #fff, rgba(59, 130, 246, 0) 25%), linear-gradient(135deg, #93c5fd, #3b82f6);
    border-radius: 0 50% 50% 50%;
    transform: rotate(45deg);
    filter: drop-shadow(0 2px 5px rgba(37, 99, 235, 0.5));
    animation: dewFloat 4s ease-in-out infinite;
    transition: transform 0.1s;
}

.dew-drop:active {
    transform: rotate(45deg) scale(0.9);
}

@keyframes dewFloat {

    0%,
    100% {
        transform: rotate(45deg) translateY(0);
    }

    50% {
        transform: rotate(45deg) translateY(-15px);
    }
}

.float-text {
    position: absolute;
    font-weight: 900;
    pointer-events: none;
    z-index: 100;
    font-family: 'Inter', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    animation: popUpFade 1.2s ease-out forwards;
    white-space: nowrap;
}

@keyframes popUpFade {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }

    15% {
        transform: translateY(-15px) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translateY(-80px) scale(0.9);
        opacity: 0;
    }
}

@keyframes bigBang {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
        filter: brightness(1)
    }

    50%,
    55% {
        transform: scale(0.1);
        opacity: 1;
        filter: brightness(5);
        background: white
    }

    90% {
        transform: scale(100);
        opacity: 0;
        filter: brightness(10);
        background: white
    }
}

.ascension-anim {
    animation: bigBang 2.5s cubic-bezier(.68, -.55, .27, 1.55) forwards;
    pointer-events: none;
    z-index: 9999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    display: none
}

.cosmic-card {
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    border: 1px solid rgba(167, 139, 250, 0.3);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.2);
    position: relative;
    z-index: 10;
}

.cosmic-card:hover {
    border-color: rgba(167, 139, 250, 0.8);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4)
}

.cosmic-text {
    background: linear-gradient(to right, #e9d5ff, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

.achievement-popup {
    animation: slideIn 0.5s cubic-bezier(.68, -.55, .27, 1.55) forwards, fadeOut 0.5s ease-in 4s forwards;
    pointer-events: none;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0
    }

    to {
        transform: translateX(0);
        opacity: 1
    }
}

@keyframes fadeOut {
    from {
        opacity: 1
    }

    to {
        opacity: 0
    }
}

/* SCROLLBAR OCULTA */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.rarity-common {
    border-left: 3px solid #9ca3af;
    background: rgba(255, 255, 255, 0.05);
}

.rarity-rare {
    border-left: 3px solid #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.rarity-epic {
    border-left: 3px solid #a855f7;
    background: rgba(168, 85, 247, 0.1);
}

.rarity-legendary {
    border-left: 3px solid #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.rarity-mythic {
    border-left: 3px solid #ef4444;
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    animation: riseParticle linear infinite;
}

@keyframes riseParticle {
    0% {
        transform: translateY(110vh) scale(0);
        opacity: 0;
    }

    20% {
        opacity: var(--opacity);
    }

    80% {
        opacity: var(--opacity);
    }

    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* TUTORIAL MODAL */
#tutorialModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

/* OFFLINE MODAL */
#offlineModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.offline-content {
    background: var(--panel-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    box-shadow: 0 0 50px var(--theme-color-glow);
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Tab Panel Transitions */
#leaderboardPanel, #marketPanel, #storeContainer, #achievementsPanel, #settingsPanel, #prestigePanel, #constellationsPanel, #travelPanel {
    animation: tabFadeIn 0.25s ease-out forwards;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Click Particles Burst */
.click-particle {
    position: absolute;
    pointer-events: none;
    z-index: 9999;
    font-size: 1.25rem;
    animation: burstParticle 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes burstParticle {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.3);
        opacity: 0;
    }
}

.animate-spin-slow {
    animation: spinSlow 20s linear infinite;
}
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Interactive Tutorial Carousel & Modal Autenticación Premium */
.tutorial-slide {
    animation: slideFadeIn 0.3s ease-out forwards;
}

@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Auth Modal placeholder style */
#authModal input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* Dynamic Input focus borders */
#authModal .focus-within\:border-green-500\/50:focus-within {
    border-color: var(--theme-color) !important;
    box-shadow: 0 0 10px var(--theme-color-glow);
}

/* Prevenir fondo blanco por autocompletado y estilos por defecto del navegador */
#authModal input {
    background-color: transparent !important;
    background: transparent !important;
    color: white !important;
}

#authModal input:-webkit-autofill,
#authModal input:-webkit-autofill:hover, 
#authModal input:-webkit-autofill:focus, 
#authModal input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(15, 23, 42, 0.95) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 0 0 0 30px rgba(15, 23, 42, 0.95) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Leaderboard Highlight for Current Player */
.leaderboard-me {
    border-color: var(--theme-color) !important;
    background-color: var(--theme-color-glow) !important;
    box-shadow: 0 0 15px var(--theme-color-glow-heavy) !important;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Custom scrollbar for tab navigation */
.tab-nav::-webkit-scrollbar {
    height: 4px;
}
.tab-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}
.tab-nav::-webkit-scrollbar-thumb {
    background: var(--theme-color, #22c55e);
    border-radius: 10px;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.tab-nav::-webkit-scrollbar-thumb:hover {
    background: var(--theme-color-glow-heavy, #4ade80);
}
.tab-nav {
    scrollbar-width: thin;
    scrollbar-color: var(--theme-color, #22c55e) rgba(0, 0, 0, 0.2);
}

/* Cosmic Nebula and Shooting Stars */
@keyframes cosmicNebula {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.shooting-star {
    position: fixed;
    width: 80px;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    transform: rotate(-35deg);
    animation: shoot 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes shoot {
    0% {
        transform: translate(0, 0) rotate(-35deg) scaleX(0.1);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
        transform: translate(8vw, 8vh) rotate(-35deg) scaleX(1);
    }
    100% {
        transform: translate(60vw, 60vh) rotate(-35deg) scaleX(1);
        opacity: 0;
    }
}