:root {
    --primary: #f87171;
    /* Subtle red/coral */
    --primary-glow: rgba(248, 113, 113, 0.6);
    --secondary: #60a5fa;
    --bg-dark: #0f172a;
    --text-light: #f8fafc;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-dark);
    overflow: hidden;
    position: relative;
}

/* Dynamic Animated Background */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(76, 29, 149, 0.4) 0%, rgba(15, 23, 42, 1) 50%);
    animation: rotateBg 25s linear infinite;
    z-index: -2;
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.04"/></svg>');
    z-index: -1;
    pointer-events: none;
}

@keyframes rotateBg {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.container {
    width: 90%;
    max-width: 720px;
    padding: 2.4rem 1.6rem;
    border-radius: 24px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(248, 113, 113, 0.15);
    transform: translateY(30px);
    opacity: 0;
    animation: slideUp 1.2s ease-out forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

header {
    margin-bottom: 1.5rem;
}

.main-title {
    font-size: clamp(1.8rem, 4vw, 3.6rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.highlight {
    color: transparent;
    -webkit-text-stroke: 1px var(--primary);
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
    display: inline-block;
    animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    from {
        filter: drop-shadow(0 0 5px rgba(248, 113, 113, 0.5));
    }

    to {
        filter: drop-shadow(0 0 15px rgba(96, 165, 250, 0.8));
    }
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    color: #cbd5e1;
    letter-spacing: 2px;
}

.countdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: nowrap;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    flex: 1 1 0;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 0.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.time-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.number {
    font-size: clamp(2rem, 4.8vw, 3.6rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #94a3b8;
    font-weight: 500;
}

.separator {
    font-size: 3rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.2);
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    0% {
        opacity: 0.2;
    }

    100% {
        opacity: 1;
    }
}

.target-date {
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: inline-block;
}

.target-date h3 {
    font-size: 1rem;
    font-weight: 300;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

#target-date-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}

.music-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.btn-glow {
    background: transparent;
    color: white;
    border: 1px solid var(--primary);
    padding: 0.8rem 2.5rem;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0 15px var(--primary-glow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.4), rgba(96, 165, 250, 0.4));
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--primary-glow);
}

.btn-glow:hover::before {
    opacity: 1;
}

.btn-glow:active {
    transform: translateY(1px);
}

.music-note {
    font-size: 0.8rem;
    color: #64748b;
    max-width: 80%;
    line-height: 1.4;
}

.controls-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-icon {
    font-size: 1.2rem;
}

/* Range slider styling */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}

/* Webkit (Chrome, Safari, Edge) */
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    margin-top: -4px;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Firefox */
input[type=range]::-moz-range-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
}

input[type=range]::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px var(--primary-glow);
}

@media (max-width: 600px) {
    .countdown-wrapper {
        gap: 0.8rem;
    }

    .time-box {
        min-width: 70px;
        padding: 1rem 0.5rem;
    }

    .number {
        font-size: 2rem;
    }

    .separator {
        display: none;
    }

    .container {
        padding: 2.5rem 1rem;
    }
}

/* Cascada de iconos */
.falling-icon {
    position: absolute;
    top: -60px; /* Inicia un poco más arriba de la pantalla para que no aparezca de golpe */
    z-index: 0; /* Por detrás del cristal pero por delante del fondo animado */
    pointer-events: none; /* Ignora el ratón, para no interrumpir clics en la página */
    object-fit: contain; /* Mantiene la proporción si la imagen no es perfecta */
    animation: fall linear forwards;
    opacity: 0.6; /* Un poco transparentes para no molestar mucho a la vista */
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2)); /* Leve brillo para encajar en el tema */
}

/* Rotación y caída constantes hacia abajo */
@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
    }
}