/* ==========================================================================
   Variables y ConfiguraciÃ³n Base
   ========================================================================== */
:root {
    /* Paleta de colores Premium Dark Mode */
    --bg-dark: #0f111a;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.08);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;

    --accent: #00f0ff;
    /* Cyan vibrante */
    --accent-glow: rgba(0, 240, 255, 0.4);

    --hot-color: #ff3366;
    /* Rojo/Rosa para nÃºmeros calientes */
    --hot-glow: rgba(255, 51, 102, 0.5);

    --number-bg: rgba(255, 255, 255, 0.1);

    /* Fuentes Premium */
    --font-heading: 'Outfit', sans-serif;
    --font-numbers: 'Space Grotesk', monospace;
    --font-body: 'Outfit', sans-serif;

    /* Utilidades */
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* ==========================================================================
   Animaciones del Fondo (Blobs)
   ========================================================================== */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a1c29 0%, var(--bg-dark) 100%);
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #7000ff;
    /* PÃºrpura */
    bottom: 10%;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: var(--hot-color);
    top: 40%;
    left: 30%;
    opacity: 0.2;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(100px, 50px) scale(1.1);
    }

    100% {
        transform: translate(-50px, 100px) scale(0.9);
    }
}

/* ==========================================================================
   TipografÃ­a y Utilidades
   ========================================================================== */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 800;
}

