@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    color-scheme: light;
    --mint: #10B981;
    --mint-dark: #059669;
    --deep: #047857;
    --forest: #064E3B;
    --coal: #0F172A;
    --paper: #F8FAFC;
    --grey: #64748B;
    --line: #E2E8F0;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #0EA5E9;
    --soil: #78350F;
    --card: #FFFFFF;
}

html {
    color-scheme: light;
    overflow-x: hidden;
    max-width: 100vw;
    font-size: 16px;
}

body { 
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    background-color: var(--paper);
    color: var(--coal);
    -webkit-tap-highlight-color: transparent;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    user-select: none;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

/* Micro-interacciones táctiles universales tipo iOS/Android Premium */
button:active:not(:disabled), 
.btn-tap:active,
[role="button"]:active {
    transform: scale(0.96);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tipografía de Marca FloraBalance */
.brand-wordmark {
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1;
    display: inline-flex;
    align-items: baseline;
}
.brand-wordmark .brand-flora {
    font-weight: 500;
    color: var(--deep);
}
.brand-wordmark .brand-balance {
    font-weight: 700;
    color: #0284C7;
}

/* Ocultar barra de scroll pero mantener funcionalidad */
.no-scrollbar::-webkit-scrollbar { 
    display: none; 
}
.no-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

/* Animaciones y Transiciones Fluidas */
.fade-in { 
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; 
}
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(8px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.slide-up {
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}
.pulse-glow {
    animation: pulseGlow 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes waterPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(14, 165, 233, 0.3)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 4px 8px rgba(14, 165, 233, 0.6)); }
}
.water-pulse {
    animation: waterPulse 1.8s infinite ease-in-out;
}

/* Tarjetas y Contenedores Premium (UI Nutribalance) */
.premium-card {
    background: #ffffff;
    border-radius: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.premium-card:active {
    transform: scale(0.99);
}

/* Tarjeta Botánica con relieve ecológico */
.botanical-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Escáner de Visión Láser */
.scanner-container {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
}
.scanner-laser {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #10B981, #34D399, transparent);
    box-shadow: 0 0 15px #10B981, 0 0 30px #34D399;
    animation: scanAnim 2.2s ease-in-out infinite alternate;
}
@keyframes scanAnim {
    0% { top: 6%; opacity: 0.9; }
    100% { top: 92%; opacity: 0.9; }
}

/* Marco del Visor de la Cámara */
.scanner-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: #10B981;
    border-width: 3px;
}
.corner-tl { top: 16px; left: 16px; border-right: none; border-bottom: none; border-top-left-radius: 8px; }
.corner-tr { top: 16px; right: 16px; border-left: none; border-bottom: none; border-top-right-radius: 8px; }
.corner-bl { bottom: 16px; left: 16px; border-right: none; border-top: none; border-bottom-left-radius: 8px; }
.corner-br { bottom: 16px; right: 16px; border-left: none; border-top: none; border-bottom-right-radius: 8px; }

/* Invernadero Digital: Estanterías y Macetas */
.greenhouse-shelf {
    background: linear-gradient(180deg, #D4A373 0%, #BC8A5F 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12), inset 0 2px 2px rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    height: 14px;
    position: relative;
}
.greenhouse-shelf::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 4%;
    right: 4%;
    height: 6px;
    background: rgba(120, 53, 15, 0.25);
    border-radius: 0 0 4px 4px;
}

.plant-pot {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.plant-pot:hover {
    transform: translateY(-4px) scale(1.03);
}

/* Ruleta Botánica */
.wheel-pointer {
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25));
}

/* Badges: Monedas y Racha de Gotas de Agua */
.badge-currency {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 1px solid #F59E0B;
    color: #92400E;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

.badge-water-streak {
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
    border: 1px solid #38BDF8;
    color: #0369A1;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.15);
}

/* Barra de Navegación Inferior Flotante */
.bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

/* ========================================================= */
/* INVERNADERO DIGITAL ESTILO PLANTS VS ZOMBIES (ZEN GARDEN) */
/* ========================================================= */

.zen-garden-stage {
    position: relative;
    border-radius: 1.75rem;
    overflow: hidden;
    background: url('../assets/greenhouse-bg.jpg') center top / cover no-repeat;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.15), 0 10px 25px -5px rgba(20, 50, 30, 0.25);
    border: 3.5px solid #5C381E;
}

