/* ═══════════════════════════════════════════════════════════════════
   LWSTC Disc Golf Tournament — DGPT-inspired light theme
   ═══════════════════════════════════════════════════════════════════ */

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

/* ─── Design tokens ──────────────────────────────────────────────── */
:root {
  --bg:         #f4f6f8;
  --bg-2:       #ffffff;
  --bg-3:       #f0f2f4;
  --bg-4:       #e8eaed;
  --border:     #dde1e7;
  --border-hi:  #c8cdd5;

  --accent:     #5a9e00;   /* green — readable on white */
  --accent-d:   #437700;
  --accent-dim: rgba(90,158,0,.1);

  --text:       #1a1a1a;
  --text-2:     #4a4a4a;
  --text-3:     #888;

  --red:        #d32f2f;
  --red-dim:    rgba(211,47,47,.08);
  --gold:       #e65100;
  --gold-dim:   rgba(230,81,0,.1);
  --blue:       #1565c0;

  --font-head:  'Barlow Condensed', sans-serif;
  --font-body:  'Barlow', sans-serif;
  --radius:     6px;
  --shadow:     0 2px 10px rgba(0,0,0,.08);
}

/* ─── Base ───────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex; flex-direction: column;
  font-size: 15px;
  line-height: 1.5;
}

/* ─── Top bar ────────────────────────────────────────────────────── */
.topbar {
  background: var(--accent);
  color: #000;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .08em;
  padding: .35rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .25rem;
}
.topbar-date { opacity: .8; }

/* ─── Header ─────────────────────────────────────────────────────── */
header {
  background: var(--bg-2);
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}

/* Logo */
.site-logo {
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none;
}
.logo-disc { font-size: 2rem; line-height: 1; }
.logo-text { display: flex; flex-direction: column; }
.logo-main {
  font-family: var(--font-head);
  font-weight: 800; font-size: 1.8rem;
  color: var(--accent);
  letter-spacing: .04em;
  line-height: 1;
}
.logo-sub {
  font-family: var(--font-head);
  font-size: .7rem; font-weight: 600;
  color: var(--text-2);
  letter-spacing: .15em;
}

/* Nav */
nav { display: flex; flex-wrap: wrap; gap: .1rem; }
nav a {
  font-family: var(--font-head);
  font-weight: 700; font-size: .85rem;
  letter-spacing: .08em;
  color: var(--text-2);
  text-decoration: none;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
}
nav a:hover { color: var(--accent); background: var(--accent-dim); }

/* ─── Main ───────────────────────────────────────────────────────── */
main { flex: 1; max-width: 1200px; margin: 0 auto; padding: 2.5rem 2rem; width: 100%; }

/* ─── Footer ─────────────────────────────────────────────────────── */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .5rem;
  font-size: .82rem; color: var(--text-3);
}
.footer-logo { font-family: var(--font-head); font-weight: 700; color: var(--accent); letter-spacing: .1em; }

/* ─── Alerts ─────────────────────────────────────────────────────── */
.alert {
  padding: .85rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .9rem;
  font-weight: 500;
  border-left: 4px solid;
}
.alert-success { background: rgba(90,158,0,.08);  border-color: var(--accent); color: #3a7000; }
.alert-error    { background: var(--red-dim);      border-color: var(--red);    color: var(--red); }
.alert-info     { background: rgba(21,101,192,.08); border-color: var(--blue);  color: var(--blue); }

/* ─── Hero ───────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #eaf4d6 0%, #ffffff 100%);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  margin-bottom: 2.5rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '🥏';
  position: absolute; right: 2rem; top: 50%;
  transform: translateY(-50%);
  font-size: 8rem; opacity: .06;
  pointer-events: none;
}
.hero h2 {
  font-family: var(--font-head);
  font-weight: 800; font-size: 2.8rem;
  letter-spacing: .03em; text-transform: uppercase;
  color: var(--text); margin-bottom: .6rem;
  line-height: 1;
}
.hero h2 span { color: var(--accent); }
.hero p { color: var(--text-2); font-size: 1rem; max-width: 520px; }

/* ─── Section headings ───────────────────────────────────────────── */
.section-title {
  font-family: var(--font-head);
  font-weight: 800; font-size: 1.3rem;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text);
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 1.5rem;
}

/* ─── Cards ──────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 {
  font-family: var(--font-head);
  font-weight: 800; font-size: 1.3rem;
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: .4rem;
}
.card p { color: var(--text-2); font-size: .9rem; margin-bottom: .75rem; }

/* ─── Panel ──────────────────────────────────────────────────────── */
.panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}
.panel h3 {
  font-family: var(--font-head);
  font-weight: 800; font-size: 1.2rem;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.panel h4 {
  font-family: var(--font-head);
  font-size: .95rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-2);
  margin-bottom: .35rem;
}
.panel p { color: var(--text-2); font-size: .9rem; line-height: 1.55; }

