/* ============================================================
   PrimeFlix Live — Dark Neon
   ============================================================ */

:root {
    /* Base */
    --bg:            #050b14;
    --bg-elev:       #0b1523;
    --bg-elev-2:     #101f31;
    --border:        #1a2b42;
    --border-hi:     #23405f;

    /* Text */
    --fg:            #e6f0f8;
    --fg-dim:        #8ba1b8;
    --fg-mute:       #536477;

    /* Neon accents */
    --neon:          #ff8000;   /* laranja neon principal */
    --neon-glow:     rgba(255, 128, 0, 0.4);
    --live:          #ff2d55;   /* vermelho ao vivo */
    --live-glow:     rgba(255, 45, 85, 0.4);
    --gold:          #ffd166;   /* placar vencedor */
    --gold-glow:     rgba(255, 209, 102, 0.25);

    /* Motion */
    --ease:          cubic-bezier(.2, .8, .2, 1);
    --dur:           220ms;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

body {
    background:
        radial-gradient(1200px 600px at 20% -10%, rgba(255, 128, 0, 0.09), transparent 60%),
        radial-gradient(900px 500px at 100% 100%, rgba(255, 45, 85, 0.06), transparent 60%),
        var(--bg);
}

a { color: var(--neon); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(5, 11, 20, 0.85);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand__glyph {
    color: var(--neon);
    font-size: 20px;
    text-shadow: 0 0 12px var(--neon-glow);
}
.brand__name { font-size: 17px; letter-spacing: 0.3px; }
.brand__dot  { color: var(--neon); margin: 0 4px; }
.brand__back {
    color: var(--fg-dim);
    padding: 6px 10px;
    border-radius: 8px;
    transition: all var(--dur) var(--ease);
    text-decoration: none;
    font-size: 18px;
}
.brand__back:hover { background: var(--bg-elev); color: var(--fg); text-decoration: none; }

.topbar__pulse {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 45, 85, 0.1);
    border: 1px solid rgba(255, 45, 85, 0.25);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}
.pulse__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 10px var(--live-glow);
    animation: pulse 1.6s ease-in-out infinite;
}
.pulse__label { color: var(--live); }
.pulse__timer { color: var(--fg-dim); font-variant-numeric: tabular-nums; }

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

/* ============================================================
   MAIN
   ============================================================ */
main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    margin-bottom: 28px;
    padding: 24px 0 20px;
    border-bottom: 1px solid var(--border);
}
.hero--compact { padding: 16px 0 12px; }

.hero__stat {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 6px;
}
.stat__num {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    color: var(--neon);
    text-shadow: 0 0 24px var(--neon-glow);
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
}
.hero--compact .stat__num { font-size: 42px; }

.stat__unit {
    font-size: 16px;
    color: var(--fg-dim);
    font-weight: 500;
}
.hero__sub {
    color: var(--fg-mute);
    font-size: 14px;
}
.hero__sep { margin: 0 8px; }

/* ============================================================
   SPORTS NAV (chips)
   ============================================================ */
.sportsnav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 28px;
    scrollbar-width: none;
}
.sportsnav::-webkit-scrollbar { display: none; }

.sportsnav__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--fg-dim);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: all var(--dur) var(--ease);
}
.sportsnav__chip:hover {
    background: var(--bg-elev-2);
    border-color: var(--border-hi);
    color: var(--fg);
    text-decoration: none;
    transform: translateY(-1px);
}
.sportsnav__chip.is-active {
    background: linear-gradient(135deg, rgba(255, 128, 0, 0.18), rgba(255, 128, 0, 0.05));
    border-color: var(--neon);
    color: var(--fg);
    box-shadow: 0 0 20px rgba(255, 128, 0, 0.18);
}
.chip__emoji { font-size: 16px; }
.chip__count {
    background: rgba(0, 0, 0, 0.35);
    color: var(--fg-dim);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.sportsnav__chip.is-active .chip__count {
    background: var(--neon);
    color: var(--bg);
}

/* ============================================================
   GAMES GRID
   ============================================================ */
.games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.game {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px 12px;
    transition: all var(--dur) var(--ease);
    position: relative;
    overflow: hidden;
}
.game:hover {
    border-color: var(--border-hi);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.game--live {
    border-color: rgba(255, 45, 85, 0.25);
}
.game--live::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--live), transparent);
    box-shadow: 0 0 12px var(--live-glow);
}

