/* ============================================================
   NFL Survivor — Styles
   Palette: "Sunday Night" — slate + electric orange + steel blue
   ============================================================ */

:root {
    /* Slate ramp, anchored at #2F3238 — dark grey, but not the near-black
       #1A1D24 this started as.
       #303339 was the target and it lands orange at 4.47:1, three hundredths
       under AA. #2F3238 is one step darker, indistinguishable by eye, and puts
       orange at 4.53:1 — so the banner subtext can stay orange instead of
       being forced to cream.
       THE GRADIENT RUNS DARKER, NOT LIGHTER. --primary is the LIGHTEST stop,
       so the banner's worst-case contrast is the anchor itself and every other
       point in the gradient only improves on it. A ramp that got lighter
       toward the corner pushed orange back down to 4.1:1. */
    --primary: #2F3238;            /* slate — header bar, table heads, buttons */
    --primary-mid: #2A2D33;        /* gradient middle; also .btn:hover */
    --primary-deep: #25282D;       /* gradient end — darkest */
    --accent: #FF6B35;             /* electric orange — CTAs, live markers, alerts */
    --accent-2: #4C7C9B;           /* steel blue — secondary highlights, "alive" */
    --gold-accent: #E8B84B;        /* winner shimmer */
    --cream: #F4F1EA;              /* light text on dark */
    --bg: #F5F5F0;
    --bg-alt: #EAEBEE;             /* zebra striping */
    --text: #212529;
    --text-light: #6C757D;
    --white: #FFFFFF;
    --border: #D4D4D4;
    --shadow: rgba(0, 0, 0, 0.1);
    --row-hover: #E2E5EA;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

/* ---- Site Header ---- */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: var(--cream);
}

.site-title {
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* ---- Hamburger ---- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 110;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--cream);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---- Navigation ---- */
.nav {
    background: var(--white);
    border-bottom: 3px solid var(--primary);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-menu > li { position: relative; }

.nav-link {
    display: block;
    padding: 0.65rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary);
    color: var(--cream);
}

.nav-dropdown > .nav-link::after {
    content: ' \25BE';
    font-size: 0.7em;
    opacity: 0.6;
}

/* ---- Dropdown Menus ---- */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--white);
    box-shadow: 0 4px 16px var(--shadow);
    border: 1px solid var(--border);
    border-radius: 0 0 6px 6px;
    list-style: none;
    padding: 0.3rem 0;
    z-index: 200;
    max-height: 70vh;
    overflow-y: auto;
}

.nav-dropdown:hover > .dropdown-menu { display: block; }

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    transition: background 0.15s;
}

.dropdown-menu a:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

.dropdown-divider {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-light);
    padding: 0.5rem 1rem 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* ---- Banner ---- */
.banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 55%, var(--primary-deep) 100%);
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Football field: 10-yard lines, 5-yard lines between them, and the two rows
   of hash marks. Coordinates sit on .5 offsets so a 1px stroke lands on a whole
   pixel instead of straddling two and blurring.

   Alphas are well up from the original 0.05/0.06, which barely registered
   (1.19:1 against the background). 0.18 / 0.10 / 0.13 puts the 10-yard lines
   at 1.77:1 — clearly a field, still quiet enough not to fight the title. */
.banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='40' viewBox='0 0 80 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.5 0V40M40.5 0V40' stroke='rgba(255,255,255,0.18)' stroke-width='1'/%3E%3Cpath d='M20.5 0V40M60.5 0V40' stroke='rgba(255,255,255,0.10)' stroke-width='1'/%3E%3Cpath d='M10.5 11V15M30.5 11V15M50.5 11V15M70.5 11V15M10.5 25V29M30.5 25V29M50.5 25V29M70.5 25V29' stroke='rgba(255,255,255,0.13)' stroke-width='1'/%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.banner-text {
    display: block;
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    font-weight: 800;
    color: var(--cream);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    position: relative;
}

/* Orange, and it clears AA (4.53:1) because the slate anchor was set dark
   enough to allow it — see the ramp comment in :root. Don't lighten --primary
   past #2F3238 without re-checking this pairing; it fails fast. */
.banner-subtext {
    display: block;
    font-size: clamp(0.7rem, 1.6vw, 0.9rem);
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    position: relative;
}

.banner-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.social-label {
    font-size: clamp(0.6rem, 1.5vw, 0.75rem);
    font-weight: 600;
    color: rgba(244, 241, 234, 0.8);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--white);
    border-radius: 50%;
    color: var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.social-icons a:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.social-icons a svg { width: 15px; height: 15px; }

