/* =========================================================
   CONSENSO — Dental Games
   Estilos del juego tipo Family Feud para congresos
   ========================================================= */

/* --- Variables de color --- */
:root {
    --bg-deep:       #08081a;
    --bg-dark:       #0d0d2b;
    --bg-card:       rgba(255,255,255,0.04);
    --bg-card-hover: rgba(255,255,255,0.07);
    --border-glass:  rgba(255,255,255,0.10);

    --team-azul:     #00c8ff;
    --team-azul-2:   #0055ff;
    --team-azul-glow:rgba(0,200,255,0.5);

    --team-rojo:     #ff2d78;
    --team-rojo-2:   #cc00ff;
    --team-rojo-glow:rgba(255,45,120,0.5);

    --gold:          #ffd700;
    --gold-2:        #ffaa00;
    --gold-glow:     rgba(255,215,0,0.4);

    --correct:       #00e676;
    --incorrect:     #ff1744;
    --strike:        #ff5252;

    --text-primary:  #ffffff;
    --text-secondary:rgba(255,255,255,0.65);
    --text-muted:    rgba(255,255,255,0.40);

    --font:          'Montserrat', 'Inter', system-ui, sans-serif;
    --radius:        1rem;
    --radius-sm:     0.6rem;
    --transition:    0.3s cubic-bezier(0.16,1,0.3,1);
}

/* --- Reset base --- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font);
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================================
   FONDO ANIMADO (partículas estrelladas)
   ========================================================= */
