/* ==========================================================
   DESAFÍO BOMBERIL 2026 - PANTALLAS PÚBLICAS
   Tema institucional CBM para proyección 3:2 / 1.5m x 1m
   ========================================================== */

:root {
    --p-black: #102A33;
    --p-black-2: #173B46;
    --p-red: #244D59;
    --p-red-dark: #173B46;
    --p-orange: #426E77;
    --p-gold: #C8D1D2;
    --p-white: #FFFFFF;
    --p-bg: #F2F6F6;
    --p-border: #AEBFC2;
    --p-green: #198754;
    --p-text: #102A33;
    --p-muted: #536A70;
    --p-accent: #315F6B;
    --p-silver-light: #E5ECEC;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--p-bg);
    color: var(--p-text);
    font-family: "Segoe UI", Arial, sans-serif;
}

.public-screen {
    min-height: 100vh;
    padding: clamp(18px, 2vw, 34px);
    background: linear-gradient(180deg, rgba(66,110,119,.10), rgba(66,110,119,0) 260px), var(--p-bg);
    color: var(--p-text);
}

.public-header {
    min-height: 118px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--p-black), var(--p-black-2));
    color: white;
    border-bottom: 7px solid var(--p-accent);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(16,42,51,.18);
}

.public-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 22px;
}

    .public-brand img {
        width: 92px;
        height: 92px;
        object-fit: contain;
    }

    .public-brand div {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .public-brand span {
        color: var(--p-gold);
        font-size: clamp(18px, 1.5vw, 27px);
        font-weight: 950;
        letter-spacing: 2px;
    }

    .public-brand strong {
        color: white;
        font-size: clamp(30px, 2.6vw, 46px);
        line-height: 1.05;
        font-weight: 950;
    }

.public-header-tag,
.round-chip {
    padding: 13px 22px;
    border-radius: 999px;
    background: var(--p-gold);
    color: var(--p-black);
    font-size: clamp(17px, 1.25vw, 23px);
    font-weight: 950;
    letter-spacing: .7px;
    text-align: center;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-radius: 999px;
    background: var(--p-accent);
    color: white;
    font-size: clamp(20px, 1.45vw, 27px);
    font-weight: 950;
}

    .live-pill span {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: white;
        animation: publicPulse 1.05s infinite;
    }

@keyframes publicPulse {
    50% {
        opacity: .2;
    }
}

.public-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding: 28px 8px 22px;
}

.eyebrow {
    color: var(--p-red-dark);
    font-size: clamp(18px, 1.35vw, 25px);
    font-weight: 950;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.public-title-row h1 {
    margin: 5px 0 0;
    font-size: clamp(48px, 5vw, 82px);
    font-weight: 950;
    line-height: .96;
    color: var(--p-black);
}

.progress-summary {
    min-width: 230px;
    text-align: right;
}

    .progress-summary strong {
        display: block;
        color: var(--p-accent);
        font-size: clamp(44px, 4vw, 68px);
        font-weight: 950;
        line-height: 1;
    }

    .progress-summary span {
        color: var(--p-muted);
        font-size: clamp(18px, 1.25vw, 24px);
        font-weight: 850;
    }

.competition-stage {
    padding: clamp(28px, 3vw, 48px);
    border-radius: 22px;
    background: white;
    border: 2px solid var(--p-border);
    box-shadow: 0 12px 36px rgba(16,42,51,.10);
}

.stage-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.stage-status,
.encounter-number {
    font-size: clamp(19px, 1.4vw, 27px);
    font-weight: 950;
    letter-spacing: .9px;
}

.stage-status {
    padding: 11px 20px;
    border-radius: 999px;
}

    .stage-status.live {
        background: var(--p-accent);
        color: white;
    }

    .stage-status.waiting {
        background: var(--p-gold);
        color: var(--p-black);
    }

.encounter-number {
    color: var(--p-muted);
}

.competitors-grid {
    display: grid;
    grid-template-columns: 1fr 130px 1fr;
    align-items: center;
    gap: 26px;
}

    .competitors-grid.single {
        grid-template-columns: minmax(0, 1fr);
        max-width: 1100px;
        margin: 0 auto;
    }

.competitor-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px;
    text-align: center;
    border-radius: 20px;
    border: 4px solid var(--p-black);
    background: #fff;
}