.text-accent {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.text-hot {
    color: var(--hot-color);
    text-shadow: 0 0 20px var(--hot-glow);
}

.text-center {
    text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   NavegaciÃ³n
   ========================================================================== */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 17, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.nav-btn.active {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
    box-shadow: inset 0 0 0 1px var(--border-glass);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    margin-top: 120px;
    margin-bottom: 50px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Layouts Generales (Views)
   ========================================================================== */
.section-view {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.section-view.active-view {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-secondary);
}

/* ==========================================================================
   Controles y Filtros
   ========================================================================== */
.controls-bar {
    background: var(--bg-glass);
    position: relative;
    z-index: 50;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 15px;
    /* Added gap to prevent elements from crushing together */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    padding: 8px 15px;
    width: 100%;
    max-width: 400px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.search-box i {
    color: var(--text-secondary);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    width: 100%;
    outline: none;
}

.date-display {
    font-weight: 600;
    color: var(--accent);
    background: rgba(0, 240, 255, 0.1);
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   Tarjetas de Resultados (Lottery Cards)
   ========================================================================== */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 60px;
}

.date-section-header {
    grid-column: 1 / -1;
    margin: 15px 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.date-section-header h3 {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Country group headers */
.country-header {
    margin-top: 30px;
    padding: 12px 0;
    border-bottom: 2px solid rgba(0, 240, 255, 0.2);
}

.country-header:first-child {
    margin-top: 0;
}

.country-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    text-transform: none;
}

.lottery-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 15px 20px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.lottery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Borde superior decorativo según lotería (se asigna via JS) */
.lottery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    opacity: 0.8;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.lottery-name {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lottery-brand-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.lottery-real-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.draw-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Badge de fecha en cada tarjeta */
.date-badge {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    white-space: nowrap;
}

.date-badge.fallback {
    color: #ffb300;
    background: rgba(255, 179, 0, 0.12);
    border: 1px solid rgba(255, 179, 0, 0.25);
}

/* Banner informativo de fallback */
.fallback-banner {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(255, 179, 0, 0.08);
    border: 1px solid rgba(255, 179, 0, 0.2);
    border-radius: var(--radius-md);
    color: #ffb300;
    font-size: 0.95rem;
    margin-bottom: 10px;
    animation: fadeIn 0.4s ease-out;
}

.fallback-banner i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* === Feriados dominicanos === */
.date-badge.holiday {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.25);
    font-weight: 600;
    font-size: 0.7rem;
}

.fallback-banner.holiday-banner {
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.2);
    color: #ff8a8a;
}

.fallback-banner.holiday-banner strong {
    color: #ffb3b3;
}

.draw-time.holiday-label {
    color: #ff8a8a;
    font-style: italic;
    font-size: 0.6rem;
    padding: 2px 5px;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lottery-card.holiday-fallback {
    opacity: 1;
    /* Remove fading */
}

.lottery-card.holiday-fallback .numbers-container {
    opacity: 1;
}

/* Números Ganadores */
.hot-numbers-list {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.hot-ball {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35, #ff3b00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    position: relative;
}

.cold-ball {
    background: linear-gradient(135deg, #4ecdc4, #2ebf91);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.hot-ball::after {
    /* Removed content to eliminate glare that obscures numbers */
    position: absolute;
    top: 5px;
    left: 10px;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    filter: blur(1px);
}

.freq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.freq-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 15px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.freq-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.freq-item .hot-ball {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.freq-count {
    min-width: 40px;
    text-align: right;
    font-family: var(--font-numbers);
    font-weight: bold;
    color: var(--text-primary);
}

.freq-bar-container {
    flex: 1;
}

.freq-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.freq-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.freq-hot {
    background: linear-gradient(90deg, #ff6b35, #ff3b00);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.freq-cold {
    background: linear-gradient(90deg, #4ecdc4, #2ebf91);
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.4);
}

.freq-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite linear;
}

.numbers-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.ball-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    /* Fondo base */
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-numbers);
    font-size: 1.3rem;
    font-weight: 700;
    box-shadow: inset 0px 4px 6px rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

/* Destacar la primera bola (1er Premio) */
.ball-1 {
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border-color: rgba(255, 215, 0, 0.5);
    color: #ffd700;
    box-shadow: inset 0px 4px 8px rgba(255, 215, 0, 0.2), 0 0 15px rgba(255, 215, 0, 0.1);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

/* Bolas uniformes para Loto (todos dorados, más pequeños) */
.ball-loto {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border-color: rgba(255, 215, 0, 0.4);
    color: #ffd700;
    box-shadow: inset 0px 3px 6px rgba(255, 215, 0, 0.15), 0 0 10px rgba(255, 215, 0, 0.08);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

/* Efecto de brillo en todas las bolas */
.ball::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lottery-card:hover .ball {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-color: var(--accent);
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.1), 0 5px 15px rgba(0, 240, 255, 0.2);
}

.ball-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ball-2 {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s forwards;
    opacity: 0;
}

.ball-3 {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s forwards;
    opacity: 0;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.draw-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-glass);
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Footer de las tarjetas con botones de acción estilo píldora */
.card-footer {
    border-top: 1px solid var(--border-glass);
    padding-top: 15px;
    margin-top: auto;
    /* Empuja el footer hacia abajo */
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.pill-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.pill-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.pill-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.pill-btn:hover i.fa-clock-rotate-left {
    transform: rotate(-30deg);
}

.pill-btn.predicciones:hover i {
    color: #ffd700;
}

.pill-btn.stats {
    border-color: rgba(0, 240, 255, 0.2);
}

.pill-btn.stats:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.pill-btn.stats:hover i {
    color: var(--accent);
    transform: scale(1.15);
}

.extras-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: flex-start;
}

.ball-extra {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.04);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s forwards;
    opacity: 0;
}

/* ==========================================================================
   Modal de Historial
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: rgba(15, 17, 26, 0.95);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    animation: modalIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-glass);
}

.modal-header h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
}

.history-date-group {
    margin-bottom: 20px;
}

.history-date-label {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: capitalize;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
}

.history-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-row:last-child {
    border-bottom: none;
}

.history-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 70px;
}

.history-numbers {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.history-numbers .ball {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    opacity: 1;
    animation: none;
}

.history-numbers .ball-loto {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    opacity: 1;
    animation: none;
}

.history-no-results {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px 0;
    font-size: 0.95rem;
}

/* ==========================================================================
   Estadísticas
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.stat-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.stat-title {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: var(--text-secondary);
}

.hot-numbers-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.hot-ball {
    width: 50px;
    height: 50px;
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid var(--hot-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-numbers);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hot-color);
    box-shadow: 0 0 15px var(--hot-glow);
}

.freq-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
    position: relative;
}

.freq-fill {
    height: 100%;
    background: var(--hot-color);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--hot-color);
}

/* ==========================================================================
   Statistics Dashboard
   ========================================================================== */

/* KPI Summary Row */
.stats-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.kpi-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}

.kpi-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.kpi-icon {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.kpi-card.kpi-hot .kpi-icon {
    color: #ff6b35;
}

.kpi-card.kpi-hot .kpi-value {
    color: #ff6b35;
}

.kpi-card.kpi-cold .kpi-icon {
    color: #4ecdc4;
}

.kpi-card.kpi-cold .kpi-value {
    color: #4ecdc4;
}

.kpi-value {
    font-family: var(--font-numbers);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stats Controls Bar */
.stats-controls {
    background: var(--bg-glass);
    position: relative;
    z-index: 50;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stats-controls-advanced {
    display: flex;
    flex-direction: column;
}

.stats-filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
}

.action-btn.bg-accent-subtle {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent);
    border: 1px solid rgba(0, 240, 255, 0.2);
    font-size: 0.85rem;
    padding: 6px 14px;
}

.action-btn.bg-accent-subtle:hover {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 240, 255, 0.2);
}

.stats-period-pills {
    display: flex;
    gap: 6px;
}

.period-pill {
    padding: 7px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-heading);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.period-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.period-pill.active-pill {
    background: rgba(0, 240, 255, 0.12);
    color: var(--accent);
    border-color: rgba(0, 240, 255, 0.4);
}

/* Chart Section */
.stats-chart-container {
    margin-bottom: 25px;
    padding: 25px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.15) 100%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
}

.stats-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Hot/Cold Grid */
.stats-hotcold-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

.stat-card-hot,
.stat-card-cold {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 25px;
}

/* Rank badges */
.freq-rank {
    font-family: var(--font-numbers);
    font-size: 0.8rem;
    font-weight: 700;
    color: #ff6b35;
    min-width: 28px;
    text-align: center;
}

.freq-rank.cold-rank {
    color: #4ecdc4;
}

.freq-last-seen {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

.freq-drought {
    font-size: 0.7rem;
    color: #ffb300;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Position Analysis */
#stats-position-section {
    margin-bottom: 25px;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.position-card {
    padding: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.15) 100%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
}

.position-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-glass);
}

.position-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.position-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.position-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.position-rank {
    font-family: var(--font-numbers);
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 18px;
}

.position-number {
    font-family: var(--font-numbers);
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
    background: rgba(0, 240, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.position-count {
    font-family: var(--font-numbers);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: auto;
}

/* Palés Frecuentes */
.stats-pairs-section {
    margin-bottom: 60px;
    padding: 25px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.15) 100%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
}

.pairs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.pair-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.pair-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.pair-rank {
    font-family: var(--font-numbers);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 24px;
}

.pair-balls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pair-ball {
    font-family: var(--font-numbers);
    font-weight: 700;
    font-size: 1rem;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.pair-ball.cold-pair-ball {
    color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.pair-separator {
    color: var(--text-secondary);
    font-weight: 600;
}

.pair-count {
    font-family: var(--font-numbers);
    font-weight: 700;
    color: var(--text-secondary);
    margin-left: auto;
}

/* Stats Dashboard Responsive */
@media (max-width: 768px) {
    .stats-kpi-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .kpi-value {
        font-size: 1.4rem;
    }

    .kpi-label {
        font-size: 0.7rem;
    }

    .stats-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 15px;
    }

    .stats-controls .custom-select-wrapper {
        width: 100%;
    }

    .stats-controls .glass-select-large {
        width: 100%;
    }

    .stats-period-pills {
        justify-content: center;
    }

    .chart-wrapper {
        height: 220px;
    }

    .stats-hotcold-grid {
        grid-template-columns: 1fr;
    }

    .stat-card-hot,
    .stat-card-cold {
        padding: 18px;
    }

    .position-grid {
        grid-template-columns: 1fr;
    }

    .pairs-list {
        grid-template-columns: 1fr;
    }

    .stats-chart-container,
    .stats-pairs-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .stats-kpi-row {
        gap: 8px;
    }

    .kpi-card {
        padding: 12px 10px;
    }

    .kpi-value {
        font-size: 1.2rem;
    }

    .chart-wrapper {
        height: 180px;
    }
}

/* ==========================================================================
   Horarios
   ========================================================================== */
.schedules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.schedule-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px;
}

.schedule-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 10px;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.schedule-item span:last-child {
    font-weight: 700;
    color: var(--text-primary);
}

/* ==========================================================================
   Loader
   ========================================================================== */
.loader-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: var(--text-secondary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Footer & Responsivo
   ========================================================================== */
.glass-footer {
    padding: 30px 20px;
    background: rgba(15, 17, 26, 0.8);
    border-top: 1px solid var(--border-glass);
    margin-top: auto;
}

.disclaimer {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 10px;
}

/* Responsivo */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .hero {
        margin-top: 140px;
        margin-bottom: 25px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .controls-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
        margin-bottom: 15px;
    }

    .search-box {
        max-width: 100%;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 30px;
    }

    /* Tarjetas compactas en móvil */
    .lottery-card {
        padding: 10px 14px;
        border-radius: 14px;
    }

    .card-header {
        margin-bottom: 6px;
    }

    .lottery-name {
        font-size: 0.95rem;
        gap: 6px;
    }

    .lottery-brand-icon {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .lottery-real-logo {
        width: 26px;
        height: 26px;
    }

    .draw-time {
        font-size: 0.7rem;
        padding: 2px 5px;
    }

    /* Bolas más pequeñas en móvil */
    .numbers-container {
        gap: 8px;
        margin: 8px 0;
    }

    .ball {
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
    }

    .ball-1 {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .ball-loto {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .ball-extra {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .ball-wrapper {
        gap: 3px;
    }

    .ball-label {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }

    .draw-details {
        margin-top: 8px;
        padding-top: 8px;
    }

    .extras-container {
        gap: 8px;
    }

    /* Footer compacto */
    .card-footer {
        padding-top: 8px;
        gap: 8px;
    }

    .pill-btn {
        padding: 4px 12px;
        font-size: 0.8rem;
        gap: 5px;
    }

    /* Headers de sección compactos */
    .country-header {
        margin-top: 18px;
        padding: 8px 0;
    }

    .country-header h3 {
        font-size: 1.1rem;
    }

    .section-header {
        margin-bottom: 20px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }
}

/* New Lottery Filter Styles */
.custom-select-wrapper {
    position: relative;
}

.glass-select-large {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    /* Remove native arrow */
    -webkit-appearance: none;
    padding-right: 35px;
    /* Space for arrow */
}

.custom-select-wrapper::after {
    content: '\f078';
    /* fa-chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 0.8rem;
}

.glass-select-large:hover,
.glass-select-large:focus {
    border-color: var(--accent);
    background: var(--bg-glass-hover);
}

.glass-select-large option,
.glass-select-large optgroup {
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* Date Filter specific styles */
.date-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-family: var(--font-body);
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
    color-scheme: dark;
}

.date-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* ==========================================================================
   Custom Date Picker (Calendario Glassmorphism)
   ========================================================================== */
.custom-date-container {
    position: relative;
    /* Evita que el calendario quede debajo de las tarjetas */
    z-index: 100;
}

.date-picker-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    min-width: 280px;
    justify-content: space-between;
}

.date-picker-btn:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(255, 255, 255, 0.3);
}

.date-picker-btn:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    outline: none;
}

.calendar-popup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: rgba(15, 17, 26, 0.95);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px;
    z-index: 1000;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transform-origin: top center;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.calendar-popup.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(0.95);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cal-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cal-nav-btn:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.cal-selectors {
    display: flex;
    gap: 10px;
}

.glass-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.glass-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
    color: var(--text-primary);
}

.cal-day:hover:not(.empty) {
    background: rgba(255, 255, 255, 0.1);
}

.cal-day.empty {
    cursor: default;
}

.cal-day.today {
    border: 2px dashed var(--accent);
    color: var(--accent);
    font-weight: 700;
}

.cal-day.selected {
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: 800;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.cal-day.today.selected {
    border: none;
}

.cal-day.future {
    color: #475569;
    cursor: not-allowed;
}

.cal-day.future:hover {
    background: transparent;
}

.calendar-footer {
    margin-top: 15px;
    text-align: center;
    border-top: 1px solid var(--border-glass);
    padding-top: 15px;
}

.today-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

.today-btn:hover {
    text-shadow: 0 0 10px var(--accent-glow);
}

@media (max-width: 768px) {
    .calendar-popup {
        left: 0;
        right: auto;
        width: 100%;
    }

    .date-picker-btn {
        min-width: 100%;
        justify-content: space-between;
    }

    /* Mobile UI Optimizations to save vertical space */
    .hero {
        margin-top: 80px;
        margin-bottom: 20px;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .hero-subtitle {
        display: none;
        /* Ocultar el subtítulo para ahorrar espacio vertical en móviles */
    }

    .controls-bar {
        padding: 12px 15px;
        margin-bottom: 15px;
        flex-direction: column;
        gap: 12px;
    }

    #yesterday-shortcut {
        padding: 10px 15px !important;
        font-size: 0.9rem !important;
    }

    .fallback-banner {
        padding: 10px 15px;
        margin-bottom: 15px;
        font-size: 0.85rem;
    }

    .date-section-header.country-header {
        margin-top: 15px;
        padding-top: 0;
    }

    /* Ocultar el título principal completo para ganar espacio de lectura */
    .hero {
        display: none;
    }

    /* Ocultar todos los filtros en móviles excepto el selector de fecha */
    .controls-bar .filter-box {
        display: none;
    }

    .controls-bar .filter-box.custom-date-container {
        display: flex !important;
        flex-direction: column;
    }
}

/* ==========================================================================
   Banners Publicitarios
   ========================================================================== */
.public-banner {
    margin: 12px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    text-align: center;
}

.public-banner img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: opacity 0.3s;
}

.public-banner img:hover {
    opacity: 0.9;
}

.public-banner a {
    display: block;
    text-decoration: none;
}

.banner-text-link,
.banner-text {
    display: block;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(0, 240, 255, 0.05));
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
}

.banner-text-link:hover {
    background: rgba(0, 240, 255, 0.15);
    transform: translateY(-1px);
}

#banners-top,
#banners-bottom {
    width: 100%;
}

/* ==========================================================================
   Banners Inline (inyectados entre resultados)
   ========================================================================== */
.inline-banner {
    grid-column: 1 / -1;
    margin: 8px 0;
    animation: fadeIn 0.4s ease-out;
}

.inline-banner .banner-text-link,
.inline-banner .banner-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(120, 0, 255, 0.06));
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
}

.inline-banner .banner-text-link:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(120, 0, 255, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.15);
}

