:root {
            --tanjiro-green: #388E3C;
            --tanjiro-black: #121212;
            --nezuko-pink: #F48FB1;
            --zenitsu-yellow: #FFD54F;
            --rengoku-red: #D32F2F;
            --wisteria-purple: #9C27B0;
            --demon-dark: #050505;
        }

        body {
            background-color: var(--demon-dark);
            font-family: 'Noto Serif JP', serif;
            overflow-x: hidden;
            color: #fff;
            margin: 0;
            padding: 0;
            /* Evita el rebote elástico en móviles */
            overscroll-behavior: none; 
        }

        /* --- ESTILOS PARA LIGHTBOX Y ROTACIÓN INTELIGENTE --- */
        .rotate-mobile {
            transform: rotate(90deg);
            /* Forzamos dimensiones para ocupar la pantalla sin desbordar */
            width: 100vh !important; 
            height: 100vw !important;
            max-width: 100vh !important;
            max-height: 100vw !important;
            object-fit: contain;
            /* Centrado absoluto tras rotación */
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotate(90deg);
        }

        .pointer-events-auto {
            pointer-events: auto;
        }
        
        #lightbox-modal {
            transition: opacity 0.3s ease-in-out, visibility 0.3s;
        }

        /* Animación para el Ghost Dot (Swipe Hint) */
        @keyframes ghostSwipe {
            0% { transform: translate(0, 0); opacity: 0; }
            10% { opacity: 1; }
            40% { transform: translate(25px, 0); opacity: 1; } /* Movimiento Horizontal */
            50% { transform: translate(0, 0); opacity: 1; }
            80% { transform: translate(0, 25px); opacity: 1; } /* Movimiento Vertical */
            100% { transform: translate(0, 0); opacity: 0; }
        }

        /* --- FONDO PATRÓN ICHIMATSU (TANJIRO) --- */
        .checkered-bg {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background-color: #1a1a1a;
            background-image: 
                linear-gradient(45deg, #0e2a10 25%, transparent 25%, transparent 75%, #0e2a10 75%, #0e2a10),
                linear-gradient(45deg, #0e2a10 25%, transparent 25%, transparent 75%, #0e2a10 75%, #0e2a10);
            background-size: 60px 60px;
            background-position: 0 0, 30px 30px;
            opacity: 0.6;
            z-index: -3;
        }

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

        /* MÁSCARA IMAGEN */
        .mask-wrapper {
            width: 280px;
            height: 320px;
            cursor: pointer;
            filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
            transition: transform 0.3s ease;
            animation: floatMask 3s ease-in-out infinite;
            position: relative;
            z-index: 102;
        }
        .mask-wrapper:hover { transform: scale(1.05); filter: drop-shadow(0 0 30px var(--rengoku-red)); }

        .mask-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        @keyframes floatMask {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-15px); }
        }

        /* EFECTO DE FUEGO (TRANSICIÓN) */
        #fire-overlay {
            position: fixed;
            top: 50%; left: 50%;
            width: 0; height: 0;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            background: radial-gradient(circle, 
                rgba(255, 235, 59, 1) 0%, 
                rgba(255, 152, 0, 1) 30%, 
                rgba(211, 47, 47, 0.9) 60%, 
                transparent 70%);
            z-index: 101;
            opacity: 0;
            pointer-events: none;
            mix-blend-mode: screen; 
        }

        .fire-active {
            animation: burnTransition 1.5s forwards ease-in-out;
        }

        @keyframes burnTransition {
            0% { width: 0; height: 0; opacity: 1; }
            20% { width: 50vw; height: 50vw; opacity: 1; }
            50% { width: 150vw; height: 150vw; opacity: 0.9; }
            100% { width: 300vw; height: 300vw; opacity: 0; }
        }

        .fade-out-screen {
            opacity: 0;
            pointer-events: none;
        }

        /* --- BOTÓN MÚSICA HANAFUDA --- */
        #music-btn {
            position: fixed; top: 20px; right: 20px; z-index: 50;
            width: 50px; height: 80px; 
            background: #fff;
            border: 2px solid #333;
            border-radius: 4px;
            overflow: hidden;
            cursor: pointer;
            box-shadow: 0 5px 15px rgba(0,0,0,0.5);
            transition: transform 0.3s;
            opacity: 0; 
        }
        #music-btn:hover { transform: scale(1.1) rotate(5deg); }
        
        .hanafuda-art {
            position: absolute; inset: 2px;
            background: #e0e0e0;
            border: 1px solid #000;
        }
        .hanafuda-sun {
            position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
            width: 50px; height: 50px;
            background: #D32F2F;
            border-radius: 50%;
            z-index: 1;
        }
        .hanafuda-mountain {
            position: absolute; bottom: 0; width: 100%; height: 30%;
            background: #333; border-radius: 50% 50% 0 0; z-index: 2;
        }
        .hanafuda-rays {
            position: absolute; top: 15px; width: 100%; height: 50%;
            background: repeating-conic-gradient(from 0deg at 50% 0%, transparent 0deg, transparent 15deg, rgba(0,0,0,0.1) 15deg, rgba(0,0,0,0.1) 30deg);
            z-index: 0;
        }
        
        .music-icon-overlay {
            position: absolute; inset: 0;
            display: flex; align-items: center; justify-content: center;
            z-index: 10; color: #000;
        }

        /* --- ESPADA NICHIRIN --- */
        .nichirin-sword {
            position: relative;
            width: 300px;
            height: 40px;
            margin: 20px auto;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .blade {
            width: 220px; height: 12px;
            background: linear-gradient(to bottom, #cfcfcf 20%, #000 50%, #000 100%);
            border-radius: 0 50% 10% 0; 
            position: relative;
            box-shadow: 0 0 5px rgba(255,255,255,0.3);
            z-index: 1;
        }
        .blade::after {
            content: ''; position: absolute; bottom: 0; left: 0; width: 90%; height: 4px;
            background: rgba(255,255,255,0.2);
            border-radius: 2px;
        }
        .tsuba {
            width: 12px; height: 35px;
            background: #000;
            border: 2px solid #FFD54F;
            border-radius: 4px;
            position: relative;
            z-index: 2;
            margin-right: -2px;
        }
        .tsuka {
            width: 70px; height: 10px;
            background: repeating-linear-gradient(45deg, #000, #000 4px, #D32F2F 4px, #D32F2F 6px);
            border-radius: 2px 0 0 2px;
            border: 1px solid #333;
            z-index: 1;
            margin-right: -2px;
        }

        /* --- ELEMENTOS FLOTANTES --- */
        .wisteria-petal {
            position: absolute; width: 15px; height: 20px;
            background: radial-gradient(circle at 30% 30%, #E1BEE7, #9C27B0);
            border-radius: 50% 0 50% 50%; opacity: 0.8;
        }
        @keyframes floatPetal {
            0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
            10% { opacity: 0.9; }
            100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
        }
        
        .main-content-hidden { opacity: 0; pointer-events: none; transition: opacity 2s ease-in; }
        .reveal-content { opacity: 1; pointer-events: auto; }
        
        .anime-title {
            font-family: 'Permanent Marker', cursive;
            background: linear-gradient(to bottom, #fff 40%, #ccc 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            filter: drop-shadow(4px 4px 0 #D32F2F);
        }

        /* Estilos Tarjetas */
        .scroll-bg {
            background-color: rgba(20, 20, 20, 0.9);
            border: 1px solid #555;
            box-shadow: 0 0 20px rgba(156, 39, 176, 0.3);
            background-image: url('https://www.transparenttextures.com/patterns/japanese-asanoha.png');
        }

        /* Countdown */
        .countdown-box {
            background: linear-gradient(to bottom, #e0e0e0, #bdbdbd);
            border-top: 3px solid #333; border-bottom: 3px solid #333;
            color: #000; font-family: 'Cinzel', serif;
            box-shadow: 0 4px 10px rgba(0,0,0,0.5);
        }

        /* --- BOTONES DE RESPIRACIÓN --- */
        .btn-water {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            background: linear-gradient(90deg, #01579B, #0288D1, #4FC3F7, #0288D1, #01579B);
            background-size: 300% 100%;
            color: #E0F7FA !important;
            font-family: 'Cinzel', serif;
            text-transform: uppercase;
            letter-spacing: 2px;
            border: 1px solid #81D4FA;
            box-shadow: 0 0 15px rgba(3, 169, 244, 0.4);
            animation: waterFlow 4s infinite linear;
            transition: all 0.3s ease;
        }

        @keyframes waterFlow {
            0% { background-position: 0% 50%; }
            100% { background-position: 100% 50%; }
        }

        .btn-water:hover {
            box-shadow: 0 0 25px #03A9F4, 0 0 10px #E1F5FE;
            border-color: #fff;
            transform: translateY(-2px);
            text-shadow: 0 0 8px #fff;
        }

        .btn-flame {
            position: relative;
            background: linear-gradient(45deg, #B71C1C, #FF5722, #FFC107, #FF5722, #B71C1C);
            background-size: 300% 300%;
            color: #FFF3E0;
            font-family: 'Permanent Marker', cursive;
            text-transform: uppercase;
            border: 2px solid #FFD700;
            text-shadow: 2px 2px 0px #bf360c;
            animation: flameBurn 1.5s infinite linear;
            box-shadow: 0 0 10px #D84315;
            transition: transform 0.2s;
        }

        @keyframes flameBurn {
            0% { background-position: 0% 50%; box-shadow: 0 0 10px #D84315; }
            50% { background-position: 100% 50%; box-shadow: 0 0 30px #FF5722; }
            100% { background-position: 0% 50%; box-shadow: 0 0 10px #D84315; }
        }

        .btn-flame:hover {
            transform: scale(1.05);
            color: #fff;
            text-shadow: 0 0 10px #FFC107;
        }

        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: #121212; }
        ::-webkit-scrollbar-thumb { background: #388E3C; border-radius: 4px; }

/* --- BOTÓN DE IDIOMA --- */
.lang-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 50;
    padding: 0.6rem 0.8rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid var(--wisteria-purple);
    color: #e9d5ff;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.5);
}