.bg-stars {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 20% 20%, rgba(0,100,255,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 80%, rgba(200,0,255,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 80% 60% at 50% 50%, rgba(0,200,255,0.04) 0%, transparent 70%),
        var(--bg-deep);
    z-index: -1;
    pointer-events: none;
}

/* =========================================================
   LAYOUT GENERAL
   ========================================================= */
.consenso-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

/* =========================================================
   HEADER DEL JUEGO
   ========================================================= */
.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(180deg, rgba(8,8,26,0.95) 0%, rgba(8,8,26,0.85) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(0, 200, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 200, 255, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.game-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.game-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--team-azul), var(--team-azul-2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.game-logo-text {
    line-height: 1.1;
}

.game-logo-text .brand { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em; color: var(--text-secondary); text-transform: uppercase; }
.game-logo-text .game-name { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.05em; }

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

.round-badge {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-glass);
    border-radius: 2rem;
    padding: 0.35rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.round-badge span { color: var(--gold); }

/* Timer */
.timer-display {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-glass);
    border-radius: 2rem;
    padding: 0.35rem 1rem;
    font-size: 1rem;
    font-weight: 800;
    min-width: 70px;
    justify-content: center;
}

.timer-display.urgent { color: var(--incorrect); animation: pulse-red 0.5s ease infinite alternate; }
.timer-display i { font-size: 0.85rem; color: var(--text-secondary); }

@keyframes pulse-red {
    from { text-shadow: 0 0 0 transparent; }
    to   { text-shadow: 0 0 12px var(--incorrect); }
}

/* =========================================================
   DISPLAY VIEW — Pantalla principal (proyector)
   ========================================================= */
.display-layout {
    display: grid;
    grid-template-columns: 320px minmax(auto, 900px) 320px;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 3rem;
    flex: 1;
    align-items: start;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
}

/* Pregunta */
.question-section { display: flex; flex-direction: column; gap: 1rem; }

.question-text {
    text-align: center;
    padding: 1.5rem 2rem;
}

.question-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

.question-main {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

/* Respuestas */
.answers-list { display: flex; flex-direction: column; gap: 0.55rem; }

.answer-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(10, 15, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.answer-row.revealed {
    border-color: var(--gold);
    background: rgba(255,215,0,0.06);
}

.answer-row.revealed::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,215,0,0.08) 0%, transparent 100%);
    pointer-events: none;
}

.answer-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.answer-row.revealed .answer-num {
    border-color: var(--gold);
    color: var(--gold);
}

.answer-text {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.answer-row.revealed .answer-text { color: var(--text-primary); }

.answer-hidden { color: rgba(255,255,255,0.2); font-style: italic; font-weight: 400; }

.answer-votes {
    font-size: 1.4rem;
    font-weight: 900;
    color: transparent;
    min-width: 40px;
    text-align: right;
}

/* Votos con color del equipo activo */
.answer-row.revealed .answer-votes.team-azul { color: var(--team-azul); }
.answer-row.revealed .answer-votes.team-rojo  { color: var(--team-rojo); }
.answer-row.revealed .answer-votes             { color: var(--gold); }

/* Marcadores laterales (3-column layout) */
.team-score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(10, 15, 40, 0.7);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 2px solid transparent;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.team-score-card.azul {
    border-color: var(--team-azul);
    box-shadow: 0 0 15px var(--team-azul-glow), inset 0 0 20px var(--team-azul-glow);
}

.team-score-card.rojo {
    border-color: var(--team-rojo);
    box-shadow: 0 0 15px var(--team-rojo-glow), inset 0 0 20px var(--team-rojo-glow);
}

.team-score-card.active.azul { border-color: var(--team-azul); box-shadow: 0 0 30px var(--team-azul-glow); }
.team-score-card.active.rojo { border-color: var(--team-rojo); box-shadow: 0 0 30px var(--team-rojo-glow); }

.team-label {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.team-label.azul { color: var(--team-azul); }
.team-label.rojo  { color: var(--team-rojo); }

.team-name-display {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.team-score-number {
    font-size: 5rem;
    font-weight: 900;
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
    margin: 1rem 0;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.team-mascot {
    font-size: 3rem;
    margin-top: 1rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.score-bar {
    width: 100%;
    height: 3px;
    border-radius: 2px;
    margin: 0.6rem 0;
}

.score-bar.azul { background: linear-gradient(90deg, var(--team-azul-2), var(--team-azul)); }
.score-bar.rojo  { background: linear-gradient(90deg, var(--team-rojo-2), var(--team-rojo)); }

/* Strikes */
.display-strikes-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    background: rgba(0,0,0,0.4);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.strikes-panel {
    background: rgba(255,255,255,0.04);
    border: 1.5px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    text-align: center;
}

.strikes-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.strikes-icons { display: flex; justify-content: center; gap: 0.6rem; }

.strike-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    background: transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    color: transparent;
}

.strike-icon.active {
    background: transparent;
    border-color: var(--strike);
    box-shadow: 0 0 10px rgba(255, 82, 82, 0.6);
    color: var(--strike);
    text-shadow: 0 0 5px var(--strike);
    animation: strike-pop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

.strike-icon.active .bi-x-lg { color:#fff !important; }

@keyframes strike-pop {
    0%   { transform: scale(0); }
    100% { transform: scale(1); }
}

/* =========================================================
   HOST PANEL VIEW
   ========================================================= */
.host-layout {
    padding: 1rem 1.25rem;
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 1rem;
    flex: 1;
}

.host-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--team-azul);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Panel control de ronda — botones 1-5 */
.answers-control-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.6rem;
}

.answer-btn {
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.15);
    border-top: 1px solid rgba(255,255,255,0.4);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.4rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    color: var(--text-primary);
    font-family: var(--font);
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.answer-btn:hover { background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%); border-top-color: #fff; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.5); }
.answer-btn.revealed { border-color: var(--gold); border-top-color: #fff2a8; background: linear-gradient(180deg, rgba(255,215,0,0.2) 0%, rgba(255,215,0,0.05) 100%); box-shadow: 0 0 20px var(--gold-glow); }
.answer-btn .btn-num { font-size: 1.3rem; font-weight: 900; display: block; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.answer-btn .btn-icon { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.answer-btn.revealed .btn-num { color: var(--gold); text-shadow: 0 0 10px rgba(255,215,0,0.5); }

/* Botones de acción del host */
.host-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
}

@keyframes start-pulse {
    0% { box-shadow: 0 0 15px var(--team-azul-glow); }
    50% { box-shadow: 0 0 35px var(--team-azul-glow), inset 0 0 10px rgba(255,255,255,0.3); transform: scale(1.02); }
    100% { box-shadow: 0 0 15px var(--team-azul-glow); }
}

.host-start-btn {
    animation: start-pulse 2.5s infinite ease-in-out;
    font-size: 1.1rem;
    padding: 1rem;
    background: linear-gradient(180deg, var(--team-azul) 0%, #0044cc 100%);
    border-top-color: #80e4ff;
    margin-bottom: 0.5rem;
}

.host-btn {
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0.85rem 0.75rem;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.host-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    pointer-events: none;
}

.host-btn:hover { transform: translateY(-3px); filter: brightness(1.15); box-shadow: 0 8px 20px rgba(0,0,0,0.5); }
.host-btn:active { transform: translateY(1px); box-shadow: 0 2px 10px rgba(0,0,0,0.6); }

.host-btn.correct   { background: linear-gradient(180deg, #00e676 0%, #00a152 100%); border-top-color: #69f0ae; color: #fff; box-shadow: 0 0 20px rgba(0,230,118,0.4), inset 0 2px 0 rgba(255,255,255,0.4); }
.host-btn.incorrect { background: linear-gradient(180deg, #ff1744 0%, #b71c1c 100%); border-top-color: #ff5252; color: #fff; box-shadow: 0 0 20px rgba(255,23,68,0.4), inset 0 2px 0 rgba(255,255,255,0.4); }
.host-btn.strike    { background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.03) 100%); border-color: rgba(255,255,255,0.2); border-top-color: rgba(255,255,255,0.4); color: var(--text-secondary); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.host-btn.next      { background: linear-gradient(180deg, var(--team-azul) 0%, var(--team-azul-2) 100%); border-top-color: #80e4ff; color: #fff; box-shadow: 0 0 20px var(--team-azul-glow), inset 0 2px 0 rgba(255,255,255,0.4); }
.host-btn.reset     { background: linear-gradient(180deg, rgba(255,215,0,0.2) 0%, rgba(255,215,0,0.05) 100%); border-color: rgba(255,215,0,0.4); border-top-color: rgba(255,215,0,0.6); color: var(--gold); }
.host-btn.end       { background: linear-gradient(180deg, var(--team-rojo) 0%, var(--team-rojo-2) 100%); border-top-color: #ff80b3; color: #fff; box-shadow: 0 0 20px var(--team-rojo-glow), inset 0 2px 0 rgba(255,255,255,0.4); }

.host-btn.correct:hover   { box-shadow: 0 0 30px rgba(0,230,118,0.7), inset 0 2px 0 rgba(255,255,255,0.5); }
.host-btn.incorrect:hover { box-shadow: 0 0 30px rgba(255,23,68,0.7), inset 0 2px 0 rgba(255,255,255,0.5); }
.host-btn.next:hover      { box-shadow: 0 0 30px var(--team-azul-glow), inset 0 2px 0 rgba(255,255,255,0.5); }
.host-btn.end:hover       { box-shadow: 0 0 30px var(--team-rojo-glow), inset 0 2px 0 rgba(255,255,255,0.5); }
.host-btn.strike:hover    { color: #fff; border-color: rgba(255,255,255,0.4); }
.host-btn.reset:hover     { color: #fff; border-color: var(--gold); background: linear-gradient(180deg, rgba(255,215,0,0.4) 0%, rgba(255,215,0,0.1) 100%); }

/* Botones para asignar puntos de respuestas */
.host-score-btn {
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    box-shadow: none;
}
.host-score-btn.azul:hover {
    background: linear-gradient(180deg, var(--team-azul) 0%, var(--team-azul-2) 100%);
    color: #fff;
    border-top-color: #80e4ff;
    box-shadow: 0 0 20px var(--team-azul-glow), inset 0 2px 0 rgba(255,255,255,0.4);
}
.host-score-btn.rojo:hover {
    background: linear-gradient(180deg, var(--team-rojo) 0%, var(--team-rojo-2) 100%);
    color: #fff;
    border-top-color: #ff80b3;
    box-shadow: 0 0 20px var(--team-rojo-glow), inset 0 2px 0 rgba(255,255,255,0.4);
}
.host-score-btn.azul.selected {
    background: linear-gradient(180deg, var(--team-azul) 0%, var(--team-azul-2) 100%);
    color: #fff;
    border-top-color: #80e4ff;
    box-shadow: 0 0 20px var(--team-azul-glow), inset 0 2px 0 rgba(255,255,255,0.4);
}
.host-score-btn.rojo.selected {
    background: linear-gradient(180deg, var(--team-rojo) 0%, var(--team-rojo-2) 100%);
    color: #fff;
    border-top-color: #ff80b3;
    box-shadow: 0 0 20px var(--team-rojo-glow), inset 0 2px 0 rgba(255,255,255,0.4);
}

/* Info panel inferior */
.host-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.host-info-card {
    background: rgba(255,255,255,0.04);
    border: 1.5px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.host-info-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.player-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
    margin: 0.15rem;
}

.player-dot.azul { background: rgba(0,200,255,0.12); color: var(--team-azul); }
.player-dot.rojo  { background: rgba(255,45,120,0.12); color: var(--team-rojo); }
.player-dot .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.response-time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    padding: 0.2rem 0;
}

.response-time-label { color: var(--text-secondary); }
.response-time-value { font-weight: 700; }
.response-time-value.azul { color: var(--team-azul); }
.response-time-value.rojo  { color: var(--team-rojo); }

/* Timer control */
.timer-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timer-preset-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-glass);
    border-radius: 0.4rem;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: var(--transition);
}

.timer-preset-btn:hover { background: rgba(255,255,255,0.12); color: white; }

/* =========================================================
   PLAYER VIEW — Móvil del jugador
   ========================================================= */
.player-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 2rem;
    text-align: center;
}

.player-header-bar {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.hamburger-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-glass);
    border-radius: 0.5rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
}

.connection-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-glass);
    border-radius: 2rem;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.connection-badge .conn-dot { width: 8px; height: 8px; border-radius: 50%; background: #aaa; }
.connection-badge.connected .conn-dot { background: var(--correct); animation: blink 2s ease infinite; }
.connection-badge.connected { color: var(--correct); }

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* Info equipo */
.player-team-info { margin-bottom: 0.5rem; }

.player-team-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.player-team-score {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
}

.player-team-score .pts { font-size: 1.1rem; font-weight: 600; opacity: 0.7; margin-left: 0.2rem; }

/* ¡BOTONAZO! */
.buzz-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    justify-content: center;
}

.buzz-ring {
    position: relative;
    width: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buzz-ring::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: ring-spin 3s linear infinite;
}

.team-azul .buzz-ring::before { border-top-color: var(--team-azul); border-right-color: rgba(0,200,255,0.2); }
.team-rojo  .buzz-ring::before { border-top-color: var(--team-rojo);  border-right-color: rgba(255,45,120,0.2); }

@keyframes ring-spin { to { transform: rotate(360deg); } }

.buzz-btn {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: white;
    transition: transform 0.15s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.team-azul .buzz-btn {
    background: radial-gradient(circle at 35% 35%, #00c8ff, #0044cc);
    box-shadow: 0 0 40px var(--team-azul-glow), 0 12px 40px rgba(0,0,0,0.5);
}

.team-rojo .buzz-btn {
    background: radial-gradient(circle at 35% 35%, #ff2d78, #8800cc);
    box-shadow: 0 0 40px var(--team-rojo-glow), 0 12px 40px rgba(0,0,0,0.5);
}

.buzz-btn:hover { transform: scale(1.04); }
.buzz-btn:active { transform: scale(0.94); }

.buzz-btn.buzzed {
    animation: buzz-pulse 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes buzz-pulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.15); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.buzz-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.buzz-btn.waiting {
    animation: waiting-glow 2s ease infinite;
}

.team-azul .buzz-btn.waiting {
    animation: waiting-glow-azul 2s ease infinite;
}

.team-rojo .buzz-btn.waiting {
    animation: waiting-glow-rojo 2s ease infinite;
}

@keyframes waiting-glow-azul {
    0%,100% { box-shadow: 0 0 30px var(--team-azul-glow), 0 12px 40px rgba(0,0,0,0.5); }
    50%      { box-shadow: 0 0 60px var(--team-azul-glow), 0 12px 40px rgba(0,0,0,0.5); }
}

@keyframes waiting-glow-rojo {
    0%,100% { box-shadow: 0 0 30px var(--team-rojo-glow), 0 12px 40px rgba(0,0,0,0.5); }
    50%      { box-shadow: 0 0 60px var(--team-rojo-glow), 0 12px 40px rgba(0,0,0,0.5); }
}

.buzz-status {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* =========================================================
   LOBBY VIEW
   ========================================================= */
.lobby-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    gap: 2rem;
}

.lobby-logo {
    text-align: center;
}

.lobby-logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--team-azul), var(--team-azul-2));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    box-shadow: 0 0 40px var(--team-azul-glow);
}

.lobby-title { font-size: 2.5rem; font-weight: 900; letter-spacing: -0.02em; }
.lobby-subtitle { color: var(--text-secondary); font-size: 1rem; margin-top: 0.4rem; }

/* Setup form */
.setup-card {
    background: rgba(255,255,255,0.04);
    border: 1.5px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 540px;
    backdrop-filter: blur(20px);
}

.setup-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.setup-row { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; }
.setup-row.single { flex-direction: column; }

.setup-input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: white;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    outline: none;
    transition: var(--transition);
}

.setup-input:focus { border-color: var(--team-azul); background: rgba(0,200,255,0.06); }
.setup-input::placeholder { color: var(--text-muted); }

.setup-input.team-azul-input:focus { border-color: var(--team-azul); }
.setup-input.team-rojo-input:focus  { border-color: var(--team-rojo); }

select.setup-input option { background: #0d0d2b; color: white; }

.team-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.3);
    transition: background 0.25s ease;
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: 0.25rem;
    flex-wrap: nowrap;
    padding: 0.25rem 0;
}

.cp-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
    flex-shrink: 0;
    padding: 0;
}

.cp-swatch:hover:not(:disabled) {
    transform: scale(1.2);
    border-color: rgba(255,255,255,0.6);
}

.cp-swatch.selected {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.4), 0 0 10px rgba(255,255,255,0.3);
    transform: scale(1.15);
}

.cp-swatch:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
    position: relative;
    overflow: hidden;
}
.cp-swatch:disabled::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 42%, rgba(255,255,255,0.5) 42%, rgba(255,255,255,0.5) 58%, transparent 58%);
    border-radius: 50%;
}

.create-game-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--team-azul), var(--team-azul-2));
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 800;
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.02em;
    margin-top: 0.5rem;
    box-shadow: 0 4px 20px var(--team-azul-glow);
}