.inline-banner .banner-text-link i,
.inline-banner .banner-text i {
    font-size: 1.1rem;
    opacity: 0.8;
}

.inline-banner img {
    width: 100%;
    max-height: 100px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: opacity 0.3s, transform 0.3s;
}

.inline-banner img:hover {
    opacity: 0.9;
    transform: scale(1.005);
}

.inline-banner a {
    display: block;
    text-decoration: none;
    border-radius: var(--radius-md);
    overflow: hidden;
}

@media (max-width: 768px) {
    .inline-banner {
        margin: 6px 0;
    }

    .inline-banner .banner-text-link,
    .inline-banner .banner-text {
        padding: 12px 16px;
        font-size: 0.85rem;
    }

    .inline-banner img {
        max-height: 80px;
    }
}

/* ==========================================================================
   Banner de Mantenimiento
   ========================================================================== */
.maintenance-banner {
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: var(--radius-md);
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: pulse-warning 2s ease-in-out infinite;
}

.maintenance-banner i {
    font-size: 1.2rem;
}

@keyframes pulse-warning {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* ==========================================================================
   Banner Sticky (siempre visible abajo del viewport)
   ========================================================================== */
.sticky-banner-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: linear-gradient(180deg, rgba(15, 17, 26, 0.95), rgba(15, 17, 26, 0.99));
    border-top: 1px solid rgba(0, 240, 255, 0.15);
    backdrop-filter: blur(20px);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: slideUpSticky 0.5s ease-out;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.sticky-banner-bar .sticky-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 900px;
}

