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

body {
    font-family: 'Poppins', sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #161b33, #4c2882);
    overflow: hidden;
    color: #fff;
}

.background-overlay {
    position: absolute;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.9));
    z-index: 1;
}

.countdown-container {
    position: relative;
    text-align: center;
    z-index: 2;
    animation: fadeInUp 1s ease-in-out both;
    padding: 20px;
}

h1 {
    font-size: 2.5rem; /* Reducido para pantallas pequeñas */
    margin-bottom: 0px;
    letter-spacing: 2px;
    text-transform: ;
    color: #ffffff;
}

.subtitle {
    font-size: 1rem; /* Reducido ligeramente */
    margin-bottom: 30px;
    opacity: 0.8;
    text-transform: uppercase;
    color: #f0f0f0;
}

.countdown {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    max-width: 700px;
    margin: 0 auto;
    flex-wrap: wrap; /* Para que los items se acomoden en pantallas pequeñas */
}

.countdown-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    min-width: 80px; /* Reducido para mejor adaptabilidad */
    transform: perspective(600px) rotateX(0deg);
}

.countdown-item:hover {
    transform: perspective(600px) rotateX(15deg) scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.time-unit {
    font-size: 2.5rem; /* Reducido para pantallas pequeñas */
    font-weight: 600;
    color: #ffffff;
    display: block;
    transition: color 0.5s;
}

.countdown-item:hover .time-unit {
    color: #CAACD7;
}

p {
    font-size: 0.8rem; /* Reducido ligeramente */
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ddd;
}

@keyframes fadeInUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Animación para elementos que se desvanezcan al cargar */
.fade-in {
    animation: fadeInUp 1s ease forwards;
}

/* Media query para pantallas pequeñas */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .time-unit {
        font-size: 2rem;
    }

    .countdown-item {
        padding: 10px;
        min-width: 70px;
    }

    .countdown {
        gap: 5px;
    }
}
