@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Barlow+Condensed:wght@600;700&display=swap');

:root {
  --bg:        #0f172a;
  --surface:   #1e293b;
  --surface2:  #273448;
  --border:    #334155;
  --text:      #f1f5f9;
  --muted:     #94a3b8;
  --green:     #22c55e;
  --green-dim: #16a34a;
  --amber:     #f59e0b;
  --red:       #ef4444;
  --red-dim:   #dc2626;
  --nav:       #020617;
}

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

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

/* ── Navigation ── */
nav {
  background: var(--nav);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  border-bottom: 2px solid #0f2027;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.nav-brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-brand .accent { color: var(--green); }

.nav-links { display: flex; gap: 0.25rem; align-items: center; }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}

/* ── Container ── */
.container {
  max-width: 980px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

/* ── Headings ── */
h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
  color: var(--text);
}

h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

p { line-height: 1.65; margin-bottom: 0.75rem; }

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

/* ── Flash messages ── */
.flash {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  border-left: 4px solid;
}

.flash.success { background: rgba(34,197,94,0.12);  border-color: var(--green); color: #bbf7d0; }
.flash.error   { background: rgba(239,68,68,0.12);  border-color: var(--red);   color: #fecaca; }
.flash.info    { background: rgba(96,165,250,0.12); border-color: #60a5fa;      color: #bfdbfe; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

/* ── Forms ── */
form label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--muted);
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form select,
form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

form input:focus,
form select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
}

form input[type="checkbox"] {
  width: auto;
  margin-bottom: 0;
  accent-color: var(--green);
}

form input[type="text"][readonly] {
  background: var(--bg);
  cursor: text;
  color: var(--muted);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  background: var(--green);
  color: #052e16;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.2px;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover { background: var(--green-dim); text-decoration: none; color: #052e16; }
.btn:active { transform: scale(0.97); }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--border); color: var(--text); }

.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: var(--red-dim); color: white; }

.btn-amber { background: var(--amber); color: #431407; }
.btn-amber:hover { background: #d97706; color: #431407; }

.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.82rem; }

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.88rem;
}

th, td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  text-align: left;
}

