html { font-size: 14px; }

@media (min-width: 768px) {
    html { font-size: 16px; }
}

body {
    margin-bottom: 0;
}

/* ---------------- Panel administrativo ---------------- */

.tarjeta-indicador {
    border: 0;
    border-left: 4px solid var(--bs-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.tarjeta-indicador .valor {
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.1;
}

.tarjeta-indicador .etiqueta {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--bs-secondary-color);
}

.codigo-sesion {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.05rem;
    letter-spacing: .18em;
    font-weight: 600;
}

.codigo-sesion-grande {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: clamp(2.4rem, 9vw, 4.5rem);
    letter-spacing: .22em;
    font-weight: 700;
    line-height: 1;
}

/* ---------------- Flujo publico del participante ---------------- */

.pcsan-publico {
    min-height: 100vh;
    background: linear-gradient(160deg, #1d2b64 0%, #3a1c71 55%, #5b247a 100%);
}

.pcsan-publico-wrap {
    min-height: 100vh;
}

.pcsan-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

/* Botones de respuesta tipo Kahoot: grandes, tocables con el pulgar */
.btn-opcion {
    display: flex;
    align-items: center;
    gap: .9rem;
    width: 100%;
    min-height: 74px;
    padding: 1rem 1.15rem;
    margin-bottom: .75rem;
    border: 0;
    border-radius: .85rem;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    transition: transform .08s ease, filter .15s ease;
}

.btn-opcion:active { transform: scale(.985); }
.btn-opcion:disabled { opacity: .55; }

.btn-opcion .letra {
    flex: 0 0 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border-radius: .5rem;
    background: rgba(255, 255, 255, .22);
    font-weight: 700;
}

.opcion-0 { background: #e21b3c; }
.opcion-1 { background: #1368ce; }
.opcion-2 { background: #d89e00; }
.opcion-3 { background: #26890c; }
.opcion-4 { background: #0aa3a3; }
.opcion-5 { background: #864cbf; }

.btn-opcion.correcta {
    outline: 4px solid #26890c;
    filter: saturate(1.2);
}

.btn-opcion.incorrecta {
    filter: grayscale(.75);
}

.barra-tiempo {
    height: 12px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .25);
    overflow: hidden;
}

.barra-tiempo > span {
    display: block;
    height: 100%;
    background: #ffd166;
    transition: width .25s linear;
}

.reloj {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.puesto-1 { color: #d4af37; }
.puesto-2 { color: #9ca3af; }
.puesto-3 { color: #b87333; }

/* ---------------- Tablero de participantes en vivo ---------------- */

/* Rejilla que se acomoda sola: con 5 participantes se ven 5 tarjetas
   anchas, con 200 se compactan sin barra horizontal. */
.tablero-vivo {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: .75rem;
}

.participante-vivo {
    border: 1px solid var(--bs-border-color);
    border-left: 4px solid var(--bs-secondary-color);
    border-radius: .5rem;
    padding: .6rem .75rem;
    min-width: 0;            /* permite que text-truncate funcione */
    background: var(--bs-body-bg);
}

/* El borde izquierdo es el que se lee de un vistazo desde lejos. */
.participante-vivo.ritmo-RESPONDIO   { border-left-color: var(--bs-success); }
.participante-vivo.ritmo-PENSANDO    { border-left-color: var(--bs-warning); }
.participante-vivo.ritmo-TERMINO     { border-left-color: var(--bs-dark); }
.participante-vivo.ritmo-AL_DIA      { border-left-color: var(--bs-primary); }
.participante-vivo.ritmo-REZAGADO    { border-left-color: var(--bs-danger); }
.participante-vivo.ritmo-SIN_EMPEZAR { border-left-color: var(--bs-border-color); }