/* Cristales y vigas del fondo anterior (Reemplazados por la hermosa ilustración) */
.zen-glass-roof,
.zen-glass-beams {
    display: none !important;
}

/* Ensamblaje Modular 3D: Tallo Animado + Maceta Estática Recta (Independientes) */
.zen-plant-assembly {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 110px;
    height: 134px;
    user-select: none;
}

.zen-plant-stem-wrap {
    position: relative;
    width: 86px;
    height: 84px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2;
    transform-origin: bottom center;
    margin-bottom: -22px; /* Se introduce 22px dentro de la maceta */
}

.zen-plant-stem-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.16));
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.zen-pot-base-wrap {
    position: relative;
    width: 78px;
    height: 72px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 4; /* El borde superior recto de la maceta oculta la base del tallo */
    pointer-events: none;
    user-select: none;
}

.zen-pot-base-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(35, 18, 5, 0.30));
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Rayos de sol cálidos atravesando el cristal (Sunbeams) */
.zen-sunbeam {
    position: absolute;
    top: -50px;
    width: 100px;
    height: 160%;
    background: linear-gradient(180deg, rgba(254, 240, 138, 0.32) 0%, rgba(254, 240, 138, 0.12) 65%, transparent 100%);
    transform: rotate(-26deg);
    pointer-events: none;
    filter: blur(8px);
    animation: zenSunbeamGlow 7s ease-in-out infinite alternate;
}
.zen-sunbeam-1 { left: 10%; animation-delay: 0s; }
.zen-sunbeam-2 { left: 52%; animation-delay: 3.5s; }

@keyframes zenSunbeamGlow {
    0% { opacity: 0.35; transform: rotate(-26deg) scaleX(0.9); }
    100% { opacity: 0.75; transform: rotate(-26deg) scaleX(1.15); }
}

/* Franja superior de atmósfera Zen */
.zen-atmosphere-badge {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(6px);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.6);
}

/* Estantes de madera escalonados (Benches) */
.zen-shelf-tier {
    position: relative;
    z-index: 5;
    margin-bottom: 1.5rem;
}
.zen-shelf-tier:last-child {
    margin-bottom: 0.5rem;
}

/* Estante 3D de Roble Natural para Invernadero (Photorealistic Timber Shelf) */
.zen-wood-bench-3d {
    position: relative;
    width: 100%;
    height: 34px;
    margin-top: -8px;
    z-index: 5;
    pointer-events: none;
}
.zen-shelf-3d-img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    filter: drop-shadow(0 8px 12px rgba(25, 12, 5, 0.42));
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Banco de listones de madera natural PvZ (Fallback) */
.zen-wood-bench {
    position: relative;
    height: 22px;
    background: linear-gradient(180deg, #DDB88C 0%, #BA8956 45%, #8B5A2B 100%);
    border-top: 2.5px solid #FDF0D5;
    border-bottom: 2.5px solid #4A280D;
    box-shadow: 0 6px 12px rgba(45, 25, 10, 0.35), inset 0 2px 2px rgba(255, 255, 255, 0.45);
    border-radius: 4px;
}
.zen-wood-bench::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, transparent, transparent 34px, rgba(74, 40, 13, 0.3) 34px, rgba(74, 40, 13, 0.3) 36px);
    pointer-events: none;
}
.zen-wood-bench-shadow {
    height: 8px;
    background: linear-gradient(180deg, rgba(50, 25, 5, 0.4) 0%, transparent 100%);
    margin-bottom: 0.5rem;
}

/* Posavasos individual de madera / bambú bajo cada maceta (Zen Garden Coaster) */
.zen-pot-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    width: 130px;
    min-height: 140px;
}

