* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    margin: 0;
    background: #000;
    overflow: hidden;
    font-family: 'Comic Sans MS', 'Chalkboard SE', Arial, sans-serif;
}

#logo-container {
    position: absolute;
    bottom: -200px;
    left: -300px;
    width: 180px;
    z-index: 100;
    transition: all 0.6s ease;
    filter: drop-shadow(3px 3px 5px rgba(0,0,0,0.4));
    pointer-events: none;
}

#logo-img {
    width: 100%;
    display: block;
    transition: opacity 0.15s ease;
}

.mode-transparent { opacity: 0.6; transition: opacity 0.5s ease; }

.spin-transform { animation: spin-once 0.8s cubic-bezier(0.5, 0, 0.3, 1); }

@keyframes spin-once {
    0%   { transform: rotate(0deg) scale(1); }
    50%  { transform: rotate(180deg) scale(1.15); }
    100% { transform: rotate(360deg) scale(1); }
}

.glitch-anim { animation: glitch-fx 0.3s forwards; }

@keyframes glitch-fx {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.2) translate(-5px, 5px); }
    100% { transform: scale(1); }
}

#particles-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; overflow: visible;
}

.dust-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

@keyframes dust-fly {
    0%   { transform: translate(0, 0) scale(0); opacity: 1; }
    30%  { opacity: 1; transform: translate(var(--mid-x), var(--mid-y)) scale(1); }
    100% { transform: translate(var(--end-x), var(--end-y)) scale(0.3); opacity: 0; }
}

/* 🐱 GATITO MASCOTA */
#cat-mascot {
    position: absolute;
    bottom: -30px; right: -40px; width: 380px;
    z-index: 99; pointer-events: none;
    transform: translate(500px, 500px) scale(0.3) rotate(-45deg);
    opacity: 0;
    filter: drop-shadow(-5px -3px 12px rgba(0,0,0,0.6));
    transition: transform 1.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
    transform-origin: bottom right;
}

#cat-mascot img { width: 100%; display: block; transform: scaleX(-1); }

.cat-visible {
    transform: translate(0, 0) scale(1) rotate(-25deg) !important;
    opacity: 1 !important;
    animation: cat-idle 2.5s ease-in-out infinite 1.4s;
}

@keyframes cat-idle {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(-25deg); }
    50%      { transform: translate(-5px, -5px) scale(1.02) rotate(-22deg); }
}

.cat-leaving {
    transform: translate(500px, 500px) scale(0.3) rotate(-60deg) !important;
    opacity: 0 !important;
    transition: transform 1s cubic-bezier(0.5, 0, 0.75, 0), opacity 0.8s ease !important;
    animation: none !important;
}

#video-player { width: 100vw; height: 100vh; background: black; display: block; }

#loading-screen {
    position: absolute; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 50%, #FFB88C 100%);
    z-index: 150; display: flex; flex-direction: column;
    justify-content: center; align-items: center; overflow: hidden;
}

.bubble {
    position: absolute; border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    animation: float-up linear infinite; pointer-events: none;
}

@keyframes float-up {
    0%   { transform: translateY(100vh) scale(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

.sparkle {
    position: absolute; color: #FFF; font-size: 24px;
    animation: sparkle-twinkle 2s ease-in-out infinite;
    pointer-events: none; text-shadow: 0 0 10px rgba(255,255,255,0.8);
}

@keyframes sparkle-twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
    50%      { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

#loading-content {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 30px; z-index: 10; padding: 20px;
}

#loading-logo-wrapper { animation: logo-entrance 1s ease-out; }

@keyframes logo-entrance {
    0%   { transform: scale(0) rotate(-180deg); opacity: 0; }
    60%  { transform: scale(1.15) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

#loading-logo {
    width: 340px; max-width: 80vw;
    animation: pulse 2.5s ease-in-out infinite;
    filter: drop-shadow(0 10px 25px rgba(0,0,0,0.35));
}

@keyframes pulse {
    0%, 100% { transform: scale(1) translateY(0); }
    50%      { transform: scale(1.05) translateY(-8px); }
}

#welcome-title {
    color: white; font-size: 32px; font-weight: bold; text-align: center;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.25), 0 0 20px rgba(255,255,255,0.4);
    animation: title-bounce 2s ease-in-out infinite; letter-spacing: 1px;
}

@keyframes title-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}

#loading-bar-container {
    width: 320px; max-width: 80vw; height: 18px;
    background: rgba(255,255,255,0.25); border-radius: 20px;
    overflow: hidden; border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2), inset 0 2px 5px rgba(0,0,0,0.2);
}

#loading-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #FFD93D, #FF6B9D, #C74EFF, #4E9EFF);
    background-size: 300% 100%; border-radius: 20px;
    animation: load-fill 2.5s ease-in-out forwards, gradient-move 2s linear infinite;
    box-shadow: 0 0 15px rgba(255,255,255,0.6);
}

@keyframes load-fill { 0% { width: 0%; } 100% { width: 100%; } }
@keyframes gradient-move { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }

#loading-text { color: white; font-size: 16px; font-weight: bold; text-shadow: 2px 2px 0 rgba(0,0,0,0.25); }

#start-btn {
    position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%);
    padding: 22px 55px; cursor: pointer; z-index: 200;
    background: linear-gradient(135deg, #FFD93D 0%, #FF9F43 100%);
    color: #4A1F00; border: 5px solid white; border-radius: 50px;
    font-size: 24px; font-weight: bold; font-family: 'Comic Sans MS', Arial, sans-serif;
    box-shadow: 0 8px 0 #C7500A, 0 12px 25px rgba(0,0,0,0.4);
    transition: all 0.15s ease; display: none; letter-spacing: 1px;
    text-shadow: 0 2px 0 rgba(255,255,255,0.4);
    animation: btn-appear 0.6s ease-out, btn-idle 2s ease-in-out infinite 0.6s;
}

@keyframes btn-appear {
    0%   { opacity: 0; transform: translateX(-50%) translateY(50px) scale(0.5); }
    60%  { transform: translateX(-50%) translateY(-10px) scale(1.1); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes btn-idle {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50%      { transform: translateX(-50%) scale(1.04); }
}

#start-btn:hover {
    background: linear-gradient(135deg, #FFE66D 0%, #FFB347 100%);
    box-shadow: 0 10px 0 #C7500A, 0 15px 30px rgba(0,0,0,0.5);
    transform: translateX(-50%) translateY(-3px) scale(1.05); animation: none;
}

#start-btn:active {
    transform: translateX(-50%) translateY(4px) scale(0.98);
    box-shadow: 0 3px 0 #C7500A, 0 5px 10px rgba(0,0,0,0.3);
}

@media (max-width: 600px) {
    #welcome-title { font-size: 22px; } #loading-logo { width: 240px; }
    #start-btn { font-size: 18px; padding: 16px 40px; } #cat-mascot { width: 240px; }
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* Evita que la gente pause el video haciendo clic, como TV real */
    z-index: 1;
}
