/* Solo 2 cartones por fila en búsqueda por figuras */
.bingo-cards-grid.two-per-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 2.5rem;
    justify-items: center;
    align-items: stretch;
}
/* Mostrar los combos de figuras en una fila y centrados */
.figure-selects-grid {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 1.2rem;
}

.figure-select-wrapper {
    flex: 1 1 0;
    min-width: 120px;
    max-width: 180px;
}
.figures-input-grid {
    display: flex;
    flex-direction: row;
    gap: 0.7rem;
    align-items: center;
    min-height: 48px;
}
.figure-select {
    min-width: 120px;
    max-width: 180px;
    padding: 0.5rem 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.figure-select img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin-right: 0.5rem;
    border-radius: 4px;
    background: #f8f8f8;
}
.card-grid-matrix {
    display: grid;
    gap: 1px;
    width: 100%;
}

.card-grid-matrix .card-header {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    text-align: center;
    padding: 0.6rem;
    border-radius: 8px;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    grid-row: 1;
}
.winner-card-grid--5x5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 1px;
    background: white;
    border: 3px solid #6c5ce7;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.15);
}
.winner-card-grid--6x8 {
    display: grid;
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 1px;
    background: white;
    border: 3px solid #6c5ce7;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.15);
}
.bingo-cell.free {
    background: #ffe066;
    color: #b8860b;
    font-weight: bold;
    font-size: 0.65em;
    letter-spacing: 0.5px;
    border: 2px dashed #b8860b;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#user-cards-modal.modal {
    z-index: 3500 !important;
}
#user-cards-modal[style*="display: block"],
#user-cards-modal[style*="display:block"] {
    align-items: center;
    justify-content: center;
}
.btn-primary {
    background: #6c5ce7;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(108,92,231,0.10);
    font-weight: 600;
    letter-spacing: 0.5px;
}
.btn-primary:hover {
    background: #a29bfe;
}
/* Participantes del sorteo */
.participants-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.participants-table th, .participants-table td {
    border: 1px solid #eee;
    padding: 0.5rem 0.75rem;
    text-align: left;
}
.participants-table th {
    background: #f7f7f7;
}
.participants-table img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.pagination {
    text-align: center;
    margin: 0.5rem 0 0.5rem 0;
}
.pagination button {
    background: #fe7c79;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.8rem;
    margin: 0 0.2rem;
    cursor: pointer;
    font-weight: bold;
}
.pagination button:disabled {
    background: #ccc;
    cursor: not-allowed;
}
/* Cartones en modal de usuario */
.bingo-cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}



.played-cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-content: flex-start;
}

.played-cards-row {
    display: contents;
}

.played-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 1rem;
    margin-bottom: 0;
    position: relative;
    min-width: 220px;
    max-width: 400px;
    width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s;
    box-sizing: border-box;
}

.played-card.winner {
    border-color: #ffd700;
    box-shadow: 0 0 12px 2px #ffe066;
}

.bingo-cell {
    background: #f7f7f7;
    border-radius: 3px;
    text-align: center;
    padding: 0.4em 0;
    font-size: 1em;
    min-width: 32px;
    min-height: 32px;
    font-weight: 500;
}
.bingo-cell.marked {
    background: #fe7c79;
    color: #fff;
}
.bingo-cell.winner {
    background: #ffe066;
    color: #b8860b;
    font-weight: bold;
}
.winning-modalities {
    margin-top: 0.2rem;
    font-size: 0.95em;
    color: #fe7c79;
    text-align: center;
}
/* Help Info Modal */
#help-info-modal.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
}
#help-info-modal .modal-content {
    background: #fff;
    border-radius: 10px;
    max-width: 480px;
    margin: 5vh auto;
    padding: 2rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    position: relative;
}
#help-info-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
#help-info-modal .modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
}
#help-info-modal .modal-body {
    font-size: 1.05rem;
    color: #333;
}
/* Help Selector (Ayuda) */
.help-selector {
    position: relative;
    margin-right: 1rem;
}

.help-btn {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    color: white;
    height: 38px;
    padding: 0 0.8rem;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.3s ease;
}

.help-btn:hover {
    background: rgba(255,255,255,0.3);
}

.help-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    min-width: 180px;
    z-index: 1001;
}

.help-menu.active {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.help-option {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: white;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.95rem;
}

.help-option:hover {
    background: #f5f5f5;
}
.dashboard-top-rooms {
    margin: 2rem 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1.5rem;
}
.top-rooms-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.top-rooms-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1.5rem;
}

.top-room-card {
    background: #f0f4f8;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #d9e2ec;
    border-top: 4px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.top-room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.top-room-info {
    margin-bottom: 0.7rem;
}
.top-room-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color);
    display: block;
    margin-bottom: 0.3rem;
}
.btn-join-room {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-join-room:hover {
    background: #e95c5a;
}
.clickable {
    cursor: pointer;
    text-decoration: underline;
    color: var(--primary-color);
}
/* Famingon Brand Styles */

:root {
    /* ── Brand palette — Opción 2 "Premium Dark Coral" ── */
    --primary-color: #E8445A;
    --primary-dark:  #C42B44;
    --primary-glow:  rgba(232, 68, 90, 0.30);
    --secondary-color: #FFC53D;
    --purple:        #5B4CF5;
    --purple-light:  #8B7CF8;
    --purple-glow:   rgba(91, 76, 245, 0.22);
    --text-color:    #0F1D24;
    --text-muted:    #374151;

    /* Surfaces */
    --bg-body:     #FAFBFD;
    --bg-card:     #FFFFFF;
    --bg-card-alt: #FFF5F7;
    --bg-input:    #FFFFFF;
    --border-color: #E8EDF2;

    /* Bingo column colors — más saturados */
    --bingo-B: #DC2626;
    --bingo-I: #1D4ED8;
    --bingo-N: #6D28D9;
    --bingo-G: #047857;
    --bingo-O: #B45309;

    /* Spacing & shape */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-card:     0 6px 32px rgba(15, 29, 36, 0.09);
    --shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.18);

    /* Typography */
    --font-family: 'Poppins', 'Arial', sans-serif;
    --font-bingo:  'Fredoka One', 'Arial Black', sans-serif;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background: #f8f9fa;
}

header {
    background: linear-gradient(160deg, #C42B44 0%, #E8445A 50%, #F06B40 100%);
    padding: 0.6rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 28px rgba(196, 43, 68, 0.30);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img {
    height: 44px;
    display: block;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav a {
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    font-size: 0.95rem;
    line-height: 1;
    white-space: nowrap;
}

nav a:hover {
    background: rgba(255,255,255,0.16);
    color: #fff;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Controles del header: todos con la MISMA altura (38px) y forma de píldora, para una línea limpia */
/* Header User Name */
.header-user-name {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: white;
    font-weight: 600;
    height: 38px;
    padding: 0 0.9rem;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 999px;
    font-size: 0.88rem;
    white-space: nowrap;
}

.header-user-name svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

#header-user-name-text {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Header Balance Display */
.header-balance {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 38px;
    padding: 0 0.3rem 0 0.95rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95) 0%, rgba(5, 150, 105, 0.95) 100%);
    border-radius: 999px;
    font-size: 0.95rem;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.header-balance svg {
    flex-shrink: 0;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

#header-balance-amount {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.btn-recharge-small {
    background: white;
    color: #059669;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Pantallas medianas (no móvil): compactar el header para que quepa en una línea */
@media (min-width: 769px) and (max-width: 1180px) {
    header { padding: 0.6rem 0.9rem; gap: 0.5rem; }
    nav a { padding: 0.5rem 0.6rem; font-size: 0.9rem; }
    .header-actions { gap: 0.4rem; }
    .header-user-name { display: none !important; } /* el nombre está en Cuenta */
    .help-btn, .lang-btn { padding: 0 0.6rem; }
    .btn-logout { padding: 0 0.8rem; }
}

.btn-recharge-small:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background: #f0fdf4;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    color: white;
    height: 38px;
    padding: 0 0.8rem;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.3);
}

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    min-width: 150px;
    z-index: 1001;
}

.lang-menu.active {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.lang-option {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: white;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.95rem;
}

.lang-option:hover {
    background: #f5f5f5;
}

.btn-logout {
    background: transparent;
    color: white;
    border: 1.5px solid rgba(255,255,255,0.65);
    height: 38px;
    padding: 0 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    background-color: var(--secondary-color);
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-color);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
}

.cta-button:hover {
    background-color: #e66b68; /* Slightly darker shade */
}

.form-section {
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
}

.form-section h2 {
    text-align: center;
    margin-bottom: 1rem;
}

/* Modern auth UI */
.auth-container {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    /* Mismo degradado que el portal administrativo */
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
}

/* El degradado coral del admin solo debe verse en la pantalla de login.
   Cuando hay una vista interna activa (dashboard/salas/cuenta/detalle), se
   restaura el fondo claro original para que el texto sea legible. */
.auth-container:has(.section-view.visible) {
    background: linear-gradient(135deg, #fff8f5 0%, #ffe8e5 100%);
}

[data-theme="dark"] .auth-container:has(.section-view.visible) {
    background: linear-gradient(135deg, #12122a 0%, #1a1040 100%);
}

.auth-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(15, 29, 36, 0.25);
    text-align: center;
    animation: authCardIn 0.4s ease;
}

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

/* Logo con imagen (igual que el portal administrativo) */
.auth-logo {
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.1rem;
}

.auth-card .brand {
    font-family: var(--font-bingo);
    font-size: 2rem;
    font-weight: 400;
    margin: 0.4rem 0 0.2rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.75rem;
}

/* Etiquetas encima de los campos (igual que el portal administrativo) */
.auth-form .field-group {
    text-align: left;
}

.auth-form .field-group label {
    display: block;
    font-size: 0.87rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-color);
}

.auth-form input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    font-size: 0.95rem;
    font-family: var(--font-family);
    background: var(--bg-input);
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Password input wrapper with eye icon */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.toggle-password .eye-icon {
    width: 20px;
    height: 20px;
}

button.primary, .btn-primary {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px var(--primary-glow);
    letter-spacing: 0.3px;
}

button.primary:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
    background: linear-gradient(135deg, #B02038 0%, var(--primary-dark) 100%);
}

button.secondary, .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: 2px solid #495057;
    padding: 0.9rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

button.secondary:hover, .btn-secondary:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.5);
}

button.info, .btn-info {
    background: linear-gradient(135deg, #17c0eb 0%, #12a6cc 100%);
    color: white;
    border: 2px solid #12a6cc;
    padding: 0.9rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(23, 192, 235, 0.3);
    margin-left: 5px;
}

button.info:hover, .btn-info:hover {
    background: linear-gradient(135deg, #12a6cc 0%, #0d8cae 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 192, 235, 0.5);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.btn-back:hover {
    color: var(--primary-color);
    transform: translateX(-4px);
}

button.link {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    text-decoration: underline;
}

/* Título "Iniciar sesión" / "Registro" */
.auth-view h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

/* Separador bajo el título */
.auth-view h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    margin: 0.4rem auto 0;
}

.auth-actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.auth-actions button.link {
    color: var(--primary-color);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    transition: color 0.2s;
}

.auth-actions button.link:hover {
    color: var(--primary-dark);
}

@media (max-width:480px) {
    .auth-container { padding: 1rem; }
    .auth-card { padding: 1.75rem 1.25rem; border-radius: 16px; }
    .auth-card .brand { font-size: 1.75rem; }
}

/* Auth view animation */
.auth-view {
    opacity: 0;
    transform: translateY(8px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 240ms ease, transform 240ms ease, max-height 240ms ease;
    pointer-events: none;
}
.auth-view.visible {
    opacity: 1;
    transform: none;
    max-height: 1000px; /* large to allow expansion */
    pointer-events: auto;
}

/* Password strength */
.password-strength {
    height: 8px;
    border-radius: 6px;
    background: #f1f1f1;
    margin-bottom: .5rem;
    overflow: hidden;
}
.password-strength > i {
    display: block;
    height: 100%;
    width: 0%;
    transition: width 200ms ease, background 200ms ease;
}
.password-strength.low > i { width: 25%; background: #ffb3b3; }
.password-strength.medium > i { width: 60%; background: #ffd27a; }
.password-strength.strong > i { width: 100%; background: #b9f6c8; }

/* Disabled button */
button.primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner inside button (simple) */
.button-spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    border-top-color: rgba(255,255,255,1);
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
    animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button[type="submit"] {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 5px;
}

button[type="submit"]:hover {
    background-color: #e66b68;
}

.rooms-section {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.rooms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.rooms-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.rooms-header button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rooms-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    align-items: center;
}

.btn-create-room {
    margin-left: auto;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(254, 124, 121, 0.3);
}

.btn-create-room:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 124, 121, 0.5);
}

/* Room search */
.room-search {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    align-items: stretch;
}

.room-search input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.room-search input:focus {
    border-color: var(--primary-color);
}

#search-result-container {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

#search-result-container h3 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

#search-result .room-card {
    margin-bottom: 0;
}

.room-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: #666;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.room-tab:hover {
    color: var(--primary-color);
    background: rgba(254, 124, 121, 0.05);
}

.room-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.room-list-container {
    min-height: 400px;
    position: relative;
}

.room-list {
    display: grid;
    gap: 1.5rem;
    padding: 1rem 0;
}

#available-rooms-list {
    grid-template-columns: repeat(3, 1fr);
}

