
:root { --mega-blue: #0d6efd; --mega-dark: #001534; --mega-yellow: #ffc107; }
body { background-color: #f1f4f9; font-family: 'Nunito Sans', sans-serif; color: var(--mega-dark); }
.navbar-mega { background: #fff; padding: 1.2rem 0; box-shadow: 0 4px 20px rgba(0,21,52,0.05); }
.mega-card { background: #fff; border-radius: 30px; border: none; box-shadow: 0 10px 30px rgba(0,21,52,0.08); overflow: hidden; }
.card-step { padding: 30px; border-top: 5px solid var(--mega-blue); }
.card-step.step-special { border-top-color: #ff4757; }   
.feature-icon-circle {width: 50px; height: 50px; background: var(--mega-dark); color: var(--mega-yellow);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 20px;}
.p3-split { border: none; box-shadow: 0 15px 45px rgba(0,21,52,0.15); }
.p3-left { background: var(--mega-dark); color: #fff; padding: 50px; position: relative; }
.p3-left::after { content: ""; position: absolute; right: -25px; top: 0; bottom: 0; width: 50px; background: var(--mega-dark); transform: skewX(-6deg); z-index: 1; }
.p3-right { padding: 50px; background: var(--mega-yellow); color: var(--mega-dark); z-index: 2; }
.results-header { background: var(--mega-dark); color: #fff; padding: 20px 30px; }
.ball-history-large { width: 42px; height: 42px; line-height: 42px; font-size: 1rem; font-weight: 900; border-radius: 50%; text-align: center; background: linear-gradient(135deg, #0d6efd, #001534); color: white; display: inline-block; box-shadow: 0 4px 10px rgba(13, 110, 253, 0.2); }
.hot-number-row { background: #f8f9fa; border-radius: 20px; padding: 15px 20px; margin-bottom: 12px; transition: 0.3s; }
.acierto-circle { width: 40px; height: 40px; background: var(--mega-dark); color: var(--mega-yellow); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; flex-shrink: 0; }
#countdown-container { background: rgba(255,255,255,0.1); border-radius: 15px; padding: 10px 20px; display: inline-block; margin-top: 15px; border: 1px solid rgba(255,255,255,0.1); }
.time-badge-mega {background: var(--mega-dark); color: #fff; padding: 5px 12px; border-radius: 10px; font-weight: 800;}
.pagination .page-link { border-radius: 10px; margin: 0 3px; border: none; color: var(--mega-dark); font-weight: bold; }
.pagination .page-item.active .page-link { background-color: var(--mega-blue); color: #fff; }
.fw-900 { font-weight: 900; }
.xx-small { font-size: 0.7rem; }
.modal-content { border-radius: 30px; border: none; overflow: hidden; }
.modal-header-mega { background: var(--mega-dark); color: #fff; border: none; padding: 30px 30px 10px; }


/* --- ESTILO BASE (Móvil y Tablet) --- */
.flip-clock-wrapper {
    display: flex;
    align-items: center;
    justify-content: center; /* Centra el contenido */
    gap: 4px;                /* Reducido ligeramente para ganar espacio */
    width: 100%;             /* Asegura que no exceda al padre */
    max-width: 100%;         /* Evita desbordamiento */
    box-sizing: border-box;
}

.flip-cards-days {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 2px;
}

.flip-card {
    background: linear-gradient(to bottom, #2c2c2c 48%, #000000 50%, #2c2c2c 52%);
    color: #e0e0e0;
    /* Usamos clamp para que la fuente sea flexible entre 1.2rem y 1.6rem */
    font-size: clamp(1.2rem, 4vw, 1.6rem); 
    font-weight: 800;
    padding: 6px 4px;        /* Reducido el padding lateral */
    border-radius: 6px;
    min-width: 28px;         /* Bajamos el mínimo para pantallas muy pequeñas */
    text-align: center;
    border: 1px solid #444;
    line-height: 1.1;
    flex-shrink: 1;          /* PERMITE que la tarjeta se encoja si es necesario */
}

.flip-dot {
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;       /* Reducido un poco para móvil */
    margin-top: -10px;       /* Ajustado el margen */
}

.flip-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;          /* Evita que el grupo se deforme */
}

.flip-label {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 8px;          /* Un punto menos para asegurar que quepa en una línea */
    letter-spacing: 0.5px;
    color: #0dcaf0;
    margin-top: 6px;
    font-weight: bold;
    text-transform: uppercase;
}

/* --- AJUSTE PARA PANTALLAS GRANDES (PC) --- */
@media (min-width: 992px) {
    .flip-clock-wrapper {
        gap: 15px;
    }

    .flip-card {
        font-size: 3.5rem; 
        min-width: 65px;  
        padding: 10px 12px;
        border-radius: 10px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }

    .flip-dot {
        font-size: 3rem;
        margin-top: -30px;
    }

    .flip-label {
        font-size: 12px;
        margin-top: 12px;
        letter-spacing: 2px;
    }
}