.game__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--fg-mute);
    margin-bottom: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-weight: 600;
}
.game__sport-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--neon);
    font-weight: 700;
}
.game__tour {
    flex: 1;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--fg-mute);
    text-transform: none;
    font-weight: 500;
}
.game__country {
    color: var(--fg-dim);
    margin-right: 6px;
    padding-right: 6px;
    border-right: 1px solid var(--border);
}
.game__time {
    color: var(--fg-dim);
    font-variant-numeric: tabular-nums;
}

.game__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;
}

.team {
    display: grid;
    grid-template-columns: 4px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 6px 0;
    position: relative;
}
.team__bar {
    width: 4px;
    height: 26px;
    border-radius: 2px;
    background: var(--team-color, var(--border-hi));
    box-shadow: 0 0 8px var(--team-color, transparent);
    opacity: 0.7;
}
.games:not(.games--detailed) .team__bar { display: none; }
.games:not(.games--detailed) .team { grid-template-columns: 1fr auto; gap: 12px; }

.team__name {
    font-size: 15px;
    font-weight: 500;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.team__score {
    font-size: 22px;
    font-weight: 700;
    color: var(--fg-dim);
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: right;
    transition: color var(--dur) var(--ease);
}
.team.is-winning .team__name { color: #fff; font-weight: 600; }
.team.is-winning .team__score {
    color: var(--gold);
    text-shadow: 0 0 12px var(--gold-glow);
}

/* Score change flash */
.team__score.flash {
    animation: scoreFlash 900ms ease-out;
}
@keyframes scoreFlash {
    0%   { color: var(--neon); text-shadow: 0 0 16px var(--neon-glow); transform: scale(1.15); }
    100% { transform: scale(1); }
}

.game__footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-elev-2);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: var(--fg-dim);
    letter-spacing: 0.4px;
}
.badge--live {
    background: rgba(255, 45, 85, 0.12);
    color: var(--live);
    border: 1px solid rgba(255, 45, 85, 0.25);
}
.badge__dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--live);
    animation: pulse 1.6s ease-in-out infinite;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    color: var(--fg-mute);
}
.empty__icon {
    font-size: 48px;
    color: var(--border-hi);
    margin-bottom: 12px;
    opacity: 0.6;
}
.empty__title {
    font-size: 17px;
    color: var(--fg-dim);
    margin: 0 0 6px;
}
.empty__sub {
    font-size: 13px;
    margin: 0;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.pagefoot {
    max-width: 1280px;
    margin: 40px auto 20px;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--fg-mute);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.3px;
}
.status-pill--ok {
    background: rgba(255, 128, 0, 0.1);
    color: var(--neon);
    border: 1px solid rgba(255, 128, 0, 0.25);
}
.status-pill--warn {
    background: rgba(255, 209, 102, 0.1);
    color: var(--gold);
    border: 1px solid rgba(255, 209, 102, 0.25);
}
.status-pill--err {
    background: rgba(255, 45, 85, 0.1);
    color: var(--live);
    border: 1px solid rgba(255, 45, 85, 0.25);
}
.status-pill__dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    main { padding: 20px 14px 60px; }
    .topbar { padding: 12px 16px; }
    .stat__num { font-size: 44px; }
    .games { grid-template-columns: 1fr; gap: 10px; }
    .pagefoot { flex-direction: column; gap: 8px; text-align: center; }
    .sportsnav__chip { padding: 8px 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
