:root {
    --void: #070707;
    --ink: #f4f4f2;
    --muted: #9a968e;
    --line: rgba(255, 255, 255, 0.1);
    --panel: #121212;
    --panel-2: #1a1a1a;
    --heat: #ff5a00;
    --heat-deep: #c94300;
    --gold: #ff5a00;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background:
        radial-gradient(1200px 500px at 80% -10%, rgba(255, 90, 0, 0.18), transparent 55%),
        radial-gradient(900px 400px at 0% 20%, rgba(255, 255, 255, 0.04), transparent 50%),
        var(--void);
    color: var(--ink);
    font-family: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.45;
    min-height: 100vh;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.preview-bar {
    background: linear-gradient(90deg, var(--heat), #ff8a3d 50%, var(--heat));
    color: #120800;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 0.45rem 0.9rem;
}

.top {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 58px;
    padding: 0.4rem 1rem;
    padding-top: max(0.4rem, env(safe-area-inset-top, 0px));
    background: rgba(7, 7, 7, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.manage-link {
    margin-left: auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.brand img {
    height: 36px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 90, 0, 0.35));
}

.top-nav {
    display: none;
    gap: 0.15rem;
    margin-left: 0.5rem;
}

.top-nav a,
.manage-link {
    color: rgba(244, 244, 242, 0.72);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.45rem 0.7rem;
    border-radius: 4px;
    transition: color 160ms ease, background 160ms ease;
}

.top-nav a:hover,
.manage-link:hover {
    color: #fff;
}

.top-nav a.is-on,
.manage-link.is-on {
    background: var(--heat);
    color: #120800;
}

.manage-link { margin-left: auto; }

main {
    width: min(720px, 100%);
    margin: 0 auto;
    padding-bottom: calc(5.2rem + var(--safe-bottom));
}

.hero {
    position: relative;
    height: min(72vh, 560px);
    min-height: 320px;
    overflow: hidden;
    background: #111;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.08) brightness(0.72);
    transform: scale(1.04);
    animation: heroDrift 18s ease-in-out infinite alternate;
}

@keyframes heroDrift {
    from { transform: scale(1.04) translateY(0); }
    to { transform: scale(1.1) translateY(-1.5%); }
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 7, 7, 0.15) 0%, rgba(7, 7, 7, 0.35) 40%, rgba(7, 7, 7, 0.92) 100%),
        linear-gradient(90deg, rgba(255, 90, 0, 0.18), transparent 42%);
    pointer-events: none;
}

.hero-copy {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 1;
    padding: 1.5rem 1.15rem 1.4rem;
    color: white;
    animation: riseIn 700ms ease both;
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.kicker {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--heat);
}

.hero h1,
.page-title {
    font-family: "Bebas Neue", "Oswald", Impact, sans-serif;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 0.92;
    margin: 0;
}

.hero h1 {
    font-size: clamp(4.2rem, 16vw, 7rem);
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

.hero-copy p:not(.kicker) {
    margin: 0.55rem 0 1.1rem;
    max-width: 22rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.02rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.sheet {
    padding: 1.35rem 1.15rem 2rem;
    animation: riseIn 650ms ease both;
    animation-delay: 80ms;
}

.sheet > h2,
.sheet .section-label {
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: 1.85rem;
    letter-spacing: 0.06em;
    margin: 1.6rem 0 0.75rem;
    color: #fff;
}

.page-title {
    font-size: clamp(2.8rem, 10vw, 4.2rem);
    margin: 0.2rem 0 0.35rem;
}

.lead {
    margin: 0 0 1rem;
    color: var(--muted);
    max-width: 34rem;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: var(--heat);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}

.cta,
.gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.7rem 1.15rem;
    background: var(--heat);
    color: #120800;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.82rem;
    border-radius: 4px;
    border: none;
    box-shadow: 0 10px 28px rgba(255, 90, 0, 0.28);
    transition: transform 160ms ease, background 160ms ease;
}

.cta:hover,
.gold:hover {
    background: #ff7a2e;
    transform: translateY(-1px);
}

.gold-dark,
.cta-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: none;
    margin-left: 0;
}

.gold-dark:hover,
.cta-ghost:hover {
    border-color: var(--heat);
    color: var(--heat);
    background: transparent;
}

.award-card {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line);
    border-left: 3px solid var(--heat);
    border-radius: 6px;
    padding: 1rem 1.1rem;
    margin: 0.65rem 0 1.1rem;
}

.award-grid {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.award-kicker {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--heat);
}

.award-card strong {
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: 1.7rem;
    font-weight: 400;
    letter-spacing: 0.03em;
}

.award-meta {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.season-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.75rem 0 1.1rem;
}