.create-game-btn:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 8px 30px var(--team-azul-glow); }
.create-game-btn:active { transform: translateY(0); }

/* URLs generadas */
.game-urls-card {
    background: rgba(255,255,255,0.03);
    border: 1.5px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 540px;
    display: none;
}

.url-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.url-label { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); min-width: 90px; }
.url-value {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-muted);
    word-break: break-all;
    font-family: monospace;
}

.url-copy-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-glass);
    border-radius: 0.4rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    transition: var(--transition);
    white-space: nowrap;
}

.url-copy-btn:hover { background: rgba(255,255,255,0.12); color: white; }

.open-host-btn {
    display: block;
    width: 100%;
    margin-top: 1.25rem;
    background: linear-gradient(135deg, var(--team-rojo-2), var(--team-rojo));
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 20px var(--team-rojo-glow);
}

.open-host-btn:hover { filter: brightness(1.1); transform: translateY(-2px); color: white; }

/* =========================================================
   ANIMACIONES DE REVEAL
   ========================================================= */
@keyframes reveal-flip {
    0%   { transform: scaleY(0); opacity: 0; }
    50%  { transform: scaleY(1.1); }
    100% { transform: scaleY(1); opacity: 1; }
}

.reveal-anim { animation: reveal-flip 0.5s cubic-bezier(0.34,1.56,0.64,1); }