/* Placa Botánica de Exhibición (Brass / Botanical Herbarium Plaque) */
.zen-plant-plaque {
    position: relative;
    z-index: 8;
    margin-top: -9px;
    padding: 2.5px 10px;
    background: linear-gradient(180deg, #FFFBEB 0%, #FDE68A 25%, #F59E0B 65%, #B45309 100%);
    border: 1px solid #78350F;
    border-radius: 9999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 1px 1.5px rgba(255, 255, 255, 0.8), inset 0 -1px 1px rgba(120, 53, 15, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 116px;
    pointer-events: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.zen-pot-slot:hover .zen-plant-plaque,
.zen-pot-slot:active .zen-plant-plaque {
    transform: scale(1.06);
}
.zen-plant-plaque-text {
    font-size: 10px;
    font-weight: 800;
    color: #451A03;
    text-shadow: 0 0.5px 1px rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.015em;
    line-height: 1.15;
}

/* Bandeja individual de madera/bambú bajo la maceta */
.zen-bamboo-tray {
    width: 106px;
    height: 14px;
    background: linear-gradient(180deg, #E6C294 0%, #C8955A 50%, #8A5726 100%);
    border-radius: 12px;
    border-top: 2px solid #FEF3C7;
    border-bottom: 2px solid #573110;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.28);
    position: relative;
    margin-top: -6px;
    z-index: 2;
}

/* Ilustraciones Botánicas 3D estilo NutriBalance / Pixar (PNG con transparencia real) */
.zen-plant-3d-img {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.22));
    user-select: none;
    -webkit-user-drag: none;
}

/* Animación Idle de la Planta (Respiración / Bamboleo suave PvZ) */
.pvz-plant-idle {
    transform-origin: bottom center;
    animation: pvzIdle 3.4s ease-in-out infinite alternate;
}
.pvz-plant-idle-delay {
    animation-delay: -1.7s;
}

@keyframes pvzIdle {
    0% {
        transform: translateY(0) scaleY(1) scaleX(1) rotate(0deg);
    }
    50% {
        transform: translateY(-2px) scaleY(1.025) scaleX(0.985) rotate(0.9deg);
    }
    100% {
        transform: translateY(0) scaleY(0.985) scaleX(1.015) rotate(-0.9deg);
    }
}

/* Salto de regocijo al regar (PvZ Happy Hop) */
.pvz-plant-happy {
    animation: pvzHappyHop 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes pvzHappyHop {
    0% { transform: scale(1) translateY(0); }
    20% { transform: scale(1.15, 0.82) translateY(5px); }
    50% { transform: scale(0.92, 1.18) translateY(-18px); }
    75% { transform: scale(1.06, 0.94) translateY(-3px); }
    100% { transform: scale(1) translateY(0); }
}

/* Bocadillo de diálogo PvZ para planta sedienta */
.pvz-speech-bubble {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFFFFF;
    border: 2px solid #0284C7;
    border-radius: 9999px;
    padding: 3px 9px;
    font-size: 10.5px;
    font-weight: 800;
    color: #0369A1;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
    white-space: nowrap;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 3px;
    animation: pvzBubbleBounce 1.8s ease-in-out infinite;
    cursor: pointer;
}
.pvz-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #0284C7 transparent transparent transparent;
}

@keyframes pvzBubbleBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-5px) scale(1.06);
    }
}

/* Recompensa de monedas flotantes al regar */
.floating-sunflower-reward {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 900;
    font-size: 15px;
    color: #D97706;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9), 0 3px 6px rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 35;
    animation: floatRewardUp 1.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes floatRewardUp {
    0% { opacity: 1; transform: translate(-50%, 0) scale(0.85); }
    50% { opacity: 1; transform: translate(-50%, -28px) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -48px) scale(1); }
}

/* Ranura vacía del invernadero */
.zen-empty-slot {
    width: 110px;
    height: 115px;
    border-radius: 18px;
    border: 2px dashed rgba(5, 150, 105, 0.45);
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.zen-empty-slot:hover {
    background: rgba(255, 255, 255, 0.75);
    border-color: #059669;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 14px rgba(5, 150, 105, 0.15);
}

/* Fases de Crecimiento Visual de las Plantas (PvZ Growth Stages) */
.plant-stage-sprout {
    transform: scale(0.85);
    transform-origin: bottom center;
}
.plant-stage-young {
    transform: scale(1);
    transform-origin: bottom center;
}
.plant-stage-mature {
    transform: scale(1.08);
    transform-origin: bottom center;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.45));
}

/* Estado de Sed (Hojas ligeramente caídas pidiendo agua) */
.pvz-plant-thirsty {
    filter: saturate(0.82) brightness(0.95);
    transform: scaleY(0.96) translateY(2px) !important;
}

