:root {
  --bg-deep: #05080f;
  --bg-mid: #0c1323;
  --bg-card: rgba(15, 22, 41, 0.82);
  --text-main: #ebf4ff;
  --text-muted: #93a4bf;
  --accent-cyan: #29f3ff;
  --accent-lime: #9dff00;
  --accent-pink: #ff3b9c;
  --good: #98ff3d;
  --warn: #ffcf2f;
  --bad: #ff587f;
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at top right, #1b2f59 0%, var(--bg-mid) 38%, var(--bg-deep) 100%);
  color: var(--text-main);
}

.app-shell {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(22px);
  opacity: 0.25;
  pointer-events: none;
}

.orb-left {
  width: 220px;
  height: 220px;
  left: -90px;
  top: 30px;
  background: var(--accent-cyan);
}

.orb-right {
  width: 260px;
  height: 260px;
  right: -110px;
  top: 140px;
  background: var(--accent-pink);
}

.hero {
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.12em;
  color: var(--accent-lime);
  font-weight: 700;
  font-size: 0.84rem;
}

h1,
h2 {
  margin: 0.2rem 0 0;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
}

h1 {
  font-size: clamp(2.8rem, 8vw, 4.8rem);
  line-height: 0.9;
}

h2 {
  font-size: clamp(1.5rem, 5vw, 2rem);
}

.hero-copy {
  max-width: 60ch;
  color: var(--text-muted);
  margin-top: 0.7rem;
}

.control-card,
.stat-card,
.share-card,
.important-card,
.contender-card,
.cta-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px var(--shadow);
  backdrop-filter: blur(5px);
  border-radius: 18px;
}

.control-card {
  padding: 1rem;
  margin-bottom: 1rem;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
}

.picker-label {
  margin: 0 0 0.4rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.team-picker-selection {
  margin: 0 0 0.7rem;
  color: var(--text-main);
  font-weight: 700;
}

.compact-team-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.compact-team-selected {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.compact-team-logo-wrap {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 11, 18, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
}

.compact-team-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.compact-team-copy {
  min-width: 0;
}

.compact-team-name,
.compact-team-meta {
  margin: 0;
}

.compact-team-name {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
}

.compact-team-meta {
  margin-top: 0.18rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.compact-team-toggle {
  flex: 0 0 auto;
  border: 1px solid rgba(148, 228, 255, 0.34);
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  background: rgba(28, 55, 68, 0.45);
  color: var(--text-main);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.compact-team-toggle:hover:not([disabled]) {
  background: rgba(42, 82, 102, 0.58);
  border-color: rgba(148, 228, 255, 0.56);
  transform: translateY(-1px);
}

.compact-team-toggle[disabled] {
  opacity: 0.7;
  cursor: default;
}

.team-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 0.45rem;
}

.team-tile {
  width: 100%;
  min-height: 68px;
  padding: 0.35rem 0.2rem 0.3rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, var(--team-primary), var(--team-secondary));
  color: var(--team-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 24px rgba(0, 0, 0, 0.28);
  font-family: inherit;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
}

.team-tile:hover:not([disabled]) {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 16px 30px rgba(0, 0, 0, 0.34);
}

.team-tile[disabled] {
  opacity: 0.88;
  cursor: default;
}

.team-tile-selected {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 0 2px rgba(255, 255, 255, 0.18), 0 16px 30px rgba(0, 0, 0, 0.34);
}

.team-tile-logo-wrap {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 11, 18, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.team-tile-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.team-tile-abbrev {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
}

.button-row {
  display: flex;
  gap: 0.6rem;
  align-items: end;
}

.pulse-button {
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent-cyan), var(--accent-lime));
  color: #041014;
  cursor: pointer;
  min-height: 44px;
}

.pulse-button[disabled] {
  opacity: 0.72;
  cursor: default;
}

.meta-line,
.meta-warning,
.meta-error {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
}

.meta-line {
  color: var(--text-muted);
}

.meta-warning {
  color: var(--warn);
}

.meta-error {
  color: var(--bad);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.stat-card {
  padding: 0.9rem;
}

.stat-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  margin: 0.3rem 0 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.stat-subtext {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-clinched {
  color: var(--good);
}

.status-in-position {
  color: var(--accent-lime);
}

.status-eliminated {
  color: var(--bad);
}

.status-chasing {
  color: var(--warn);
}

.status-contending {
  color: var(--accent-cyan);
}

.share-card,
.important-card,
.contender-card,
.cta-card {
  padding: 1rem;
  margin-bottom: 1rem;
}

.share-headline {
  color: var(--accent-cyan);
  font-weight: 700;
}

.cta-link {
  display: inline-block;
  margin-top: 0.4rem;
  color: var(--accent-lime);
  font-weight: 700;
}

.contender-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.65rem;
}

.contender-row {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 10, 17, 0.76);
  padding: 0.8rem;
}

.contender-name,
.contender-meta,
.contender-need,
.contender-note {
  margin: 0;
}

.contender-name {
  font-weight: 700;
}

.contender-meta {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.contender-need {
  margin-top: 0.35rem;
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 0.88rem;
}

.contender-note {
  margin-top: 0.35rem;
  color: var(--warn);
  font-size: 0.82rem;
}

.important-controls {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.important-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab-button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(7, 11, 19, 0.75);
  cursor: pointer;
}

.tab-button-active {
  border-color: transparent;
  background: linear-gradient(120deg, rgba(41, 243, 255, 0.9), rgba(157, 255, 0, 0.9));
  color: #041014;
}

.important-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.important-toggle-input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.important-toggle-text {
  line-height: 1;
}

.important-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.65rem;
}

.top-rival-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.65rem;
}

.top-rival-row {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 10, 17, 0.76);
  padding: 0.8rem;
}

