/* ===== HERO CON MINI BINGO ===== */
.hero-live {
    width: 92%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 0 56px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    min-height: 520px;
    position: relative;
    z-index: 1;
}

/* Full-width transparent background with subtle radial accents */
.hero-live::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background:
        radial-gradient(ellipse at 15% 0%, rgba(14,165,233,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, rgba(255,29,186,0.035) 0%, transparent 45%);
    z-index: -2;
    pointer-events: none;
}

/* Ambient glow behind bingo board */
.hero-live::after {
    content: '';
    position: absolute;
    right: 2%;
    top: 45%;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14,165,233,0.08) 0%, rgba(168,85,247,0.04) 40%, transparent 70%);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: -1;
}

/* --- Lado izquierdo: texto + acciones --- */
.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: heroEnterLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-content .welcome {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--text-xl);
    color: var(--gray);
    font-weight: 600;
}

.welcome-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e5e7eb;
}

.welcome-avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue), var(--pink));
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 700;
    border: none;
}

.welcome-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.welcome-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    text-decoration: none;
    width: fit-content;
    transition: filter 0.2s;
}
.welcome-plan-badge:hover { filter: brightness(1.1); }

.welcome-plan-badge svg { flex-shrink: 0; }

.welcome-plan-badge.plan-none {
    background: #e5e7eb;
    color: #6b7280;
}
.welcome-plan-badge.plan-none:hover { background: #d1d5db; }

.welcome-plan-badge.plan-personal {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
}

.welcome-plan-badge.plan-profesional {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    color: #fff;
}

.welcome-plan-badge.plan-premium {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #78350f;
}

.welcome-plan-badge.plan-evento-48,
.welcome-plan-badge.plan-evento-72 {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: #fff;
}

.hero-content .tagline {
    font-size: clamp(2rem, 5vw, 3.1rem);
    font-weight: 800;
    color: var(--gray-dark);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.hero-content .tagline::before {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    background: linear-gradient(90deg, var(--pink), var(--blue));
    border-radius: 2px;
    margin-bottom: 16px;
}

.hero-content .tagline span {
    background: linear-gradient(135deg, #ff1dba 0%, #a855f7 50%, #1abcf5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content .subtitle {
    font-size: var(--text-xl);
    color: var(--gray);
    line-height: 1.6;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 8px;
}

/* --- Lado derecho: mini bingo --- */
.mini-bingo-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    box-shadow:
        0 25px 50px rgba(0,0,0,0.14),
        0 10px 20px rgba(0,0,0,0.07),
        0 0 0 1px rgba(0,0,0,0.05),
        0 0 80px rgba(14,165,233,0.08);
    animation: heroEnterRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

/* Glass reflection on bingo board */
.mini-bingo-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.08), transparent);
    pointer-events: none;
    z-index: 1;
}

/* ===== MINI BINGO GAME ===== */
.mini-bingo {
    width: 100%;
    height: 100%;
    display: flex;
    gap: 2%;
    padding: 3%;
    box-sizing: border-box;
    transition: background 0.8s ease;
    position: relative;
}

/* Tablero */
.mini-board {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(9, 1fr);
    gap: 1.5%;
    border-radius: 10px;
    padding: 1.5%;
    transition: background 0.8s ease;
}

.mini-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: clamp(6px, 0.85vw, 13px);
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    transition: all 0.4s ease;
    user-select: none;
    line-height: 1;
}

.mini-cell.called {
    transform: scale(1.05);
}

.mini-cell.just-called {
    animation: mini-pop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes mini-pop {
    0% { transform: scale(0.7); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.05); }
}

/* Panel lateral */
.mini-side {
    width: 26%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8%;
}

.mini-logo {
    font-size: clamp(10px, 1.6vw, 24px);
    font-weight: 900;
    color: #fff;
    letter-spacing: 2px;
    text-align: center;
    transition: all 0.8s ease;
}

.mini-current {
    width: 75%;
    aspect-ratio: 1;
    border-radius: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(16px, 3.5vw, 52px);
    font-weight: 900;
    transition: all 0.5s ease;
    position: relative;
}