/* Visitante Botánico Adorable: Mariquita de la Suerte (PvZ Zen Garden Mascot) */
.zen-lucky-bug {
    position: absolute;
    z-index: 15;
    cursor: pointer;
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
    animation: bugFlutter 2.4s ease-in-out infinite alternate;
    user-select: none;
    transition: transform 0.2s ease;
}
.zen-lucky-bug:hover {
    transform: scale(1.25);
}
.zen-lucky-bug.bug-fly-away {
    animation: bugFlyAway 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
    pointer-events: none;
}

@keyframes bugFlutter {
    0% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-3px) rotate(4deg); }
    100% { transform: translateY(0) rotate(-4deg); }
}

@keyframes bugFlyAway {
    0% { opacity: 1; transform: scale(1) translate(0, 0); }
    50% { opacity: 0.9; transform: scale(1.3) translate(15px, -35px) rotate(15deg); }
    100% { opacity: 0; transform: scale(0.4) translate(40px, -90px) rotate(35deg); }
}

/* Cartel de Nivel Superado / Evolución */
.zen-levelup-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 2px solid #F59E0B;
    color: #78350F;
    font-weight: 900;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 9999px;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
    z-index: 40;
    pointer-events: none;
    white-space: nowrap;
    animation: levelUpPop 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes levelUpPop {
    0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    40% { transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -70%) scale(0.9); }
}

/* ========================================================= */
/* ESTADOS DE GAMIFICACIÓN PVZ: MALEZA, BICHITOS, MARCHITA Y COSECHA */
/* ========================================================= */

/* Planta Marchita / Muerta por falta de agua (>5d) o bicho (>2d) */
.pvz-plant-wilted {
    filter: grayscale(0.7) sepia(0.4) brightness(0.75) !important;
    transform: scaleY(0.88) translateY(6px) rotate(-4deg) !important;
}

/* Parche de Maleza en la base de la maceta */
.zen-weeds-patch {
    position: absolute;
    bottom: 22px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
    pointer-events: none;
    z-index: 18;
}
.zen-weed-clump {
    font-size: 19px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25));
    animation: weedRustle 2.6s ease-in-out infinite alternate;
}
.zen-weed-clump:last-child {
    animation-delay: -1.3s;
}
@keyframes weedRustle {
    0% { transform: rotate(-5deg) scale(0.95); }
    50% { transform: rotate(5deg) scale(1.05); }
    100% { transform: rotate(-3deg) scale(1); }
}

/* Bichito / Plaga trepando en la hoja */
.zen-bug-pest {
    position: absolute;
    top: 24px;
    right: 14px;
    font-size: 20px;
    z-index: 24;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(220, 38, 38, 0.4));
    animation: bugCrawl 1.8s ease-in-out infinite alternate;
}
@keyframes bugCrawl {
    0% { transform: translate(0, 0) rotate(8deg); }
    30% { transform: translate(-3px, -4px) rotate(-6deg); }
    70% { transform: translate(2px, -2px) rotate(12deg); }
    100% { transform: translate(0, 0) rotate(8deg); }
}

/* Bocadillos de Acción PvZ Zen Garden */
.pvz-action-bubble {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 9999px;
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    z-index: 22;
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    animation: pvzBubbleBounce 1.8s ease-in-out infinite;
}

.bubble-weed {
    background: #FEF9C3;
    border: 2px solid #CA8A04;
    color: #854D0E;
}
.bubble-weed::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #CA8A04 transparent transparent transparent;
}

.bubble-bug {
    background: #FEE2E2;
    border: 2px solid #DC2626;
    color: #991B1B;
}
.bubble-bug::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #DC2626 transparent transparent transparent;
}

.bubble-dead {
    background: #F1F5F9;
    border: 2px solid #64748B;
    color: #334155;
}
.bubble-dead::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #64748B transparent transparent transparent;
}

/* Burbuja de Moneda de Girasol Lista para Cosechar (PvZ Zen Garden Style) */
.pvz-coin-bubble {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #FEF08A 0%, #F59E0B 100%);
    border: 2px solid #D97706;
    color: #78350F;
    border-radius: 9999px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.45);
    white-space: nowrap;
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    animation: coinFloatGlow 1.6s ease-in-out infinite alternate;
}
.pvz-coin-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #D97706 transparent transparent transparent;
}
@keyframes coinFloatGlow {
    0% { transform: translateX(-50%) translateY(0) scale(1); box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35); }
    100% { transform: translateX(-50%) translateY(-5px) scale(1.08); box-shadow: 0 8px 18px rgba(217, 119, 6, 0.6); }
}

