:root {
    --anac-green: #05a901;
    --anac-bg: #f2f2f2;
    --anac-dark: #1e293b;
    --anac-border: #cccccc;
    --anac-white: #ffffff;
    --anac-red: #d9534f;
    --anac-text-muted: #666666;
    --anac-header-bg: #ffffff;
    --anac-header-border: #e2e8f0;
}

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--anac-bg);
    color: var(--anac-dark);
    margin: 0;
    padding: 0;
    line-height: 1.4;
    width: 100%;
}

/* Navbar estilo Anacondaweb corporativo (Limpio y claro) */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--anac-header-bg);
    color: var(--anac-dark);
    padding: 10px 20px;
    border-bottom: 3px solid var(--anac-green);
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.navbar-container {
    max-width: 1050px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar .brand {
    font-size: 20px;
    font-weight: bold;
    color: #0f172a;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar .brand-logo {
    height: 46px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

.navbar .brand-text {
    font-weight: 800;
    letter-spacing: -0.3px;
}

.navbar .brand-text span {
    color: var(--anac-green);
}

.navbar .nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.navbar .nav-links a {
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar .nav-links a:hover {
    color: var(--anac-green);
    background-color: #f1f5f9;
}

.navbar .nav-links a.active {
    color: var(--anac-white);
    background-color: var(--anac-green);
}

/* Contenedor principal */
.container {
    width: 100%;
    max-width: 1050px;
    margin: 20px auto 0 auto;
    padding: 15px;
}

/* Marcadores / Score Board */
.score-board {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.score-card {
    flex: 1;
    background: var(--anac-white);
    border: 1px solid var(--anac-border);
    border-top: 4px solid var(--anac-green);
    padding: 18px 15px;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.score-card.leader {
    border-top-color: var(--anac-green);
    background-color: #eafbe9;
    transform: translateY(-2px);
}

.score-card h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: var(--anac-dark);
}

.score-card .members-list {
    font-size: 12px;
    color: var(--anac-text-muted);
    margin: 0 0 10px 0;
    font-style: italic;
}

.score-num {
    font-size: 38px;
    font-weight: bold;
    color: var(--anac-green);
}

/* Tarjeta / Contenedores de Sección */
.card {
    background: var(--anac-white);
    border: 1px solid var(--anac-border);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

h2 {
    color: var(--anac-green);
    font-size: 16px;
    border-bottom: 2px solid var(--anac-green);
    padding-bottom: 8px;
    margin-top: 0;
    margin-bottom: 15px;
}

/* Tablas Responsivas */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    border: 1px solid var(--anac-border);
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
}

th {
    background-color: var(--anac-green);
    color: var(--anac-white);
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: var(--anac-bg);
}

.table-game-title {
    text-align: left;
    font-weight: bold;
}

.game-detail-badge {
    display: inline-block;
    background-color: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: normal;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 6px;
}

.game-points-info {
    display: block;
    font-size: 11px;
    color: #64748b;
    font-weight: normal;
    margin-top: 2px;
}

/* Badges de puntaje en la tabla de participantes */
.score-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    color: #475569;
    background-color: #f1f5f9;
    white-space: nowrap;
}

.score-badge.winner {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    font-weight: 700;
}

.score-badge.tie {
    background-color: #fef9c3;
    color: #a16207;
    border: 1px solid #fef08a;
}

.table-empty-msg {
    color: var(--anac-text-muted);
    font-style: italic;
    padding: 12px;
}

/* Bingo items */
.bingo-item {
    background: #eafbe9;
    border-left: 4px solid var(--anac-green);
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 13px;
}

.bingo-empty-msg {
    font-size: 13px;
    color: var(--anac-text-muted);
    font-style: italic;
    text-align: center;
    margin: 5px 0;
}

/* Form Controles & Botones */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--anac-border);
    border-radius: 4px;
    font-size: 13px;
}

.form-control:focus {
    outline: none;
    border-color: var(--anac-green);
    box-shadow: 0 0 4px rgba(5, 169, 1, 0.4);
}

.btn {
    background-color: var(--anac-green);
    color: var(--anac-white);
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    transition: opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    opacity: 0.9;
}

.btn-danger {
    background-color: var(--anac-red);
}

.btn-sm {
    padding: 6px 10px;
    font-size: 11px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
}

/* Layout Utilities */
.flex-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-group {
    margin-bottom: 12px;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* Alert Notification Banner */
.alert-box {
    padding: 10px 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 15px;
    display: none;
    font-size: 13px;
}

/* ================= FALSO INDEX / MODO TEASER ("SE VIENE LA FONDA") ================= */
#falso-index-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: linear-gradient(135deg, #05a901 0%, #036b00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#falso-index-container.teaser-hidden {
    display: none !important;
}

#falso-index-container.teaser-active {
    display: flex !important;
}

#main-participant-content.teaser-hidden {
    display: none !important;
}

.th-game-title {
    text-align: left;
}

.falso-index-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    padding: 20px;
    max-width: 600px;
    width: 100%;
}

.falso-index-logo {
    width: 140px;
    max-width: 80%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    animation: floatingIcon 3s ease-in-out infinite;
}