/* ─── Rules grid ─────────────────────────────────────────────────── */
.rules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.1rem; }

/* ─── Rule cards ─────────────────────────────────────────────────── */
.rule-card {
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  background: var(--bg-3);
}
.rule-card .rule-icon { font-size: 1.8rem; margin-bottom: .4rem; }
.rule-card h4 { font-size: .9rem; margin-bottom: .4rem; letter-spacing: .04em; }
.rule-card p  { font-size: .85rem; line-height: 1.55; color: var(--text-2); }
.rule-penalty { border-left: 3px solid var(--red); }
.rule-penalty h4 { color: #ef9a9a; }
.rule-safe    { border-left: 3px solid var(--accent); }
.rule-safe h4 { color: var(--accent); }

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .55rem 1.2rem;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700; font-size: .9rem;
  letter-spacing: .05em; text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--border-hi);
  background: var(--bg-3);
  color: var(--text-2);
  text-decoration: none;
  transition: all .15s;
}
.btn:hover { background: var(--bg-4); color: var(--text); border-color: var(--text-3); }

.btn-primary {
  background: var(--accent); color: #000;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-d); border-color: var(--accent-d); color: #000; }

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}
.btn-secondary:hover { background: var(--accent-dim); }

.btn-sm  { padding: .3rem .8rem; font-size: .78rem; }
.btn-lg  { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .9rem; }
.status-row { margin-bottom: .75rem; }

/* ─── Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: .2rem .8rem;
  border-radius: 3px;
  font-family: var(--font-head);
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.badge-gold  { background: var(--gold-dim);  color: var(--gold); border: 1px solid rgba(249,168,37,.3); }
.badge-green { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(125,196,0,.3); }
.badge-blue  { background: rgba(30,136,229,.15); color: #90caf9; border: 1px solid rgba(30,136,229,.3); }
.badge-gray  { background: var(--bg-3); color: var(--text-3); border: 1px solid var(--border); }

/* ─── Forms ──────────────────────────────────────────────────────── */
.inline-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
input[type="text"], input[type="number"], select {
  padding: .5rem .9rem;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  font-family: var(--font-body); font-size: .9rem;
  background: var(--bg-3); color: var(--text);
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
select option { background: var(--bg-3); }
.hint { color: var(--text-3); font-size: .82rem; margin-bottom: .75rem; }
.text-muted { color: var(--text-3); }

/* ─── Page header ────────────────────────────────────────────────── */
.page-header {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.page-header h2 {
  font-family: var(--font-head);
  font-weight: 800; font-size: 2rem;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--text);
}

/* ─── Table ──────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th {
  background: var(--bg-3);
  text-align: left;
  padding: .65rem 1rem;
  font-family: var(--font-head);
  font-weight: 700; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-2);
  border-bottom: 2px solid var(--border-hi);
}
.data-table td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-3); }
.seed-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: var(--accent); color: #000;
  border-radius: 3px; font-size: .75rem; font-weight: 700;
  font-family: var(--font-head);
}
.empty-state { color: var(--text-3); text-align: center; padding: 2.5rem; font-style: italic; }

/* ─── Seeding form ───────────────────────────────────────────────── */
.seeding-form input[type="number"] { width: 110px; }

/* ─── Bracket ────────────────────────────────────────────────────── */
.bracket-wrapper {
  display: flex; flex-wrap: nowrap;
  gap: 1.5rem; overflow-x: auto; padding-bottom: 1rem;
  align-items: flex-start;
}
.bracket-round { display: flex; flex-direction: column; gap: 1rem; min-width: 230px; }
.round-label {
  font-family: var(--font-head);
  font-size: .78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent);
  text-align: center;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--accent);
  margin-bottom: .25rem;
}
.match-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  box-shadow: var(--shadow);
  transition: border-color .15s;
}
.match-card.match-done { border-color: var(--accent); }
.match-card.match-bye  { opacity: .5; }
.match-id {
  font-family: var(--font-head);
  font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: .5rem;
}
.matchup  { display: flex; flex-direction: column; gap: .3rem; }
.slot {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .6rem;
  border-radius: 4px;
  font-size: .88rem;
  background: var(--bg-3);
  color: var(--text-2);
}
.slot-winner {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  border: 1px solid rgba(125,196,0,.3);
}
.seed-num {
  font-family: var(--font-head);
  font-size: .7rem; font-weight: 700;
  color: var(--text-3); min-width: 22px;
}
.match-score { margin-left: auto; font-weight: 700; color: var(--text); }
.vs { text-align: center; font-size: .7rem; color: var(--text-3); letter-spacing: .1em; font-family: var(--font-head); }
.tbd { color: var(--text-3); font-style: italic; font-size: .82rem; }
.match-result {
  margin-top: .55rem;
  font-family: var(--font-head);
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent);
}