@keyframes score-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.score-pop { animation: score-pop 0.4s cubic-bezier(0.34,1.56,0.64,1); }

/* Overlay de botonazo ganador */
.buzz-winner-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.buzz-winner-overlay.show { opacity: 1; pointer-events: auto; }

.buzz-winner-card {
    text-align: center;
    padding: 2.5rem 3rem;
    border-radius: 1.5rem;
    animation: winner-bounce 0.6s cubic-bezier(0.34,1.56,0.64,1);
}

.buzz-winner-card.azul {
    background: linear-gradient(135deg, rgba(0,100,255,0.3), rgba(0,200,255,0.2));
    border: 2px solid var(--team-azul);
    box-shadow: 0 0 60px var(--team-azul-glow);
}

.buzz-winner-card.rojo {
    background: linear-gradient(135deg, rgba(200,0,255,0.25), rgba(255,45,120,0.2));
    border: 2px solid var(--team-rojo);
    box-shadow: 0 0 60px var(--team-rojo-glow);
}

@keyframes winner-bounce {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.buzz-winner-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.buzz-winner-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-secondary); }
.buzz-winner-team  { font-size: 2rem; font-weight: 900; }
.buzz-winner-team.azul { color: var(--team-azul); }
.buzz-winner-team.rojo  { color: var(--team-rojo); }

/* =========================================================
   GAME OVER SCREEN
   ========================================================= */