@keyframes floatingIcon {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(2deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.falso-index-title {
    font-size: 34px;
    font-weight: 800;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: -0.5px;
}

.falso-index-subtitle {
    font-size: 16px;
    color: #e2e8f0;
    margin: 0;
    font-weight: 400;
}

/* Badges de estado admin */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-badge.active {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.status-badge.inactive {
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--anac-text-muted);
    border-top: 1px solid var(--anac-border);
    margin-top: 30px;
    background: var(--anac-white);
}

/* ================= MEDIA QUERIES PARA DISPOSITIVOS MÓVILES ================= */

@media (max-width: 640px) {
    .navbar {
        padding: 8px 12px;
    }

    .navbar .brand {
        font-size: 16px;
        gap: 8px;
    }

    .navbar .brand-logo {
        height: 36px;
    }

    .navbar .nav-links a {
        padding: 6px 10px;
        font-size: 12px;
    }

    .nav-page-link {
        display: none !important;
    }

    .container {
        padding: 8px;
        margin-top: 10px;
    }

    .card {
        padding: 12px 10px;
        margin-bottom: 12px;
        border-radius: 6px;
    }

    h2 {
        font-size: 14px;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }

    /* Marcadores en paralelo en celular */
    .score-board {
        gap: 8px;
        margin-bottom: 12px;
    }

    .score-card {
        padding: 10px 6px;
    }

    .score-card h3 {
        font-size: 14px;
        margin-bottom: 2px;
    }

    .score-card .members-list {
        font-size: 10px;
        margin-bottom: 6px;
        line-height: 1.2;
    }

    .score-num {
        font-size: 28px;
    }

    /* Falso index en celular */
    .falso-index-screen {
        padding: 30px 15px;
        min-height: 350px;
    }

    .falso-index-logo {
        width: 110px;
        margin-bottom: 20px;
    }

    .falso-index-title {
        font-size: 26px;
    }

    .falso-index-subtitle {
        font-size: 14px;
    }

    /* Ajuste específico para la tabla de participantes en móvil */
    .participant-table th, 
    .participant-table td {
        padding: 8px 4px;
        font-size: 11px;
    }

    .participant-table th:first-child,
    .participant-table td:first-child {
        width: 46%;
    }

    .participant-table th:nth-child(2),
    .participant-table td:nth-child(2),
    .participant-table th:nth-child(3),
    .participant-table td:nth-child(3) {
        width: 27%;
    }

    .score-badge {
        font-size: 10px;
        padding: 3px 4px;
    }

    .game-detail-badge {
        display: block;
        margin: 2px 0 0 0;
        width: fit-content;
        font-size: 9px;
        padding: 1px 4px;
    }

    .game-points-info {
        font-size: 9px;
    }

    /* Transformación completa de la tabla admin en tarjetas en móviles */
    .admin-table upper,
    .admin-table thead {
        display: none;
    }

    .admin-table, 
    .admin-table tbody, 
    .admin-table tr, 
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table tr {
        background-color: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .admin-table td {
        border: none;
        padding: 4px 0;
        text-align: left;
    }

    .admin-table td.table-game-title {
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 8px;
        margin-bottom: 8px;
    }

    .admin-table td.admin-opt-cell {
        margin-bottom: 4px;
    }

    .admin-table td.admin-reset-cell {
        margin-top: 8px;
        border-top: 1px dashed #e2e8f0;
        padding-top: 8px;
    }

    .admin-table td.admin-reset-cell .btn {
        width: 100%;
    }

    /* Formularios y Botones adaptados a touch */
    .flex-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .flex-between {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .btn {
        width: 100%;
        min-height: 40px;
        font-size: 13px;
    }

    .btn-sm, .btn-xs {
        min-height: 34px;
    }

    .radio-label {
        width: 100%;
        justify-content: center;
        background-color: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 4px;
        padding: 8px 4px;
        font-size: 12px;
    }
}

/* ================= LOGIN FORM & UTILITIES ================= */
.login-card {
    max-width: 440px;
    margin: 40px auto;
    padding: 35px 30px;
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo {
    width: 90px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
}

.login-title {
    font-size: 22px;
    margin: 0 0 8px 0;
    color: var(--anac-primary);
}

.login-subtitle {
    font-size: 13px;
    color: var(--anac-text-muted);
    margin: 0;
}

.nav-logout-btn {
    background-color: #ef4444;
    color: #ffffff !important;
    border-radius: 4px;
    padding: 5px 12px;
    margin-left: 8px;
    font-size: 12px;
    transition: background-color 0.2s;
}

.nav-logout-btn:hover {
    background-color: #dc2626;
}

.mb-10 {
    margin-bottom: 10px;
}

.card-title-clean {
    margin-bottom: 0;
    border-bottom: none;
}

.card-description {
    font-size: 13px;
    color: var(--anac-text-muted);
    margin-top: 0;
    margin-bottom: 15px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.label-clickable {
    font-weight: bold;
    cursor: pointer;
}

.flex-1 {
    flex: 1;
}

.form-actions-right {
    text-align: right;
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.text-muted-sm {
    font-size: 13px;
    color: var(--anac-text-muted);
}

.bingo-ticket-wrapper {
    text-align: center;
    margin-top: 15px;
}

.bingo-ticket-img {
    max-width: 100%;
    width: 320px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: inline-block;
}