.mini-current.pop {
    animation: current-pop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes current-pop {
    0% { transform: scale(0.6) rotate(-10deg); }
    60% { transform: scale(1.15) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.mini-last-balls {
    display: flex;
    gap: 8%;
    width: 85%;
}

.mini-last-ball {
    flex: 1;
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(7px, 0.8vw, 12px);
    font-weight: 800;
    transition: all 0.5s ease;
    opacity: 0.4;
}

.mini-last-ball.active {
    opacity: 1;
}

.mini-counter {
    font-size: clamp(7px, 0.7vw, 11px);
    color: rgba(255,255,255,0.5);
    text-align: center;
    font-weight: 600;
    transition: color 0.8s ease;
}

/* ===== TEMAS DEL MINI BINGO ===== */

/* Default (Clasico) */
.mini-bingo.theme-default {
    background: linear-gradient(145deg, #8B0000, #A52A2A);
}
.theme-default .mini-board { background: rgba(0,0,0,0.2); }
.theme-default .mini-cell { background: rgba(255,255,255,0.1); }
.theme-default .mini-cell.called { background: linear-gradient(145deg, #FFD700, #FFA500); color: #8B0000; box-shadow: 0 2px 8px rgba(255,215,0,0.4); }
.theme-default .mini-logo { font-family: 'Russo One', sans-serif; text-shadow: 2px 2px 0 #FF1493; }
.theme-default .mini-current { background: linear-gradient(145deg, #fff, #f0f0f0); color: #8B0000; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.theme-default .mini-last-ball { background: linear-gradient(145deg, #FFD700, #FFA500); color: #8B0000; }

/* Cyberpunk */
.mini-bingo.theme-cyberpunk {
    background: linear-gradient(145deg, #050508, #0a0a1a);
}
.theme-cyberpunk .mini-board { background: rgba(255,0,128,0.05); border: 1px solid rgba(255,0,128,0.2); }
.theme-cyberpunk .mini-cell { background: rgba(20,20,35,0.9); color: rgba(255,0,128,0.5); border: 1px solid rgba(255,0,128,0.1); }
.theme-cyberpunk .mini-cell.called { background: linear-gradient(145deg, #ff0080, #ff00ff); color: #fff; box-shadow: 0 0 12px rgba(255,0,128,0.6); border-color: transparent; }
.theme-cyberpunk .mini-logo { font-family: 'Orbitron', sans-serif; color: #ff0080; text-shadow: 0 0 20px rgba(255,0,128,0.8), 0 0 40px rgba(255,0,128,0.4); }
.theme-cyberpunk .mini-current { background: #0a0a1a; color: #00ffff; border: 2px solid #ff0080; box-shadow: 0 0 30px rgba(255,0,128,0.4), inset 0 0 20px rgba(0,255,255,0.1); }
.theme-cyberpunk .mini-last-ball { background: linear-gradient(145deg, #ff0080, #ff00ff); color: #fff; box-shadow: 0 0 10px rgba(255,0,128,0.5); }

/* Verde Hoja */
.mini-bingo.theme-verde-hoja {
    background: linear-gradient(145deg, #1a3a1a, #2d5a2d);
}
.theme-verde-hoja .mini-board { background: rgba(0,0,0,0.25); }
.theme-verde-hoja .mini-cell { background: linear-gradient(145deg, rgba(124,179,66,0.15), rgba(85,139,47,0.15)); color: rgba(200,230,180,0.7); }
.theme-verde-hoja .mini-cell.called { background: linear-gradient(145deg, #7cb342, #558b2f); color: #fff; box-shadow: 0 2px 10px rgba(124,179,66,0.4); }
.theme-verde-hoja .mini-logo { font-family: 'Quicksand', sans-serif; text-shadow: 2px 2px 4px rgba(0,0,0,0.4); }
.theme-verde-hoja .mini-current { background: linear-gradient(145deg, #e8f5e9, #c8e6c9); color: #1b5e20; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.theme-verde-hoja .mini-last-ball { background: linear-gradient(145deg, #7cb342, #558b2f); color: #fff; }

/* Alto Contraste */
.mini-bingo.theme-alto-contraste {
    background: linear-gradient(145deg, #000, #0a0a2e);
}
.theme-alto-contraste .mini-board { background: rgba(0,191,255,0.05); border: 1px solid rgba(0,191,255,0.15); }
.theme-alto-contraste .mini-cell { background: rgba(0,191,255,0.08); color: rgba(0,191,255,0.5); }
.theme-alto-contraste .mini-cell.called { background: linear-gradient(145deg, #00bfff, #0080ff); color: #000; box-shadow: 0 0 12px rgba(0,191,255,0.5); }
.theme-alto-contraste .mini-logo { font-family: 'Orbitron', sans-serif; color: #00bfff; text-shadow: 0 0 20px rgba(0,191,255,0.6); }
.theme-alto-contraste .mini-current { background: #000; color: #00bfff; border: 2px solid #00bfff; box-shadow: 0 0 25px rgba(0,191,255,0.3); }
.theme-alto-contraste .mini-last-ball { background: linear-gradient(145deg, #00bfff, #0080ff); color: #000; }

/* Piedra Cartoon */
.mini-bingo.theme-piedra-cartoon {
    background: linear-gradient(145deg, #5d4037, #795548);
}
.theme-piedra-cartoon .mini-board { background: rgba(0,0,0,0.2); }
.theme-piedra-cartoon .mini-cell { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.6); border-radius: 6px; }
.theme-piedra-cartoon .mini-cell.called { background: linear-gradient(145deg, #e6b84d, #d4a03c); color: #4e342e; box-shadow: 0 3px 0 #b8860b; }
.theme-piedra-cartoon .mini-logo { font-family: 'Nunito', sans-serif; text-shadow: 2px 2px 0 rgba(0,0,0,0.4); }
.theme-piedra-cartoon .mini-current { background: linear-gradient(145deg, #ffecb3, #ffe082); color: #4e342e; box-shadow: 0 4px 0 #b8860b, 0 6px 20px rgba(0,0,0,0.3); }
.theme-piedra-cartoon .mini-last-ball { background: linear-gradient(145deg, #e6b84d, #d4a03c); color: #4e342e; }

/* ===== BADGE TEMA ACTUAL ===== */
.mini-theme-badge {
    position: absolute;
    bottom: 8px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.7);
    font-size: clamp(7px, 0.65vw, 10px);
    font-weight: 600;
    transition: opacity 0.3s;
    z-index: 2;
}

/* --- Sound toggle button --- */
.hero-sound-btn {
    position: absolute;
    bottom: 8px;
    left: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    padding: 0;
}

.hero-sound-btn svg {
    width: 16px;
    height: 16px;
}

.hero-sound-btn .icon-sound-on { display: none; }
.hero-sound-btn .icon-sound-off { display: block; }

.hero-sound-btn:not(.muted) .icon-sound-on { display: block; }
.hero-sound-btn:not(.muted) .icon-sound-off { display: none; }

.hero-sound-btn:not(.muted) {
    background: rgba(26,188,245,0.25);
    color: #1abcf5;
}

.hero-sound-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
    transform: scale(1.1);
}

.hero-sound-btn:not(.muted):hover {
    background: rgba(26,188,245,0.4);
    color: #fff;
}

/* ===== ENTRANCE ANIMATIONS ===== */
@keyframes heroEnterLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes heroEnterRight {
    from { opacity: 0; transform: translateX(40px) scale(0.96); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes heroEnterUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */

/* Tablet + movil: 1 columna + bingo vertical */
@media (max-width: 899px) {
    .hero-live {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px 0 40px;
        min-height: auto;
    }

    .hero-content {
        text-align: center;
        align-items: center;
        animation-name: heroEnterUp;
    }

    .hero-content .tagline::before {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content .subtitle {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .mini-bingo-wrapper {
        animation-name: heroEnterUp;
    }

    .hero-live::after {
        display: none;
    }

    .mini-bingo-wrapper {
        max-width: 680px;
        width: 100%;
        margin: 0 auto;
        aspect-ratio: auto;
        border-radius: 16px;
    }

    /* Vertical: tablero arriba, panel abajo */
    .mini-bingo {
        flex-direction: column;
        padding: 3%;
        gap: 12px;
    }

    .mini-board {
        width: 100%;
        gap: 1.8% 1.2%;
        padding: 2% 1.5%;
        border-radius: 10px;
    }

    .mini-cell {
        font-size: clamp(8px, 1.6vw, 13px);
        border-radius: 4px;
        padding: 5px 0;
    }

    /* Panel horizontal debajo del tablero */
    .mini-side {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 18px;
    }

    .mini-logo {
        font-size: clamp(15px, 2.5vw, 20px);
        letter-spacing: 1.5px;
        flex-shrink: 0;
    }

    .mini-current {
        width: clamp(44px, 7vw, 60px);
        height: clamp(44px, 7vw, 60px);
        min-width: 44px;
        aspect-ratio: auto;
        border-radius: 12px;
        font-size: clamp(22px, 3.5vw, 32px);
        flex-shrink: 0;
    }

    .mini-last-balls {
        width: auto;
        gap: 8px;
        flex-shrink: 0;
    }

    .mini-last-ball {
        width: clamp(28px, 4.5vw, 38px);
        height: clamp(28px, 4.5vw, 38px);
        min-width: 28px;
        aspect-ratio: auto;
        font-size: clamp(10px, 1.4vw, 13px);
    }

    .mini-counter {
        font-size: clamp(10px, 1.3vw, 13px);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .mini-theme-badge {
        position: static;
        padding: 3px 10px;
        font-size: clamp(9px, 1.2vw, 11px);
        flex-shrink: 0;
    }
}

/* Movil pequeno: ajustes de tamano */
@media (max-width: 599px) {
    .hero-live {
        gap: 20px;
        padding: 24px 0 32px;
    }

    .mini-bingo-wrapper {
        max-width: none;
        border-radius: 14px;
    }

    .mini-bingo {
        gap: 10px;
    }

    .mini-board {
        gap: 1.8% 1.2%;
        padding: 2.5% 1.5%;
        border-radius: 8px;
    }

    .mini-cell {
        font-size: clamp(7px, 2.4vw, 11px);
        border-radius: 3px;
        padding: 4px 0;
    }

    .mini-side {
        gap: 14px;
    }

    .mini-logo {
        font-size: 15px;
        letter-spacing: 1px;
    }

    .mini-current {
        width: 44px;
        height: 44px;
        min-width: 44px;
        border-radius: 10px;
        font-size: 22px;
    }

    .mini-last-balls {
        gap: 6px;
    }

    .mini-last-ball {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 10px;
    }

    .mini-counter {
        font-size: 10px;
    }

    .mini-theme-badge {
        padding: 2px 8px;
        font-size: 9px;
    }
}