.gameover-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.gameover-title {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.gameover-winner {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 2rem;
    text-shadow: 0 0 20px var(--gold-glow);
}

.final-scores {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.final-score-card {
    padding: 1.5rem 2.5rem;
    border-radius: var(--radius);
    border: 2px solid transparent;
    text-align: center;
}

.final-score-card.winner { transform: scale(1.08); }
.final-score-card.azul { border-color: var(--team-azul); background: rgba(0,200,255,0.1); }
.final-score-card.rojo  { border-color: var(--team-rojo);  background: rgba(255,45,120,0.1); }

.final-score-num { font-size: 3.5rem; font-weight: 900; }
.final-score-num.azul { color: var(--team-azul); }
.final-score-num.rojo  { color: var(--team-rojo); }

/* =========================================================
   RESPONSIVE MÓVIL
   ========================================================= */
@media (max-width: 768px) {
    .display-layout {
        grid-template-columns: 1fr;
    }

    .scoreboard {
        flex-direction: row;
        justify-content: center;
        gap: 0.75rem;
    }

    .team-score-card { min-width: 130px; }

    .answers-control-grid { grid-template-columns: repeat(5, 1fr); }

    .host-actions-grid { grid-template-columns: repeat(2, 1fr); }

    .buzz-btn { width: 190px; height: 190px; font-size: 1.3rem; }
    .buzz-ring { width: 210px; height: 210px; }

    .question-main { font-size: 1.4rem; }
}

/* =========================================================
   UTILIDADES
   ========================================================= */
.text-azul { color: var(--team-azul); }
.text-rojo  { color: var(--team-rojo); }
.text-gold  { color: var(--gold); }
.text-muted { color: var(--text-muted); }

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.divider {
    height: 1px;
    background: var(--border-glass);
    margin: 0.75rem 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* =========================================================
   STRIKE OVERLAY GIGANTE (Family Feud style)
   ========================================================= */
.strike-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    z-index: 250;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.strike-overlay.show { opacity: 1; pointer-events: auto; }

.strike-marks {
    display: flex;
    gap: 1.5rem;
}

.giant-strike-icon {
    font-size: 15rem;
    line-height: 1;
    font-weight: 900;
    color: var(--strike);
    text-shadow: 0 0 80px rgba(255,82,82,0.8), 0 0 20px rgba(0,0,0,0.8);
    transform: scale(0);
}

.strike-overlay.show .giant-strike-icon {
    animation: giant-strike-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes giant-strike-pop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* =========================================================
   DISPLAY VIEW — Additional Styles
   ========================================================= */
body.display-page { overflow: hidden; }

.display-layout { min-height: calc(100vh - 60px); }

.display-separator { color: var(--text-muted); }

.header-spacer { width: 140px; }

/* Lobby message */
.display-lobby-msg {
    display: none;
    flex: 1;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 3rem;
}

.display-lobby-emoji { font-size: 4rem; }

.display-lobby-title { font-size: 2rem; font-weight: 900; color: var(--team-azul); }

.display-lobby-subtitle { color: var(--text-secondary); font-size: 1.1rem; }

.display-lobby-bar {
    width: 48px;
    height: 4px;
    background: linear-gradient(90deg, var(--team-azul), var(--team-rojo));
    border-radius: 2px;
    animation: lobby-bar 1.5s ease infinite alternate;
}

@keyframes lobby-bar { from { width: 48px; } to { width: 200px; } }

.display-main { display: none; }

.display-question-card { padding: 1.5rem 2rem; }

.display-strikes-row { margin-top: 0.75rem; justify-content: center; gap: 0.5rem; }

.display-strike-dot {
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--border-glass);
    border-radius: 50%;
    opacity: 0.3;
}

.display-gameover { display: none; }

.display-gameover-trophy { font-size: 5rem; margin-bottom: 1rem; }

.display-score-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.4rem; }

.display-restart-btn {
    margin-top: 2rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--team-azul), var(--team-azul-2));
    border-radius: 0.75rem;
    color: white;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Knockout overlay */
.knockout-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 300;
    flex-direction: column;
}

