:root {
    --green:      #00a651;
    --green-deep: #006837;
    --yellow:     #ffd500;
    --yellow-soft: rgba(255, 213, 0, 0.14);
    --blue:       #1c2d6b;
    --ink:        #051208;
    --text:       #f3f7f3;
    --muted:      rgba(243, 247, 243, 0.62);
    --surface:    rgba(255, 255, 255, 0.06);
    --border:     rgba(255, 255, 255, 0.12);
    --red:        #ff5a4d;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background:
        radial-gradient(1100px 600px at 50% -15%, rgba(255, 213, 0, 0.16), transparent 55%),
        radial-gradient(900px 700px at 100% 120%, rgba(0, 166, 81, 0.30), transparent 55%),
        linear-gradient(160deg, #073d22 0%, var(--ink) 70%);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Chuva de emojis (sutil) ---------- */
#emoji-rain { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.falling-emoji {
    position: absolute;
    top: -60px;
    opacity: 0.12;
    filter: saturate(1.2);
    animation: fall linear infinite;
}
@keyframes fall { to { transform: translateY(112vh) rotate(300deg); } }

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1180px;
    display: grid;
    gap: 40px 56px;
    align-items: start;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "header   header"
        "next     timeline"
        "footer   footer";
}
.header         { grid-area: header; }
.next-match     { grid-area: next; }
.timeline-section { grid-area: timeline; }
.footer         { grid-area: footer; }

/* ---------- Header ---------- */
.header { text-align: center; }

.eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 16px;
}

.title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(2.8rem, 11vw, 5rem);
    line-height: 0.96;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.verdict { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 14px; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    padding: 10px 22px;
    border-radius: 999px;
    background: var(--yellow-soft);
    border: 1px solid rgba(255, 213, 0, 0.45);
    color: var(--yellow);
    transition: all 0.3s;
}
.status-badge.alive { background: rgba(0, 166, 81, 0.18); border-color: rgba(0, 166, 81, 0.55); color: #4fe09a; }
.status-badge.dead  { background: rgba(255, 90, 77, 0.16); border-color: rgba(255, 90, 77, 0.5); color: var(--red); }

.tagline {
    font-family: 'Bricolage Grotesque', sans-serif;
    color: var(--text);
    font-size: clamp(1.4rem, 4vw, 2.1rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    min-height: 1.3em;
    max-width: 22ch;
    text-wrap: balance;
    transition: opacity 0.3s;
}

.hexa-counter {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    margin-top: 2px;
}
.hexa-counter #hexa-time {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    color: var(--yellow);
    font-variant-numeric: tabular-nums;
}

/* ---------- Card próximo jogo ---------- */
.next-match {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 36px 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    position: sticky;
    top: 24px;
}

.next-label {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

#match-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    letter-spacing: -0.01em;
    line-height: 1.1;
}
#match-title span, #match-title b { color: var(--yellow); font-weight: 700; }

.subtitle { color: var(--muted); font-size: 0.95rem; margin-top: 10px; }

/* ---------- Medidor de perrengue ---------- */
.drama-meter { margin-top: 24px; text-align: left; }
.drama-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 8px;
}
.drama-head #drama-label { color: var(--yellow); white-space: nowrap; }
.drama-track {
    height: 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    overflow: hidden;
}
.drama-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--green), var(--yellow) 60%, var(--red));
    transition: width 1s ease;
}

/* ---------- Countdown ---------- */
#countdown { display: flex; justify-content: center; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

.time-box {
    flex: 1;
    min-width: 70px;
    max-width: 110px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 8px 14px;
}

.time-box span {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 9vw, 3.2rem);
    line-height: 1;
    display: block;
    font-variant-numeric: tabular-nums;
    color: var(--yellow);
}

.time-box p {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 10px;
}

.countdown-message {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 5vw, 1.9rem);
    color: var(--yellow);
    width: 100%;
}

/* ---------- Timeline ---------- */
.section-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
}

.timeline { display: flex; flex-direction: column; gap: 12px; }

.match-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--muted);
    border-radius: 16px;
    padding: 16px 18px;
    animation: slideIn 0.5s ease backwards;
}
.match-card.win  { border-left-color: var(--green); }
.match-card.draw { border-left-color: var(--yellow); }
.match-card.loss { border-left-color: var(--red); }
.match-card.live { border-left-color: var(--red); }
.match-card.upcoming { border-left-color: var(--blue); border-left-style: dashed; }

@keyframes slideIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }

.match-emoji { font-size: 1.9rem; flex-shrink: 0; line-height: 1; }

.match-info { flex: 1; min-width: 0; }
.match-info .matchup { font-weight: 600; font-size: 1.05rem; }
.match-info .stage {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 3px;
}
.match-info .zoeira { font-size: 0.9rem; color: var(--muted); margin-top: 5px; font-style: italic; }

.match-score {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.match-score.pending {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
    text-align: right;
    line-height: 1.35;
    font-style: normal;
}
.match-card.live .match-score { color: var(--yellow); }

/* ---------- Eliminado ---------- */
.eliminated .next-match { border-color: rgba(255, 90, 77, 0.4); }

/* ---------- Footer ---------- */
.footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
}

/* ---------- Empilha no tablet/celular ---------- */
@media (max-width: 860px) {
    body { align-items: flex-start; padding: 40px 22px; }
    .container {
        grid-template-columns: 1fr;
        grid-template-areas: "header" "next" "timeline" "footer";
        gap: 36px;
        max-width: 620px;
    }
    .next-match { position: static; top: auto; }
}

@media (max-width: 480px) {
    body { padding: 32px 16px; }
    .next-match { padding: 28px 20px; }
    #countdown { gap: 8px; }
    .time-box { min-width: 62px; padding: 14px 6px 12px; }
    .match-emoji { font-size: 1.6rem; }
}