.season-chip {
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.45rem 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: transparent;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.season-chip:hover,
.season-chip.is-on {
    color: #120800;
    background: var(--heat);
    border-color: var(--heat);
}

.predict-box {
    margin-top: 0.9rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
}

.predict-line {
    margin: 0.2rem 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.predict-edge {
    margin: 0.55rem 0 0;
    font-weight: 800;
    color: var(--ink);
    font-size: 0.98rem;
}

.predict-box a {
    color: var(--heat);
    text-decoration: none;
    font-weight: 700;
}

.predict-box a:hover {
    text-decoration: underline;
}

.standings-row {
    display: grid;
    grid-template-columns: 2rem 40px 1fr auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.2rem;
    border-bottom: 1px solid var(--line);
}

.award-note {
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
}

.matchup-card {
    position: relative;
    overflow: hidden;
}

.matchup-card::before {
    content: "";
    position: absolute;
    inset: auto -20% -40% auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 90, 0, 0.28), transparent 70%);
    pointer-events: none;
}

.matchup-sides {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
}

.matchup-side {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    text-align: center;
}

.matchup-side img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #000;
}

.matchup-sides .vs {
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    color: var(--heat);
}

.tow-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.tow-row img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.team-list,
.roster-list,
.standings-list,
.schedule-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.team-list a,
.standings-list a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    min-height: 72px;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.55rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 6px;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.team-list a:hover,
.standings-list a:hover {
    border-color: rgba(255, 90, 0, 0.55);
    background: rgba(255, 90, 0, 0.08);
    transform: translateX(2px);
}

.team-list img,
.standings-list img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}

.logo-fallback {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: #000;
    color: var(--heat);
    display: grid;
    place-items: center;
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: 1.7rem;
    border: 1px solid var(--line);
}

.team-meta {
    display: grid;
    gap: 0.1rem;
}

.team-meta strong,
.standings-list strong,
.sched-match strong,
.roster-list strong {
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    font-weight: 400;
}

.team-meta span,
.record {
    color: var(--muted);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.standings-list .rank {
    width: 1.6rem;
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: 1.35rem;
    color: var(--heat);
}

.standings-list .record {
    margin-left: auto;
    color: #fff;
}

.team-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.85rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.team-head-logo {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #000;
}

.roster-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
}

.roster-list li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 48px;
    padding: 0.45rem 0.55rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 4px;
}

.roster-list .jersey {
    min-width: 2.4rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: #120800;
    background: var(--heat);
    border-radius: 3px;
    font-variant-numeric: tabular-nums;
}

.schedule-list li {
    padding: 0.95rem 0.85rem;
    margin-bottom: 0.55rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.sched-when {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--heat);
}

.sched-match {
    margin: 0.35rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.55rem;
    align-items: baseline;
}

.sched-match span { color: var(--muted); font-weight: 700; }

.rules-block ul {
    margin: 0.4rem 0 1.25rem;
    padding-left: 1.2rem;
}

.rules-block li { margin-bottom: 0.45rem; color: rgba(244, 244, 242, 0.86); }

.empty {
    color: var(--muted);
    margin: 1rem 0;
}

.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(7, 7, 7, 0.96);
    border-top: 1px solid var(--line);
    padding: 0.35rem 0.25rem calc(0.4rem + var(--safe-bottom));
    z-index: 6;
}

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

.tabbar a {
    color: rgba(255, 255, 255, 0.48);
    text-decoration: none;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    min-height: 44px;
    display: grid;
    place-items: center;
}

.tabbar a.is-on { color: var(--heat); }

@media (min-width: 640px) {
    .award-grid { grid-template-columns: 1fr 1fr; }
    .roster-list { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 800px) {
    .top-nav { display: flex; }
    .tabbar { display: none; }
    main {
        width: 100%;
        max-width: none;
        margin: 0;
        padding-bottom: 3.5rem;
    }
    .hero {
        height: min(78vh, 640px);
        min-height: 420px;
    }
    .hero-copy {
        padding: 2.5rem clamp(1.5rem, 6vw, 4.5rem) 2.4rem;
        max-width: 1120px;
        margin: 0 auto;
        left: 0;
        right: 0;
        width: 100%;
        box-sizing: border-box;
    }
    .sheet {
        width: min(1120px, 100%);
        margin: 0 auto;
        padding: 2rem clamp(1.5rem, 4vw, 2.5rem) 3.5rem;
    }
    .page-title { font-size: 4.4rem; }
    .lead { font-size: 1.12rem; max-width: 38rem; }
    .team-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .team-list li { margin: 0; }
    .schedule-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .schedule-list li { margin: 0; }
}

@media (min-width: 1100px) {
    .team-list { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .hero img,
    .hero-copy,
    .sheet {
        animation: none !important;
    }
}
