.bingo-frontend {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

.bingo-header {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 15px 10px;
    border-radius: 12px;
    margin-bottom: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.header-top h1 {
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.header-top p {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    opacity: 0.95;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    padding: 8px 12px;
    border-radius: 8px;
}

.info-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.status-badge {
    background: #9e9e9e;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.status-badge.playing {
    background: linear-gradient(135deg, #66bb6a, #43a047);
}

.status-badge.paused {
    background: linear-gradient(135deg, #ffa726, #fb8c00);
}

.status-badge.ended {
    background: linear-gradient(135deg, #ef5350, #e53935);
}

.audio-btn {
    background: rgba(255,255,255,0.25);
    color: white;
    border: 2px solid white;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.audio-btn:hover {
    background: white;
    color: #1976d2;
}

/* ========================================
   BOLA PRINCIPAL - AZUL
   ======================================== */
.ball-container {
    text-align: center;
    background: white;
    padding: 20px 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ball {
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
    background: radial-gradient(circle at 30% 30%, #64b5f6 0%, #42a5f5 20%, #2196f3 40%, #1976d2 70%, #1565c0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 900;
    color: white;
    box-shadow: 0 10px 35px rgba(25, 118, 210, 0.4), 
                inset 0 10px 25px rgba(255,255,255,0.5), 
                inset 0 -10px 25px rgba(0,0,0,0.2);
    border: 4px solid #bbdefb;
    position: relative;
}

.ball::before {
    content: '';
    position: absolute;
    top: 12%;
    left: 18%;
    width: 30%;
    height: 20%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.9) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(2px);
}

.ball.ball-spinning {
    animation: spin-ball 0.1s linear infinite;
}

.ball.ball-landing {
    animation: ball-landing 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes spin-ball {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.15); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes ball-landing {
    0% { transform: scale(1.3); }
    50% { transform: scale(0.85); }
    100% { transform: scale(1); }
}

.ball-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.table-container {
    background: white;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bingo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    table-layout: fixed;
}

.bingo-table thead {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
}

.bingo-table thead th {
    padding: 8px 2px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 0.7rem;
    white-space: nowrap;
}

.bingo-table thead th small {
    display: block;
    font-size: 8px;
    font-weight: 500;
    margin-top: 2px;
    white-space: nowrap;
}

.bingo-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.player-name-cell {
    font-weight: 700;
    color: #1976d2;
    padding: 8px 4px !important;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.7rem;
    white-space: nowrap;
    width: 60px;
}

.bingo-table td {
    padding: 4px 2px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

/* ========================================
   BOLAS EN CARTILLAS - MISMO DISEÑO DIFERENTES COLORES
   ======================================== */
.bnum {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    margin: 2px !important;
    border-radius: 50% !important;
    font-weight: 700 !important;
    font-size: 0.7rem !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    line-height: 1 !important;
    border: 2px solid !important;
}

/* Sin marcar - Gris con diseño */
.bnum {
    background: linear-gradient(135deg, #f5f5f5, #eeeeee) !important;
    border-color: #e0e0e0 !important;
    color: #424242 !important;
}

/* Marcadas - Verde con diseño */
.bnum.marked {
    background: linear-gradient(135deg, #81c784, #66bb6a, #43a047) !important;
    border-color: #388e3c !important;
    color: white !important;
    box-shadow: 0 3px 10px rgba(102, 187, 106, 0.4) !important;
}

/* ========================================
   BOLAS SORTEADAS - AZUL CON DISEÑO
   ======================================== */
.drawn-container {
    background: white;
    border-radius: 12px;
    padding: 15px 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.drawn-container h3 {
    margin-bottom: 12px;
    color: #1976d2;
    font-size: 1rem;
    text-align: center;
}

#drawn-count {
    color: #66bb6a;
    font-weight: 800;
}

.drawn-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.drawn-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #64b5f6, #42a5f5, #2196f3);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(66, 165, 245, 0.4);
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* RESPONSIVE */
@media (min-width: 768px) {
    .bingo-frontend { padding: 15px; }
    .header-top h1 { font-size: 1.8rem; }
    .ball { width: 140px; height: 140px; font-size: 56px; }
    .bingo-table { font-size: 0.8rem; }
    .bnum { width: 28px !important; height: 28px !important; font-size: 0.75rem !important; }
    .drawn-ball { width: 42px; height: 42px; font-size: 1rem; }
}

@media (min-width: 1024px) {
    .bingo-frontend { max-width: 1200px; padding: 20px; }
    .header-top h1 { font-size: 2rem; }
    .ball { width: 150px; height: 150px; font-size: 60px; }
    .bingo-table { font-size: 0.85rem; }
    .bnum { width: 32px !important; height: 32px !important; font-size: 0.85rem !important; margin: 3px !important; }
    .drawn-ball { width: 45px; height: 45px; font-size: 1.05rem; }
}

@media (max-width: 480px) {
    .bingo-frontend { padding: 5px; }
    .header-top h1 { font-size: 1.2rem; }
    .header-top p { font-size: 0.8rem; }
    .ball { width: 100px; height: 100px; font-size: 40px; }
    .ball-label { font-size: 0.75rem; }
    .table-container { padding: 5px; }
    .bingo-table { font-size: 0.65rem; }
    .player-name-cell { width: 50px; font-size: 0.65rem; }
    .bnum { width: 24px !important; height: 24px !important; font-size: 0.65rem !important; margin: 1px !important; }
    .drawn-ball { width: 35px; height: 35px; font-size: 0.85rem; }
    .info-bar { font-size: 0.75rem; }
    .status-badge { font-size: 0.65rem; padding: 4px 10px; }
    .audio-btn { font-size: 0.75rem; padding: 5px 10px; }
}