/* Efecto de destello en juego arcade al recibir daño */
.hazard-hit-flash {
    animation: hazardFlash 0.35s ease-out;
}
@keyframes hazardFlash {
    0% { filter: invert(0.2) sepia(1) saturate(5) hue-rotate(-50deg); }
    100% { filter: none; }
}

/* ========================================================= */
/* CICLO DIURNO/NOCTURNO Y AMBIENTACIÓN ZEN GARDEN */
/* ========================================================= */

.zen-garden-stage.zen-time-morning {
    background-image: 
        linear-gradient(180deg, rgba(98, 164, 216, 0.20) 0%, rgba(194, 226, 248, 0.10) 45%, rgba(212, 235, 210, 0.18) 100%),
        url('../assets/greenhouse-bg.jpg');
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    border-color: #5C381E;
}

.zen-garden-stage.zen-time-afternoon {
    background-image: 
        linear-gradient(180deg, rgba(217, 119, 6, 0.24) 0%, rgba(251, 191, 36, 0.14) 45%, rgba(204, 227, 200, 0.18) 100%),
        url('../assets/greenhouse-bg.jpg');
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    border-color: #6D3D15;
}

.zen-garden-stage.zen-time-night {
    background-image: 
        linear-gradient(180deg, rgba(9, 13, 26, 0.68) 0%, rgba(17, 29, 56, 0.55) 45%, rgba(14, 36, 30, 0.60) 100%),
        url('../assets/greenhouse-bg.jpg');
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    border-color: #382414;
    box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.4), 0 10px 25px -5px rgba(5, 15, 10, 0.4);
}

.zen-time-night .zen-glass-roof {
    background-image: 
        radial-gradient(1.5px 1.5px at 20px 30px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 60px 80px, #fef08a, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 110px 40px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 180px 70px, #bae6fd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 240px 25px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 290px 65px, #fef08a, rgba(0,0,0,0)),
        linear-gradient(to right, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    opacity: 0.95;
}

.zen-time-night .zen-sunbeam {
    display: none;
}

/* Faroles rústicos de madera para la noche con resplandor cálido */
.zen-lantern {
    position: absolute;
    top: 40px;
    z-index: 12;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lanternSway 4.5s ease-in-out infinite alternate;
    transform-origin: top center;
}
.zen-lantern-left { left: 16px; }
.zen-lantern-right { right: 16px; animation-delay: -2.2s; }

.zen-lantern-chain {
    width: 2px;
    height: 18px;
    background: repeating-linear-gradient(180deg, #854D0E, #854D0E 3px, #422006 3px, #422006 6px);
}

.zen-lantern-body {
    width: 22px;
    height: 26px;
    background: #3E200C;
    border-radius: 4px;
    border: 2px solid #5C381E;
    position: relative;
    box-shadow: 0 0 16px 6px rgba(251, 191, 36, 0.55), 0 0 32px 14px rgba(245, 158, 11, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}
.zen-lantern-glass {
    width: 14px;
    height: 18px;
    background: #FDE047;
    border-radius: 2px;
    animation: lanternFlicker 2.8s infinite alternate;
}
@keyframes lanternSway {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}
@keyframes lanternFlicker {
    0%, 100% { opacity: 0.95; filter: brightness(1.1); }
    50% { opacity: 0.78; filter: brightness(0.9); }
}

/* Partículas ambientales (Polen dorado de día / Luciérnagas titilantes de noche) */
.zen-ambient-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 8;
}
.zen-pollen-mote {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(254, 240, 138, 0.9) 0%, rgba(251, 191, 36, 0.3) 100%);
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.8);
    animation: floatMote 9s ease-in-out infinite alternate;
}
.zen-firefly {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #A7F3D0;
    box-shadow: 0 0 10px 4px rgba(52, 211, 153, 0.85);
    animation: glowFirefly 4.5s ease-in-out infinite alternate;
}
@keyframes floatMote {
    0% { transform: translate(0, 0); opacity: 0.2; }
    50% { opacity: 0.8; }
    100% { transform: translate(25px, -45px); opacity: 0.3; }
}
@keyframes glowFirefly {
    0% { transform: translate(0, 0) scale(0.8); opacity: 0.3; }
    50% { transform: translate(-15px, -20px) scale(1.2); opacity: 1; }
    100% { transform: translate(12px, -35px) scale(0.9); opacity: 0.4; }
}

/* Rincón y Mesa de Herboristería de Florencia en la base del Invernadero */
.zen-florencia-workshop {
    position: relative;
    z-index: 10;
    margin-top: 0.5rem;
    padding: 10px 14px 12px 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(254, 243, 199, 0.85) 100%);
    border-top: 2px solid rgba(217, 119, 6, 0.3);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
    border-radius: 0 0 1.25rem 1.25rem;
}
.zen-florencia-workshop:active {
    transform: scale(0.985);
}
.florencia-speech-bubble {
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    background: #FFFFFF;
    border: 2px solid #10B981;
    color: #064E3B;
    border-radius: 1rem;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.22);
    width: 88%;
    max-width: 320px;
    z-index: 30;
    pointer-events: none;
    animation: speechBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.florencia-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: #10B981 transparent transparent transparent;
}
@keyframes speechBounce {
    0% { transform: translateX(-50%) translateY(12px) scale(0.9); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

/* Base de césped vivo y musgo al pie del Invernadero */
.zen-moss-base {
    height: 12px;
    background: linear-gradient(180deg, #4ADE80 0%, #16A34A 50%, #14532D 100%);
    border-top: 1.5px solid #BBF7D0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* ========================================================= */
/* MISIONES DIARIAS & COFRE BOTÁNICO */
/* ========================================================= */

.botanical-chest-box {
    position: relative;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 50%, #F59E0B 100%);
    border: 2.5px solid #D97706;
    border-radius: 1.25rem;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.25);
    overflow: hidden;
}
.botanical-chest-box.ready-to-claim {
    animation: chestGlowPulse 2.2s infinite ease-in-out;
}
@keyframes chestGlowPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5), 0 8px 20px rgba(217, 119, 6, 0.25); }
    50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0), 0 10px 28px rgba(245, 158, 11, 0.5); }
}

