:root {
  color-scheme: dark;
  --accent: #2fb344;
  --accent-strong: #83d475;
  --ink: #f4f7f5;
  --page: #080b0a;
  --panel: #111614;
  --panel-soft: #1a211e;
  --muted: #a4ada8;
  --line: #2b3430;
  --surface: #151b18;
  --surface-alt: #202923;
  --ice: #d8e3dc;
  --win: #0b735f;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(145deg, rgba(8, 11, 10, 0.96), rgba(19, 28, 23, 0.98)),
    repeating-linear-gradient(90deg, rgba(131, 212, 117, 0.045) 0 1px, transparent 1px 72px);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
  padding: 6px 0 18px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: clamp(16px, 3vw, 26px);
  grid-column: 1 / 2;
}

.brand-lockup > div {
  display: grid;
  min-width: 0;
  justify-items: center;
}

.team-logo {
  flex: 0 0 auto;
  width: clamp(160px, 26vw, 260px);
  height: auto;
  max-height: 142px;
  padding: clamp(8px, 1.2vw, 14px);
  border: 2px solid rgba(131, 212, 117, 0.42);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  box-shadow:
    0 0 0 7px rgba(47, 179, 68, 0.1),
    0 18px 36px rgba(0, 0, 0, 0.36),
    0 0 48px rgba(47, 179, 68, 0.14);
}

.eyebrow {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  display: grid;
  gap: 2px;
  justify-items: center;
  margin: 0;
  font-size: clamp(1.9rem, 5.8vw, 3.7rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-align: center;
}

h1 span {
  display: block;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(131, 212, 117, 0.18);
  border-radius: 8px;
  background: rgba(21, 27, 24, 0.82);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.header-actions {
  display: grid;
  grid-column: 2 / 3;
  grid-row: 2;
  gap: 10px;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: rgba(131, 212, 117, 0.4);
  background: rgba(32, 41, 35, 0.95);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.26),
    0 0 0 4px rgba(47, 179, 68, 0.08);
  outline: 0;
}

.icon-button:active {
  transform: translateY(1px);
}

.social-link {
  background: rgba(21, 27, 24, 0.82);
  padding: 0;
  text-decoration: none;
}

.social-link img {
  display: block;
  width: 25px;
  height: 25px;
  border-radius: 6px;
  object-fit: contain;
}

.next-game {
  overflow: hidden;
  min-height: 184px;
  border: 1px solid rgba(131, 212, 117, 0.18);
  border-radius: 8px;
  background: #0b0f0d;
  color: #fff;
  box-shadow: var(--shadow);
}

.next-card {
  position: relative;
  min-height: 184px;
  padding: 20px 22px;
  isolation: isolate;
}

.next-card::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(120deg, rgba(47, 179, 68, 0.42), transparent 48%),
    radial-gradient(circle at 86% 14%, rgba(216, 227, 220, 0.16), transparent 34%);
  content: "";
}

.next-card::after {
  position: absolute;
  right: -52px;
  bottom: -24px;
  z-index: -1;
  width: min(42%, 320px);
  aspect-ratio: 1160 / 737;
  background: rgba(131, 212, 117, 0.18);
  content: "";
  filter: drop-shadow(0 0 28px rgba(47, 179, 68, 0.14));
  mask: url("./assets/gator-head-transparent-v2.png") center / contain no-repeat;
  -webkit-mask: url("./assets/gator-head-transparent-v2.png") center / contain no-repeat;
}

