/* ============ TABLERO ============ */
.board-stage {
    position: relative;
    background: var(--bg);
    border-radius: 2rem;
    box-shadow:
        14px 14px 32px var(--shadow-dark),
        -14px -14px 32px var(--shadow-light),
        0 0 0 1px rgba(6,182,212,0.10),
        0 24px 60px rgba(6,182,212,0.10);
    padding: 2rem;
    transition: box-shadow 0.6s ease;
}
@media (max-width: 640px) { .board-stage { padding: 1.25rem; border-radius: 1.5rem; } }
.board-stage::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 1.5rem;
    border: 1px solid rgba(6,182,212,0.07);
    pointer-events: none;
}

.board-sidebar {
    background: var(--bg);
    border-radius: 1.25rem;
    box-shadow: var(--raise);
    padding: 1.25rem;
}

/* ============ BOLETOS — ESTADOS ============ */
.ticket-available {
    background: var(--bg);
    box-shadow: var(--raise-sm);
    color: var(--text);
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}
.ticket-available:hover {
    box-shadow: 4px 4px 10px var(--shadow-dark),
                -4px -4px 10px var(--shadow-light),
                0 0 0 1px rgba(6,182,212,0.3);
    color: var(--accent-dark);
    transform: translateY(-2px);
}
.ticket-available:active {
    box-shadow: var(--inset-sm);
    transform: translateY(0);
}

.ticket-selected {
    background: linear-gradient(135deg, var(--accent-yellow-light), var(--accent));
    color: #0a2530;
    border-radius: 0.75rem;
    font-weight: 800;
    box-shadow:
        inset 3px 3px 8px rgba(8,145,178,0.4),
        inset -2px -2px 6px rgba(255,255,255,0.4),
        0 0 0 2px rgba(6,182,212,0.35),
        0 6px 16px rgba(6,182,212,0.35);
    animation: ticketPop 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes ticketPop {
    0% { transform: scale(0.9); }
    60% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* Vendido: rayado gris */
.ticket-sold {
    background: var(--bg);
    box-shadow: var(--inset-sm);
    color: var(--text-muted);
    border-radius: 0.75rem;
    cursor: not-allowed;
    background-image: repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(120,120,120,0.08) 5px, rgba(120,120,120,0.08) 10px);
}

/* Reservado por OTRO usuario: ámbar apagado con pulso sutil */
.ticket-reserved {
    background: var(--bg);
    box-shadow: var(--inset-sm);
    color: #b45309;
    border-radius: 0.75rem;
    cursor: not-allowed;
    background-image: repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(234,179,8,0.10) 6px, rgba(234,179,8,0.10) 12px);
    position: relative;
    overflow: hidden;
}
.ticket-reserved::after {
    content: '';
    position: absolute;
    top: 4px; right: 4px;
    width: 5px; height: 5px;
    border-radius: 999px;
    background: #eab308;
    animation: reservedPulse 1.6s ease-in-out infinite;
}
@keyframes reservedPulse {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Reservado por MÍ (usuario actual): borde cyan brillante */
.ticket-mine {
    background: linear-gradient(135deg, rgba(34,211,238,0.15), rgba(6,182,212,0.25));
    color: var(--accent-dark);
    border-radius: 0.75rem;
    font-weight: 800;
    cursor: not-allowed;
    box-shadow:
        inset 0 0 0 2px rgba(6,182,212,0.6),
        0 4px 12px rgba(6,182,212,0.3);
}

/* ============ FILTROS ============ */
.filter-tab {
    padding: 8px 14px;
    border-radius: 0.5rem;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-tab:hover { color: var(--text); background: rgba(255,255,255,0.4); }
.filter-tab.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-yellow-dark), var(--accent-dark));
    box-shadow: 0 4px 10px rgba(6,182,212,0.35), inset 0 1px 0 0 rgba(255,255,255,0.3);
}

/* ============ SLIDER ============ */
.carousel-viewport { position: relative; overflow: hidden; }
.carousel-track {
    display: flex;
    height: 100%;
    transform: translateX(0);
    transition: transform 0.75s cubic-bezier(0.65, 0, 0.35, 1);
    will-change: transform;
}
.carousel-slide {
    height: 100%;
    flex-shrink: 0;
    object-fit: cover;
    user-select: none;
    pointer-events: none;
}

#carousel-title, #carousel-desc {
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.carousel-text-switching { opacity: 0 !important; transform: translateY(10px); }

/* ============ LIVE INDICATOR ============ */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--bg);
    box-shadow: var(--inset-sm);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #059669;
    transition: all 0.3s ease;
}
.live-badge.syncing { color: var(--accent-dark); }
.live-badge .live-dot {
    width: 6px; height: 6px; border-radius: 999px;
    background: #10b981;
    animation: pulseSoft 2s ease-in-out infinite;
}
.live-badge.syncing .live-dot { background: var(--accent); animation-duration: 0.6s; }