.sticky-banner-bar .banner-text-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
}

.sticky-banner-bar .banner-text-link:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.sticky-banner-bar .banner-text {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sticky-banner-bar img {
    max-height: 50px;
    max-width: 728px;
    width: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.sticky-banner-bar .sticky-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s;
    flex-shrink: 0;
}

.sticky-banner-bar .sticky-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Google Ads container dentro de banners */
.banner-adsense {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    overflow: hidden;
}

.inline-banner .banner-adsense {
    min-height: 90px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.sticky-banner-bar .banner-adsense {
    min-height: 50px;
}

@keyframes slideUpSticky {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Padding inferior al body cuando hay sticky banner */
body.has-sticky-banner {
    padding-bottom: 75px;
}

@media (max-width: 768px) {
    .sticky-banner-bar {
        padding: 8px 12px;
    }

    .sticky-banner-bar .banner-text-link,
    .sticky-banner-bar .banner-text {
        font-size: 0.8rem;
    }

    .sticky-banner-bar img {
        max-height: 40px;
    }

    body.has-sticky-banner {
        padding-bottom: 65px;
    }
}

/* ==========================================================================
   Resumen de Resultados (Vista Compacta)
   ========================================================================== */
.resumen-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
}

.resumen-date-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: capitalize;
}

.resumen-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    /* Removed the global background and border since each item is now a card */
}