/* ========================================================= */
/* PASAPORTE BOTÁNICO / CÉDULA OFICIAL */
/* ========================================================= */

.botanical-passport-card {
    background: #FFFDF9;
    border: 2px solid #D4AF37;
    border-radius: 1.25rem;
    padding: 14px;
    position: relative;
    box-shadow: 0 6px 18px rgba(180, 130, 40, 0.12), inset 0 0 12px rgba(212, 175, 55, 0.08);
    background-image: 
        radial-gradient(#E8D5A3 0.75px, transparent 0.75px),
        radial-gradient(#E8D5A3 0.75px, #FFFDF9 0.75px);
    background-size: 24px 24px;
    background-position: 0 0, 12px 12px;
}
.passport-seal {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px dashed #B45309;
    color: #92400E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 9px;
    text-transform: uppercase;
    transform: rotate(-12deg);
    background: rgba(254, 243, 199, 0.7);
    box-shadow: 0 2px 6px rgba(146, 64, 14, 0.2);
}

/* ========================================================= */
/* COMPARADOR INTERACTIVO ANTES / DESPUÉS (GROWTH SLIDER) */
/* ========================================================= */

.compare-container {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 1.25rem;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    background: #0F172A;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.compare-image-before,
.compare-image-after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.compare-image-after-wrap {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 50%;
    overflow: hidden;
    z-index: 2;
    border-right: 2.5px solid #FFFFFF;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
}
.compare-image-after-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    min-width: 100%;
    object-fit: cover;
}
.compare-slider-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    z-index: 10;
}
.compare-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #0F172A;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    z-index: 5;
    pointer-events: none;
}

/* ========================================================= */
/* BANNER MATUTINO DE FLORENCIA (MIS PLANTAS) */
/* ========================================================= */

.florencia-morning-card {
    background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 50%, #FEF9C3 100%);
    border: 1.5px solid #A7F3D0;
    border-radius: 1.25rem;
    padding: 12px 14px;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.08);
}




