* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0b1020;
    color: #ffffff;
    min-height: 100vh;

    /* 🔥 FIX PRINCIPAL: permitir scroll en móvil */
    overflow-x: hidden;
    overflow-y: auto;
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #ffcc70, #ff6f91, #845ec2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: #fff;
}

.loader-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

#loader p {
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Fondo */
.bg-gradient {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top left, #ff9a9e, transparent 50%),
                radial-gradient(circle at bottom right, #fad0c4, transparent 50%),
                linear-gradient(135deg, #845ec2, #ff6f91);
    opacity: 0.9;
    z-index: -2;
}

/* Globos flotando */
.floating-balloon {
    position: fixed;
    width: 80px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: float 8s ease-in-out infinite;
    z-index: -1;
}

.balloon-1 {
    left: 5%;
    top: 20%;
    animation-delay: 0s;
}

.balloon-2 {
    right: 10%;
    top: 40%;
    animation-delay: 2s;
}

.balloon-3 {
    left: 15%;
    bottom: 10%;
    animation-delay: 4s;
}

/* Canvas confeti */
#confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

/* Main */
.hidden {
    opacity: 0;
    pointer-events: none;
}

main {
    position: relative;

    /* 🔥 FIX: evitar que se vea apretado en móviles */
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px 60px;
    text-align: center;
}

/* Hero */
.hero .logo {
    width: 180px;
    max-width: 60%;
    margin: 0 auto 20px;
    display: block;
}

.hero h1 {
    font-family: "Fredoka One", cursive;
    font-size: 2.4rem;
    margin-bottom: 10px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.subtitle {
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto 24px;
}

/* Glass card */
.glass-card {
    margin: 20px auto;
    padding: 20px 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Countdown */
.countdown-card h2 {
    margin-bottom: 12px;
    font-weight: 700;
}

#countdown {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.time-box {
    min-width: 70px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.time-box span {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
}

.time-box small {
    font-size: 0.75rem;
    opacity: 0.85;
}

/* Botones */
.actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
    transform: translateY(0);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.btn-instagram {
    background: radial-gradient(circle at 30% 30%, #fdf497 0, #fd5949 45%, #d6249f 70%, #285aeb 100%);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.45);
    filter: brightness(1.05);
}

/* Juegos */
.games-section h2 {
    margin-bottom: 16px;
    font-weight: 700;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.game-item {
    padding: 10px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    margin-top: 30px;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Animaciones */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 600px) {

    /* 🔥 FIX: globos y confeti desactivados en móvil */
    .floating-balloon,
    #confetti-canvas {
        display: none;
    }

    .hero h1 {
        font-size: 1.9rem;
    }

    .glass-card {
        padding: 16px 18px;
    }

    .btn {
        width: 100%;
    }

    main {
        padding: 30px 16px;
    }
}

/* Nueva grilla más linda */
.pretty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

/* Tarjetas más bonitas */
.game-card {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 22px 12px;
    text-align: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Icono grande arriba */
.game-card .icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* Texto */
.game-card span {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Hover */
.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}

/* Mobile */
@media (max-width: 600px) {
    .pretty-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 14px;
    }

    .game-card {
        padding: 18px 10px;
    }

    .game-card .icon {
        font-size: 1.8rem;
    }
}