/* ─── Champion banner ────────────────────────────────────────────── */
.champion-banner {
  background: var(--gold-dim);
  border: 1px solid rgba(249,168,37,.4);
  border-radius: var(--radius);
  padding: .6rem 1.2rem;
  font-family: var(--font-head);
  font-weight: 700; font-size: 1rem;
  letter-spacing: .05em;
  color: var(--gold);
}

/* ─── 3rd Place Match ────────────────────────────────────────────── */
.third-place-section { margin: 2.5rem 0 1.5rem; }
.third-place-label {
  font-family: var(--font-head);
  font-size: 1rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: #bcaaa4;
  margin-bottom: .75rem;
}

/* ─── Standings / Podium ─────────────────────────────────────────── */
.standings-section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin: 2rem 0;
}
.standings-section h3 {
  font-family: var(--font-head);
  font-weight: 800; font-size: 1.4rem;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: 2rem;
  text-align: center;
}
.podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 1rem;
}
.podium-place { display: flex; flex-direction: column; align-items: center; width: 160px; }
.podium-medal  { font-size: 2.2rem; margin-bottom: .4rem; }
.podium-name {
  font-family: var(--font-head);
  font-weight: 800; font-size: 1.05rem;
  text-transform: uppercase; text-align: center;
  color: var(--text); margin-bottom: .2rem;
}
.podium-label {
  font-family: var(--font-head);
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-3); margin-bottom: .5rem;
}
.podium-block  { width: 100%; border-radius: 4px 4px 0 0; }
.p1-block { height: 90px;  background: linear-gradient(180deg, #f9a825, #f57f17); }
.p2-block { height: 64px;  background: linear-gradient(180deg, #9e9e9e, #616161); }
.p3-block { height: 46px;  background: linear-gradient(180deg, #8d6e63, #5d4037); }

/* ─── Match entry ────────────────────────────────────────────────── */
.match-entry { max-width: 600px; }
.matchup-display {
  display: flex; align-items: center; justify-content: space-around;
  gap: 1rem; margin-bottom: 2rem;
  background: var(--bg-3);
  border-radius: var(--radius); padding: 1.5rem;
}
.player-box { text-align: center; }
.player-seed {
  font-family: var(--font-head); font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3); margin-bottom: .3rem;
}
.player-name {
  font-family: var(--font-head);
  font-size: 1.3rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--text);
}
.vs-large {
  font-family: var(--font-head);
  font-size: 1.5rem; font-weight: 800;
  color: var(--text-3); letter-spacing: .1em;
}
.score-entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.score-field label {
  display: block;
  font-family: var(--font-head); font-weight: 700;
  font-size: .85rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-2); margin-bottom: .5rem;
}
.score-field input { width: 100%; }
.winner-display {
  background: var(--accent-dim);
  border: 1px solid rgba(125,196,0,.3);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  font-family: var(--font-head); font-size: .9rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent);
}
.tie-notice {
  background: var(--gold-dim);
  border: 1px solid rgba(249,168,37,.3);
  border-radius: var(--radius);
  padding: .7rem 1rem; margin-bottom: 1rem;
  font-family: var(--font-head); font-weight: 700;
  font-size: .9rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--gold);
}

/* ─── Responsive ─────────────────────────────────────────────────── */
/* ─── Login ──────────────────────────────────────────────────────── */
.login-wrap {
  max-width: 380px;
  margin: 3rem auto;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
}
.login-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.login-form label { font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.login-form input[type="password"] {
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  width: 100%;
}
.login-form input[type="password"]:focus { outline: 2px solid var(--accent); border-color: transparent; }
.admin-badge {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--accent);
  color: #fff;
  padding: .2rem .5rem;
  border-radius: 4px;
  margin-left: .5rem;
}

@media (max-width: 700px) {
  main { padding: 1.5rem 1rem; }
  .hero { padding: 2rem 1.25rem; }
  .hero h2 { font-size: 2rem; }
  .bracket-wrapper { flex-direction: column; }
  .score-entry-grid { grid-template-columns: 1fr; }
  .podium { gap: .5rem; }
  .podium-place { width: 100px; }
  .topbar { flex-direction: column; gap: 0; text-align: center; }
  .header-inner { flex-direction: column; align-items: flex-start; }
}
