@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    background-color: #000 !important;
    background-image: url('https://batallacultural.shop/images/bg.jpg?v=2');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 1rem;
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
}


.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
    z-index: 1;
}

.logo {
    width: clamp(50px, 15vw, 70px);
    border-radius: 100%;
    height: auto;
    margin-bottom: 0.5rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.logo_text {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.main-content {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    padding-top: 8rem; /* Dar espacio para el header */
}

/* Segundos grandes de fondo */
.seconds-background {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(30rem, 60vw, 50rem);
    font-weight: 900;
    color: rgba(255, 0, 0, 0.2);
    z-index: -2;
    pointer-events: none;
    user-select: none;
    font-family: 'Impact', sans-serif;
    line-height: 1;
    transition: all 0.4s ease;
    text-align: center;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seconds-background.flash {
    color: rgba(255, 0, 0, 0.2);
}

/* Overlay de suspenso */
.suspense-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center, 
        transparent 20%, 
        rgba(0, 0, 0, 0.9) 80%
    );
    pointer-events: none;
    z-index: -1;
    animation: pulse-darkness 4s ease-in-out infinite;
}

.logo {
    width: clamp(50px, 15vw, 70px);
    border-radius: 100%;
    height: auto;
    margin-bottom: 0.5rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.logo_text {
    margin-bottom: 3rem;
    font-size: 1rem;
    font-weight: 100;
}

/* Container de frases dinámicas */
.dynamic-phrase-container {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
}

.dynamic-phrase {
    font-size: clamp(1rem, 4vw, 2rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    margin: 0;
    padding: 0 1rem;
}

.countdown-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    width: 100%;
    padding: 0;
}

.countdown-el {
    padding: clamp(1.2rem, 3vw, 2rem);
    text-align: center;
    transition: all 0.4s ease;
    width: clamp(120px, 25vw, 160px);
    min-width: 120px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Wrapper para animaciones de tiempo */
.time-wrapper {
    position: relative;
    overflow: hidden;
    height: clamp(3rem, 8vw, 5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    perspective: 200px;
}

.big-text {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
    color: #fff;

}

time-flip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
    transform: translateY(100%) rotateX(-90deg);
    opacity: 0;
    z-index: 1;
    transform-origin: center bottom;
    border-radius: inherit;
    pointer-events: none;
}

.time-flip-overlay.flip-active {
    animation: calendar-flip-smooth 2s ease-in-out infinite;
}

/* Animación especial para segundos más rápida */
.critical-time .time-flip-overlay.flip-active {
    animation: calendar-flip-seconds 1s ease-in-out infinite;
}

/* Animación especial para minutos */
.urgent-time .time-flip-overlay.flip-active {
    animation: calendar-flip-minutes 1.5s ease-in-out infinite;
}

.countdown-el span {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
}



/* Nuevas animaciones */
@keyframes spray-glow {
    0% { 
        text-shadow: 
            3px 3px 0 rgba(0, 0, 0, 0.9),
            6px 6px 15px rgba(255, 0, 0, 0.2);
        filter: brightness(0.9);
    }
    100% { 
        text-shadow: 
            3px 3px 0 rgba(0, 0, 0, 0.9),
            6px 6px 25px rgba(255, 0, 0, 0.4);
        filter: brightness(1.1);
    }
}

@keyframes pulse-darkness {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes calendar-flip-smooth {
    0% { 
        transform: translateY(100%) rotateX(-90deg) scale(0.95);
        opacity: 0;
    }
    20% { 
        transform: translateY(60%) rotateX(-60deg) scale(0.97);
        opacity: 0.2;
    }
    50% { 
        transform: translateY(0%) rotateX(0deg) scale(1);
        opacity: 0.4;
    }
    80% { 
        transform: translateY(-60%) rotateX(60deg) scale(0.97);
        opacity: 0.2;
    }
    100% { 
        transform: translateY(-100%) rotateX(90deg) scale(0.95);
        opacity: 0;
    }
}

@keyframes calendar-flip-seconds {
    0% { 
        transform: translateY(80%) rotateX(-70deg) scale(0.9);
        opacity: 0;
        filter: blur(0.5px);
    }
    30% { 
        transform: translateY(20%) rotateX(-15deg) scale(0.95);
        opacity: 0.3;
        filter: blur(0px);
    }
    70% { 
        transform: translateY(-20%) rotateX(15deg) scale(1.02);
        opacity: 0.5;
        filter: blur(0px);
    }
    100% { 
        transform: translateY(-80%) rotateX(70deg) scale(0.9);
        opacity: 0;
        filter: blur(0.5px);
    }
}

@keyframes calendar-flip-minutes {
    0% { 
        transform: translateY(90%) rotateX(-75deg) scale(0.92);
        opacity: 0;
    }
    35% { 
        transform: translateY(15%) rotateX(-8deg) scale(0.98);
        opacity: 0.35;
    }
    65% { 
        transform: translateY(-15%) rotateX(8deg) scale(1.01);
        opacity: 0.45;
    }
    100% { 
        transform: translateY(-90%) rotateX(75deg) scale(0.92);
        opacity: 0;
    }
}

/* Remover las animaciones 3D anteriores que causaban problemas */
@keyframes calendar-flip-3d {
    0% { 
        transform: translateY(100%) rotateX(-90deg) scale(0.8);
        opacity: 0;
    }
    25% { 
        transform: translateY(50%) rotateX(-45deg) scale(0.9);
        opacity: 0.3;
    }
    50% { 
        transform: translateY(0%) rotateX(0deg) scale(1);
        opacity: 0.8;
    }
    75% { 
        transform: translateY(-25%) rotateX(15deg) scale(1.05);
        opacity: 0.6;
    }
    100% { 
        transform: translateY(-100%) rotateX(90deg) scale(0.8);
        opacity: 0;
    }
}

@keyframes calendar-flip-fast {
    0% { 
        transform: translateY(80%) rotateX(-75deg) scale(0.9);
        opacity: 0;
        filter: blur(1px);
    }
    30% { 
        transform: translateY(20%) rotateX(-20deg) scale(0.95);
        opacity: 0.6;
        filter: blur(0px);
    }
    60% { 
        transform: translateY(-10%) rotateX(10deg) scale(1.02);
        opacity: 0.8;
        filter: blur(0px);
    }
    100% { 
        transform: translateY(-100%) rotateX(80deg) scale(0.85);
        opacity: 0;
        filter: blur(1px);
    }
}

@keyframes calendar-flip-medium {
    0% { 
        transform: translateY(90%) rotateX(-80deg) scale(0.85);
        opacity: 0;
    }
    40% { 
        transform: translateY(10%) rotateX(-10deg) scale(0.98);
        opacity: 0.7;
    }
    70% { 
        transform: translateY(-20%) rotateX(20deg) scale(1.03);
        opacity: 0.9;
    }
    100% { 
        transform: translateY(-110%) rotateX(85deg) scale(0.8);
        opacity: 0;
    }
}

@keyframes urgent-pulse-3d {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.01);
    }
}

@keyframes critical-warning-3d {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    25% { 
        transform: scale(1.005) rotate(-0.2deg);
        filter: brightness(1.05);
    }
    75% { 
        transform: scale(1.005) rotate(0.2deg);
        filter: brightness(1.05);
    }
}

@keyframes number-shake-3d {
    0%, 100% { 
        transform: translateX(0) rotateY(0deg) rotateZ(0deg);
    }
    25% { 
        transform: translateX(-2px) rotateY(-2deg) rotateZ(-1deg) scale(1.02);
    }
    75% { 
        transform: translateX(2px) rotateY(2deg) rotateZ(1deg) scale(1.02);
    }
}

@keyframes gradient-shift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(20deg); }
}