.important-game {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 10, 17, 0.76);
  padding: 0.8rem;
}

.important-game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.important-matchup {
  margin: 0;
  font-weight: 700;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.important-game-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tier-primary {
  background: rgba(41, 243, 255, 0.2);
  color: var(--accent-cyan);
}

.tier-secondary {
  background: rgba(157, 255, 0, 0.2);
  color: var(--accent-lime);
}

.tier-rival {
  background: rgba(255, 114, 94, 0.18);
  color: #ff9f90;
}

.tier-neutral {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-main);
}

.important-time,
.important-swing,
.important-why {
  margin: 0.35rem 0 0;
}

.important-time {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.important-swing {
  color: var(--accent-cyan);
  font-size: 0.86rem;
  font-weight: 700;
}

.important-why {
  color: var(--text-main);
  font-size: 0.88rem;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1rem;
}

.page-nav-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  background: rgba(7, 11, 19, 0.72);
  color: var(--text-main);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.page-nav-button-active {
  background: linear-gradient(120deg, rgba(41, 243, 255, 0.92), rgba(157, 255, 0, 0.88));
  color: #041014;
  border-color: transparent;
}

.movement-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.65rem;
}

.movement-row {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 10, 17, 0.76);
  padding: 0.8rem;
}

.info-block,
.faq-item {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question,
.faq-answer {
  margin: 0;
}

.faq-answer {
  margin-top: 0.45rem;
  color: var(--text-soft);
}

.movement-header,
.movement-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.movement-team {
  justify-content: flex-start;
}

.movement-team-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

.movement-team-name,
.movement-team-meta,
.movement-headline {
  margin: 0;
}

.movement-team-name {
  font-weight: 700;
}

.movement-team-meta {
  margin-top: 0.1rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.movement-bucket {
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.movement-headline {
  margin-top: 0.45rem;
  color: var(--text-main);
  font-size: 0.88rem;
}

.movement-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.movement-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.movement-chip-good {
  background: rgba(152, 255, 61, 0.14);
  color: var(--good);
}

.movement-chip-bad {
  background: rgba(255, 88, 127, 0.14);
  color: var(--bad);
}

.movement-chip-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.movement-toggle {
  margin-top: 0.9rem;
}

.standings-toggle-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.standings-section {
  margin-top: 1rem;
}

.standings-section-title {
  margin: 0 0 0.55rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.standings-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 10, 17, 0.76);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.standings-table th,
.standings-table td {
  padding: 0.7rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: middle;
  font-size: 0.84rem;
}

.standings-table th {
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.standings-table tbody tr:last-child td {
  border-bottom: none;
}

.standings-row-selected {
  background: rgba(41, 243, 255, 0.08);
}

.standings-team-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 180px;
}

.standings-team-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex: 0 0 auto;
}

.standings-team-name,
.standings-team-abbrev {
  display: block;
}

.standings-team-name {
  font-weight: 700;
}

.standings-team-abbrev {
  margin-top: 0.12rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.loading-panel {
  min-height: 128px;
}

@media (max-width: 860px) {
  .control-grid {
    grid-template-columns: 1fr;
  }

  .compact-team-picker {
    flex-direction: column;
    align-items: stretch;
  }

  .compact-team-toggle {
    width: 100%;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movement-header {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding: 1.2rem 0.75rem 2.5rem;
  }

  .page-nav {
    flex-wrap: wrap;
  }

  .movement-header,
  .movement-team {
    flex-direction: column;
    align-items: flex-start;
  }
}
