:root {
  /* Perennial Sports palette - matched to Perennial Pools' staging site:
     deep navy + brass gold. --forest/--orange kept as the names in use
     throughout this file, just repointed to the navy/gold values. */
  --forest: #0f2b3d;
  --forest-dark: #0a1e2c;
  --navy: #0f2b3d;
  --navy-dark: #0a1e2c;
  --blue: #2f6f8f;
  --blue-hover: #285f7a;
  --blue-light: #eaf3f3;
  --orange: #c8962c;
  --orange-bright: #e0ac3a;
  --gold: #c8962c;
  --gold-bright: #e0ac3a;
  --gold-light: #faf1de;
  --bg: #f4f2ec;
  --card-bg: #ffffff;
  --border: #ddd8cb;
  --text: #1a1f29;
  --text-dim: #6b7280;
  --green: #1a7f37;
  --red: #b3372c;
  --font: 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); min-height: 100vh; }
a { color: var(--forest); }

.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px; background: var(--forest); border-bottom: 4px solid var(--orange);
}
.navbar .brand { font-size: 20px; font-weight: 800; color: #fff; }
.navbar .brand .accent { color: var(--orange-bright); }
.navbar form { display: inline; }
.navbar button.logout { background: rgba(255,255,255,0.1); color: #d7ecdf; border: 1px solid rgba(255,255,255,0.25); padding: 7px 14px; border-radius: 3px; cursor: pointer; }

.container { max-width: 900px; margin: 0 auto; padding: 24px 16px 60px; }

.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-dark) 60%, #08281e 100%);
  position: relative; overflow: hidden;
}
.auth-page::before {
  content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,114,12,0.25) 0%, rgba(232,114,12,0) 70%);
  top: -150px; right: -150px;
}
.auth-page::after {
  content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,140,41,0.15) 0%, rgba(255,140,41,0) 70%);
  bottom: -120px; left: -120px;
}
.auth-page a.back-home { position: absolute; top: 24px; left: 28px; color: #fff; opacity: 0.75; font-weight: 600; text-decoration: none; font-size: 0.9rem; z-index: 2; }
.auth-page a.back-home:hover { opacity: 1; }

.login-wrap { max-width: 380px; width: 100%; text-align: center; background: var(--card-bg); padding: 40px 34px; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); position: relative; z-index: 1; }
.login-wrap h1 { font-size: 1.7rem; margin-bottom: 6px; color: var(--forest); font-weight: 800; }
.login-wrap .tagline { color: var(--text-dim); margin-bottom: 24px; font-size: 0.92rem; }
.login-wrap input { width: 100%; padding: 12px 14px; margin-bottom: 12px; background: #fafbf8; border: 1px solid var(--border); border-radius: 5px; font-size: 1rem; }
.btn { display: inline-block; background: var(--orange); color: #fff; font-weight: 700; border: none; padding: 12px 28px; border-radius: 5px; cursor: pointer; font-size: 0.95rem; }
.btn:hover { background: var(--orange-bright); }
.alert { padding: 12px 16px; border-radius: 5px; margin-bottom: 16px; font-weight: 600; }
.alert.error { background: #fdecea; border: 1px solid var(--red); color: var(--red); }

.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 18px; margin-bottom: 16px; }
.card h2 { margin-top: 0; color: var(--forest); }

/* Chat box */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 150px); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: 8px 8px 0 0; }
.chat-msg { margin-bottom: 14px; max-width: 75%; padding: 10px 14px; border-radius: 12px; line-height: 1.45; white-space: pre-wrap; }
.chat-msg.user { background: var(--forest); color: #fff; margin-left: auto; border-bottom-right-radius: 3px; }
.chat-msg.assistant { background: #eef4f0; color: var(--text); border-bottom-left-radius: 3px; }
.chat-input-row { display: flex; gap: 8px; border: 1px solid var(--border); border-top: none; border-radius: 0 0 8px 8px; padding: 10px; background: #fff; }
.chat-input-row input { flex: 1; padding: 12px 14px; border: 1px solid var(--border); border-radius: 5px; font-size: 1rem; }
.chat-input-row button { padding: 0 22px; }

table.standings { width: 100%; border-collapse: collapse; }
table.standings th, table.standings td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
table.standings th { color: var(--forest); text-transform: uppercase; font-size: 0.75rem; background: #eef4f0; letter-spacing: 0.03em; }
table.standings tr:first-child td { font-weight: 700; }

.division-list a, .team-list a { display: block; padding: 10px 4px; border-bottom: 1px solid var(--border); font-weight: 600; }
.division-list a:hover, .team-list a:hover { color: var(--orange); }

.hero-banner {
  padding: 32px 28px; color: #fff; border-radius: 0 0 14px 14px;
}
.hero-banner .eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.hero-banner h1 { font-size: 2rem; margin: 4px 0 0; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.badge.final { background: #eafaf0; color: var(--green); }
.badge.scheduled { background: #f3f1ea; color: var(--text-dim); }

/* ---------- Public landing page (/) ----------
   Ported from Perennial Pools' staging landing page - same visual system,
   copy adapted for leagues instead of prediction pools. Additive only. */

.landing-navbar {
  background: transparent; border-bottom: none; position: absolute;
  top: 0; left: 0; right: 0; z-index: 3; padding: 18px 28px;
}
.brand-fancy { display: flex; align-items: baseline; gap: 9px; }
.brand-fancy .brand-script {
  font-family: 'Pinyon Script', 'Snell Roundhand', 'Apple Chancery', cursive;
  font-size: 2.3rem; font-weight: 400; line-height: 1; color: #fff;
  letter-spacing: 0.5px; text-shadow: 0 2px 14px rgba(0,0,0,0.4); padding-right: 2px;
}
.brand-fancy .brand-sports {
  font-family: var(--font); font-size: 1.05rem; font-weight: 800; letter-spacing: 4px;
  color: var(--gold-bright); text-transform: uppercase; position: relative; top: -2px;
}

.landing-hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 0%, #14405c 0%, var(--navy) 45%, #050d15 100%);
  border-bottom: 4px solid var(--gold); padding: 96px 16px 0; isolation: isolate;
}
/* Optional licensed background clip. Absent file = element renders nothing. */
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.28; z-index: -3; filter: saturate(0.8) contrast(1.1);
}
/* Two slow-drifting pools of light - reads as stadium floods, no imagery needed. */
.hero-lights {
  position: absolute; inset: -20%; z-index: -2;
  background:
    radial-gradient(38% 44% at 18% 12%, rgba(200,150,44,0.28) 0%, transparent 62%),
    radial-gradient(32% 40% at 82% 24%, rgba(47,111,143,0.42) 0%, transparent 65%),
    radial-gradient(44% 50% at 62% 96%, rgba(224,172,58,0.14) 0%, transparent 70%);
  animation: heroDrift 26s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}
.hero-grain {
  position: absolute; inset: 0; z-index: -1; opacity: 0.16; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
.landing-inner { max-width: 980px; margin: 0 auto; position: relative; }
.hero-eyebrow { color: var(--gold-bright); font-size: 0.72rem; font-weight: 800; letter-spacing: 2.4px; text-transform: uppercase; margin-bottom: 18px; }
.landing-hero h1 { color: #fff; font-size: 4rem; line-height: 1.02; margin: 0 0 24px; font-weight: 800; letter-spacing: -2px; text-shadow: 0 2px 30px rgba(0,0,0,0.45); }
.landing-hero h1 .accent {
  background: linear-gradient(92deg, var(--gold-bright) 0%, #f3d488 45%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.landing-hero .lede { color: #cfdce8; font-size: 1.15rem; line-height: 1.65; max-width: 660px; margin: 0 0 34px; }

.btn.btn-xl { padding: 17px 40px; font-size: 1.05rem; box-shadow: 0 10px 34px rgba(200,150,44,0.34); }
.btn.btn-gold { background: var(--gold); color: var(--navy-dark); font-weight: 800; letter-spacing: 0.2px; }
.btn.btn-gold:hover { background: var(--gold-bright); }

.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta-note { color: #9fb3c4; font-size: 0.88rem; }
.cta-note strong { color: var(--gold-bright); }

/* Scrolling league names - typographic only, no logos (trademarks, would imply an endorsement that doesn't exist). */
.league-marquee {
  margin-top: 76px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,0.13); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; align-items: center; gap: 22px; width: max-content; animation: marqueeScroll 55s linear infinite; }
.marquee-item { color: rgba(255,255,255,0.34); font-size: 1.05rem; font-weight: 700; letter-spacing: 2.5px; white-space: nowrap; }
.marquee-item.lead { color: #fff; font-size: 1.3rem; font-weight: 800; text-shadow: 0 0 26px rgba(224,172,58,0.45); }
.marquee-dot { color: var(--gold); font-size: 0.7rem; }
@keyframes marqueeScroll { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

@media (prefers-reduced-motion: reduce) {
  .hero-lights, .marquee-track { animation: none; }
  .hero-video { display: none; }
}

.feature-list { margin: 0; padding-left: 20px; line-height: 1.75; }
.feature-list li { margin-bottom: 6px; }

.quote-demo {
  margin: 16px 0; padding: 16px 18px; background: var(--blue-light); border-left: 4px solid var(--blue);
  color: var(--navy); font-size: 1rem; line-height: 1.55; font-style: italic;
}

.honest-note { color: var(--text-dim); font-size: 0.88rem; border-top: 1px solid var(--border); padding-top: 12px; margin-bottom: 0; }

.landing-container { max-width: 980px; margin: 0 auto; padding: 24px 16px 60px; }

@media (max-width: 640px) {
  .landing-navbar { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 16px; gap: 10px; }
  .brand-fancy .brand-script { font-size: 1.75rem; }
  .brand-fancy .brand-sports { font-size: 0.78rem; letter-spacing: 2.5px; }
  .landing-hero { padding: 86px 16px 0; }
  .landing-hero h1 { font-size: 2.1rem; letter-spacing: -1px; }
  .landing-hero .lede { font-size: 0.98rem; }
  .hero-eyebrow { font-size: 0.64rem; letter-spacing: 1.8px; margin-bottom: 12px; }
  .cta-row { gap: 12px; }
  .btn.btn-xl { padding: 14px 30px; font-size: 0.96rem; }
  .league-marquee { margin-top: 44px; }
  .marquee-item.lead { font-size: 1.1rem; }
  .marquee-item { font-size: 0.92rem; }
}