/* Partículas de suspenso */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, rgba(255, 0, 0, 0.1), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.08), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 0, 0, 0.06), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: floating-particles 25s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes floating-particles {
    0% { transform: translateY(0px) translateX(0px); }
    100% { transform: translateY(-200px) translateX(-50px); }
}

@media (max-width: 480px) {
    .countdown-container {
        justify-content: space-around;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .countdown-el {
        padding: 1rem 0.5rem;
        width: clamp(100px, 22vw, 140px);
        min-width: 100px;
    }
    
    .dynamic-phrase-container {
        height: 100px;
        margin-bottom: 1.5rem;
    }
}

@media (min-width: 768px) {
    .countdown-container {
        justify-content: center;
        gap: clamp(2rem, 5vw, 3rem);
    }
}

/* Efecto especial para momentos finales */
body.final-moments {
    animation: final-tension 2s ease-in-out infinite;
}

@keyframes final-tension {
    0%, 100% { 
        filter: brightness(1) contrast(1);
    }
    50% { 
        filter: brightness(1.1) contrast(1.1);
    }
}

/* Animación suave para los segundos de fondo */
@keyframes gentle-pulse {
    0%, 100% { 
        opacity: 0.05;
        transform: translate(-50%, -50%) scale(1);
        filter: blur(1px);
    }
    50% { 
        opacity: 0.08;
        transform: translate(-50%, -50%) scale(1.01);
        filter: blur(0);
    }
}



.instagram-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: transparent;
    color: white;
    padding: 0.8rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.instagram-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.instagram-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.promo-section {
    text-align: center;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.promo-text {
    font-size: 0.7rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}