/**
 * Senka (戦果) — Sistema de Torneos y Liga Beyblade X (BDB)
 * Estilos Modulares de la Mesa de Arbitraje en Vivo & Marcadores Táctiles
 * Autor: Sebastián Ariza / https://sebastiandeveloper.website/
 */

/* -------------------------------------------------------------------------
   1. Modal Overlay & Contenedor de la Mesa de Arbitraje
   ------------------------------------------------------------------------- */
.scoring-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 11, 18, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.scoring-modal-overlay.active {
    display: flex;
}

.scoring-desk-modal {
    background: #1e2227;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 85, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    animation: scoringModalAppear 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scoringModalAppear {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* -------------------------------------------------------------------------
   2. Encabezado de Mesa & Metadatos del Match
   ------------------------------------------------------------------------- */
.scoring-header {
    background: #181b1f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.9rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

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

.scoring-match-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(255, 85, 0, 0.15);
    color: #ff6a00;
    border: 1px solid rgba(255, 85, 0, 0.3);
}

.scoring-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0.2rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scoring-subtitle {
    font-size: 0.78rem;
    color: #9ca3af;
    margin: 0.1rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-modal-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.btn-modal-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* -------------------------------------------------------------------------
   3. Pestañas Estilo Challonge (Informar resultados / Detalles / BEX)
   ------------------------------------------------------------------------- */
.challonge-tabs-nav {
    display: flex;
    background: #181b1f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 1rem;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.challonge-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #9ca3af;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.75rem 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.challonge-tab:hover {
    color: #e5e7eb;
}

.challonge-tab.active {
    color: #ffffff;
    border-bottom-color: #ff5500;
}

/* Paneles del Modal */
.challonge-panel {
    display: none;
}

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

.scoring-arena {
    padding: 1.2rem;
    overflow-y: auto;
    max-height: calc(92vh - 150px);
}

/* -------------------------------------------------------------------------
   4. Tabla de Informar Resultados (Pure Challonge Simplicity)
   ------------------------------------------------------------------------- */
.challonge-score-table {
    background: #252a30;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.1rem;
}

.score-table-header {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.25);
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.score-table-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.score-table-row:last-child {
    border-bottom: none;
}

.participant-col {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
}

.participant-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #374151;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.participant-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
}

.participant-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f3f4f6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.participant-seed-pill {
    font-size: 0.72rem;
    font-weight: 700;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.result-col {
    flex-shrink: 0;
}

.score-stepper-box {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: #1a1e23;
    padding: 0.2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-stepper-pill {
    width: 34px;
    height: 34px;
    background: #2b313a;
    border: none;
    border-radius: 6px;
    color: #f3f4f6;
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    user-select: none;
}

.btn-stepper-pill:hover {
    background: #374151;
}

.btn-stepper-pill:active {
    transform: scale(0.92);
}

.score-number-input {
    width: 44px;
    height: 34px;
    background: transparent;
    border: none;
    text-align: center;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    -moz-appearance: textfield;
}

.score-number-input::-webkit-outer-spin-button,
.score-number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Presets Rápidos */
.quick-presets-section {
    margin-bottom: 1.25rem;
}

.quick-presets-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.45rem;
}

.quick-presets-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

@media (max-width: 480px) {
    .quick-presets-pills {
        grid-template-columns: repeat(4, 1fr);
    }
}

.btn-preset-pill {
    background: #252a30;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #d1d5db;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.45rem 0.2rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.btn-preset-pill:hover {
    background: #ff5500;
    border-color: #ff5500;
    color: #ffffff;
}

/* Verificar Ganador (Segmented Control Challonge) */
.challonge-winner-section {
    margin-bottom: 1.4rem;
}

.winner-section-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 800;
    color: #e5e7eb;
    text-align: center;
    margin-bottom: 0.65rem;
    letter-spacing: 0.02em;
}

.winner-selector-group {
    display: flex;
    gap: 0.5rem;
}

.winner-select-btn {
    flex: 1;
    background: #252a30;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.85rem 0.5rem;
    color: #9ca3af;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.winner-select-btn:hover {
    border-color: rgba(255, 85, 0, 0.4);
    color: #f3f4f6;
}

.winner-select-btn.active {
    background: #ff5500 !important;
    border-color: #ff5500 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(255, 85, 0, 0.4);
}

/* Botón Principal Challonge Submit */
.challonge-submit-wrap {
    margin-top: 0.5rem;
}

.btn-challonge-submit {
    width: 100%;
    background: #ff5500;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.95rem 1rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 85, 0, 0.4);
    transition: filter 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-challonge-submit:hover {
    filter: brightness(1.1);
}

.btn-challonge-submit:active {
    transform: scale(0.98);
}

/* Footer del modal */
.btn-link-reset {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 0.78rem;
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.8;
}

.btn-link-reset:hover {
    opacity: 1;
}

.scoring-referee-text {
    font-size: 0.78rem;
    color: #9ca3af;
}
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.scoring-versus-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.2rem;
    align-items: stretch;
}

@media (max-width: 720px) {
    .scoring-versus-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.fighter-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: var(--transition-normal);
}

.fighter-card.is-winner {
    border-color: var(--success);
    background: linear-gradient(180deg, rgba(0, 255, 136, 0.08), var(--bg-surface-elevated));
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.18);
}