th {
  background: var(--surface2);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tr td { transition: background 0.1s; }
tr:nth-child(even) td { background: rgba(30,41,59,0.6); }
tr:hover td { background: var(--surface2); }

/* ── Status ── */
.alive      { color: var(--green); font-weight: 600; }
.eliminated { color: var(--red);   font-weight: 600; }

.pick-win  { background: rgba(34,197,94,0.18) !important; color: #bbf7d0; }
.pick-loss { background: rgba(239,68,68,0.18) !important; color: #fecaca; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-green { background: rgba(34,197,94,0.15);  color: #86efac; border: 1px solid #166534; }
.badge-red   { background: rgba(239,68,68,0.15);  color: #fca5a5; border: 1px solid #991b1b; }
.badge-amber { background: rgba(245,158,11,0.15); color: #fcd34d; border: 1px solid #92400e; }
.badge-gray  { background: var(--surface2);       color: var(--muted); border: 1px solid var(--border); }

/* ── Banners (winner / archive) ── */
.banner {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 10px;
  text-align: center;
  border: 2px solid;
}

.banner h2 { margin-bottom: 0.35rem; }
.banner p  { margin: 0; font-size: 0.92rem; }

.banner-green { background: rgba(34,197,94,0.1);  border-color: var(--green); }
.banner-green h2 { color: #86efac; }
.banner-green p  { color: #bbf7d0; }

.banner-amber { background: rgba(245,158,11,0.1); border-color: var(--amber); }
.banner-amber h2 { color: #fcd34d; }
.banner-amber p  { color: #fde68a; }

.banner-gray {
  background: var(--surface);
  border-color: var(--border);
  color: var(--muted);
  margin-top: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
}

/* ── Week status bar ── */
.week-status {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  padding: 0.9rem 1.25rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.picks-open   { color: var(--green); font-weight: 600; }
.picks-locked { color: var(--red);   font-weight: 600; }
.pick-pending { color: var(--amber); font-weight: 600; }

/* ── Commissioner panel ── */
.commissioner-panel {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--amber);
  border-radius: 10px;
}

.commissioner-panel h2 { color: var(--amber); margin-bottom: 1rem; }
.commissioner-panel h3 { color: var(--muted); margin-top: 1.5rem; }

.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  align-items: center;
}

/* ── Invite box ── */
.invite-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 1rem;
}

.invite-box label { margin: 0; color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

.invite-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.88rem;
  margin-bottom: 0;
  padding: 0;
  width: auto;
}

.invite-box input:focus { outline: none; box-shadow: none; }

/* ── Game cards (make pick) ── */
.game-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  transition: border-color 0.15s;
}

.game-card:hover { border-color: var(--green); }

.game-card .kickoff {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

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

.game-card .team-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.92rem;
  transition: background 0.12s;
}

.game-card .team-label:hover { background: var(--surface2); }
.game-card .team-label.used { opacity: 0.35; cursor: not-allowed; }

.game-card .at-sign {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── Misc utilities ── */
.text-muted { color: var(--muted); }
.table-scroll { overflow-x: auto; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }

/* ── Collapsible sections ── */
.section-collapsible { border: none; }

.section-collapsible > summary {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  user-select: none;
}

.section-collapsible > summary::-webkit-details-marker { display: none; }

.section-collapsible > summary::before {
  content: '▶';
  font-size: 0.7rem;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.section-collapsible[open] > summary::before { transform: rotate(90deg); }

.section-collapsible > summary:hover { color: var(--green); }

/* ── Landing page ── */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3.5rem 0 2.5rem;
  min-height: 380px;
}

.hero-inner { flex: 1; max-width: 520px; }

.hero-badge {
  display: inline-block;
  background: rgba(34,197,94,0.12);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  color: var(--text);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 420px;
}

.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn-hero {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--green);
  color: #052e16;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.3px;
  transition: background 0.15s, transform 0.1s;
}

.btn-hero:hover { background: var(--green-dim); text-decoration: none; color: #052e16; }
.btn-hero:active { transform: scale(0.97); }

.btn-hero-outline {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.btn-hero-outline:hover { background: var(--surface); border-color: var(--muted); text-decoration: none; color: var(--text); }

/* football field graphic */
.hero-graphic {
  flex: 0 0 300px;
  height: 200px;
  position: relative;
}

.field {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #064e3b 0%, #065f46 40%, #047857 60%, #059669 100%);
  border-radius: 12px;
  border: 2px solid #10b981;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

.field-lines {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent calc(16.66% - 1px),
      rgba(255,255,255,0.18) calc(16.66% - 1px),
      rgba(255,255,255,0.18) 16.66%
    );
}

.field-end {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.5);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.field-end.left  { left: 0.6rem; transform: translateY(-50%) rotate(180deg); }
.field-end.right { right: 0.6rem; }

/* How it works */
.how-it-works {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
}

.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}

.step-num {
  width: 42px;
  height: 42px;
  background: var(--green);
  color: #052e16;
  border-radius: 50%;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.step-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.step-card p  { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 0 0 2.5rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

.feature-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
}

.feature-item strong { display: block; margin-bottom: 0.3rem; font-size: 0.95rem; }
.feature-item p { color: var(--muted); font-size: 0.88rem; margin: 0; }

/* ── Mobile ── */
@media (max-width: 600px) {
  nav { padding: 0 1rem; }
  .nav-brand { font-size: 1.35rem; }
  .container { margin: 1rem auto; }
  h1 { font-size: 1.7rem; }
  .game-card .teams { flex-direction: column; align-items: flex-start; }
  .commissioner-panel { padding: 1rem; }
  .hero { flex-direction: column; min-height: auto; padding: 2rem 0 1.5rem; }
  .hero-graphic { display: none; }
  .hero-title { font-size: 2.8rem; }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
}