.competitor-label {
    margin-bottom: 18px;
    color: var(--p-accent);
    font-size: clamp(19px, 1.35vw, 26px);
    font-weight: 950;
    letter-spacing: 1.3px;
}

.competitor-card h2 {
    margin: 0;
    font-size: clamp(46px, 4.8vw, 78px);
    font-weight: 950;
    line-height: 1.02;
    color: var(--p-black);
}

.versus {
    color: var(--p-accent);
    font-size: clamp(48px, 5vw, 78px);
    font-weight: 1000;
    text-align: center;
}

.next-strip {
    display: grid;
    grid-template-columns: 270px 1fr;
    align-items: center;
    margin-top: 24px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--p-black);
    background: white;
}

.next-strip-title {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--p-black);
    color: var(--p-gold);
    font-size: clamp(18px, 1.35vw, 25px);
    font-weight: 950;
}

.next-strip-name {
    padding: 20px 28px;
    font-size: clamp(30px, 2.6vw, 45px);
    font-weight: 950;
}

    .next-strip-name span {
        margin: 0 18px;
        color: var(--p-accent);
        font-size: 1.1em;
    }

.public-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding: 16px 5px 5px;
    color: var(--p-muted);
    font-size: clamp(17px, 1.15vw, 22px);
    font-weight: 850;
}

.public-empty,
.public-message {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.public-empty-logo {
    width: min(300px, 35vw);
    margin-bottom: 24px;
}

.public-empty h1,
.public-message h2 {
    font-size: clamp(52px, 6vw, 92px);
    font-weight: 950;
}

.public-empty p,
.public-message p {
    color: var(--p-muted);
    font-size: clamp(27px, 2.5vw, 40px);
}

/* ================= PRÓXIMOS ================= */

.now-card {
    position: relative;
    padding: clamp(38px, 4vw, 65px);
    text-align: center;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--p-black), var(--p-black-2));
    color: white;
    border-bottom: 9px solid var(--p-accent);
    box-shadow: 0 14px 38px rgba(16,42,51,.20);
}

.now-badge {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--p-accent);
    color: white;
    font-size: clamp(20px, 1.4vw, 27px);
    font-weight: 950;
}

.now-number {
    margin-top: 22px;
    color: var(--p-gold);
    font-size: clamp(20px, 1.5vw, 28px);
    font-weight: 950;
    letter-spacing: 1.2px;
}

.now-card h2 {
    max-width: 1400px;
    margin: 14px auto 0;
    color: white;
    font-size: clamp(50px, 5.8vw, 92px);
    font-weight: 950;
    line-height: 1.04;
}

.solo-note {
    display: inline-block;
    margin-top: 24px;
    padding: 11px 18px;
    border: 2px solid var(--p-gold);
    border-radius: 9px;
    color: var(--p-gold);
    font-size: clamp(18px, 1.3vw, 25px);
    font-weight: 900;
}

.up-next-list {
    display: grid;
    gap: 15px;
    margin-top: 22px;
}

.up-next-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: stretch;
    overflow: hidden;
    border: 2px solid var(--p-border);
    border-radius: 16px;
    background: white;
    box-shadow: 0 5px 16px rgba(16,42,51,.07);
}

.queue-position {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--p-accent);
    color: white;
    font-size: 42px;
    font-weight: 1000;
}