.status-row,
.game-meta,
.game-actions,
.game-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-row {
  justify-content: space-between;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(47, 179, 68, 0.2);
  color: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.next-date {
  color: rgba(244, 247, 245, 0.76);
  font-size: 0.9rem;
  font-weight: 700;
}

.matchup {
  display: grid;
  align-items: center;
  max-width: min(100%, 760px);
  gap: 6px;
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 7.6vw, 3.9rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.matchup span {
  overflow-wrap: anywhere;
}

.matchup em {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(131, 212, 117, 0.32);
  border-radius: 999px;
  background: rgba(8, 11, 10, 0.42);
  color: var(--accent-strong);
  font-size: clamp(0.82rem, 2vw, 1rem);
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-meta {
  flex-wrap: wrap;
  color: rgba(244, 247, 245, 0.78);
  font-size: 0.95rem;
  font-weight: 600;
}

.game-meta span + span::before {
  margin-right: 10px;
  color: rgba(244, 247, 245, 0.36);
  content: "/";
}

.game-actions {
  flex-wrap: wrap;
  margin-top: 16px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(131, 212, 117, 0.28);
  border-radius: 8px;
  background: rgba(47, 179, 68, 0.15);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 440px);
  padding: 4px;
  border: 1px solid rgba(131, 212, 117, 0.16);
  border-radius: 8px;
  background: rgba(17, 22, 20, 0.82);
}

.segment {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.segment.is-active {
  background: var(--surface-alt);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.schedule-list {
  display: grid;
  gap: 14px;
}

.month-group {
  display: grid;
  gap: 8px;
}

.month-title {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 2px 0 0;
  padding: 10px 2px 6px;
  background: linear-gradient(180deg, rgba(8, 11, 10, 0.96), rgba(8, 11, 10, 0.72));
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.game-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(131, 212, 117, 0.14);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: rgba(17, 22, 20, 0.92);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.game-card:hover {
  border-color: rgba(131, 212, 117, 0.3);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.game-card.is-cancelled {
  border-left-color: #87908b;
  opacity: 0.72;
}

.game-card.is-cancelled .time {
  color: #d8e3dc;
}

.date-tile {
  display: grid;
  align-content: center;
  min-height: 64px;
  border-radius: 8px;
  border: 1px solid rgba(131, 212, 117, 0.08);
  background: linear-gradient(180deg, rgba(32, 41, 35, 0.98), rgba(24, 31, 27, 0.98));
  text-align: center;
}

.date-tile strong {
  font-size: 1.42rem;
  line-height: 1;
}

.date-tile span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.game-line {
  justify-content: space-between;
  gap: 12px;
}

.opponent {
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 900;
}

.opponent span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time {
  color: var(--accent-strong);
  font-weight: 900;
  white-space: nowrap;
}

.subline {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.empty,
.loading,
.error {
  padding: 28px;
  color: rgba(244, 247, 245, 0.78);
  font-weight: 700;
}

.error {
  color: #ffd6d6;
}

.page-footer {
  min-height: 22px;
  padding: 18px 2px 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

@media (max-width: 520px) {
  .app-shell {
    padding: 12px 12px 28px;
  }

  .masthead {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    padding: 4px 0 14px;
  }

  .brand-lockup {
    align-items: center;
    flex-direction: column;
    grid-column: 1;
    justify-content: center;
    gap: 10px;
    width: 100%;
  }

  .team-logo {
    width: min(66vw, 230px);
    max-height: 112px;
    padding: 6px;
  }

  h1 {
    font-size: clamp(2rem, 9.2vw, 2.75rem);
    line-height: 0.9;
  }

  .header-actions {
    display: flex;
    grid-column: 1;
    grid-row: auto;
    gap: 8px;
    justify-content: center;
  }

  .icon-button {
    width: 42px;
    height: 42px;
  }

  .eyebrow {
    max-width: calc(100% - 56px);
    font-size: 0.72rem;
  }

  .next-card {
    min-height: 0;
    padding: 14px;
  }

  .next-card::after {
    right: -58px;
    bottom: 18px;
    width: min(58%, 250px);
  }

  .next-game {
    min-height: 0;
  }

  .status-row {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
  }

  .pill {
    min-height: 26px;
    padding: 4px 9px;
    font-size: 0.7rem;
  }

  .next-date {
    font-size: 0.82rem;
  }

  .matchup {
    gap: 5px;
    margin-bottom: 8px;
    font-size: clamp(1.9rem, 8.8vw, 2.65rem);
  }

  .matchup em {
    min-height: 24px;
    padding: 3px 9px;
    font-size: 0.78rem;
  }

  .game-meta {
    display: grid;
    gap: 4px;
  }

  .game-meta span + span::before {
    content: "";
    margin: 0;
  }

  .game-actions {
    gap: 8px;
    margin-top: 12px;
  }

  .action-link {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  .controls {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

  .toggle {
    justify-content: flex-end;
  }

  .game-card {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .game-line {
    align-items: flex-start;
    display: grid;
    gap: 4px;
  }

  .opponent span {
    white-space: normal;
  }

  .time {
    justify-self: start;
  }
}