.fighter-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-surface), #0a3052);
    border: 2px solid var(--primary-neon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-neon);
    margin-bottom: 0.6rem;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.25);
}

.fighter-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.fighter-seed {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.fighter-score-display {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary);
    margin: 0.4rem 0 0.8rem;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
    transition: transform 0.15s ease;
}

.fighter-target-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 1.2rem;
}

.fighter-target-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-neon), #00b4d8);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.fighter-card.is-winner .fighter-target-progress {
    background: linear-gradient(90deg, #00ff88, #00e5ff);
}

.versus-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
}

.vs-badge {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--cyan-neon);
    background: linear-gradient(135deg, rgba(11, 123, 177, 0.25), rgba(3, 82, 126, 0.35));
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
}

.target-badge {
    margin-top: 0.8rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
}

/* -------------------------------------------------------------------------
   5. Botones Táctiles de Tipos de Victoria Beyblade X
   ------------------------------------------------------------------------- */
.finish-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    width: 100%;
}

.btn-finish {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 60px;
}

.btn-finish:active {
    transform: scale(0.94);
}

.finish-name {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.finish-pts {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 900;
    margin-top: 0.15rem;
}

/* 1. Spin Finish (+1 pt) */
.btn-finish.spin {
    background: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.3);
    color: #48cae4;
}
.btn-finish.spin:hover {
    background: rgba(0, 229, 255, 0.18);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
}

/* 2. Over Finish (+2 pts) */
.btn-finish.over {
    background: rgba(255, 85, 0, 0.08);
    border-color: rgba(255, 85, 0, 0.35);
    color: #ff7733;
}
.btn-finish.over:hover {
    background: rgba(255, 85, 0, 0.2);
    box-shadow: 0 0 16px rgba(255, 85, 0, 0.35);
}

/* 3. Burst Finish (+2 pts) */
.btn-finish.burst {
    background: rgba(255, 187, 0, 0.08);
    border-color: rgba(255, 187, 0, 0.35);
    color: #ffc425;
}
.btn-finish.burst:hover {
    background: rgba(255, 187, 0, 0.2);
    box-shadow: 0 0 16px rgba(255, 187, 0, 0.35);
}

/* 4. Xtreme Finish (+3 pts) */
.btn-finish.xtreme {
    background: linear-gradient(135deg, rgba(255, 0, 85, 0.15), rgba(255, 85, 0, 0.15));
    border-color: rgba(255, 0, 85, 0.5);
    color: #ff3377;
}
.btn-finish.xtreme:hover {
    background: linear-gradient(135deg, rgba(255, 0, 85, 0.28), rgba(255, 85, 0, 0.28));
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.45);
}

/* -------------------------------------------------------------------------
   6. Selector de Marcador Rápido (Tab 2)
   ------------------------------------------------------------------------- */
.quick-score-container {
    display: none;
    flex-direction: column;
    gap: 1.2rem;
}

.quick-score-container.active {
    display: flex;
}

.quick-presets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}

@media (max-width: 600px) {
    .quick-presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.btn-preset-score {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.5rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
}

.btn-preset-score:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--primary-neon);
    color: var(--primary-neon);
    transform: translateY(-2px);
}

.quick-steppers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
}

.stepper-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.stepper-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-stepper {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-stepper:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--primary-neon);
}

.stepper-val {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 900;
    min-width: 40px;
    text-align: center;
}

/* -------------------------------------------------------------------------
   7. Registro Cronológico de Rondas (Timeline de Batalla)
   ------------------------------------------------------------------------- */
.scoring-rounds-log {
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1rem 1.2rem;
}

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

.rounds-log-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rounds-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 160px;
    overflow-y: auto;
}

.round-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
}