.queue-content {
    display: flex;
    flex-direction: column;
    padding: 18px 24px;
}

    .queue-content span {
        color: var(--p-accent);
        font-size: clamp(17px, 1.15vw, 22px);
        font-weight: 950;
    }

    .queue-content strong {
        font-size: clamp(29px, 2.6vw, 44px);
        line-height: 1.1;
    }

/* ================= LLAVES ================= */

.world-bracket {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) 130px minmax(420px, .9fr);
    min-height: 650px;
    gap: 18px;
    align-items: center;
}

.bracket-column {
    min-width: 0;
}

    .bracket-column > h2 {
        margin-bottom: 16px;
        color: var(--p-black);
        font-size: clamp(26px, 2vw, 36px);
        font-weight: 950;
        letter-spacing: 1.3px;
    }

.classification-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.bracket-match {
    position: relative;
    border: 3px solid var(--p-black);
    border-radius: 14px;
    overflow: hidden;
    background: white;
}

.match-number {
    padding: 8px 13px;
    background: var(--p-black);
    color: var(--p-gold);
    font-size: clamp(16px, 1.05vw, 21px);
    font-weight: 950;
    letter-spacing: 1px;
}

.match-player {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 62px;
    padding: 13px 14px;
    border-top: 1px solid var(--p-border);
}

    .match-player span {
        overflow: hidden;
        color: var(--p-black);
        font-size: clamp(21px, 1.55vw, 30px);
        font-weight: 900;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .match-player strong {
        color: var(--p-accent);
        font-size: clamp(20px, 1.5vw, 29px);
        font-weight: 950;
        font-variant-numeric: tabular-nums;
    }

.match-solo {
    padding: 10px 14px;
    color: var(--p-accent);
    border-top: 1px solid var(--p-border);
    font-size: clamp(16px, 1.05vw, 21px);
    font-weight: 950;
}

.bracket-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--p-accent);
    font-size: 22px;
    font-weight: 950;
}

    .bracket-connector div {
        width: 4px;
        height: 145px;
        background: linear-gradient(var(--p-gold), var(--p-accent));
    }

    .bracket-connector span {
        padding: 13px 16px;
        border-radius: 999px;
        background: var(--p-accent);
        color: white;
        font-size: clamp(18px, 1.2vw, 24px);
    }

.final-match-card {
    padding: 26px;
    border: 5px solid var(--p-black);
    border-radius: 20px;
    background: white;
    box-shadow: 0 14px 34px rgba(16,42,51,.13);
}

.final-label {
    margin-bottom: 18px;
    color: var(--p-accent);
    text-align: center;
    font-size: clamp(22px, 1.7vw, 31px);
    font-weight: 1000;
    letter-spacing: 1.2px;
}

.final-player {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 105px;
    padding: 18px;
    border: 3px solid var(--p-border);
    border-radius: 14px;
}

    .final-player span {
        font-size: clamp(29px, 2.6vw, 45px);
        font-weight: 950;
    }

    .final-player strong {
        color: var(--p-accent);
        font-size: clamp(27px, 2.3vw, 40px);
        font-variant-numeric: tabular-nums;
    }

    .final-player.pending {
        color: #697C81;
        border-style: dashed;
    }

    .final-player.winner {
        border-color: var(--p-accent);
        background: #EAF1F2;
    }

.final-vs {
    padding: 12px;
    color: var(--p-accent);
    text-align: center;
    font-size: clamp(30px, 2.4vw, 42px);
    font-weight: 1000;
}

.winner-banner {
    margin-top: 18px;
    padding: 16px;
    border-radius: 12px;
    background: var(--p-gold);
    color: var(--p-black);
    text-align: center;
    font-size: clamp(27px, 2.5vw, 42px);
    font-weight: 1000;
}

/* ================= RESULTADOS ================= */

.results-public-table {
    overflow: hidden;
    border: 3px solid var(--p-black);
    border-radius: 18px;
    background: white;
    box-shadow: 0 10px 30px rgba(16,42,51,.10);
}