.knockout-card { text-align: center; animation: ko-fadein 0.5s ease; }
.knockout-emoji { font-size: 6rem; margin-bottom: 0.5rem; }
.knockout-title { font-size: 3rem; font-weight: 900; color: var(--strike); text-shadow: 0 0 40px rgba(255, 82, 82, 0.6); letter-spacing: 0.05em; }
.knockout-team { font-size: 2rem; font-weight: 700; color: #fff; margin: 0.5rem 0; }
.knockout-sub { font-size: 1rem; color: var(--text-muted); margin-bottom: 1rem; }
.knockout-strikes { font-size: 3rem; color: var(--strike); letter-spacing: 0.3em; }

@keyframes ko-fadein { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

/* =========================================================
   PLAYER VIEW — Additional Styles
   ========================================================= */
.player-bg-gradient {
    position: fixed;
    inset: 0;
}

.player-wrapper {
    position: relative;
    z-index: 1;
}

.player-header-full { width: 100%; }

.player-team-separator { color: var(--text-muted); margin: 0 0.3rem; }

.player-team-name {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.player-footer-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

/* Player page body */
body.player-page { height: 100%; overflow: hidden; }
body.player-page .player-layout { min-height: 100svh; }

.player-strikes-compact { display: flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; }
.strike-dots { letter-spacing: 0.15em; color: rgba(255, 255, 255, 0.2); }
.strike-dots .active { color: var(--strike); text-shadow: 0 0 6px rgba(255, 82, 82, 0.6); }
.strike-team-label { font-size: 0.6rem; }
.strike-team-azul { color: var(--team-azul); font-weight: 700; }
.strike-team-rojo { color: var(--team-rojo); font-weight: 700; }

/* =========================================================
   INDEX / LOBBY (coincident-index.php)
   ========================================================= */
.lobby-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.lobby-section-title-spaced { margin-top: 0.5rem; }

.lobby-team-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.lobby-team-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-dot-azul { background: #00c8ff; flex-shrink: 0; }
.team-dot-rojo { background: #ff2d78; flex-shrink: 0; }

.lobby-success-title { color: var(--correct); }

.lobby-url-label-azul { color: var(--team-azul); }
.lobby-url-label-rojo { color: var(--team-rojo); }

.lobby-error-msg {
    color: var(--incorrect);
    font-size: 0.85rem;
    margin-top: 0.75rem;
    display: none;
    text-align: center;
}

.lobby-qr-row {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.lobby-qr-box {
    flex: 1;
    min-width: 140px;
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
}

.lobby-qr-box.azul {
    background: rgba(0, 100, 255, 0.1);
    border: 1px solid rgba(0, 200, 255, 0.3);
}

.lobby-qr-box.rojo {
    background: rgba(200, 0, 255, 0.1);
    border: 1px solid rgba(255, 45, 120, 0.3);
}

.lobby-qr-label {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.lobby-qr-label.azul { color: var(--team-azul); }
.lobby-qr-label.rojo { color: var(--team-rojo); }

.lobby-qr-img {
    width: 130px;
    height: 130px;
    background: white;
    padding: 0.4rem;
    border-radius: 0.4rem;
    display: none;
    margin: 0 auto;
}

.lobby-display-btn {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.3), rgba(0, 100, 255, 0.3));
    border: 2px solid var(--team-azul);
    margin-top: 0.5rem;
    box-shadow: 0 4px 20px var(--team-azul-glow);
}

/* =========================================================
   ADMIN VIEW
   ========================================================= */
body.admin-page { overflow-y: auto; }

.admin-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.sidebar {
    flex: 0 0 250px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.main-editor { flex: 1; }

.file-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
}

.file-item:hover { background: rgba(255, 255, 255, 0.1); }

.file-item.active {
    background: rgba(0, 200, 255, 0.2);
    border-color: var(--team-azul);
    color: white;
    font-weight: bold;
}

.q-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.a-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

.admin-input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-glass);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-family: inherit;
}

.admin-input:focus { outline: none; border-color: var(--team-azul); }

.btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 0.4rem;
    cursor: pointer;
    border: none;
    color: white;
    font-weight: 600;
}

.btn-red { background: var(--team-rojo); }
.btn-blue { background: var(--team-azul); }
.btn-green { background: var(--correct); }
.btn-grey { background: rgba(255, 255, 255, 0.2); }

.admin-actions { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }

.no-file-msg {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
}

.no-file-msg-text { margin-top: 1rem; font-size: 1.1rem; }

.no-file-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.3; }

.admin-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
}

.admin-logo-clickable { cursor: pointer; }

.admin-header-spacer { width: 180px; }

.admin-tabs-row { 
    display: flex; 
    gap: 1rem; 
    margin-bottom: 2rem; 
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: rgba(0, 200, 255, 0.1);
    border-color: rgba(0, 200, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.2) 0%, rgba(0, 81, 255, 0.2) 100%);
    border-color: #00c8ff;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 200, 255, 0.2), inset 0 0 10px rgba(0, 200, 255, 0.1);
    text-shadow: 0 0 5px rgba(0, 200, 255, 0.5);
    transform: none;
}

.admin-tab-btn {
    padding: 0.75rem;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Admin layout helpers */
.admin-editor-card { padding: 2rem; }

.admin-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-editor-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.admin-filename {
    margin: 0;
    font-size: 1.8rem;
    color: var(--team-azul);
}

.admin-editor-actions { display: flex; gap: 1rem; }

.admin-save-btn { font-size: 1rem; padding: 0.5rem 1.5rem; }

.admin-add-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 1rem;
}

.admin-delete-btn { align-self: flex-end; }

