:root {
  --bg: #0b1020;
  --bg-soft: #111933;
  --card: #121b36;
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #eef2ff;
  --muted: #a9b4d0;
  --accent: #fbbf24;
  --accent-2: #60a5fa;
  --danger: #f87171;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, #050814 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: rgba(5, 8, 20, 0.7);
  border-bottom: 1px solid var(--card-border);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-user {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a,
.site-nav button {
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px 0;
}

.inline-form {
  display: inline;
}

.main-content {
  padding: 40px 0 64px;
}

.hero-card,
.panel {
  background: linear-gradient(180deg, rgba(18, 27, 54, 0.96), rgba(10, 16, 32, 0.92));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 48px;
}

.hero-card h1,
.panel h1 {
  margin: 0 0 16px;
  line-height: 1.05;
}

.hero-card h1 {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  max-width: 12ch;
}

.hero-copy,
.muted,
.site-footer {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.14);
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-meta {
  margin-top: 18px;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.button.primary {
  background: var(--accent);
  color: #1b1606;
}

.button.secondary {
  border-color: var(--card-border);
  background: rgba(255, 255, 255, 0.04);
}

.panel {
  padding: 32px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.week-controls {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.week-select-field {
  min-width: 180px;
}

.week-select {
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.game-list {
  display: grid;
  gap: 16px;
}

.game-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.game-card h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.pick-options {
  display: grid;
  gap: 10px;
  min-width: 280px;
}

.pick-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 12px 16px;
  border: 1px solid var(--card-border);
  border-radius: 22px;
}

.pick-button {
  width: 100%;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--team-color, rgba(255, 255, 255, 0.04));
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.pick-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.18) 45%, transparent 70%);
  transform: translateX(-120%);
  opacity: 0;
  pointer-events: none;
}

.pick-button.selected {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.26),
    0 16px 34px rgba(0, 0, 0, 0.28);
}

.pick-button:not(.selected):hover,
.pick-button:not(.selected):focus-visible {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  transform: translateY(-2px) scale(1.01);
}

.pick-button.selected:hover,
.pick-button.selected:focus-visible {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.3),
    0 18px 36px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px) scale(1.02);
}

.pick-button:hover::after,
.pick-button:focus-visible::after {
  opacity: 1;
  transform: translateX(120%);
  transition: transform 420ms ease, opacity 160ms ease;
}

.week-picker-row {
  margin-bottom: 18px;
}

.inline-field select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text);
  background: var(--card);
  background-color: var(--card);
  color-scheme: dark;
  appearance: auto;
}

.inline-field select option {
  background: var(--card);
  color: var(--text);
}

.picks-form {
  display: grid;
  gap: 20px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.saving-pill {
  color: var(--accent-2);
  font-size: 0.9rem;
}

.pick-button__team {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  z-index: 1;
}

.team-logo-frame {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(4px);
}

.team-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.pick-button__percent {
  flex: 0 0 auto;
  z-index: 1;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.pick-button__percent.is-hidden {
  display: none;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 200px);
}

.auth-card {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, rgba(18, 27, 54, 0.96), rgba(10, 16, 32, 0.92));
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
}

.field input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  border-color: rgba(96, 165, 250, 0.75);
  background: rgba(96, 165, 250, 0.18);
}

.form-error {
  margin: 0;
  color: var(--danger);
}

.helper-text {
  margin: 0;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-border);
  text-align: left;
}

.leaderboard-table th {
  color: var(--muted);
  font-weight: 600;
}

.site-footer {
  padding: 24px 0 32px;
  border-top: 1px solid var(--card-border);
  text-align: center;
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-heading,
  .game-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .week-controls {
    justify-items: flex-start;
  }

  .hero-card {
    padding: 28px 22px;
  }

  .panel {
    padding: 22px;
  }
}