#mine-rooms-list {
    grid-template-columns: repeat(2, 1fr);
}

.rooms-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.rooms-top-bar .rooms-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex-shrink: 0;
}

.rooms-top-bar .room-search {
    margin-bottom: 0;
    padding: 0;
    background: none;
    flex-grow: 1;
    justify-content: flex-end;
}

@media (max-width: 1000px) {
    #available-rooms-list, #mine-rooms-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .rooms-top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .rooms-top-bar .room-search {
        justify-content: stretch;
    }
    #available-rooms-list, #mine-rooms-list {
        grid-template-columns: 1fr;
    }
}

.btn-cards {
    background: #6c5ce7;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
    margin: 0 0.2rem;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(108,92,231,0.10);
    font-weight: 600;
    letter-spacing: 0.5px;
}
.btn-cards:hover {
    background: #a29bfe;
}

.room-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.room-card h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.25rem;
}

.room-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Badge de visibilidad de la sala (pública / privada) */
.room-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    justify-content: flex-end;
}
.room-visibility-badge {
    padding: 0.25rem 0.7rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.room-visibility-badge.public {
    background: #d1fae5;
    color: #047857;
}
.room-visibility-badge.private {
    background: #e8edf2;
    color: #475569;
}

.room-status-badge.started {
    background: #d4edda;
    color: #155724;
}

.room-status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.room-status-badge.ended {
    background: #f8d7da;
    color: #721c24;
}

.room-role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.room-role-badge.admin {
    background: var(--primary-color);
    color: white;
}

.room-role-badge.user {
    background: var(--secondary-color);
    color: var(--text-color);
}

.room-code {
    font-size: 0.85rem;
    color: #666;
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-family: monospace;
}

.room-code strong {
    color: var(--text-color);
}

.room-admin-info {
    font-size: 0.9rem;
    color: #666;
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: #f0f8ff;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.room-admin-info strong {
    color: var(--text-color);
}

.admin-badge-self {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: linear-gradient(135deg, var(--primary-color), #ff6663);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

.room-card-info {
    margin: 0.75rem 0;
    color: #666;
    font-size: 0.9rem;
    flex-grow: 1;
}

.room-card-info p {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.room-card-info strong {
    color: var(--text-color);
}

.room-card-actions {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.room-card-actions button {
    flex: 1 1 120px;
    min-width: 100px;
    padding: 0.5rem 0.4rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: normal;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.room-card-actions .btn-join {
    background: var(--primary-color);
    color: white;
}

.room-card-actions .btn-join:hover {
    background: #ff6663;
}

.room-card-actions .btn-manage {
    background: var(--text-color);
    color: white;
}

.room-card-actions .btn-manage:hover {
    background: #034550;
}

.room-card-actions .btn-invite {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.room-card-actions .btn-invite:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
}

.room-card-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.room-card-actions .btn-secondary:hover {
    background: #5a6268;
}

/* Separador visual para el grupo secundario de acciones */
.room-card-secondary-actions {
    margin-top: 0.4rem;
    padding-top: 0;
    border-top: none;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* Room status action buttons */
.room-status-actions {
    margin-top: 0.4rem;
    display: flex;
    gap: 0.4rem;
    padding-top: 0;
    border-top: none;
    flex-wrap: wrap;
}

.room-status-actions button {
    flex: 1 1 120px;
    min-width: 100px;
    padding: 0.5rem 0.4rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.btn-suspend {
    background: #ff9800;
    color: white;
}

.btn-suspend:hover {
    background: #f57c00;
    transform: scale(1.05);
}

.btn-activate {
    background: #4caf50;
    color: white;
}

.btn-activate:hover {
    background: #388e3c;
    transform: scale(1.05);
}

.btn-finish {
    background: #f44336;
    color: white;
}

.btn-finish:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

.room-placeholder {
    border: 1px dashed #e2e2e2;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    background: #fff8f5;
    color: #6a4b00;
    max-width: 420px;
    margin: 0.5rem auto;
}
.room-placeholder .placeholder-title { font-weight:700; margin:0; }
.room-placeholder .placeholder-sub { margin:0.25rem 0 0 0; font-size:0.92rem; }
.room-placeholder button { margin-top:.5rem; }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #fff8f5 100%);
    margin: 3% auto;
    border-radius: 20px;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(15, 29, 36, 0.22);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 1rem;
}

.current-balance-display {
    background: rgba(16, 185, 129, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #10b981;
}

.current-balance-display p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

.current-balance-display span {
    font-size: 1.3rem;
    font-weight: 700;
    color: #10b981;
}

.success-message {
    display: none;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #047857;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 600;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-footer button {
    min-width: 130px;
    display: flex;
    justify-content: center;
    align-items: center;
}

footer {
    background-color: var(--text-color);
    color: white;
    text-align: center;
    padding: 0.1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.error-message {
    color: #d9534f;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
}

.success-message {
    color: #28a745;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #d4edda;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
}

/* Debug log visible in UI for development (kept hidden by default) */
.debug-log {
    display:none; /* keep UI clean */
    margin: 1rem auto 0;
    max-width: 420px;
    background: #f8f9fa;
    border: 1px solid #e2e2e2;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: #333;
    border-radius: 6px;
    max-height: 140px;
    overflow: auto;
    white-space: pre-wrap;
}

/* Generic section view transitions (for dashboard, rooms, etc.) */
.section-view {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 260ms ease, transform 260ms ease;
    pointer-events: none;
    /* Fix: dentro de .auth-container (flex) tomar 100% del ancho disponible */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.section-view.visible {
    display: block;
    opacity: 1;
    transform: none;
    pointer-events: auto;
} 

.debug-controls {
    max-width: 420px;
    margin: 0.5rem auto 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    justify-content: center;
}

.debug-controls label { font-size: 0.85rem; color: #333; }
.debug-controls input[type="text"], .debug-controls input[type="password"] { padding: .25rem .5rem; border-radius: 4px; border: 1px solid #ccc; }
.debug-controls button { padding: .35rem .6rem; border-radius: 5px; border: none; background: var(--primary-color); color: white; cursor: pointer; }
.debug-controls button:hover { background: #e66b68; }

.svc-result { text-align: center; }

.dashboard-section {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.dashboard-content {
    background: linear-gradient(135deg, #ffffff 0%, #fff8f5 100%);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.welcome-section {
    margin-bottom: 2rem;
}

.welcome-section h2 {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.user-card {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.user-avatar-container {
    flex-shrink: 0;
}

.user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(254,124,121,0.3);
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.user-email {
    color: #666;
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.user-id-display {
    color: #666;
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px dashed #ddd;
    transition: all 0.2s;
}

.user-id-display:hover {
    background: #e9ecef;
    border-color: var(--primary-color);
}

.user-id-value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.user-info-item {
    margin: 0.5rem 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

.user-info-item strong {
    color: var(--primary-color);
}

.user-info {
    margin-bottom: 2rem;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.dashboard-actions button {
    min-width: 180px;
}

/* Account Section */
.account-section {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.account-content {
    background: linear-gradient(135deg, #ffffff 0%, #fff8f5 100%);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.account-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.account-header h2 {
    flex: 1;
    text-align: center;
    color: var(--text-color);
    font-size: 1.8rem;
    margin: 0;
}

.participants-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(108,92,231,0.10);
}
.participants-table th, .participants-table td {
    padding: 0.85rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid #eaeaff;
}
.participants-table th {
    background: #f8f9fa;
    color: #6c5ce7;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #a29bfe;
}
.participants-table td {
    font-size: 1rem;
    color: #2d3436;
}
.participants-table tr:last-child td {
    border-bottom: none;
}
.account-tab-content {
    animation: fadeIn 0.3s ease;
}

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

.password-form {
    max-width: 500px;
    margin: 2rem auto;
}

.account-body {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.account-avatar-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(254,124,121,0.3);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-form {
    flex: 1;
    min-width: 300px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.info-section h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #e6eaeb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.form-group select {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #e6eaeb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: white;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(254,124,121,0.1);
}

.form-group input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.success-message {
    color: #28a745;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #d4edda;
    border-radius: 6px;
    text-align: center;
}

/* ============================================================
   HEADER MÓVIL — Rediseño completo
   ROW 1: Logo  |  Saldo · Campana · Usuario
   ROW 2: Nav tabs  |  Idioma · Dark · Salir
   ============================================================ */
@media (max-width: 768px) {
    header {
        display: grid !important;
        grid-template-areas:
            "logo actions"
            "nav  nav";
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        padding: 0.6rem 0.75rem 0.35rem !important;
        gap: 0.5rem 0 !important;
        align-items: center;
        position: relative !important;
    }

    /* ── Logo ── */
    .logo {
        grid-area: logo;
        display: flex;
        align-items: center;
    }
    .logo img { height: 38px; }

    /* ── Acciones Row 1 ── */
    .header-actions {
        grid-area: actions;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 0.35rem !important;
    }

    /* Saldo: movido a la misma fila que Inicia Salas Cuenta y alineado a la derecha */
    .header-balance {
        position: absolute !important;
        bottom: 0.35rem !important;
        right: 0.75rem !important;
        padding: 0 0.5rem !important;
        height: 28px !important;
        min-height: 28px !important;
        gap: 0.3rem !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        order: 1;
        margin: 0 !important;
        z-index: 10;
        white-space: nowrap !important;
    }
    #header-balance-amount { font-size: 0.85rem !important; }
    .btn-recharge-small {
        width: 22px !important;
        height: 22px !important;
        min-height: 22px !important;
        max-height: 22px !important;
        padding: 0 !important;
        font-size: 1.1rem !important;
        border-radius: 4px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Campana de notificaciones */
    .notifications-container { order: 2; }
    .notifications-btn svg { width: 20px; height: 20px; }

    /* Botones de menú uniformes */
    #header-user-name,
    .lang-btn,
    .dark-mode-btn,
    #logout-btn-global,
    .notifications-btn {
        width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        padding: 0 !important;
        border-radius: 8px !important;
        display: flex;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    /* Nombre de usuario: solo ícono */
    #header-user-name {
        order: 3;
        background: rgba(255,255,255,0.2) !important;
        gap: 0 !important;
    }
    #header-user-name span { display: none !important; }

    /* Ayuda: ocultar en móvil (ahorra espacio) */
    .help-selector { display: none !important; }

    /* Idioma: solo texto sin flecha */
    .language-selector { order: 4; }
    .lang-btn {
        font-size: 0.85rem !important;
        gap: 0 !important;
    }
    .lang-btn svg { display: none !important; }
    #current-lang { font-size: 0.85rem !important; }

    /* Dark mode toggle */
    .dark-mode-btn {
        order: 5;
    }

    /* Cerrar sesión: solo ícono (×) */
    #logout-btn-global {
        order: 6;
        font-size: 0 !important;          /* Oculta el texto */
        background: rgba(255,255,255,0.95) !important;
        color: var(--primary-color) !important;
        position: relative !important;
    }
    /* Ícono de salida via ::after */
    #logout-btn-global::after {
        content: '';
        display: block;
        width: 16px;
        height: 16px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fe7c79' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'%3E%3C/path%3E%3Cpolyline points='16 17 21 12 16 7'%3E%3C/polyline%3E%3Cline x1='21' y1='12' x2='9' y2='12'%3E%3C/line%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: contain;
        flex-shrink: 0;
    }

    /* ── Nav Row 2 ── */
    nav {
        grid-area: nav;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.35rem 0 0.4rem !important;
        margin-top: 0.35rem !important;
        border-top: 1px solid rgba(255,255,255,0.2) !important;
    }

    nav ul {
        display: flex !important;
        gap: 0.25rem !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-wrap: nowrap !important;
        align-items: center;
    }

    /* Nav tabs: pill style */
    nav a {
        padding: 0.35rem 0.9rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
        border-radius: 20px !important;
        font-weight: 600 !important;
        background: rgba(255,255,255,0.12) !important;
        transition: background 0.2s ease !important;
    }

    nav a:hover,
    nav a.active {
        background: rgba(255,255,255,0.3) !important;
        transform: none !important;
    }

    /* Dark mode en nav row */
    [data-theme="dark"] nav {
        border-top-color: rgba(255,255,255,0.1) !important;
    }

    /* ── Otros ajustes globales sin relación al header ── */
    .account-body {
        flex-direction: column;
        align-items: center;
    }
    .user-card {
        flex-direction: column;
        text-align: center;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Global alert/banner */
.global-alert {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 260px;
    max-width: 90%;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 9999;
}

.global-alert.info { background: #e7f5ff; color: #044b59; }
.global-alert.warning { background: #fff4e5; color: #6a4b00; }
.global-alert.error { background: #fdecea; color: #6a0c0c; }

.global-alert button { background: transparent; border: none; font-size: 1.1rem; cursor: pointer; }

#global-alert-message { flex: 1; font-weight: 500; }

/* Notifications */
.notifications-container {
    position: relative;
}

.notifications-btn {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s;
    flex-shrink: 0;
}

.notifications-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.06);
}

.notifications-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
    stroke: white;
}

.notifications-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

.notifications-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.invitation-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #FF69B4;
}

.invitation-card:hover {
    background: #f1f3f5;
}

.invitation-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.invitation-room-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.invitation-type {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.invitation-type.incoming {
    background: #e7f5ff;
    color: #0c5460;
}

.invitation-type.outgoing {
    background: #fff4e5;
    color: #856404;
}

.invitation-details {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.invitation-details p {
    margin: 0.25rem 0;
}

.invitation-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn-accept {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-reject {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-reject:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}


.btn-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 105, 180, 0.4);
}

.btn-invite {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    margin-right: 0.5rem;
}

.btn-invite:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.no-invitations {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* User Cards (Room Users Modal) */
.user-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.user-info {
    flex: 1;
}

.user-info h4 {
    margin: 0 0 0.25rem 0;
    color: #333;
    font-size: 1.1rem;
}

.user-email {
    margin: 0 0 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

.user-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.user-status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.user-status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.user-status-badge.unknown {
    background-color: #e2e3e5;
    color: #6c757d;
}

.user-card-details {
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 0.9rem;
}

.user-card-details p {
    margin: 0.25rem 0;
}

.no-users {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.loading-message {
    text-align: center;
    padding: 2rem;
    color: #007bff;
    font-style: italic;
}

.pagination-info {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    margin-top: 1rem;
}

/* Room Status Action Buttons */
.room-status-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.btn-suspend,
.btn-activate,
.btn-finish {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-suspend {
    background-color: #ffc107;
    color: #000;
}

.btn-suspend:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
}

.btn-activate {
    background-color: #28a745;
    color: white;
}

.btn-activate:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.btn-finish {
    background-color: #6c757d;
    color: white;
}

.btn-finish:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.4);
}

/* Bingo Cards Buttons */
.room-card-actions .btn-cards {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.room-card-actions .btn-cards:hover {
    background: linear-gradient(135deg, #8e44ad, #71368a);
}

.room-card-actions .btn-assign-cards {
    background: linear-gradient(135deg, #16a085, #1abc9c);
    color: white;
}

.room-card-actions .btn-assign-cards:hover {
    background: linear-gradient(135deg, #138f75, #16a085);
}

.room-card-actions .btn-view-requests {
    background: linear-gradient(135deg, #f39c12, #d35400);
    color: white;
}
.room-card-actions .btn-view-requests:hover {
    background: linear-gradient(135deg, #e67e22, #ca6f1e);
}

.room-card-actions .btn-view-users {
    background: linear-gradient(135deg, #00bcd4, #0097a7);
    color: white;
}
.room-card-actions .btn-view-users:hover {
    background: linear-gradient(135deg, #00acc1, #00838f);
}

.room-card-actions .btn-view-draws {
    background: linear-gradient(135deg, #3f51b5, #303f9f);
    color: white;
}
.room-card-actions .btn-view-draws:hover {
    background: linear-gradient(135deg, #3949ab, #283593);
}

.room-card-actions .btn-my-cards {
    background: linear-gradient(135deg, #e83e8c, #d63384);
    color: white;
}

.room-card-actions .btn-my-cards:hover {
    background: linear-gradient(135deg, #d63384, #c2185b);
}

/* Bingo Cards Modal */
/* Modal de cartones de sala (Sala Cami / Ver Cartones) */
.cards-modal-content {
    width: min(95vw, 1220px);
    max-width: 95vw;
    max-height: 92vh;
    margin: 2% auto;
    overflow: hidden;
}

.cards-modal-content .modal-body {
    max-height: 78vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem 1.5rem;
}

/* Modales de cartones jugados / cartones del participante */
.figure-cards-modal-content {
    width: min(95vw, 1220px);
    max-width: 95vw;
    max-height: 92vh;
    margin: 2% auto;
    overflow: hidden;
}

.figure-cards-modal-content .modal-body {
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 1.5rem;
}

/* Protección global: ningún bingo-cards-vertical desborda su modal */
.modal-content .bingo-cards-vertical {
    max-width: 100%;
    overflow: hidden;
}

.modal-content .bingo-card {
    overflow: hidden;
    box-sizing: border-box;
}

.cards-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.cards-summary h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.cards-summary p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
}

.no-cards {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Pagination Controls */
.pagination-controls {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid #e0e0e0;
}

.pagination-info {
    text-align: center;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-page {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 45px;
}

.btn-page:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 102, 99, 0.3);
}

.btn-page.active {
    background: var(--primary-color);
    color: white;
}

.btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #ccc;
    color: #999;
}

/* Bingo Cards Grid */
.bingo-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.bingo-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    box-sizing: border-box;
}

.bingo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(254, 124, 121, 0.3);
    border-color: var(--primary-color);
}

/* Card selection checkbox */
.card-select-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 10;
}

/* Card entered in draw styling */
.bingo-card.entered-in-draw {
    border-color: #4caf50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05), rgba(76, 175, 80, 0.1));
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.3);
}

.bingo-card.entered-in-draw::before {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #4caf50;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 5;
}

/* Draw entry controls */
.draw-entry-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.draw-entry-controls button {
    flex: 1;
    max-width: 250px;
}

.bingo-card-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.bingo-card-serial {
    font-family: monospace;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-color);
}

/* BINGO Letters Header */
.bingo-card-letters {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    margin-bottom: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.bingo-letter {
    text-align: center;
    font-weight: 900;
    font-size: 1rem;
    color: white;
    padding: 0.4rem 0.2rem;
    border-radius: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 35px;
    box-sizing: border-box;
    overflow: hidden;
}

.bingo-letter:nth-child(1) { background: #DC2626; } /* B - Red       */
.bingo-letter:nth-child(2) { background: #1D4ED8; } /* I - Blue      */
.bingo-letter:nth-child(3) { background: #6D28D9; } /* N - Violet    */
.bingo-letter:nth-child(4) { background: #047857; } /* G - Emerald   */
.bingo-letter:nth-child(5) { background: #B45309; } /* O - Amber     */

/* Card Search Section */
.card-search-section {
    background: #CDF7DE;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #02515a;
}

.card-search-section h4 {
    margin: 0 0 0.75rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.search-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-tab {
    flex: 1;
    padding: 0.6rem;
    border: none;
    background: white;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.search-tab.active {
    background: #02515a;
    color: white;
}

.search-tab:hover:not(.active) {
    background: #f5f5f5;
}

.search-panel {
    display: none;
}

.search-panel.active {
    display: block;
}

.search-help {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.search-input {
    flex: 1;
    padding: 0.6rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #02515a;
}

.btn-search {
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #21f3c3, #2f9184);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-search:hover {
    background: linear-gradient(135deg, #2f9184, #02515a);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(2, 81, 90, 0.4);
}

.btn-clear-search {
    width: 100%;
    padding: 0.6rem;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.75rem;
}

.btn-clear-search:hover {
    background: #f57c00;
    transform: translateY(-2px);
}

.search-results-header {
    background: #fff8e1;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #ffc107;
}

.search-results-header h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-color);
}

.search-results-header p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.bingo-card-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: #ccc;
    border: 2px solid #999;
    border-radius: 5px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.bingo-cell {
    background: white;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-color);
    box-sizing: border-box;
    overflow: hidden;
}

.bingo-cell.free-space {
    background: linear-gradient(135deg, var(--primary-color), #ff6663);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
}

/* Assign Card Form */
.assign-card-form {
    background: #fff3cd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #ffc107;
}

.assign-card-form h4 {
    margin: 0 0 0.75rem 0;
    color: var(--text-color);
    font-size: 1rem;
}

.form-inline {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.card-serial-input {
    flex: 1;
    padding: 0.6rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: monospace;
    transition: border-color 0.3s;
}

.card-serial-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-assign-single {
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #16a085, #1abc9c);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-assign-single:hover {
    background: linear-gradient(135deg, #138f75, #16a085);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(22, 160, 133, 0.4);
}

/* Remove Card Button */
.btn-remove-card {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    transition: all 0.3s;
    padding: 0;
}

.btn-remove-card:hover {
    background: #c82333;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.5);
}

/* Assign Me Button */
.btn-assign-me {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-assign-me:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
}

/* Assign Me Full Width Button (below card grid) */
.btn-assign-me-full {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-assign-me-full:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.5);
}

.bingo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Card actions group for multiple buttons */
.card-actions-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.card-actions-group .btn-assign-me {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.card-actions-group .btn-remove-card {
    width: 28px;
    height: 28px;
    font-size: 1.3rem;
}

/* Small info text for cards */
.bingo-card-info-small {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.75rem;
}


/* ======================================
   Room Detail View Styles
   ====================================== */

.room-detail-section {
    display: none;
    width: 100%;
    max-width: 1800px;
    margin: 1rem auto 0 auto;
    box-sizing: border-box;
}

#room-detail {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    box-sizing: border-box;
}
@media (max-width: 1200px) {
    #room-detail,
    .room-detail-section {
        max-width: 100vw;
        padding: 0 0.5rem;
    }
}

@media (max-width: 768px) {
    #room-detail,
    .room-detail-section {
        max-width: 100vw;
        padding: 0 0.2rem;
    }
    .cards-list {
        grid-template-columns: 1fr !important;
        gap: 0.5rem;
    }
    .figure-card {
        max-width: 100vw;
        width: 100%;
        margin: 0 auto;
    }
}

.room-detail-section.visible {
    display: block;
}

.room-detail-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.room-detail-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff9693 100%);
    padding: 1.5rem 2rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.room-detail-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.room-detail-title h2 {
    margin: 0;
    font-size: 1.8rem;
}

.room-detail-actions {
    display: flex;
    gap: 0.5rem;
}

.room-detail-actions button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.room-detail-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.room-detail-body {
    display: flex;
    overflow: hidden;
    position: relative;
}

/* Users Panel */
.room-users-panel {
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    width: 320px;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    overflow-x: hidden;
    position: relative;
}

.room-users-panel.collapsed {
    width: 60px;
}

.room-users-panel.collapsed .users-list,
.room-users-panel.collapsed .header-left {
    display: none;
}

.panel-header {
    padding: 1rem;
    background: white;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 60px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-toggle-sidebar {
    background: #f1f3f5;
    border: none;
    border-radius: 8px;
    padding: 0.4rem;
    cursor: pointer;
    color: #636e72;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-sidebar:hover {
    background: var(--primary-color);
    color: white;
}

.room-users-panel.collapsed .btn-toggle-sidebar {
    transform: rotate(180deg);
    margin: 0 auto;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.panel-header .badge {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.users-list {
    padding: 1rem;
}

.user-item {
    background: white;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.user-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.user-info .user-name {
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    font-size: 0.95rem;
}

.user-info .user-email {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-status-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.user-status-badge.active {
    background: #d4edda;
    color: #155724;
}

.user-status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Administrador de sala en el panel de miembros */
.user-item-admin {
    border-left: 3px solid var(--primary-color);
    background: linear-gradient(135deg, #fff8f5 0%, #fff 100%);
}

.user-avatar-admin {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff9693 100%);
    font-size: 0.95rem;
}

.admin-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff9693 100%);
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Cards Panel */
.room-cards-panel {
    background: white;
    flex: 1;
    min-width: 0; /* Important for flex child to be able to shrink/expand correctly */
}

.cards-list {
    padding: 0.75rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 600px));
    gap: 1rem;
    justify-content: center;
}

.no-cards-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
    grid-column: 1 / -1;
}

.no-cards-message svg {
    width: 80px;
    height: 80px;
    color: #ccc;
    margin-bottom: 1rem;
}

.no-cards-message p {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

/* Bingo Card Grid for Detail View */
.cards-list .bingo-card {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.cards-list .bingo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.cards-list .bingo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
    /* Espacio para el checkbox absoluto (20px) + su posición left (8px) + gap (4px) */
    padding-left: 32px;
}

.cards-list .bingo-card-serial {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.cards-list .btn-remove-card {
    background: #dc3545;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cards-list .btn-remove-card:hover {
    background: #c82333;
    transform: scale(1.1);
}

.cards-list .bingo-card-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: 0.75rem;
}

.cards-list .bingo-cell {
    aspect-ratio: 1;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.cards-list .bingo-cell:hover {
    background: #e9ecef;
    transform: scale(1.05);
}

.cards-list .bingo-cell.free-space {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-color);
    font-size: 0.7rem;
    font-weight: 700;
}

.cards-list .bingo-cell.marked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Responsive Design for Room Detail */
@media (max-width: 968px) {
    .room-detail-body {
        grid-template-columns: 1fr;
    }

    .room-users-panel {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        max-height: 300px;
    }

    .room-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .room-detail-actions {
        width: 100%;
        justify-content: stretch;
    }

    .room-detail-actions button {
        flex: 1;
    }
    
    .cards-list {
        grid-template-columns: 1fr;
    }
}

/* Current Draw Info Section */
.current-draw-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.25rem 1.5rem;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 3px solid rgba(255,255,255,0.2);
}

.draw-info-content {
    flex: 1;
    min-width: 200px;
}

.draw-info-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.draw-info-main h3 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
}

.draw-status-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.draw-status-badge.pending {
    background: #ffd746;
    color: #02515a;
}

.draw-status-badge.started {
    background: #4ade80;
    color: #14532d;
}

.draw-status-badge.suspended {
    background: #fb923c;
    color: #7c2d12;
}

.draw-status-badge.finished {
    background: #94a3b8;
    color: #1e293b;
}

.draw-info-details {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.draw-serie {
    color: rgba(255,255,255,0.95);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: monospace;
}

.draw-modality {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    padding: 0.25rem 0.6rem;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
}

.draw-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.draw-actions button {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Draw Ball Area */
.draw-ball-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.jitsi-container {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 400px;
}

.jitsi-meet {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

.btn-share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-share-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.btn-share-link:active {
    transform: translateY(0);
}

.ball-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.btn-draw-ball {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #78350f;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.btn-draw-ball:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
}

.last-ball-drawn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.ball-number {
    font-size: 3rem;
    font-weight: 900;
    color: #667eea;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== Efecto de suspenso al sortear bolitas ===== */
.last-ball-drawn.ball-suspense {
    animation: ballSuspensePulse 0.7s ease-in-out infinite;
    box-shadow: 0 0 0 4px var(--primary-glow), 0 0 28px var(--primary-glow);
}
.last-ball-drawn.ball-suspense .ball-number {
    color: var(--primary-color);
    animation: ballSuspenseFlip 0.22s linear infinite;
}
@keyframes ballSuspensePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
@keyframes ballSuspenseFlip {
    0% { transform: rotateX(0deg); opacity: 1; }
    49% { transform: rotateX(85deg); opacity: 0.3; }
    50% { transform: rotateX(-85deg); opacity: 0.3; }
    100% { transform: rotateX(0deg); opacity: 1; }
}
.last-ball-drawn.ball-reveal {
    animation: ballReveal 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes ballReveal {
    0% { transform: scale(0.2) rotate(-12deg); opacity: 0; }
    60% { transform: scale(1.18) rotate(4deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.ball-letter {
    font-size: 1.5rem;
    font-weight: 700;
    color: #764ba2;
}

.balls-remaining {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

@media (max-width: 768px) {
    .draw-ball-area {
        flex-direction: column;
        text-align: center;
    }
    
    .jitsi-container {
        width: 100%;
    }
    
    .jitsi-meet {
        height: 250px;
    }
}

/* Drawn Balls List Styles */
.drawn-balls-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.drawn-balls-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 1rem 0;
    text-align: center;
    color: var(--primary-color);
}

.drawn-balls-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    max-height: 380px;
    overflow-y: auto;
    padding: 0.5rem;
}

.drawn-ball-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.drawn-ball-item:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.drawn-ball-number {
    font-size: 1.5rem;
    line-height: 1;
}

.drawn-ball-letter {
    font-size: 0.75rem;
    margin-top: 0.15rem;
    opacity: 0.9;
}

.no-balls-message {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 2rem;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .drawn-balls-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    .drawn-ball-number {
        font-size: 1.25rem;
    }
    .drawn-ball-letter {
        font-size: 0.65rem;
    }
}

/* Responsive adjustments for draw info */
@media (max-width: 768px) {
    .current-draw-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .draw-actions {
        width: 100%;
    }
    
    .draw-actions button {
        flex: 1;
        justify-content: center;
    }
}

/* Search Cards Modal Styles */
.modal-large {
    max-width: 900px;
}

/* Extra wide modal for figure cards */
.modal-wide {
    max-width: 1200px !important;
}

.search-cards-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.numbers-input-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.numbers-input-grid input {
    padding: 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.3s ease;
}

.numbers-input-grid input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(254, 124, 121, 0.1);
}

.search-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.search-actions button {
    flex: 1;
}

.search-results {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
}

.search-placeholder {
    text-align: center;
    color: #999;
    padding: 3rem;
    font-size: 1.1rem;
}

/* Ver Cartones modal uses shared .bingo-cards-grid layout */
.search-results .bingo-cards-grid {
    padding: 1rem;
}

@media (max-width: 768px) {
    .numbers-input-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .search-results .bingo-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Draw Statistics Styles */
.draw-stats-inline {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.stat-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

.stat-inline span {
    color: rgba(255, 255, 255, 0.9);
}

.stat-inline strong {
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.draw-stats-panel {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.draw-stats-panel h3 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.stat-label {
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.stat-value {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.modalities-checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.modality-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modality-checkbox-item:hover {
    background: #e3f2fd;
}

.modality-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.modality-checkbox-item span {
    font-size: 0.9rem;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .winner-details-inline {
        flex-direction: column;
        gap: 0.5rem;
    }
}
/* ==========================   */
@media (max-width: 768px) {
    .draw-stats-inline {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modalities-checkbox-list {
        grid-template-columns: 1fr;
    }
}

/* Draw admin style */
.draw-admin {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Bingo search grid - colored input boxes for number search */
.bingo-search-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.bingo-search-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bingo-search-input-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.bingo-column-label {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bingo-search-input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    background: white;
    transition: all 0.2s;
}

.bingo-search-input:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.bingo-search-input::placeholder {
    color: #999;
    font-weight: normal;
    font-size: 0.85rem;
}

/* Collapsible sections */
.collapsible-section {
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #ff9693 0%, #ff7b77 100%);
    color: white;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
}

.collapsible-header:hover {
    background: linear-gradient(135deg, #ff7b77 0%, #ff6661 100%);
}

.collapsible-header h3,
.collapsible-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.collapsible-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.collapsible-section.collapsed .collapsible-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 1.25rem;
    background: var(--bg-color);
}

.collapsible-section.collapsed .collapsible-content {
    max-height: 0;
    padding: 0 1.25rem;
}

.collapsible-content p {
    margin: 0.75rem 0;
    line-height: 1.6;
}

.collapsible-content .form-inline {
    margin-top: 1rem;
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    header {
        padding: 0.5rem 0.75rem;
    }
    
    .header-actions {
        gap: 0.4rem;
    }
    
    .header-balance {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .header-balance svg {
        width: 16px;
        height: 16px;
    }
    
    #header-balance-amount {
        font-size: 0.85rem;
    }
    
    .btn-recharge-small {
        padding: 0.2rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .header-user-name {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .header-user-name svg {
        width: 16px;
        height: 16px;
    }
    
    .header-user-name span {
        max-width: 80px;
    }
    
    .notifications-container {
        order: -1;
    }
    
    .notifications-btn {
        padding: 0.3rem;
    }
    
    .notifications-btn svg {
        width: 20px;
    }
    
    /* Mobile bingo search grid - stack vertically */
    .bingo-search-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .bingo-search-input-wrapper {
        padding: 0.5rem 0.4rem;
    }
    
    .bingo-column-label {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }
    
    .bingo-search-input {
        padding: 0.4rem;
        font-size: 0.9rem;
    }
    
    /* Mobile collapsible sections */
    .collapsible-header {
        padding: 0.75rem 1rem;
    }
    
    .collapsible-header h3,
    .collapsible-header h4 {
        font-size: 1rem;
    }
    
    .collapsible-content {
        padding: 1rem;
    }
    
    .collapsible-section.collapsed .collapsible-content {
        padding: 0 1rem;
        height: 20px;
    }
    
    .lang-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .lang-btn svg {
        width: 14px;
        height: 14px;
    }
    
    #current-lang {
        font-size: 0.8rem;
    }
    
    .btn-logout {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    nav a {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Winners Modal Styles */
.winners-modal-content {
    max-width: 800px;
}

/* Celebration mode animations */
.celebration-mode .winners-modal-content {
    animation: modalBounce 0.6s ease-out;
}

@keyframes modalBounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.winners-message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2ecc71;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 8px;
    border: 2px solid #28a745;
}

/* Bingo announcement styles */
.bingo-announcement {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 25%, #6bcf7f 50%, #4ecdc4 75%, #a55eea 100%);
    background-size: 400% 400%;
    animation: rainbowGradient 3s ease infinite, sparkle 1.5s ease-in-out infinite;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.bingo-announcement::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.1) 10px,
        rgba(255, 255, 255, 0.1) 20px
    );
    animation: moveStripes 2s linear infinite;
}

@keyframes rainbowGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes sparkle {
    0%, 100% { 
        filter: brightness(1) contrast(1);
        transform: scale(1);
    }
    50% { 
        filter: brightness(1.3) contrast(1.2);
        transform: scale(1.02);
    }
}

@keyframes moveStripes {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

.bingo-text {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4),
        3px 3px 6px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5rem;
    animation: textPulse 1s ease-in-out infinite, textColor 3s ease infinite;
    position: relative;
    z-index: 1;
}

@keyframes textPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes textColor {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(180deg); }
}

.bingo-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
}

/* Fireworks container */
.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.firework {
    position: absolute;
    width: 10px;
    height: 10px;
}

.firework-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: explode 1.5s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty));
        opacity: 0;
    }
}

.winners-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 0.5rem;
}

.winner-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.winner-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-color: #6c5ce7;
}

.winner-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.winner-number {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    min-width: 50px;
    text-align: center;
}

.pot-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #856404;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 2px solid #ffc107;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.winner-status {
    margin-left: auto;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.winner-status.fulfilled {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.winner-status.pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.winner-info {
    margin-bottom: 0.75rem;
}

.winner-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 0.25rem;
}

.winner-email {
    font-size: 0.9rem;
    color: #636e72;
}

.winner-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.winner-detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.8rem;
    color: #636e72;
    font-weight: 500;
    text-transform: uppercase;
}

.detail-value {
    font-size: 1rem;
    color: #2d3436;
    font-weight: 600;
}

.prize-amount {
    color: #27ae60;
    font-size: 1.2rem;
}

.winner-notes {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-left: 4px solid #6c5ce7;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #636e72;
    font-style: italic;
}

/* Winner actions */
.winner-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
}

.btn-view-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-view-card:hover {
    background: linear-gradient(135deg, #5b4bc7 0%, #9189de 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.btn-view-card svg {
    flex-shrink: 0;
}

.btn-view-card-small {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.btn-view-card-small:hover {
    background: linear-gradient(135deg, #5b4bc7 0%, #9189de 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.4);
}

.btn-view-card-small svg {
    flex-shrink: 0;
}

/* Winner Card Modal Styles */
.winner-card-info {
    padding: 1rem;
}

.winner-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #856404;
    font-weight: 900;
    font-size: 1.5rem;
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 3px solid #ffc107;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

.card-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.85rem;
    color: #636e72;
    font-weight: 600;
    text-transform: uppercase;
}

.info-value {
    font-size: 1.05rem;
    color: #2d3436;
    font-weight: 500;
}

.card-modalities-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #e3e8f7 0%, #f0e7ff 100%);
    border-radius: 8px;
    border: 2px solid #6c5ce7;
}

.card-modalities-section h4 {
    margin: 0 0 1rem 0;
    color: #6c5ce7;
    font-size: 1.1rem;
}

.winning-modality {
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border-left: 4px solid #6c5ce7;
}

.winning-modality:last-child {
    margin-bottom: 0;
}

.modality-name {
    font-weight: 700;
    color: #6c5ce7;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.modality-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.winning-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #856404;
    font-weight: 700;
    border-radius: 50%;
    border: 2px solid #ffc107;
}

.card-grid-section {
    margin-bottom: 1rem;
}

.card-grid-section h4 {
    margin: 0 0 1rem 0;
    color: #2d3436;
    font-size: 1.1rem;
}

.winner-card-grid {
    background: white;
    border: 3px solid #6c5ce7;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.15);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
}

/* Ajuste para que los headers sean grid y usen el mismo número de columnas que el cartón */
.card-grid-headers {
    display: grid;
    gap: 1px;
    margin-bottom: 0.5rem;
}

.card-header {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    text-align: center;
    padding: 0.6rem;
    border-radius: 8px;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
}

.card-grid-body {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
}

.card-column {
    display: contents;
}

.card-cell {
    background: #f8f9fa;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: #2d3436;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    aspect-ratio: 1;
    width: 100%;
}

.card-cell.marked {
    background: linear-gradient(135deg, #74b9ff 0%, #a29bfe 100%);
    color: white;
    border-color: #0984e3;
}

.card-cell.winning {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #856404;
    border-color: #ffc107;
    animation: winningPulse 1.5s ease-in-out infinite;
}

@keyframes winningPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(255, 215, 0, 0);
    }
}

.card-cell.empty {
    background: transparent;
    border: none;
}

.card-cell.free-space {
    background: linear-gradient(135deg, var(--primary-color), #ff6663);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.card-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #636e72;
}

.legend-box {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid;
}

.legend-box.marked {
    background: linear-gradient(135deg, #74b9ff 0%, #a29bfe 100%);
    border-color: #0984e3;
}

.legend-box.winning {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #ffc107;
}

/* Card drawn numbers section */
.card-drawn-numbers-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #e3e8f7 0%, #f0e7ff 100%);
    border-radius: 8px;
    border: 2px solid #6c5ce7;
}

.card-drawn-numbers-section h4 {
    margin: 0 0 1rem 0;
    color: #6c5ce7;
    font-size: 1.1rem;
}

.card-drawn-numbers-section .drawn-numbers-info {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #6c5ce7;
}

.card-drawn-numbers-section .drawn-numbers-info p {
    margin: 0;
    color: #2d3436;
}

.card-drawn-numbers-section .drawn-numbers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
}

/* Responsive winner card modal */
@media (max-width: 768px) {
    .card-info-grid {
        grid-template-columns: 1fr;
    }
    
    .card-drawn-numbers-section .drawn-numbers-list {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
        gap: 0.4rem;
        max-height: 250px;
    }
    
    .card-grid-headers {
        gap: 0.25rem;
    }
    
    .card-header {
        font-size: 1rem;
        padding: 0.5rem;
    }
    
    .card-grid-body {
        gap: 0.25rem;
    }
    
    .card-column {
        gap: 0.25rem;
    }
    
    .card-cell {
        padding: 0.5rem;
        font-size: 1rem;
        min-height: 50px;
    }
    
    .winning-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .card-legend {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* My Played Cards Modal */
.played-cards-summary {
    padding: 1rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.played-cards-summary p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: #2d3436;
}

.played-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.played-card-item {
    background: white;
    border: 2px solid #dfe6e9;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.played-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.played-card-item.winner-card {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
}

.played-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.played-card-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    font-family: monospace;
}

.winner-badge-small {
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #856404;
    font-weight: 700;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 2px solid #ffc107;
}

.played-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
}

.played-card-info span {
    color: #636e72;
}

.played-card-grid {
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .played-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive adjustments for winners modal */
@media (max-width: 768px) {
    .winners-modal-content {
        max-width: 95%;
    }
    
    .winner-details {
        grid-template-columns: 1fr;
    }
    
    .winner-header {
        flex-wrap: wrap;
    }
    
    .winners-message {
        font-size: 1rem;
        padding: 0.75rem;
    }
}

/* Draws List Styles */
.draws-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

.draw-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.draw-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.15);
    border-color: #6c5ce7;
}

.draw-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.draw-item-header h4 {
    margin: 0;
    color: #2d3436;
    font-size: 1.1rem;
}

.draw-item-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
}

.draw-item-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #636e72;
}

.draw-item-info strong {
    color: #2d3436;
}

/* Draw Details Styles */
.draw-details-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.draw-details-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.draw-details-section h3 {
    margin: 0 0 1rem 0;
    color: #6c5ce7;
    font-size: 1.1rem;
    border-bottom: 2px solid #6c5ce7;
    padding-bottom: 0.5rem;
}

.draw-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.85rem;
    color: #636e72;
    font-weight: 600;
    text-transform: uppercase;
}

.detail-item > span:last-child {
    font-size: 1rem;
    color: #2d3436;
    font-weight: 500;
}

.modalities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modality-tag {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.prizes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.prize-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem;
}

.prize-item strong {
    color: #6c5ce7;
    font-size: 1rem;
}

.prize-notes {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-left: 3px solid #6c5ce7;
    font-size: 0.85rem;
    color: #636e72;
    font-style: italic;
}

.winners-list-inline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.winner-item-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
}

.winner-number-inline {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 50%;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.winner-info-inline {
    flex: 1;
}

.winner-name-inline {
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 0.25rem;
}

.winner-details-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #636e72;
}

/* Drawn Numbers Styles */
.drawn-numbers-info {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #6c5ce7;
}

.drawn-numbers-info p {
    margin: 0;
    color: #2d3436;
}

.drawn-numbers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.drawn-number-item {
    background: white;
    border: 2px solid #6c5ce7;
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.drawn-number-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.2);
}

.drawn-number-position {
    font-size: 0.75rem;
    color: #636e72;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.drawn-number-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: #6c5ce7;
    background: linear-gradient(135deg, #e3e8f7 0%, #f0e7ff 100%);
    border-radius: 6px;
    padding: 0.5rem;
}

/* Responsive drawn numbers */
@media (max-width: 768px) {
    .drawn-numbers-list {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 0.5rem;
    }
    
    .drawn-number-value {
        font-size: 1.2rem;
        padding: 0.4rem;
    }
    
    .drawn-number-position {
        font-size: 0.7rem;
    }
}

.winner-prize-inline {
    color: #27ae60;
    font-weight: 600;
}

.pot-badge-inline {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #856404;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid #ffc107;
}

.no-data {
    color: #636e72;
    font-style: italic;
}

.loading-message, .error-message, .no-data-message {
    text-align: center;
    padding: 2rem;
    color: #636e72;
    font-size: 1rem;
}

.error-message {
    color: #d63031;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .draw-details-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================
   Rounds and Prizes Configuration
   ========================== */
.rounds-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.rounds-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.rounds-header h4 {
    margin: 0;
    color: #2d3436;
    font-size: 1.1rem;
}

.rounds-table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.rounds-table {
    width: 100%;
    border-collapse: collapse;
}

.rounds-table th {
    background: #f8f9fa;
    color: #636e72;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
}

.rounds-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.rounds-table tr:last-child td {
    border-bottom: none;
}

.rounds-table select, 
.rounds-table input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dfe6e9;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.rounds-table select:focus, 
.rounds-table input:focus {
    outline: none;
    border-color: #6c5ce7;
}

.round-number-cell {
    font-weight: 700;
    color: #6c5ce7;
    text-align: center;
}

.btn-remove-round {
    background: #ff7675;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-remove-round:hover {
    background: #d63031;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .rounds-table {
        min-width: 600px;
    }
}

/* ===================================
   DASHBOARD HERO SECTION (SEO & Core Web Vitals Optimized)
   =================================== */

.dashboard-hero {
    background: linear-gradient(135deg, #C42B44 0%, #E8445A 40%, #FFC53D 100%);
    padding: 3rem 2rem;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    /* Performance optimization */
    will-change: transform;
    contain: layout style paint;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
    pointer-events: none;
}

.dashboard-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3rem;
    font-family: var(--font-bingo);
    color: white;
    margin: 0 0 1rem 0;
    font-weight: 400;
    text-shadow: 0 2px 12px rgba(0,0,0,0.20);
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.95);
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero-primary,
.btn-hero-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    /* Performance optimization */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.btn-hero-primary {
    background: white;
    color: var(--primary-dark);
    font-weight: 700;
    border-radius: var(--radius-md);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    background: #fff5f5;
    box-shadow: 0 8px 28px rgba(196,43,68,0.35);
}

.btn-hero-secondary {
    background: rgba(15, 29, 36, 0.88);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    backdrop-filter: blur(8px);
}

.btn-hero-secondary:hover {
    transform: translateY(-3px);
    background: rgba(15, 29, 36, 1);
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.bingo-card-preview {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
    /* Performance optimization */
    will-change: transform;
}

.bingo-card-preview:hover {
    transform: rotate(0deg) scale(1.05);
}

.preview-card {
    min-width: 250px;
}

.card-header-preview {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    letter-spacing: 0.5rem;
}

.card-grid-preview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.card-cell-preview {
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary-color), #ff9693);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Abanico de cartas de La Caída en el hero */
.caida-cards-preview {
    position: relative;
    width: 180px;
    height: 150px;
    margin-left: -10px;
}
.caida-card-mini {
    position: absolute;
    width: 78px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
    transition: transform 0.3s ease;
    bottom: 0;
    left: 50px;
}
.caida-card-mini.c1 { transform: rotate(-18deg) translateX(-46px) translateY(8px); z-index: 1; }
.caida-card-mini.c2 { transform: rotate(-6deg)  translateX(-16px); z-index: 2; }
.caida-card-mini.c3 { transform: rotate(6deg)   translateX(14px); z-index: 3; }
.caida-card-mini.c4 { transform: rotate(18deg)  translateX(44px) translateY(8px); z-index: 4; }
.caida-cards-preview:hover .caida-card-mini.c1 { transform: rotate(-26deg) translateX(-70px) translateY(4px); }
.caida-cards-preview:hover .caida-card-mini.c4 { transform: rotate(26deg)  translateX(68px) translateY(4px); }

/* Selector de juego (Bingo / La Caída) */
.game-selector {
    margin: 2rem 0 1rem;
}
.game-selector-title {
    text-align: center;
    margin-bottom: 1.2rem;
}
.game-selector-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.game-card {
    background: white;
    border-radius: 16px;
    padding: 1.8rem;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.game-card:hover, .game-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    border-color: var(--primary-color);
    outline: none;
}
.game-card-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #ff9693);
}
.game-card-caida .game-card-icon {
    background: linear-gradient(135deg, #0f5132, #157347);
}
/* La carta es vertical; se fija el alto (igual que el SVG de Bingo) para que ambos iconos
   tengan el mismo tamaño visual y las tarjetas se vean iguales. */
.game-card-caida .game-card-icon img {
    width: auto !important;
    height: 40px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.game-card h3 { margin: 0.2rem 0 0.6rem; font-size: 1.4rem; }
.game-card p { color: #555; min-height: 3.2em; margin-bottom: 1.1rem; }
.game-card-btn { width: 100%; }

/* Pestañas de reglas por juego en el modal de Ayuda */
.rules-tab {
    background: #eee;
    color: #444;
}
.rules-tab.active {
    background: var(--primary-color, #fe7c79);
    color: #fff;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
    /* Performance optimization */
    transform: translateZ(0);
    will-change: transform;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.feature-card h3 {
    color: var(--text-color);
    font-size: 1.3rem;
    margin: 0 0 1rem 0;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.stat-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #ff9693);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.stat-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.stat-value {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Responsive Design for Dashboard */
@media (max-width: 768px) {
    .dashboard-hero {
        padding: 2rem 1rem;
        margin: -1rem -1rem 1rem -1rem;
    }
    
    .dashboard-hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .bingo-card-preview {
        transform: rotate(0deg);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Lazy Loading Optimization */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Tamaño aún mayor para figuras en Sortear Bolita y Bolitas Sorteadas */
#last-ball-drawn .figure-img {
  max-width: 110px !important;
  max-height: 110px !important;
  width: 110px !important;
  height: 110px !important;
}

.drawn-balls-list .figure-img {
  max-width: 70px !important;
  max-height: 70px !important;
  width: 70px !important;
  height: 70px !important;
}

/* ========== ACCOUNT TABS STYLING ========== */
.account-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    background-color: #f1f3f5;
    padding: 6px;
    border-radius: 30px;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.account-tab {
    background-color: transparent;
    border: none;
    color: #666;
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 24px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.account-tab:hover {
    color: #fe7c79;
    background-color: rgba(254, 124, 121, 0.1);
}

.account-tab.active {
    background-color: #ffffff;
    color: #fe7c79;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

/* Pestañas de Cuenta: responsivas en pantallas angostas y móvil */
@media (max-width: 600px) {
    .account-tabs {
        width: 100%;
        gap: 5px;
        padding: 5px;
        border-radius: 18px;
    }
    .account-tab {
        padding: 8px 14px;
        font-size: 0.82rem;
    }
    .account-tab.active {
        transform: none;
    }
}

/* Winner Card Round Selector */
.round-selector-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.round-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    color: #444;
}

.round-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.round-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 6px rgba(254, 124, 121, 0.3);
}

.card-modalities-section, .card-drawn-numbers-section {
    transition: opacity 0.3s ease;
}

/* Nuevo estilo para los cartones numéricos de Bingo */
.bingo-header-cell {
    color: white;
    font-weight: 900;
    font-size: 1.3rem;
    text-align: center;
    padding: 0.5rem 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 0 rgba(0,0,0,0.15);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.bingo-header-B { background: #e74c3c; border: 1px solid #c0392b; }
.bingo-header-I { background: #3498db; border: 1px solid #2980b9; }
.bingo-header-N { background: #9b59b6; border: 1px solid #8e44ad; }
.bingo-header-G { background: #2ecc71; border: 1px solid #27ae60; }
.bingo-header-O { background: #f39c12; border: 1px solid #d35400; }

.bingo-number-cell {
    background: white;
    text-align: center;
    font-family: var(--font-bingo);
    font-weight: 400;
    font-size: 1.2rem;
    color: #004d40;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    width: 100%;
    border: none;
    border-radius: 0;
}
.bingo-number-cell.free-space {
    background: #ff6b6b;
    color: white;
    font-size: 1rem;
}
.bingo-number-cell.marked {
    background: linear-gradient(135deg, #74b9ff 0%, #a29bfe 100%);
    color: white;
    animation: stampIn 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
.bingo-number-cell.winning {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #856404;
    animation: winningPulse 1.5s ease-in-out infinite;
    z-index: 1;
}
.bingo-number-cell.empty {
    background: #f1f2f6;
}

/* ============================================================
   MEJORAS VISUALES 2025 — Famingon
   ============================================================ */

/* --- Tipografía global con Poppins --- */
body {
    font-family: var(--font-family);
    background: var(--bg-body);
    color: var(--text-color);
}

.bingo-header-cell {
    font-family: var(--font-bingo);
    font-weight: 400;
    letter-spacing: 1px;
}

.drawn-number-value {
    font-family: var(--font-bingo);
}

/* --- Animación stamp para marcar celdas --- */
@keyframes stampIn {
    0%   { transform: scale(1.6) rotate(-8deg); opacity: 0.4; }
    60%  { transform: scale(0.9) rotate(3deg);  opacity: 1; }
    80%  { transform: scale(1.06) rotate(-1deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Aplicar stamp también a .bingo-cell.marked */
.bingo-cell.marked {
    animation: stampIn 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* --- Animación pop para número sorteado --- */
@keyframes numberPop {
    0%   { transform: scale(0.5) translateY(20px); opacity: 0; }
    70%  { transform: scale(1.15) translateY(-4px); opacity: 1; }
    85%  { transform: scale(0.96); }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes ballGlow {
    0%, 100% { box-shadow: 0 0 20px 4px var(--primary-glow); }
    50%       { box-shadow: 0 0 40px 12px var(--primary-glow); }
}

/* Panel del número sorteado actual — aspecto de bola de bingo */
.drawn-number-value {
    animation: numberPop 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Estilos mejorados para el item de número sorteado */
.drawn-number-item {
    position: relative;
    overflow: hidden;
}
.drawn-number-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}

/* --- Botón Dark Mode --- */
.dark-mode-btn {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.dark-mode-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: rotate(20deg);
}

/* --- DARK MODE --- */
[data-theme="dark"] {
    --bg-body: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-alt: #16213e;
    --bg-input: #1e1e30;
    --border-color: #2d2d4e;
    --text-color: #e0e0f0;
    --text-muted: #9090b0;
    --shadow-card: 0 8px 24px rgba(0,0,0,0.45);
}

[data-theme="dark"] body {
    background: var(--bg-body);
    color: var(--text-color);
}

[data-theme="dark"] .auth-container {
    background: linear-gradient(135deg, #12122a 0%, #1a1040 100%);
}

[data-theme="dark"] .auth-card,
[data-theme="dark"] .dashboard-content,
[data-theme="dark"] .account-content,
[data-theme="dark"] .modal-content {
    background: var(--bg-card);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .room-card,
[data-theme="dark"] .user-card,
[data-theme="dark"] .played-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .dashboard-top-rooms,
[data-theme="dark"] .top-room-card {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .rooms-section,
[data-theme="dark"] .dashboard-section,
[data-theme="dark"] .account-section {
    color: var(--text-color);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--bg-input);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .room-search {
    background: #16162a;
}

[data-theme="dark"] .rooms-tabs,
[data-theme="dark"] .rooms-header,
[data-theme="dark"] .rooms-top-bar {
    border-color: var(--border-color);
}

[data-theme="dark"] .participants-table th {
    background: #1a1a2e;
    color: var(--purple-light);
}
[data-theme="dark"] .participants-table td {
    color: var(--text-color);
    border-color: var(--border-color);
}
[data-theme="dark"] .participants-table {
    background: var(--bg-card);
}

[data-theme="dark"] .bingo-number-cell {
    background: #1e1e30;
    color: #c0d0ff;
}
[data-theme="dark"] .bingo-number-cell.marked {
    background: linear-gradient(135deg, #4a7af7 0%, #7b5ce7 100%);
    color: white;
}
[data-theme="dark"] .bingo-number-cell.free-space {
    background: #c0392b;
}

[data-theme="dark"] .winner-card-grid--5x5,
[data-theme="dark"] .winner-card-grid--6x8 {
    background: var(--bg-card);
}

[data-theme="dark"] .modal-header {
    border-color: var(--border-color);
}

[data-theme="dark"] .room-code,
[data-theme="dark"] .user-id-display {
    background: #16162a;
    color: var(--text-muted);
}

[data-theme="dark"] .room-status-badge.pending {
    background: #3a2e00;
    color: #ffd746;
}
[data-theme="dark"] .room-status-badge.started {
    background: #0a2e18;
    color: #4caf50;
}
[data-theme="dark"] .room-status-badge.ended {
    background: #2e0a0a;
    color: #ef9a9a;
}

[data-theme="dark"] .cards-summary,
[data-theme="dark"] .card-drawn-numbers-section {
    background: linear-gradient(135deg, #1a1a3e 0%, #1e1030 100%);
    border-color: var(--purple);
}
[data-theme="dark"] .drawn-numbers-info,
[data-theme="dark"] .card-drawn-numbers-section .drawn-numbers-info {
    background: #1a1a2e;
    border-color: var(--purple-light);
}

[data-theme="dark"] .global-alert.info    { background: #0a2030; color: #7ecfff; }
[data-theme="dark"] .global-alert.warning { background: #2a1e00; color: #ffd746; }
[data-theme="dark"] .global-alert.error   { background: #2a0a0a; color: #ff8080; }

[data-theme="dark"] .invitation-card {
    background: #1a1a2e;
    border-left-color: var(--primary-color);
}

[data-theme="dark"] footer {
    background: #0a0a14;
}

/* Dark mode: transición suave en toda la página */
body, .auth-card, .modal-content, .room-card, .dashboard-content,
.account-content, .played-card, .feature-card {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* --- Mejoras generales de cards de sala --- */
.room-card {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.room-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(2, 81, 90, 0.14);
}

/* --- Header BINGO con font Fredoka One --- */
.card-header-preview {
    font-family: var(--font-bingo);
    letter-spacing: 4px;
}

/* --- Número sorteado: panel tipo bola de bingo --- */
.drawn-number-item.latest {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff9693 100%);
    border-color: var(--primary-dark);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--primary-glow);
    animation: ballGlow 2s ease-in-out infinite, numberPop 0.5s cubic-bezier(0.36,0.07,0.19,0.97) both;
}
.drawn-number-item.latest .drawn-number-value,
.drawn-number-item.latest .drawn-number-position {
    color: white;
}

/* --- Feature cards del dashboard --- */
.feature-card {
    border-radius: var(--radius-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(108, 92, 231, 0.15);
}

/* --- Inputs con focus mejorado --- */
.form-group input:focus,
.form-group select:focus,
.room-search input:focus,
.auth-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
    outline: none;
}

/* --- Scrollbar estilizada (Webkit) --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    opacity: 0.7;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

[data-theme="dark"] ::-webkit-scrollbar-track { background: #1a1a2e; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--purple); }

/* ============================================================
   MOBILE RESPONSIVENESS v2.0.0 — Famingon
   Correcciones integrales para pantallas móviles (375px+)
   ============================================================ */

/* Evitar scroll horizontal global */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Espacio inferior para no quedar tapado por el footer fijo */
main,
.auth-container,
.rooms-section,
.dashboard-section,
.account-section,
.room-detail-section {
    padding-bottom: 56px;
}

/* ===== INPUTS: evitar zoom en iOS (font-size mínimo 16px) ===== */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="date"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ===== TOUCH TARGETS mínimos 44px ===== */
@media (max-width: 768px) {
    button:not(.modal-close):not(.toggle-password):not(.dark-mode-btn),
    .room-tab,
    nav a,
    .btn-accept,
    .btn-reject,
    .btn-join,
    .btn-manage,
    .btn-invite {
        min-height: 44px;
    }
}

/* ===== HEADER: fix wrapping y tamaños ===== */
@media (max-width: 480px) {
    header {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }

    .header-actions {
        gap: 0.4rem;
    }

    /* Ocultar texto del balance en pantallas muy pequeñas */
    .header-user-name span {
        display: none;
    }

    .lang-btn,
    .help-btn {
        padding: 0.4rem 0.6rem;
    }

    #current-lang {
        font-size: 0.8rem;
    }
}

/* ===== AUTH: centrado y sin espacio muerto ===== */
@media (max-width: 768px) {
    .auth-container {
        align-items: flex-start;
        padding: 1rem 1rem 80px;
        min-height: calc(100vh - 80px);
    }

    .auth-card {
        margin-top: 1rem;
        border-radius: var(--radius-md);
    }

    .auth-form input {
        min-height: 48px;
    }

    button.primary {
        min-height: 48px;
        font-size: 1.05rem;
    }
}

/* ===== MODALES: tamaño y padding correcto en móvil ===== */
@media (max-width: 768px) {
    .modal-content {
        width: calc(100% - 1.5rem) !important;
        max-width: calc(100% - 1.5rem) !important;
        margin: 3vh auto !important;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: var(--radius-md) !important;
    }

    .modal-large,
    .modal-wide {
        max-width: calc(100% - 1.5rem) !important;
        width: calc(100% - 1.5rem) !important;
    }

    .modal-header {
        padding: 1rem 1.25rem;
        position: sticky;
        top: 0;
        background: inherit;
        z-index: 1;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .modal-body {
        padding: 0.75rem 1rem;
    }

    .modal-footer {
        flex-direction: column-reverse;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .modal-footer button {
        width: 100%;
        min-height: 48px;
    }
}

/* ===== SALAS: cards, búsqueda y pestañas ===== */
@media (max-width: 600px) {
    /* Barra de búsqueda: apilar en 2 filas */
    .room-search {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .room-search input {
        flex: 1 1 100%;    /* Input ocupa toda la fila */
        min-width: 0;
    }

    .room-search button {
        flex: 1 1 calc(50% - 0.25rem);  /* Botones lado a lado */
        min-height: 44px;
        white-space: nowrap;
    }

    /* Pestañas + botón Crear Sala: separar en dos filas */
    .rooms-tabs {
        flex-wrap: wrap;
        gap: 0.4rem 0.5rem;
    }

    .btn-create-room {
        margin-left: 0;
        width: 100%;
        order: 99;         /* Va abajo de las pestañas */
        min-height: 44px;
    }

    /* También en rooms-top-bar: apilar verticalmente */
    .rooms-top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .rooms-top-bar .rooms-header {
        flex-shrink: 1;
    }

    .rooms-top-bar .room-search {
        justify-content: stretch;
    }
}

@media (max-width: 480px) {
    .rooms-section {
        padding: 1rem 0.75rem 80px;
    }

    .room-tab {
        white-space: nowrap;
        padding: 0.6rem 1rem;
    }

    .room-card {
        padding: 1rem;
    }

    /* Botones de acción de sala: columna en móvil */
    .room-card-actions,
    .room-card-secondary-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .room-card-actions button,
    .room-card-secondary-actions button {
        flex: none !important;
        width: 100% !important;
        min-height: 44px;
    }

    .room-status-actions {
        flex-direction: column;
    }

    .room-status-actions button {
        flex: none;
        width: 100%;
        min-height: 44px;
    }
}

/* ===== DASHBOARD: secciones y hero ===== */
@media (max-width: 480px) {
    .dashboard-section {
        padding: 1rem 0.75rem 80px;
    }

    .dashboard-content {
        padding: 1.25rem 1rem;
        border-radius: var(--radius-md);
    }

    .user-card {
        padding: 1.25rem 1rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .dashboard-hero {
        padding: 1.25rem 1rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-actions {
        flex-direction: column;
    }

    .dashboard-actions button {
        width: 100%;
        min-height: 48px;
    }

    .top-rooms-list {
        flex-direction: column;
    }

    .top-room-card {
        max-width: 100%;
        width: 100%;
    }
}

/* ===== CUENTA ===== */
@media (max-width: 480px) {
    .account-section {
        padding: 1rem 0.75rem 80px;
    }

    .account-content {
        padding: 1.25rem 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
        min-height: 48px;
    }
}

/* ===== CARTONES JUGADOS: fix ancho fijo ===== */
@media (max-width: 768px) {
    .played-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .played-cards-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
    }
}

/* ===== CARTONES: modal edge-to-edge en móvil para que quepan los cartones ===== */
@media (max-width: 768px) {
    .bingo-cards-grid.two-per-row {
        grid-template-columns: 1fr !important;
    }

    /* Modal de cartones: aprovechar todo el ancho disponible */
    .cards-modal-content,
    #user-cards-modal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 2vh 0 0 0 !important;
        border-radius: 16px 16px 0 0 !important;
        max-height: 92vh;
    }

    .cards-modal-content .modal-body,
    #user-cards-modal .modal-body {
        max-height: 76vh;
        padding: 0.5rem 0.5rem !important;
    }

    /* Cartones individuales: ancho completo del modal */
    .played-card,
    .bingo-cards-grid > *,
    .played-cards-grid > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    /* Contenedor de cartones de figura: sin padding extra */
    .bingo-cards-vertical {
        padding: 0 !important;
        width: 100% !important;
    }
}

/* ===== SECCIÓN DE SORTEO ===== */
@media (max-width: 768px) {
    .draw-ball-area {
        gap: 1rem;
    }

    .drawn-balls-list {
        grid-template-columns: repeat(3, 1fr);
        max-height: 260px;
    }

    .draw-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .draw-actions button {
        width: 100%;
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    .drawn-balls-list {
        grid-template-columns: repeat(4, 1fr);  /* más compacto */
        gap: 0.4rem;
    }

    .draw-stats-inline {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ===== TABLAS: scroll horizontal ===== */
@media (max-width: 768px) {
    .participants-table,
    .rounds-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
}

/* ===== NOTIFICACIONES ===== */
@media (max-width: 768px) {
    .notifications-modal-content {
        max-width: 100%;
        max-height: 85vh;
    }
}

/* ===== CELDA DE BINGO: tamaño táctil ===== */
@media (max-width: 480px) {
    .bingo-cell {
        min-width: 38px;
        min-height: 38px;
        font-size: 0.9em;
    }

    .bingo-number-cell {
        font-size: 1rem;
    }
}

/* ===== ALERT GLOBAL: mejor posición ===== */
@media (max-width: 480px) {
    .global-alert {
        top: auto;
        bottom: 60px;
        left: 0.75rem;
        right: 0.75rem;
        transform: none;
        max-width: none;
        width: auto;
        border-radius: var(--radius-md);
    }
}

/* ===== ROOM DETAIL: mejor padding ===== */
@media (max-width: 768px) {
    .room-detail-section {
        margin: 0.5rem auto 0 auto;
    }
}

@media (max-width: 480px) {
    .room-detail-section {
        padding: 0 0.5rem;
    }
}

/* ===== BOTONES DE ACCIÓN DEL SORTEO: uniformes en móvil ===== */

/* Neutralizar margin-left de btn-info dentro del draw-actions */
.draw-actions .btn-info {
    margin-left: 0;
}

@media (max-width: 768px) {
    /* Todos los botones de acción del sorteo: misma altura, ancho, padding */
    .draw-actions button {
        width: 100% !important;
        margin: 0 !important;
        justify-content: center !important;
        min-height: 48px !important;
        padding: 0.75rem 1rem !important;
        border-radius: 8px !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .draw-actions {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
}

/* ===== BOTÓN DARK MODE: mejor en cabecera ===== */
@media (max-width: 480px) {
    .dark-mode-btn {
        width: 34px;
        height: 34px;
    }
}

/* ===== LAYOUT DE SALA EN MÓVIL: panel miembros arriba, cartones abajo full-width ===== */
@media (max-width: 768px) {
    /* Cambiar de fila a columna: panel de miembros arriba, cartones abajo */
    .room-detail-body {
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
    }

    /* Panel de miembros: barra horizontal compacta arriba */
    .room-users-panel {
        width: 100% !important;
        max-width: 100% !important;
        border-right: none !important;
        border-bottom: 2px solid #e0e0e0 !important;
        max-height: 44px !important;         /* Colapsado: solo el header */
        overflow: hidden !important;
        transition: max-height 0.3s ease !important;
        flex-shrink: 0 !important;
    }

    /* Expandido: mostrar la lista con altura razonable */
    .room-users-panel:not(.collapsed) {
        max-height: 200px !important;
        overflow-y: auto !important;
    }

    /* En colapsado (horizontal), mostrar el header-left que normalmente se oculta */
    .room-users-panel.collapsed .header-left {
        display: flex !important;
    }

    /* Panel-header: fila con toggle btn y título */
    .panel-header {
        min-height: 44px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 0 0.75rem !important;
        gap: 0.5rem !important;
    }

    /* Botón toggle: apunta hacia arriba/abajo en vez de izq/der */
    .btn-toggle-sidebar {
        flex-shrink: 0 !important;
    }

    .room-users-panel.collapsed .btn-toggle-sidebar {
        transform: rotate(90deg) !important;  /* Apunta hacia abajo = expandir */
        margin: 0 !important;
    }

    .room-users-panel:not(.collapsed) .btn-toggle-sidebar {
        transform: rotate(-90deg) !important; /* Apunta hacia arriba = colapsar */
    }

    /* Cards panel: ancho total, sin restricción de altura */
    .room-cards-panel {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
    }
}

/* ===== VISTA DE SALA EN JUEGO — correcciones móvil ===== */

/* --- Header de la sala: acciones wrap en 2 filas --- */
@media (max-width: 768px) {
    .room-detail-header {
        padding: 1rem !important;
    }

    .room-detail-title h2,
    .room-detail-title {
        font-size: 1.3rem !important;
        word-break: break-word;
    }

    .room-detail-actions {
        flex-wrap: wrap !important;
        gap: 0.4rem !important;
        width: 100% !important;
    }

    .room-detail-actions button {
        flex: 1 1 calc(50% - 0.2rem) !important;
        min-width: 0 !important;
        padding: 0.5rem 0.4rem !important;
        font-size: 0.82rem !important;
        min-height: 44px !important;
        white-space: normal !important;
        text-align: center !important;
    }
}

/* --- Panel de cartones: sin max-height fijo en móvil, scroll de la página --- */
@media (max-width: 768px) {
    .room-cards-panel {
        overflow: visible !important;     /* La página hace el scroll, no el panel */
        max-height: none !important;      /* Sin límite de altura */
        height: auto !important;
        padding: 0.5rem !important;
        box-sizing: border-box !important;
    }

    .cards-list {
        padding: 0.25rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
        grid-template-columns: 1fr !important;
    }

    /* Cartón en vista de juego: ancho completo, padding mínimo */
    .cards-list .bingo-card,
    .bingo-card.entered-in-draw {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding: 0.25rem !important;
    }

    /* Grid numérico 5x5: ajustar al ancho disponible */
    .bingo-card .card-grid-matrix {
        width: 100% !important;
    }

    .bingo-number-cell {
        font-size: 0.95rem !important;
    }
}

/* ===== SECCIÓN DE SORTEO ACTIVO: rediseño móvil ===== */
@media (max-width: 768px) {
    .current-draw-info {
        padding: 1rem !important;
        gap: 0.5rem !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .draw-info-content {
        min-width: 0 !important;
        width: 100% !important;
    }

    /* Fila 1: Título a la izquierda, badge estado a la derecha */
    .draw-info-main {
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        flex-wrap: nowrap !important;
    }

    .draw-info-main h3 {
        font-size: 1rem !important;
        flex: 1 !important;
        line-height: 1.3 !important;
    }

    .draw-status-badge {
        flex-shrink: 0 !important;
        font-size: 0.72rem !important;
    }

    /* Fila 2: Código y Ronda en la misma fila, alineados */
    .draw-info-details {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 0.4rem 0.75rem !important;
    }

    .draw-serie {
        font-size: 0.82rem !important;
        letter-spacing: 0.5px !important;
    }

    /* Modalidades: cada una en su propia fila, nombre izq → precio der */
    #active-round-prizes-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 4px !important;
        margin-left: 0 !important;
        margin-top: 0.5rem !important;
    }

    .active-prize-item {
        display: flex !important;
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Nombre de la modalidad: crece para ocupar espacio disponible */
    .active-prize-item .draw-modality,
    .active-prize-item > span:first-child {
        flex: 1 !important;
        border-radius: 4px 0 0 4px !important;
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        text-align: left !important;
        padding: 0.3rem 0.6rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Precio: ancho fijo a la derecha */
    .active-prize-item .draw-prize,
    .active-prize-item > span:last-child {
        flex-shrink: 0 !important;
        border-radius: 0 4px 4px 0 !important;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
        padding: 0.3rem 0.6rem !important;
        min-width: 62px !important;
        text-align: center !important;
        font-size: 0.8rem !important;
    }

    /* Stats (Usuarios, Cartones, etc.) en grid 2 columnas, label arriba valor abajo */
    .draw-stats-inline {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem 0.75rem !important;
        margin-top: 0.75rem !important;
    }

    .stat-inline {
        flex-direction: column !important;
        gap: 0.05rem !important;
        align-items: flex-start !important;
        font-size: 0.75rem !important;
    }

    .stat-inline span {
        opacity: 0.85 !important;
        font-size: 0.72rem !important;
    }

    .stat-inline strong {
        font-size: 0.9rem !important;
        color: white !important;
    }

    /* Admin badge: ancho completo */
    #current-draw-admin {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        margin-bottom: 0.25rem !important;
        font-size: 0.82rem !important;
    }
}

/* --- Botones Inscribir / Retirar: iguales y apilados --- */
@media (max-width: 768px) {
    .draw-entry-controls {
        flex-direction: column !important;
        gap: 0.5rem !important;
        padding: 0.75rem !important;
    }

    .draw-entry-controls button {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        min-height: 48px !important;
        font-size: 1rem !important;
        padding: 0.75rem 1rem !important;
    }
}

/* ===== Unificar alto de botones del header en escritorio ===== */
@media (min-width: 769px) {
    .header-balance,
    .header-user-name,
    #header-user-name,
    .help-btn,
    .lang-btn,
    #logout-btn-global,
    .btn-logout {
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        box-sizing: border-box !important;
        display: flex;
        align-items: center !important;
    }
    
    .notifications-btn,
    .dark-mode-btn {
        width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        box-sizing: border-box !important;
        display: flex;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }
}

/* ================================================================
   MOBILE FIXES — pantalla principal (≤ 480px)
   ================================================================ */
@media (max-width: 480px) {

    /* 1. Header sticky: se mantiene al hacer scroll */
    header {
        position: sticky !important;
        top: 0 !important;
    }

    /* 2. Nav row: padding derecho para que el balance absoluto
          no tape los enlaces de navegación */
    nav {
        padding-right: 135px !important;
    }

    /* 3. Hero: alinear margen lateral con el padding del .dashboard-section
          (0.75 rem) para evitar desbordamiento horizontal */
    .dashboard-hero {
        margin-left: -0.75rem !important;
        margin-right: -0.75rem !important;
        border-radius: 0 0 16px 16px !important;
    }

    /* 4. Preview card: eliminar min-width fijo que causa overflow */
    .preview-card {
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 5. Bingo card preview: sin rotación y sin overflow en mobile */
    .bingo-card-preview {
        transform: none !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 6. Hero visual: centrar y limitar ancho */
    .hero-visual {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* 7. Botones hero: altura mínima accesible en touch */
    .btn-hero-primary,
    .btn-hero-secondary {
        min-height: 52px !important;
        font-size: 1rem !important;
    }
}

/* ================================================================
   SYSTEM CONFIG MODAL — Administración del sistema
   ================================================================ */
.sys-config-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.sys-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#system-config-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

#system-config-form .form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    display: block;
    margin-bottom: 0.4rem;
}

#system-config-form input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-family);
    box-sizing: border-box;
    transition: border-color 0.2s;
}

#system-config-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

@media (max-width: 600px) {
    #system-config-form .form-row {
        grid-template-columns: 1fr;
    }
    .sys-config-section {
        padding: 1rem;
    }
}

/* ================================================================
   WINNER CARD MODAL — Cartón ganador responsive
   ================================================================ */
.winner-card-modal-content {
    width: min(95vw, 860px);
    max-width: 95vw;
    max-height: 92vh;
    margin: 2% auto;
    overflow: hidden;
}

.winner-card-modal-content .modal-body {
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 1.5rem;
}

/* Centrar el cartón de figura dentro del modal ganador */
.figure-card-modal {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
}

/* El grid de figuras dentro del modal ganador no debe desbordar */
.figure-card-modal .bingo-card-figures-grid {
    max-width: 100%;
    overflow: hidden;
}

.figure-card-modal .bingo-cards-vertical,
.figure-card-modal .figure-side {
    max-width: 100%;
}

/* En mobile: cartón ocupa todo el ancho disponible */
@media (max-width: 600px) {
    .winner-card-modal-content {
        margin: 0 auto;
        border-radius: 12px 12px 0 0;
    }

    .figure-card-modal {
        max-width: 100%;
    }

    .winner-card-modal-content .modal-body {
        padding: 0.75rem 0.75rem;
    }
}

/* ================================================================
   PREMIOS DEL SORTEO — responsive mobile
   ================================================================ */
#draw-prizes-modal .modal-content {
    width: min(95vw, 580px);
    max-width: 95vw;
    margin: 3% auto;
}

/* ── Prizes cards: layout mobile (reemplaza la tabla en pantallas pequeñas) ── */
.prizes-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.prize-card-mobile {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.prize-card-mobile.adjudicado {
    opacity: 0.65;
    background: #f8f9fa;
}

.prize-card-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.prize-card-round {
    background: #6c5ce7;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 10px;
    flex-shrink: 0;
}

.prize-card-modality {
    flex: 1;
    font-size: 0.9rem;
    color: #2d3436;
    min-width: 0;
}

.prize-card-amount {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.btn-ver-ganadores-mobile {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 7px 12px;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
}

.btn-ver-ganadores-mobile:active {
    opacity: 0.85;
}

/* En mobile: rediseño completo de la tabla de premios para evitar scroll horizontal */
@media (max-width: 540px) {
    #draw-prizes-modal .rounds-table-container {
        overflow-x: hidden;
        border: none;
    }

    /* Forzar tabla al ancho real del contenedor */
    #draw-prizes-modal .rounds-table {
        table-layout: fixed !important;
        width: 100% !important;
    }

    /* Compactar celdas */
    #draw-prizes-modal .rounds-table th,
    #draw-prizes-modal .rounds-table td {
        padding: 0.5rem 0.35rem;
        font-size: 0.82rem;
        word-break: break-word;
        overflow: hidden;
    }

    /* Columnas: 15% ronda | 40% modalidad | 45% premio+botón */
    #draw-prizes-modal .rounds-table th:first-child,
    #draw-prizes-modal .rounds-table td:first-child {
        width: 15% !important;
        text-align: center;
    }

    #draw-prizes-modal .rounds-table th:nth-child(2),
    #draw-prizes-modal .rounds-table td:nth-child(2) {
        width: 38% !important;
    }

    #draw-prizes-modal .rounds-table th:last-child,
    #draw-prizes-modal .rounds-table td:last-child {
        width: 47% !important;
        text-align: left !important;
    }

    /* El div contenedor del premio: columna (monto arriba, botón abajo) */
    #draw-prizes-list td:last-child > div {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 4px !important;
    }

    /* Botón "Ver Ganadores": ancho completo de su celda */
    #draw-prizes-list .btn-info.btn-small {
        width: 100% !important;
        text-align: center !important;
        padding: 5px 4px !important;
        font-size: 0.75rem !important;
        white-space: normal !important;
        line-height: 1.2;
    }
}

/* ===== KYC / Verificación de identidad ===== */
.kyc-panel { padding: 0.5rem 0; max-width: 640px; }
.kyc-status-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; font-weight: 600; }
.kyc-badge { display: inline-block; padding: 0.3rem 0.85rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.kyc-badge--none { background: #e8edf2; color: #374151; }
.kyc-badge--pending { background: #fff3cd; color: #8a6d00; }
.kyc-badge--verified { background: #d1fae5; color: #047857; }
.kyc-badge--rejected { background: #fee2e2; color: #b91c1c; }
.kyc-intro { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 1.25rem; line-height: 1.5; }
.kyc-rejection {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.kyc-uploads {
    display: grid;
    grid-template-columns: 1fr;   /* apiladas por defecto (móvil y escritorio angosto) */
    gap: 1.25rem;
    margin: 0.5rem 0 1.25rem;
}
/* Dos columnas solo en pantallas anchas */
@media (min-width: 900px) {
    .kyc-uploads { grid-template-columns: 1fr 1fr; }
}
.kyc-upload {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: var(--bg-card-alt, #fff5f7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 14px);
    padding: 0.9rem;
}
.kyc-upload label { font-weight: 700; font-size: 0.88rem; color: var(--text-color); }

/* Caja de previsualización: tamaño acotado, imagen recortada (cover) */
.kyc-preview {
    width: 100%;
    max-width: 340px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 29, 36, 0.08);
}

/* Input de archivo estilizado con el botón de marca */
.kyc-upload input[type="file"] {
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
}
.kyc-upload input[type="file"]::file-selector-button {
    margin-right: 0.6rem;
    padding: 0.45rem 0.9rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: filter 0.2s;
}
.kyc-upload input[type="file"]::file-selector-button:hover { filter: brightness(1.05); }

/* Aceptación de Términos y Condiciones en el registro */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: left;
    margin: 0.35rem 0;
    color: #2c3e50;
}
.terms-check input[type="checkbox"] {
    margin-top: 0.15rem;
    width: auto;
    flex-shrink: 0;
    accent-color: #fe7c79;
}
.terms-check a { color: #e85f5c; font-weight: 600; text-decoration: underline; }

/* Footer en una sola línea (copyright + enlaces legales), con wrap en pantallas pequeñas */
.footer-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.25rem 0.6rem; margin: 0; font-size: 0.85rem; }
.footer-sep { opacity: 0.6; }
.footer-legal { margin: 0; font-size: 0.85rem; }
.footer-legal a { color: inherit; text-decoration: underline; }
.footer-legal a:hover { opacity: 0.85; }
@media (max-width: 480px) { .footer-sep { display: none; } }

/* Submenú del nav "Cuenta" */
.nav-dropdown { position: relative; }
.nav-caret { font-size: 0.7em; }
.nav-submenu {
    display: none !important; flex-direction: column; position: absolute; top: 100%; left: 0;
    background: #fff; list-style: none; margin: 0.2rem 0 0; padding: 0.3rem 0; gap: 0;
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); min-width: 190px; z-index: 1000;
}
.nav-dropdown:hover > .nav-submenu, .nav-dropdown.open > .nav-submenu { display: block !important; }
.nav-submenu li { display: block; margin: 0; width: 100%; }
.nav-submenu a { display: block; padding: 0.55rem 1rem; color: #2c3e50; white-space: nowrap; text-decoration: none; font-size: 0.95rem; }
.nav-submenu a:hover { background: #fff5f4; color: #e85f5c; }

/* Historial de saldo (modal) */
.bh-summary { margin-bottom: 0.5rem; }
.bh-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.6rem 0.4rem; border-bottom: 1px solid #f0eaea; flex-wrap: wrap; }
.bh-row-main { display: flex; flex-direction: column; }
.bh-type { font-weight: 600; color: #2c3e50; font-size: 0.92rem; }
.bh-game { display: inline-block; font-size: 0.68rem; font-weight: 700; padding: 0.08rem 0.5rem; border-radius: 999px; margin-right: 0.45rem; vertical-align: middle; color: #fff; }
.bh-game-bingo { background: #fe7c79; }
.bh-game-caida { background: #0f5132; }
.bh-date { font-size: 0.78rem; color: #888; }
.bh-row-amounts { display: flex; flex-direction: column; align-items: flex-end; }
.bh-amount { font-weight: 700; }
.bh-balance { font-size: 0.78rem; color: #888; }
.bh-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.9rem; }
.bh-pager button:disabled { opacity: 0.5; cursor: default; }
.bh-row-actions { flex-basis: 100%; display: flex; justify-content: flex-end; margin-top: 0.15rem; }
.bh-detail-btn { background: transparent; border: 1px solid #c0392b; color: #c0392b; font-size: 0.76rem; font-weight: 600; padding: 0.18rem 0.7rem; border-radius: 999px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.bh-detail-btn:hover { background: #c0392b; color: #fff; }

/* Detalle de premio */
.pd-body { display: flex; flex-direction: column; }
.pd-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.55rem 0.2rem; border-bottom: 1px solid #f0eaea; }
.pd-row:last-child { border-bottom: none; }
.pd-label { font-size: 0.82rem; color: #888; flex-shrink: 0; }
.pd-val { font-weight: 600; color: #2c3e50; text-align: right; }
.pd-row-nums { flex-direction: column; align-items: stretch; }
.pd-nums { margin-top: 0.35rem; font-size: 0.82rem; color: #2c3e50; line-height: 1.5; word-break: break-word; background: #faf6f6; border-radius: 8px; padding: 0.5rem 0.6rem; }
.pd-row-figs { flex-direction: column; align-items: stretch; }
.pd-figures { margin-top: 0.45rem; display: flex; flex-wrap: wrap; gap: 0.4rem; background: #faf6f6; border-radius: 8px; padding: 0.55rem; }
.pd-figure { width: 44px; height: 44px; object-fit: contain; background: #fff; border: 1px solid #eceaea; border-radius: 6px; padding: 2px; }

/* Tiempo Fuera (juego responsable) */
.timeout-intro { color: #4b5563; font-size: 0.92rem; line-height: 1.55; margin: 0 0 1rem; }
.timeout-active-box { background: #fff8e6; border: 1px solid #f5d98b; border-radius: 10px; padding: 0.9rem 1rem; }
.timeout-badge { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 700; color: #92400e; font-size: 0.9rem; }
.timeout-active-box p { color: #7a5d00; font-size: 0.9rem; line-height: 1.5; }
.timeout-label { display: block; font-weight: 600; color: #2c3e50; margin: 0.4rem 0 0.4rem; font-size: 0.92rem; }
.timeout-select { width: 100%; padding: 0.6rem 0.7rem; border: 1px solid #d8dde2; border-radius: 8px; font-size: 0.95rem; background: #fff; }
.timeout-warning { color: #b45309; font-size: 0.82rem; line-height: 1.45; margin: 0.8rem 0; }
.timeout-msg { margin: 0 0 0.7rem; font-size: 0.88rem; }
#timeout-activate-btn { width: 100%; }
#selfexcl-activate-btn { width: 100%; }
/* Aviso legal / juego responsable */
.legal-note { margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid #eee; }
.legal-note p { font-size: 0.78rem; color: #6b7280; line-height: 1.5; margin: 0 0 0.5rem; }
.legal-note p:last-child { margin-bottom: 0; }
/* Recarga manual (transferencia / pago móvil) */
.rc-blocked-warning { background: #fff4e5; border: 1px solid #f5c98b; color: #92400e; border-radius: 10px; padding: 0.9rem 1rem; font-size: 0.9rem; line-height: 1.55; margin: 0.4rem 0 0.2rem; }
.rc-intro { font-size: 0.88rem; color: #4b5563; line-height: 1.5; margin: 0 0 1rem; }
.rc-method-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.rc-method-tab { flex: 1; padding: 0.6rem; border: 2px solid #e5e7eb; background: #fff; border-radius: 10px; cursor: pointer; font-weight: 600; color: #4b5563; font-size: 0.9rem; }
.rc-method-tab.active { border-color: #fe7c79; color: #c0392b; background: #fff5f5; }
.rc-destination { background: #faf6f6; border: 1px solid #f0e3e3; border-radius: 10px; padding: 0.9rem 1rem; margin-bottom: 1rem; }
.rc-dest-title { font-weight: 700; color: #2c3e50; margin-bottom: 0.5rem; font-size: 0.92rem; }
.rc-d-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; align-items: center; }
.rc-d-label { color: #888; font-size: 0.85rem; }
.rc-d-val { font-weight: 600; color: #2c3e50; text-align: right; word-break: break-word; }
.rc-section-title { font-size: 0.95rem; font-weight: 700; color: #2c3e50; margin: 0.6rem 0 0.6rem; }
.rc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.rc-grid .form-group { margin: 0; }
.rc-myreqs { margin-top: 1.2rem; border-top: 1px solid #eee; padding-top: 0.8rem; }
.rc-req-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid #f0eaea; font-size: 0.86rem; }
.rc-req-ref { color: #888; font-size: 0.8rem; }
.rc-req-date { color: #9aa3ad; font-size: 0.76rem; }
.rc-req-note { color: #c0392b; font-size: 0.78rem; margin-top: 0.2rem; }
.rc-status { padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.rc-st-pending { background: #fef3c7; color: #92400e; }
.rc-st-approved { background: #d1fae5; color: #065f46; }
.rc-st-rejected { background: #fee2e2; color: #991b1b; }
/* Chip de banco (logo + nombre) */
.bank-chip { display: inline-flex; align-items: center; gap: 0.4rem; }
.bank-logo { object-fit: contain; border-radius: 4px; }
.bank-chip-name { font-weight: 600; }
.bank-badge-fallback { display: inline-flex; align-items: center; justify-content: center; background: #2c3e50; color: #fff; border-radius: 4px; font-size: 0.62rem; font-weight: 700; }

/* Límites de depósito */
.limits-table { width: 100%; border-collapse: collapse; margin: 0.6rem 0 0.4rem; }
.limits-table th, .limits-table td { padding: 0.5rem 0.5rem; text-align: left; border-bottom: 1px solid #f0eaea; font-size: 0.88rem; }
.limits-table th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.4px; color: #888; }
.limit-input { width: 100%; max-width: 130px; padding: 0.4rem 0.5rem; border: 1px solid #d8dde2; border-radius: 7px; font-size: 0.9rem; }
.limit-cell-muted { color: #6b7280; white-space: nowrap; }
.limit-hint { font-size: 0.78rem; color: #6b7280; margin: 0.2rem 0 0.8rem; }
#limits-save-btn { width: 100%; }

/* Login con Google: separador y contenedor del botón */
.auth-divider { display: flex; align-items: center; text-align: center; color: #9aa3ad; font-size: 0.8rem; margin: 0.9rem 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-bottom: 1px solid #e5e7eb; }
.auth-divider span { padding: 0 0.7rem; }
.google-btn-container { display: flex; justify-content: center; margin: 0.25rem 0 0.5rem; min-height: 40px; }
.google-terms-hint { font-size: 0.78rem; color: #6b7280; text-align: center; margin: 0 0 0.4rem; }

/* ============================================================
   Celdas GANADORAS en el cartón de la sala (renderNumericCard).
   La clase aplicada es ".winning"; antes no existía regla para
   ".bingo-cell.winning", así que la celda ganadora quedaba con el
   rojo de ".marked" y no se distinguía. Se pinta de AMARILLO y con
   !important para ganarle a las variantes de ".marked".
   ============================================================ */
.bingo-cell.winning,
.cards-list .bingo-cell.winning {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    color: #856404 !important;
    border-color: #ffc107 !important;
    font-weight: bold;
    animation: winningPulse 1.5s ease-in-out infinite;
}