.admin-question-card-editor {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.admin-team-col {
    flex: 1;
    min-width: 180px;
    text-align: center;
}

.admin-team-label-azul {
    color: var(--team-azul);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.admin-team-label-rojo {
    color: var(--team-rojo);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.admin-status-col {
    flex: 1;
    min-width: 150px;
    text-align: center;
}

.admin-status-label {
    color: var(--text-muted);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.admin-field-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-field-group { margin-top: 1rem; }

.admin-input-full { width: 100%; text-align: center; margin-bottom: 0.5rem; }

.admin-input-medium { width: 80px; text-align: center; margin-bottom: 0.5rem; }

.admin-input-small { width: 60px; text-align: center; }

.admin-details-section { margin-top: 2rem; }

.admin-details-title { color: var(--gold); }

.admin-details-pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    overflow-x: auto;
    max-height: 400px;
}

/* Create session */
.admin-create-section { padding: 2rem; }

.admin-create-title { color: var(--gold); margin-bottom: 1.5rem; }

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

.admin-create-row { display: flex; gap: 1rem; flex-wrap: wrap; }

.admin-create-field { flex: 1; min-width: 200px; }

.admin-create-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-create-input { width: 100%; }

.admin-picker-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.admin-picker-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 100%;
}

.admin-picker-swatches { display: flex; gap: 0.3rem; }

.admin-picker-swatches .cp-swatch {
    width: 20px;
    height: 20px;
}

.admin-input-full { width: 100%; text-align: center; margin-bottom: 0.5rem; }
.admin-select-full { width: 100%; }

.admin-create-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

.admin-cancel-btn { flex: 1; }

.admin-create-submit {
    flex: 2;
    font-size: 1rem;
    padding: 0.75rem;
}

.admin-error-msg {
    color: var(--incorrect);
    font-size: 0.85rem;
    display: none;
    text-align: center;
}

.admin-answer-index { color: var(--text-muted); width: 20px; }

.admin-answer-input { flex: 1; }

.admin-answer-pts { width: 80px; }

.admin-answer-delete { padding: 0.4rem 0.5rem; }

.admin-question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.admin-question-field { flex: 1; margin-right: 1rem; }

.admin-question-label {
    font-size: 0.8rem;
    color: var(--team-azul);
    font-weight: 700;
}

.admin-question-input {
    width: 100%;
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 0.3rem;
    resize: vertical;
    min-height: 3rem;
}

.admin-answers-container {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.admin-answers-header {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.admin-add-answer-btn {
    margin-top: 0.8rem;
    width: 100%;
    border: 1px dashed rgba(255, 255, 255, 0.3);
}

/* Sessions list */
.admin-session-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

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

.admin-session-id {
    color: var(--gold);
    font-size: 0.85rem;
}

.admin-session-status {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
}

.admin-session-status.finished { background: rgba(0, 200, 0, 0.2); color: #4caf50; }
.admin-session-status.playing { background: rgba(0, 200, 255, 0.2); color: #00c8ff; }
.admin-session-status.lobby { background: rgba(255, 255, 255, 0.1); color: #aaa; }

.admin-session-teams {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-session-scores {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
}

.admin-session-score-azul { color: var(--team-azul); }
.admin-session-score-sep { color: var(--text-muted); }
.admin-session-score-rojo { color: var(--team-rojo); }

.admin-session-date {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
}

.admin-no-sessions {
    padding: 1rem;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 600px) {
    .admin-container { flex-direction: column; padding: 1rem; }
    .sidebar { flex: none; width: 100%; }
}

/* =========================================================
   HOST VIEW
   ========================================================= */
body.host-page { overflow-y: auto; }

.label-edit-container .bi-pencil { opacity: 0; transition: opacity 0.15s; }
.label-edit-container:hover .bi-pencil { opacity: 0.6; }

.host-share-section { margin-top: 1rem; }

.host-share-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

.host-share-item { text-align: center; }

.host-share-url {
    font-size: 0.65rem;
    word-break: break-all;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.3rem 0.4rem;
    border-radius: 0.3rem;
}

.host-share-qr {
    width: 90px;
    height: 90px;
    background: white;
    padding: 0.25rem;
    border-radius: 0.3rem;
    display: none;
    margin: 0 auto;
}

.host-share-copy {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.3rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0.4rem;
    font-size: 0.7rem;
    transition: 0.15s;
}

.host-share-copy:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.host-share-copy.copied { color: var(--correct); border-color: var(--correct); }

.host-scores-header { display: flex; flex: 1; justify-content: flex-end; gap: 0.75rem; align-items: center; }

.host-score-block { text-align: center; }

.host-label-edit {
    position: relative;
    display: inline-block;
}

.host-label-text {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: text;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}

.host-label-text.azul { color: var(--team-azul); }
.host-label-text.rojo { color: var(--team-rojo); }

.host-label-pencil {
    position: absolute;
    top: -4px;
    right: -14px;
    font-size: 0.4rem;
    color: rgba(255, 255, 255, 0.2);
}

.host-score-number {
    font-size: 1.1rem;
    font-weight: 900;
}

.host-score-number.azul { color: var(--team-azul); }
.host-score-number.rojo { color: var(--team-rojo); }

.host-vs { color: var(--text-muted); }

.host-start-btn {
    font-size: 1.1rem;
    padding: 1.1rem;
    display: none;
}

.host-question-card { padding: 0.875rem 1.1rem; }

.host-question-text {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
}

.host-buzz-indicator {
    display: none;
    background: rgba(255, 215, 0, 0.1);
    border: 1.5px solid var(--gold);
    border-radius: 0.6rem;
    padding: 0.6rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
}

.host-control-card { padding: 1rem; }

.host-answers-grid { margin-bottom: 1rem; }

.host-actions-section { margin-top: 1rem; }

.host-strike-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }

.host-timer-section { margin-top: 1rem; }

.host-timer-display { display: flex; align-items: center; gap: 0.75rem; }

.host-timer-input {
    width: 60px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
}

.host-timer-btns { display: flex; gap: 0.5rem; }

.host-info-section { margin-top: 1rem; }

.host-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.host-status-badge.lobby { background: rgba(0, 200, 255, 0.15); color: var(--team-azul); }
.host-status-badge.playing { background: rgba(0, 230, 118, 0.15); color: var(--correct); }
.host-status-badge.ended { background: rgba(255, 45, 120, 0.15); color: var(--team-rojo); }

.host-game-status { margin-top: 1rem; }

.host-countdown {
    font-size: 4rem;
    font-weight: 900;
    text-align: center;
    animation: countdown-pulse 1s ease infinite;
}

.host-strike-btn { flex: 1; font-size: 1.2rem; padding: 0.75rem; }

.host-knockout-warning {
    padding: 1rem;
    border-color: var(--strike);
    background: rgba(255, 82, 82, 0.1);
}

.host-knockout-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--strike);
    text-align: center;
}

.host-knockout-desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.host-btn-text { line-height: 1.1; }
.host-btn-sub { font-weight: 500; opacity: 0.8; }

.host-timer-stop-btn { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.host-section-title-small { font-size: 0.85rem; }

.host-strike-rm-actions { display: flex; gap: 1rem; }

.host-strike-rm-btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.5rem;
    opacity: 0.8;
}

.host-strike-rm-btn.azul { border-color: var(--team-azul); color: var(--team-azul); }
.host-strike-rm-btn.rojo { border-color: var(--team-rojo); color: var(--team-rojo); }

.host-no-players { color: var(--text-muted); font-size: 0.85rem; }

.host-share-label {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.host-share-label.azul { color: var(--team-azul); }
.host-share-label.rojo { color: var(--team-rojo); }

.host-share-icon { font-size: 0.7rem; }

.host-share-url-row {
    display: flex;
    gap: 0.25rem;
    align-items: stretch;
}

.host-share-url { flex: 1; min-width: 0; }

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

@media (max-width: 600px) {
    .host-share-grid { grid-template-columns: 1fr; }
    .admin-container { flex-direction: column; padding: 1rem; }
    .sidebar { flex: none; width: 100%; }
}

/* === Color picker swatch backgrounds (replacing inline styles) === */
.cp-swatch[data-color="#00c8ff"] { background: #00c8ff; }
.cp-swatch[data-color="#ff2d78"] { background: #ff2d78; }
.cp-swatch[data-color="#00e676"] { background: #00e676; }
.cp-swatch[data-color="#ffd700"] { background: #ffd700; }
.cp-swatch[data-color="#ff9800"] { background: #ff9800; }
.cp-swatch[data-color="#ce93d8"] { background: #ce93d8; }
.cp-swatch[data-color="#ffffff"] { background: #ffffff; }
.cp-swatch[data-color="#9e9e9e"] { background: #9e9e9e; }

/* =========================================================
   PREMIUM DISPLAY STYLES (NO EMOJIS, NEON UI)
   ========================================================= */

/* Header & Timer */
.premium-badge {
    background: transparent;
    border: 2px solid rgba(0,200,255,0.4);
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 0 20px rgba(0,200,255,0.2), inset 0 0 10px rgba(0,200,255,0.2);
    letter-spacing: 0.05em;
    backdrop-filter: blur(5px);
}

.premium-timer {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}
.premium-timer .timer-ring-bg { fill: none; stroke: rgba(0,200,255,0.1); stroke-width: 6; }
.premium-timer .timer-ring-fg { fill: none; stroke: var(--team-azul); stroke-width: 6; stroke-dasharray: 251; filter: drop-shadow(0 0 5px var(--team-azul)); }
.premium-timer.urgent .timer-ring-fg { stroke: var(--strike); filter: drop-shadow(0 0 10px var(--strike)); animation: pulse-red 1s infinite; }

/* Answers Board */
.premium-board {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: 0.75rem !important;
}
.premium-board .answer-row {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}
.premium-board .answer-row.revealed {
    border-color: rgba(0,200,255,0.3);
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,200,255,0.05) 100%);
    box-shadow: 0 0 15px rgba(0,200,255,0.1);
}
.answer-progress-bar {
    position: absolute;
    top: 50%;
    left: 4.5rem;
    transform: translateY(-50%);
    height: 12px;
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
    max-width: calc(100% - 10rem);
}
.premium-board .answer-text, .premium-board .answer-votes {
    position: relative;
    z-index: 1;
}

/* Colors for answers */
.color-1 { color: #f1c40f; } .answer-progress-bar.color-1 { background: linear-gradient(90deg, #f1c40f, #f39c12); box-shadow: 0 0 10px rgba(241,196,15,0.5); }
.color-2 { color: #9b59b6; } .answer-progress-bar.color-2 { background: linear-gradient(90deg, #9b59b6, #8e44ad); box-shadow: 0 0 10px rgba(155,89,182,0.5); }
.color-3 { color: #00c8ff; } .answer-progress-bar.color-3 { background: linear-gradient(90deg, #00c8ff, #0099ff); box-shadow: 0 0 10px rgba(0,200,255,0.5); }
.color-4 { color: #2ecc71; } .answer-progress-bar.color-4 { background: linear-gradient(90deg, #2ecc71, #27ae60); box-shadow: 0 0 10px rgba(46,204,113,0.5); }
.color-5 { color: #e74c3c; } .answer-progress-bar.color-5 { background: linear-gradient(90deg, #e74c3c, #c0392b); box-shadow: 0 0 10px rgba(231,76,60,0.5); }

.premium-board .answer-num {
    background: rgba(255,255,255,0.05);
    border: 2px solid currentColor;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow: inset 0 0 10px currentColor, 0 0 10px currentColor;
    text-shadow: none;
}
.premium-board .answer-row.revealed .answer-text {
    font-size: 1.5rem;
    font-weight: 600;
}
.premium-board .answer-row.revealed .answer-votes {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    margin-left: auto;
}

/* Team Score Cards Overrides */
.premium-card {
    background: rgba(0,0,0,0.4) !important;
    border: 2px solid rgba(255,255,255,0.1) !important;
    border-radius: var(--radius) !important;
    backdrop-filter: blur(10px);
}
.premium-card.azul { border-color: rgba(0,200,255,0.3) !important; box-shadow: 0 0 30px rgba(0,200,255,0.1) !important; }
.premium-card.rojo { border-color: rgba(255,45,120,0.3) !important; box-shadow: 0 0 30px rgba(255,45,120,0.1) !important; }

