:root {
            --jungle-green: #2E7D32;
            --dark-metal: #1a1a1a;
            --warning-yellow: #FFC107;
            --danger-red: #D32F2F;
            --magma-orange: #FF5722;
            --bone: #FBE9E7;
            --dark-night: #050a05;
        }

        body {
            background-color: var(--dark-night);
            font-family: 'Roboto Condensed', sans-serif;
            overflow-x: hidden;
            color: var(--bone);
            margin: 0;
            padding: 0;
            -webkit-overflow-scrolling: touch; 
            overscroll-behavior: none; /* Previene rebote en móviles */
        }

        /* --- CLASES UTILITARIAS Y FIXES --- */
        .gpu-fix {
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            perspective: 1000px;
        }

        .hidden { display: none !important; }

        /* --- ROTACIÓN INTELIGENTE (LIGHTBOX) --- */
        .rotate-mobile {
            transform: rotate(90deg);
            width: 100vh !important; 
            height: 100vw !important;
            max-width: 100vh !important;
            max-height: 100vw !important;
            object-fit: contain;
        }

        /* --- SWIPE GHOST DOT ANIMATIONS --- */
        @keyframes ghostSwipe {
            0% { transform: translate(0, 0); opacity: 0; }
            15% { opacity: 1; }
            40% { transform: translate(-30px, 0); opacity: 1; } /* Horizontal */
            50% { opacity: 0; transform: translate(-30px, 0); }
            55% { transform: translate(0, 0); opacity: 0; }
            65% { opacity: 1; }
            90% { transform: translate(0, -30px); opacity: 1; } /* Vertical */
            100% { transform: translate(0, -30px); opacity: 0; }
        }

        .ghost-dot {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.9);
            box-shadow: 0 0 15px var(--warning-yellow);
            animation: ghostSwipe 2.5s infinite ease-in-out;
        }

        /* Ocultar flechas en móvil para UX limpia */
        @media (max-width: 768px) {
            #btn-prev, #btn-next { display: none !important; }
        }

        /* --- INTRO (HUEVO) --- */
        #intro-screen {
            position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
            background: radial-gradient(circle at center, #0f1f0f 0%, #000000 100%);
            z-index: 2000; display: flex; flex-direction: column;
            align-items: center; justify-content: center;
            transition: opacity 0.8s ease-in-out, visibility 0.8s;
        }

        .dino-egg-container {
            width: 220px; height: 280px; cursor: pointer;
            transition: transform 0.3s ease; position: relative;
        }
        .dino-egg-container:hover { transform: scale(1.05); }
        
        .dino-egg { width: 100%; height: 100%; filter: drop-shadow(0 0 30px rgba(255, 193, 7, 0.2)); }
        
        .egg-shake { animation: shakeEgg 0.5s cubic-bezier(.36,.07,.19,.97) both; }
        @keyframes shakeEgg {
            10%, 90% { transform: translate3d(-3px, 0, 0) rotate(-3deg); }
            20%, 80% { transform: translate3d(3px, 0, 0) rotate(3deg); }
            30%, 50%, 70% { transform: translate3d(-6px, 0, 0) rotate(-6deg); }
            40%, 60% { transform: translate3d(6px, 0, 0) rotate(6deg); }
        }

        .egg-broken .egg-top { transform: translateY(-60px) rotate(-15deg); opacity: 0; transition: all 0.6s ease; }
        .egg-broken .egg-bottom { transform: translateY(60px) rotate(15deg); opacity: 0; transition: all 0.6s ease; }

        .intro-text {
            margin-top: 40px; color: var(--warning-yellow);
            font-family: 'Creepster', cursive; font-size: 2.2rem;
            text-align: center; text-shadow: 0 5px 10px rgba(0,0,0,0.8);
            letter-spacing: 3px; animation: pulseText 2s infinite;
        }
        @keyframes pulseText { 0% { opacity: 0.7; } 50% { opacity: 1; transform: scale(1.05); } 100% { opacity: 0.7; } }

        #hatch-flash {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: white; z-index: 2001; opacity: 0; pointer-events: none;
            transition: opacity 0.5s ease-out;
        }

        /* --- T-REX ASOMADO --- */
        #peeking-rex {
            position: fixed; 
            bottom: -20px; 
            right: -100%; 
            z-index: 300; 
            pointer-events: none;
            transition: right 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            width: 80vw; max-width: 400px;
            -webkit-transform: translateZ(0); transform: translateZ(0); will-change: right;
        }
        
        @media (min-width: 768px) {
            #peeking-rex { bottom: -50px; max-width: 500px; }
        }

        #peeking-rex img {
            width: 100%; height: auto;
            transform: scaleX(1) rotate(-10deg); /* Espejo */
            filter: drop-shadow(-10px 10px 20px rgba(0,0,0,0.8));
            image-rendering: -webkit-optimize-contrast;
        }
        .rex-visible { right: -10% !important; }
        @media (min-width: 768px) { .rex-visible { right: -50px !important; } }

        /* GLOBO DIÁLOGO */
        #rex-bubble {
            position: absolute; top: -50px; left: 0%; 
            background: #fff; color: #000; border: 3px solid #000;
            padding: 10px 15px; border-radius: 30px;
            font-family: 'Creepster', cursive; font-size: 1.2rem;
            box-shadow: 5px 5px 0 rgba(0,0,0,0.5);
            opacity: 0; transform: scale(0) rotate(-10deg);
            transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            pointer-events: auto; z-index: 310; white-space: nowrap;
        }
        #rex-bubble::after {
            content: ''; position: absolute; right: 20px; bottom: -15px; top: auto;
            border-left: 15px solid transparent; border-right: 15px solid transparent;
            border-top: 20px solid #000; transform: rotate(-20deg);
        }
        .bubble-visible { opacity: 1 !important; transform: scale(1) rotate(0deg) !important; transition-delay: 0.5s; }

        /* --- BOTÓN MÚSICA --- */
        #music-control {
            position: fixed; top: 20px; right: 20px; z-index: 500;
            background: rgba(0,0,0,0.7); border: 2px solid #FFC107; border-radius: 50%;
            width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
            color: #FFC107; cursor: pointer; transition: transform 0.2s, opacity 0.5s;
            opacity: 0; pointer-events: none;
            -webkit-transform: translateZ(0); transform: translateZ(0);
        }
        #music-control.visible { opacity: 1; pointer-events: auto; }
        #music-control:active { transform: scale(0.9) translateZ(0); }
        .paused-line { position: absolute; width: 100%; height: 2px; background: #D32F2F; transform: rotate(45deg); }

        /* --- ESTILOS GENERALES Y BOTONES --- */
        .btn-dino-base {
            display: inline-flex; align-items: center; justify-content: center; gap: 8px;
            background: linear-gradient(180deg, #4E342E, #3E2723);
            border: 2px solid #8D6E63;
            color: var(--warning-yellow); text-transform: uppercase;
            font-family: 'Creepster', cursive; letter-spacing: 2px;
            padding: 12px 24px; border-radius: 8px; transition: all 0.3s ease;
            text-shadow: 1px 1px 0 #000; text-decoration: none;
            box-shadow: 0 4px 6px rgba(0,0,0,0.5); margin-top: 15px; width: 100%; cursor: pointer;
        }
        .btn-dino-base:hover {
            background: #5D4037; color: #fff; border-color: #FFC107;
            transform: translateY(-2px); box-shadow: 0 6px 15px rgba(255, 193, 7, 0.3);
        }

        .btn-roar {
            background: linear-gradient(to bottom, #FF5722, #D84315);
            color: #fff; text-transform: uppercase; font-family: 'Creepster', cursive;
            letter-spacing: 2px; font-size: 1.5rem; padding: 15px 30px;
            /* SE ELIMINÓ EL BORDE ORIGINAL PARA USAR EL AMARILLO SOLICITADO */
            border: 4px solid #FFC107; /* Borde amarillo solicitado */
            border-radius: 8px;
            box-shadow: 0 0 20px rgba(255, 193, 7, 0.5); /* Glow amarillo */
            position: relative; overflow: hidden;
            animation: shake-constant 3s infinite linear; will-change: transform;
        }
        .btn-roar:hover {
            background: linear-gradient(to bottom, #FF8A65, #FF5722);
            box-shadow: 0 0 40px #FFC107; cursor: pointer;
        }
        @keyframes shake-constant {
            0% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(1px, 1px) rotate(0deg); }
            75% { transform: translate(1px, -1px) rotate(0deg); }
            100% { transform: translate(0, 0) rotate(0deg); }
        }

        /* --- SECCIÓN PRINCIPAL Y CONTENEDORES --- */
        .main-content-hidden { opacity: 0; pointer-events: none; }
        .reveal-content { opacity: 1; pointer-events: auto; transition: opacity 1.5s ease-in; }

        .dino-card {
            background: #2b1b17e6; /* Opacidad 90% */
            border: 4px solid #2E7D32;
            box-shadow: 0 0 30px rgba(0,0,0,0.8);
            border-radius: 12px;
            padding: 2rem;
            position: relative;
        }

        .count-box {
            background: rgba(62, 39, 35, 0.9); border: 2px solid #8D6E63;
            border-radius: 12px; min-width: 70px; padding: 10px;
            box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
        }

        /* --- GALERÍA ESTILO JURÁSICO --- */
        .photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 15px; }
        .photo-item { 
            width: 100%; height: 100px; background: #333; border-radius: 8px; border: 2px solid #8D6E63;
            display: flex; align-items: center; justify-content: center; overflow: hidden;
            position: relative; cursor: zoom-in;
        }
        .photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
        .photo-item:hover img { transform: scale(1.1); }

        /* --- LIGHTBOX (VISOR PANTALLA COMPLETA) --- */
        #lightbox-modal {
            background: rgba(0,0,0,0.95); backdrop-filter: blur(10px);
            z-index: 5000; /* SUPERIOR AL DINO */
            opacity: 0; transition: opacity 0.3s ease;
        }
        #lightbox-controls button { pointer-events: auto; }

        /* --- MODALES RSVP --- */
        .modal-overlay {
            background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(5px);
            z-index: 1000; -webkit-transform: translateZ(0); transform: translateZ(0);
        }
        .modal-content {
            background: url('https://www.transparenttextures.com/patterns/dark-leather.png'), linear-gradient(to bottom, #2b2b2b, #1a1a1a);
            border: 4px solid #FFC107; box-shadow: 0 0 50px rgba(255, 193, 7, 0.4); border-radius: 12px;
        }
        .dino-input {
            background: #000; border: 2px solid #555; color: #FFC107;
            font-family: 'Roboto Condensed', sans-serif; font-weight: bold;
            padding: 12px; width: 100%; border-radius: 6px;
        }

        /* --- FONDO ANIMADO --- */
        #shenlong-container {
            position: fixed; bottom: -20%; left: 50%;
            transform: translateX(-50%) translateZ(0); width: 100%; max-width: 1000px; height: 80vh;
            z-index: 0; pointer-events: none; opacity: 0;
            background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/5/52/T-rex_skeleton_silhouette.svg/1024px-T-rex_skeleton_silhouette.svg.png');
            background-repeat: no-repeat; background-position: center bottom; background-size: contain;
            filter: drop-shadow(0 0 20px rgba(0,0,0,0.8));
            transition: opacity 3s ease;
        }
        .falling-item {
            position: absolute; top: -50px; font-size: 24px; opacity: 0.6;
            animation: fall linear infinite; pointer-events: none; z-index: 50;
        }
        @keyframes fall { to { transform: translateY(110vh) rotate(360deg); } }
        .bg-jungle-gradient { background: radial-gradient(ellipse at bottom, #1b5e20 0%, #0a2f0c 50%, #000 100%); }
        .dino-title { font-family: 'Creepster', cursive; text-shadow: 4px 4px 0 #1B5E20, 6px 6px 0 #000; color: #FFC107; }

    

/* --- BOTÓN DE IDIOMA --- */
.lang-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 500;
    background: rgba(0,0,0,0.7);
    border: 2px solid #FFC107;
    border-radius: 999px;
    color: #FFC107;
    padding: 8px 14px;
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.lang-toggle:hover {
    background: rgba(46, 125, 50, 0.8);
    transform: translateY(-1px);
}