.results-head,
.result-row {
    display: grid;
    grid-template-columns: 120px minmax(330px, 1.7fr) 190px 155px 220px;
    align-items: center;
}

.results-head {
    padding: 18px 22px;
    background: var(--p-black);
    color: var(--p-gold);
    font-size: clamp(18px, 1.3vw, 25px);
    font-weight: 950;
}

.result-row {
    min-height: 88px;
    padding: 10px 22px;
    border-top: 1px solid var(--p-border);
    font-size: clamp(23px, 2vw, 34px);
}

    .result-row strong {
        font-size: clamp(27px, 2.4vw, 40px);
    }

    .result-row b {
        color: var(--p-accent);
        font-size: clamp(28px, 2.5vw, 42px);
        font-variant-numeric: tabular-nums;
    }

.result-position {
    color: var(--p-black);
    font-size: clamp(31px, 2.5vw, 43px);
    font-weight: 1000;
}

.rank-first {
    background: #E7EFF0;
}

.rank-second {
    background: #F1F4F4;
}

.rank-first .result-position {
    color: var(--p-accent);
}

.status-dq {
    color: #A52820;
}

.status-retired {
    color: #687A7F;
}

.results-empty {
    padding: 80px;
    color: var(--p-muted);
    text-align: center;
    font-size: clamp(32px, 2.7vw, 46px);
    font-weight: 850;
}

/* ================= CAMPEÓN ================= */

.champion-tag {
    background: var(--p-gold);
    color: var(--p-black);
}

.champion-screen {
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.champion-kicker {
    color: var(--p-accent);
    font-size: clamp(30px, 2.7vw, 46px);
    font-weight: 1000;
    letter-spacing: 6px;
}

.champion-trophy {
    margin: 8px 0;
    font-size: clamp(100px, 11vw, 175px);
    line-height: 1;
}

.champion-screen h1 {
    max-width: 1450px;
    margin: 0;
    color: var(--p-black);
    font-size: clamp(68px, 8vw, 126px);
    font-weight: 1000;
    line-height: .94;
}

.champion-time {
    margin-top: 25px;
    color: var(--p-accent);
    font-size: clamp(58px, 6vw, 96px);
    font-weight: 1000;
    font-variant-numeric: tabular-nums;
}

.runner-up {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 28px;
    padding: 17px 28px;
    border: 3px solid var(--p-border);
    border-radius: 999px;
    background: white;
}

    .runner-up span {
        color: var(--p-muted);
        font-size: 18px;
        font-weight: 950;
    }

    .runner-up strong,
    .runner-up b {
        font-size: clamp(25px, 2vw, 34px);
    }

    .runner-up b {
        color: var(--p-accent);
    }

.champion-category {
    margin-top: 22px;
    color: var(--p-muted);
    font-size: clamp(27px, 2.5vw, 42px);
    font-weight: 900;
}

/* Preparación / cronómetros públicos */
#preparationTimer,
.preparation-timer,
.public-timer,
.timer-public {
    color: var(--p-black);
    font-size: clamp(72px, 9vw, 150px) !important;
    font-weight: 1000 !important;
    line-height: .9;
    font-variant-numeric: tabular-nums;
}

.preparation-warning,
.timer-warning {
    color: #A56B00 !important;
}

.preparation-expired,
.timer-expired {
    color: #A52820 !important;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 980px) {
    .public-header {
        min-height: 92px;
    }

    .public-brand img {
        width: 72px;
        height: 72px;
    }

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

    .versus {
        padding: 4px;
    }

    .world-bracket {
        grid-template-columns: 1fr;
    }

    .bracket-connector {
        flex-direction: row;
    }

        .bracket-connector div {
            width: 100px;
            height: 4px;
        }

    .results-head,
    .result-row {
        grid-template-columns: 85px minmax(240px, 1.5fr) 145px 115px 170px;
    }
}