/* Utilidades */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Reservado por OTRO usuario: ámbar apagado */
.ticket-reserved {
    background: var(--bg);
    box-shadow: var(--inset-sm);
    color: #b45309;
    border-radius: 0.75rem;
    cursor: not-allowed;
    background-image: repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(234,179,8,0.10) 6px, rgba(234,179,8,0.10) 12px);
    position: relative;
    overflow: hidden;
}
.ticket-reserved::after {
    content: '';
    position: absolute;
    top: 4px; right: 4px;
    width: 5px; height: 5px;
    border-radius: 999px;
    background: #eab308;
    animation: reservedPulse 1.6s ease-in-out infinite;
}
@keyframes reservedPulse {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Bloqueado por OTRO usuario (alguien lo está eligiendo) */
.ticket-locked {
    background: var(--bg);
    box-shadow: var(--inset-sm);
    color: #c2410c;
    border-radius: 0.75rem;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
}
.ticket-locked::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249,115,22,0.12), rgba(234,88,12,0.06));
    animation: lockedPulse 1.4s ease-in-out infinite;
}
@keyframes lockedPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

/* Bloqueado por MÍ pero aún sin reserva formal */
.ticket-locked-mine {
    background: linear-gradient(135deg, rgba(34,211,238,0.15), rgba(6,182,212,0.25));
    color: var(--accent-dark);
    border-radius: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow:
        inset 0 0 0 2px rgba(6,182,212,0.5),
        0 4px 12px rgba(6,182,212,0.25);
}

/* Reserva formal por MÍ */
.ticket-mine {
    background: linear-gradient(135deg, rgba(34,211,238,0.2), rgba(6,182,212,0.35));
    color: var(--accent-dark);
    border-radius: 0.75rem;
    font-weight: 800;
    cursor: not-allowed;
    box-shadow:
        inset 0 0 0 2px rgba(6,182,212,0.7),
        0 4px 14px rgba(6,182,212,0.35);
}

/* ============================================================
   BANNER DEL GANADOR
   ============================================================ */
.ganador-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(250,204,21,0.12) 0%, rgba(6,182,212,0.12) 100%);
    border: 2px solid rgba(250,204,21,0.4);
    border-radius: 2rem;
    padding: 3rem 2rem;
    text-align: center;
    overflow: hidden;
    box-shadow:
        14px 14px 32px var(--shadow-dark),
        -14px -14px 32px var(--shadow-light),
        0 0 60px rgba(250,204,21,0.15);
    animation: ganadorEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ganadorEnter {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.ganador-confetti {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 80px;
    opacity: 0.15;
    pointer-events: none;
}

.ganador-trophy {
    font-size: 72px;
    line-height: 1;
    animation: trophyBounce 2s ease-in-out infinite;
    display: inline-block;
}
@keyframes trophyBounce {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.ganador-label {
    display: inline-block;
    margin-top: 1rem;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #b45309;
    background: rgba(250,204,21,0.15);
    padding: 6px 16px;
    border-radius: 999px;
}

.ganador-titulo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.03em;
    margin: 0.75rem 0 1.5rem;
}
@media (max-width: 640px) {
    .ganador-titulo { font-size: 1.5rem; }
}

.ganador-numero-wrap {
    display: inline-block;
    padding: 24px 48px;
    border-radius: 24px;
    background: linear-gradient(135deg, #facc15, #06b6d4);
    box-shadow:
        0 10px 32px rgba(6,182,212,0.4),
        inset 0 2px 0 0 rgba(255,255,255,0.4);
    margin-bottom: 1.5rem;
    animation: numeroPulse 2.5s ease-in-out infinite;
}
@keyframes numeroPulse {
    0%, 100% { box-shadow: 0 10px 32px rgba(6,182,212,0.4), inset 0 2px 0 0 rgba(255,255,255,0.4); }
    50% { box-shadow: 0 16px 48px rgba(6,182,212,0.6), inset 0 2px 0 0 rgba(255,255,255,0.6); }
}

.ganador-numero-label {
    font-size: 10px;
    font-weight: 800;
    color: #0a2530;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ganador-numero {
    font-family: 'JetBrains Mono', monospace;
    font-size: 5rem;
    font-weight: 900;
    color: #0a2530;
    line-height: 1;
    letter-spacing: 0.05em;
}
@media (max-width: 640px) {
    .ganador-numero { font-size: 3.5rem; }
}

.ganador-nombre {
    font-size: 15px;
    color: var(--text-soft);
    margin-bottom: 6px;
}
.ganador-nombre strong {
    color: var(--accent-dark);
    font-weight: 800;
}

.ganador-fecha {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.ganador-notas {
    margin-top: 1.5rem;
    padding: 16px 24px;
    background: rgba(255,255,255,0.5);
    border-radius: 14px;
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    border-left: 3px solid #facc15;
}