.round-entry-seq {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.round-entry-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.round-entry-badge.spin { background: rgba(0, 229, 255, 0.12); color: #48cae4; }
.round-entry-badge.over { background: rgba(255, 85, 0, 0.12); color: #ff7733; }
.round-entry-badge.burst { background: rgba(255, 187, 0, 0.12); color: #ffc425; }
.round-entry-badge.xtreme { background: rgba(255, 0, 85, 0.15); color: #ff3377; }

/* -------------------------------------------------------------------------
   8. Banner de Auto-Reporte y Validación
   ------------------------------------------------------------------------- */
.self-report-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(255, 187, 0, 0.1);
    border: 1px solid rgba(255, 187, 0, 0.35);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.self-report-banner.active {
    display: flex;
}

.self-report-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: #ffc425;
}

/* -------------------------------------------------------------------------
   9. Barra de Acciones y Guardado (Footer del Modal)
   ------------------------------------------------------------------------- */
.scoring-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    padding: 1rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.scoring-footer-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-left: auto;
}

/* -------------------------------------------------------------------------
   10. Tarjetas de Partidos para la Vista de Torneo
   ------------------------------------------------------------------------- */
.match-card-item {
    background: #25282d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: var(--transition-fast);
    position: relative;
    cursor: pointer;
}

.match-card-item:hover {
    border-color: rgba(255, 85, 0, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.match-card-item.completed {
    border-color: rgba(255, 255, 255, 0.1);
}

.match-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
}

.match-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: #1e2125;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.match-card-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.65rem;
    background: transparent;
    font-size: 0.9rem;
    color: #d1d5db;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.match-card-player:last-child {
    border-bottom: none;
}

.match-card-player.winner {
    background: rgba(255, 85, 0, 0.08);
    font-weight: 800;
    color: #ffffff;
}

.match-score-badge {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    color: #9ca3af;
    background: #2e333a;
    min-width: 28px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0 0.35rem;
    flex-shrink: 0;
}

.match-card-player.winner .match-score-badge {
    background: #ff5500 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(255, 85, 0, 0.35);
}

.match-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.2rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.live-indicator-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan-neon);
    box-shadow: 0 0 8px var(--cyan-neon);
    animation: livePulse 1.6s infinite ease-in-out;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* -------------------------------------------------------------------------
   10. Modo Lectura & Espectador en Vivo (Challonge Live Spec)
   ------------------------------------------------------------------------- */
.scoring-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.scoring-mode-badge.spectator {
    background: rgba(0, 229, 255, 0.14);
    color: var(--cyan-neon);
    border: 1px solid rgba(0, 229, 255, 0.35);
}

.scoring-mode-badge.referee {
    background: rgba(255, 85, 0, 0.15);
    color: #ff6a00;
    border: 1px solid rgba(255, 85, 0, 0.35);
}

.live-dot-pulse {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00e5ff;
    box-shadow: 0 0 8px #00e5ff;
    animation: livePulseAnim 1.4s infinite ease-in-out;
}

@keyframes livePulseAnim {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.45; }
}

.btn-share-match-link {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-share-match-link:hover {
    color: var(--cyan-neon);
    border-color: var(--cyan-neon);
    background: rgba(0, 229, 255, 0.08);
}

.spectator-live-banner {
    background: linear-gradient(135deg, rgba(5, 36, 65, 0.85), rgba(8, 21, 32, 0.95));
    border: 1px solid rgba(0, 229, 255, 0.28);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin: 0.8rem 1.25rem 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.spectator-live-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.spectator-live-text strong {
    display: block;
    color: var(--cyan-neon);
    font-size: 0.85rem;
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
}

.spectator-live-text span {
    display: block;
    color: #94a3b8;
    font-size: 0.76rem;
    line-height: 1.35;
    margin-top: 0.15rem;
}

/* Reglas en Modo Solo Lectura / Espectador */
.scoring-desk-modal.mode-read-only .challonge-tabs-nav #tabScoringResultsBtn,
.scoring-desk-modal.mode-read-only .challonge-tabs-nav #tabScoringBexBtn,
.scoring-desk-modal.mode-read-only #panelScoringResults,
.scoring-desk-modal.mode-read-only #panelScoringBex,
.scoring-desk-modal.mode-read-only .self-report-banner,
.scoring-desk-modal.mode-read-only #btnResetCurrentScore {
    display: none !important;
}

.scoring-desk-modal.mode-read-only .challonge-tabs-nav {
    display: none;
}

.scoring-desk-modal.mode-read-only #panelScoringDetails {
    display: block !important;
}

.live-flash-highlight {
    animation: flashLiveUpdate 0.6s ease-out;
}

@keyframes flashLiveUpdate {
    0% { background-color: rgba(0, 229, 255, 0.22); }
    100% { background-color: transparent; }
}

/* Pestañas del Modal Compartir Torneo */
.share-type-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-medium);
    padding: 0.5rem 1.25rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
}

.share-type-tabs::-webkit-scrollbar {
    display: none;
}

.share-type-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.share-type-tab:hover {
    color: var(--text-primary);
}

.share-type-tab.active {
    color: var(--cyan-neon);
    border-bottom-color: var(--cyan-neon);
}