.social-divider {
    width: 1px;
    height: 18px;
    background: rgba(244, 241, 234, 0.4);
}

/* ---- Main Content ---- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* ---- Pool Status Banner ---- */
.status-banner {
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-banner.pending  { background: #FFF3CD; color: #856404; }
.status-banner.active   { background: #d4edda; color: #155724; }
.status-banner.complete { background: #D1ECF1; color: #0C5460; }

/* A test contest must be impossible to mistake for the live pool. */
.status-banner.test {
    background: repeating-linear-gradient(45deg, #FF6B35, #FF6B35 12px, #E85A28 12px, #E85A28 24px);
    color: #fff;
    font-weight: 800;
    letter-spacing: 2px;
}

/* ---- Stat strip (alive / out / pot / lock countdown) ---- */
.stat-strip {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0 auto 1.2rem;
}

.stat-tile {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 6px var(--shadow);
    padding: 0.6rem 1.1rem;
    text-align: center;
    min-width: 108px;
}

.stat-tile .stat-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.15rem;
}

.stat-tile .stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.stat-tile.accent .stat-value { color: var(--accent); }
.stat-tile.wide { min-width: 190px; }

/* ---- Countdown ---- */
.countdown {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 1rem;
    margin: 1rem auto 1.5rem;
    padding: 0.7rem 1rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 6px var(--shadow);
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.countdown-label {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.countdown-value {
    font-weight: 800;
    color: var(--accent);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

/* ---- Survivor board ---- */
.pool-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 12px var(--shadow);
    background: var(--white);
}

.pool-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 900px;
    font-size: 0.82rem;
}

.pool-table thead th {
    background: var(--primary);
    color: var(--cream);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.6rem 0.3rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.pool-table thead th:first-child {
    text-align: left;
    padding-left: 0.8rem;
    min-width: 150px;
}

/* The week currently being picked gets an orange rail so your eye lands on it. */
.pool-table thead th.wk-current {
    background: var(--accent);
    color: #fff;
}

.pool-table tbody tr { transition: background 0.15s; }
.pool-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.pool-table tbody tr:nth-child(odd)  { background: var(--white); }
.pool-table tbody tr:hover { background: var(--row-hover); }

.pool-table td {
    padding: 0.4rem 0.25rem;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

.pool-table tbody tr.is-eliminated { opacity: 0.6; }

.col-entry {
    text-align: left !important;
    padding-left: 0.8rem !important;
    font-weight: 700;
    white-space: nowrap;
}

.col-buyback {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    background: var(--accent);
    color: var(--white);
    border-radius: 3px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* ---- Team pills (one per week cell) ---- */
.team-pill {
    display: inline-block;
    padding: 2px 6px;
    min-width: 40px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.3px;
}

.team-pill.win     { background: #d4edda; border-color: #b6e0c5; color: #155724; }
.team-pill.loss    { background: #f8d7da; border-color: #f1c1c4; color: #721c24; text-decoration: line-through; }
.team-pill.push    { background: #D1ECF1; border-color: #bee5eb; color: #0C5460; }
.team-pill.pending { background: #FFF3CD; border-color: #FFE89A; color: #856404; }

/* Someone else's pick, before their game kicks off. */
.team-pill.hidden {
    background: #eee;
    border-color: #e0e0e0;
    color: #aaa;
    font-style: italic;
    letter-spacing: 2px;
}

/* An auto-assigned pick is flagged so nobody thinks the system picked for them silently. */
.team-pill.autopick { position: relative; }
.team-pill.autopick::after {
    content: 'A';
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-2);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 800;
    line-height: 1;
    padding: 2px 3px;
    border-radius: 2px;
}

.pill-empty { color: #ccc; font-size: 0.9rem; }

.status-alive {
    color: var(--accent-2);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.status-eliminated {
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

/* Winner rows */
.pool-table tbody tr.place-1 {
    background: linear-gradient(90deg, #FFD700 0%, #FFF8DC 30%, #FFFBE6 100%) !important;
}
.pool-table tbody tr.place-2 {
    background: linear-gradient(90deg, #C0C0C0 0%, #E8E8E8 30%, #F5F5F5 100%) !important;
}
.pool-table tbody tr.place-3 {
    background: linear-gradient(90deg, #CD7F32 0%, #E8C49A 30%, #FDF0E0 100%) !important;
}

.pool-table tbody tr[class*="place-"] td:first-child::before {
    content: attr(data-place);
    display: inline-block;
    color: var(--text);
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
    text-transform: uppercase;
}

/* ---- Pick distribution ---- */
.dist-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.4rem 1rem;
    margin-top: 0.6rem;
}

.dist-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
}

.dist-team { font-weight: 700; min-width: 44px; }

.dist-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-alt);
    border-radius: 4px;
    overflow: hidden;
}

.dist-fill { height: 100%; background: var(--accent-2); border-radius: 4px; }

.dist-pct {
    min-width: 62px;
    text-align: right;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
}

/* ---- Picks UI: game cards ---- */
.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.7rem;
    margin: 1rem 0;
}

.game-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
}

.game-card.locked { opacity: 0.5; background: #fafafa; }

.game-when {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.game-when .lock-flag { color: var(--accent); }

.game-teams { display: flex; align-items: center; gap: 0.4rem; }

.game-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.15s, border-color 0.15s;
}

.game-team:hover:not(.disabled) { background: var(--bg-alt); }

.game-team.selected {
    background: rgba(255, 107, 53, 0.14);
    border-color: var(--accent);
    font-weight: 800;
}

.game-team.disabled { opacity: 0.45; cursor: not-allowed; }
.game-team input[type="radio"] { accent-color: var(--accent); }

.game-team .team-spread {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
}

.game-vs {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
}

.used-tag {
    margin-left: auto;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* How old the spreads on this week's games are. Quiet on purpose: it is a
   caveat on decoration, not an alarm — the pool is won outright, not on the
   line. Only rendered for a week that is not the one in play. */
.line-age {
    margin: 0.5rem 0 0;
    padding: 0.45rem 0.6rem;
    border-left: 3px solid var(--border);
    background: var(--bg-alt);
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-light);
}

/* ---- Week selector on the picks page ----
   One tab per week that still has an un-started game. `live` is the week in
   play, `active` is the week being viewed, `done` already has a pick. A week
   can be all three at once, so the rules are ordered least- to most-specific
   and every state stays legible on top of the others. */
.week-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0.6rem 0 0.9rem;
}

.week-tab {
    min-width: 2.1rem;
    padding: 0.3rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--white);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    line-height: 1.1;
}

.week-tab:hover { border-color: var(--accent); }

/* Already answered — quieter than an unpicked week, but not struck through:
   the pick is changeable until kickoff and the tab is how you get back to it. */
.week-tab.done { background: var(--bg-alt); }

/* The week in play. Bolder edge so "this week" is findable at a glance even
   when the player is looking at Week 14. */
.week-tab.live { border-color: var(--accent); }

.week-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.week-tab .week-tick {
    display: block;
    font-size: 0.55rem;
    font-weight: 600;
    line-height: 1;
    color: #155724;
}

.week-tab.active .week-tick { color: #9BE8B0; }

.week-ahead-tag {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    background: var(--accent-2, #6C757D);
    color: var(--white);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ---- Used-teams grid (all 32) ---- */
.team-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 0.35rem;
    margin: 0.8rem 0;
}

.team-chip {
    text-align: center;
    padding: 0.35rem 0.2rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
}

.team-chip.used {
    background: var(--bg-alt);
    color: #aaa;
    text-decoration: line-through;
    border-style: dashed;
}

.team-chip.this-week { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,107,53,0.2); }

.team-chip .chip-wk {
    display: block;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    letter-spacing: 0.5px;
}

/* ---- Split-vote card ---- */
.split-card {
    background: #FFF8E7;
    border: 2px solid var(--gold-accent);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin: 1rem auto;
    max-width: 760px;
}

.split-card h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.split-card .split-actions { display: flex; gap: 0.6rem; margin-top: 0.8rem; flex-wrap: wrap; }

.vote-yes { color: #155724; font-weight: 800; }
.vote-no  { color: #721c24; font-weight: 800; }
.vote-none { color: var(--text-light); font-weight: 600; }

/* ---- Footer ---- */
.site-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.site-footer .last-updated { font-weight: 600; color: var(--text); }

/* ---- Rules / content sections ---- */
.rules-container { max-width: 800px; margin: 0 auto; }

.rules-section {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 6px var(--shadow);
    margin-bottom: 1.2rem;
    overflow: hidden;
}

.rules-section h2 {
    background: var(--primary);
    color: var(--cream);
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rules-section .rules-body {
    padding: 1rem 1.2rem;
    font-size: 0.88rem;
    line-height: 1.7;
}

.rules-section .rules-body p  { margin-bottom: 0.8rem; }
.rules-section .rules-body p:last-child { margin-bottom: 0; }
.rules-section .rules-body ul { margin: 0.3rem 0 0.8rem 1.5rem; }
.rules-section .rules-body li { margin-bottom: 0.4rem; }

.payout-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.8rem 0;
    font-size: 0.85rem;
}

.payout-table th {
    background: var(--bg-alt);
    padding: 0.5rem 0.8rem;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid var(--primary);
}

.payout-table td {
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--border);
}

/* ---- Forms ---- */
.form-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 6px var(--shadow);
    padding: 1.5rem;
    max-width: 540px;
    margin: 1rem auto;
}

.form-card h2 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-row { margin-bottom: 0.9rem; }

.form-row label {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 0.3rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="number"],
.form-row input[type="password"],
.form-row input[type="datetime-local"],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--primary);
    color: var(--cream);
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn:hover { background: var(--primary-mid); }
.btn:disabled { background: var(--text-light); cursor: not-allowed; }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #E85A28; }

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-secondary:hover { background: var(--bg-alt); }

.btn-danger { background: #BC4749; color: #fff; }
.btn-danger:hover { background: #9e3a3c; }

.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.7rem; letter-spacing: 0.5px; }

.note { font-size: 0.78rem; color: var(--text-light); font-style: italic; }

.flash {
    padding: 0.7rem 1rem;
    border-radius: 4px;
    margin: 0 auto 1rem;
    max-width: 760px;
    font-size: 0.85rem;
    font-weight: 600;
}

.flash.success { background: #d4edda; color: #155724; border: 1px solid #b6e0c5; }
.flash.error   { background: #f8d7da; color: #721c24; border: 1px solid #f1c1c4; }
.flash.info    { background: #D1ECF1; color: #0C5460; border: 1px solid #bee5eb; }
.flash.warn    { background: #FFF3CD; color: #856404; border: 1px solid #FFE89A; }

/* ---- Contest tabs (results.php) ---- */
.contest-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.contest-tab {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contest-tab.active { background: var(--primary); color: var(--cream); border-color: var(--primary); }
.contest-tab.live   { border-style: dashed; border-color: var(--gold-accent); }

/* ---- Admin ---- */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1rem;
    align-items: start;
}

.admin-log {
    background: #0d1117;
    color: #7ee787;
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: 0.72rem;
    line-height: 1.5;
    padding: 0.8rem;
    border-radius: 6px;
    max-height: 460px;
    overflow: auto;
    white-space: pre-wrap;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.admin-table th {
    background: var(--bg-alt);
    padding: 0.4rem 0.5rem;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--border);
}

.admin-table input[type="text"],
.admin-table input[type="number"],
.admin-table select {
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.78rem;
    width: 100%;
}

/* ---- Responsive: Tablet ---- */
@media (max-width: 1024px) {
    .main-content { padding: 1rem 0.75rem; }
    .pool-table { min-width: 820px; }
    .pool-table thead th:first-child { min-width: 128px; }
}

/* ---- Responsive: Mobile ---- */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
        border-bottom: none;
    }

    .nav.open {
        max-height: 100vh;
        border-bottom: 3px solid var(--primary);
        overflow-y: auto;
    }

    .nav-menu { flex-direction: column; }

    .nav-link {
        padding: 0.8rem 1.5rem;
        border-bottom: 1px solid #eee;
        font-size: 0.9rem;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--bg);
        display: none;
        padding-left: 1rem;
    }

    .nav-dropdown.open > .dropdown-menu { display: block; }

    .dropdown-menu a { padding: 0.6rem 1.5rem; font-size: 0.82rem; }

    /* Sticky entry column so the name stays visible while scrolling 18 weeks */
    .pool-table .col-entry {
        position: sticky;
        left: 0;
        z-index: 5;
        background: inherit;
        box-shadow: 2px 0 4px rgba(0,0,0,0.08);
    }

    .pool-table thead th:first-child {
        position: sticky;
        left: 0;
        z-index: 15;
    }

    .pool-table { min-width: 760px; }

    .banner { padding: 1.5rem 1rem 1rem; }
    .banner-text { letter-spacing: 2px; }
    .main-content { padding: 1rem 0.5rem; }
    .game-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .site-title { font-size: 1.05rem; }
    .pool-table { font-size: 0.72rem; }
    .stat-tile { min-width: 92px; padding: 0.5rem 0.8rem; }
    .stat-tile .stat-value { font-size: 1.05rem; }
}