.resumen-header {
    display: none;
    /* If there was one, keep it hidden for grid */
}

.resumen-row {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, background 0.2s ease;
}

.resumen-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.resumen-row:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.resumen-row:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.resumen-col-name {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 150px;
}

.resumen-col-balls {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex: 2;
}

.resumen-col-date {
    flex: 1;
    text-align: right;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.resumen-ball {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    /* Verde oscuro/vibrante */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.2), 0 2px 5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
    .resumen-row {
        padding: 10px 15px;
    }

    .resumen-col-name {
        font-size: 0.9rem;
        min-width: 120px;
    }

    .resumen-ball {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
        gap: 5px;
    }

    .resumen-col-date {
        font-size: 0.85rem;
    }

    .resumen-date-title {
        font-size: 1rem;
    }

    .resumen-nav {
        padding: 10px;
    }

    .resumen-nav .pill-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   Sección Dólar Hoy
   ========================================================================== */

.dollar-summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dollar-summary-card {
    padding: 24px 20px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    border-top: 3px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dollar-summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.dollar-card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.dollar-card-central {
    border-top-color: #00e5ff;
}

.dollar-card-central .dollar-card-icon {
    color: #00e5ff;
}

.dollar-card-bancos {
    border-top-color: #4caf50;
}

.dollar-card-bancos .dollar-card-icon {
    color: #4caf50;
}

.dollar-card-otros {
    border-top-color: #ab47bc;
}

.dollar-card-otros .dollar-card-icon {
    color: #ab47bc;
}

.dollar-summary-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dollar-card-values {
    display: flex;
    justify-content: space-around;
    gap: 16px;
}

.dollar-val {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dollar-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dollar-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.dollar-table-container {
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
}

.dollar-table {
    width: 100%;
    border-collapse: collapse;
}

.dollar-table thead th {
    background: rgba(0, 240, 255, 0.08);
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dollar-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease;
}

.dollar-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.dollar-table tbody td {
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.dollar-table tbody td:nth-child(3),
.dollar-table tbody td:nth-child(4) {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 1rem;
}

.dollar-cat-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dollar-cat-central {
    background: rgba(0, 229, 255, 0.15);
    color: #00e5ff;
}

.dollar-cat-banco {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.dollar-cat-otro {
    background: rgba(171, 71, 188, 0.15);
    color: #ab47bc;
}

.dollar-updated-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 16px;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .dollar-summary-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .dollar-summary-card {
        padding: 18px 16px;
    }

    .dollar-price {
        font-size: 1.35rem;
    }

    .dollar-table thead th,
    .dollar-table tbody td {
        padding: 10px 10px;
        font-size: 0.85rem;
    }

    .dollar-table tbody td:nth-child(3),
    .dollar-table tbody td:nth-child(4) {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .dollar-card-icon {
        font-size: 1.5rem;
    }

    .dollar-summary-card h3 {
        font-size: 0.85rem;
    }

    .dollar-price {
        font-size: 1.2rem;
    }

    .dollar-table thead th:nth-child(5),
    .dollar-table tbody td:nth-child(5) {
        display: none;
    }
}