@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800&family=Space+Mono:wght@400;700&display=swap");

:root {
  --bg: #070707;
  --surface: #111111;
  --surface-2: #1d1d1b;
  --ink: #fff7ea;
  --muted: #b5aa9d;
  --line: rgba(255, 122, 24, 0.24);
  --orange: #ff7918;
  --orange-2: #ffb15c;
  --teal: #35b8a5;
  --plum: #4b2f28;
  --gold: #ffd166;
  --danger: #ff5b61;
  --shadow: 0 22px 52px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 121, 24, 0.11) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 121, 24, 0.07) 1px, transparent 1px),
    linear-gradient(135deg, #050505 0%, #10100f 50%, #1b120b 100%);
  background-size: 28px 28px, 28px 28px, auto;
  font-family: "Inter", system-ui, sans-serif;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.app {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(255, 121, 24, 0.36);
  background:
    linear-gradient(130deg, rgba(5, 5, 5, 0.94), rgba(47, 25, 10, 0.86)),
    #080808;
  color: #fffaf0;
  display: flex;
  align-items: flex-end;
  padding: clamp(24px, 5vw, 54px);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(4.25rem, 15vw, 10.5rem);
  line-height: 0.8;
  letter-spacing: 0;
}

.hero p {
  max-width: 580px;
  margin: 14px 0 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 247, 234, 0.78);
}

.eyebrow {
  margin: 0;
  color: var(--orange);
  font-family: "Space Mono", monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--orange-2);
}

.hero__court {
  position: absolute;
  inset: 0;
  opacity: 0.8;
}

.court-line {
  position: absolute;
  border: 3px solid rgba(255, 121, 24, 0.34);
}

.court-line--arc {
  width: min(520px, 70vw);
  aspect-ratio: 1;
  right: -120px;
  bottom: -190px;
  border-radius: 50%;
}

.court-line--paint {
  width: min(280px, 42vw);
  height: 170px;
  right: 80px;
  bottom: 0;
  border-bottom: 0;
}

.court-line--rim {
  width: 70px;
  height: 70px;
  right: 184px;
  bottom: 126px;
  border-radius: 50%;
  border-color: rgba(255, 177, 92, 0.82);
}

.court-line--half {
  width: 360px;
  height: 360px;
  left: -180px;
  top: -120px;
  border-radius: 50%;
}

.scorebar {
  margin: 14px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 48px;
  gap: 10px;
}

.scorebar__item,
.icon-button,
.roster,
.board,
.result,
.slot,
.player-card {
  border: 1px solid var(--line);
  background: rgba(17, 17, 17, 0.9);
  box-shadow: var(--shadow);
}

.scorebar__item {
  min-height: 72px;
  padding: 13px 14px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.scorebar__item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.scorebar__item strong {
  font-size: 1.55rem;
  color: var(--orange-2);
}

.icon-button {
  color: var(--orange-2);
  font-size: 1.5rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.4fr);
  gap: 14px;
  align-items: start;
}

.roster,
.board {
  padding: 18px;
}

.roster {
  position: sticky;
  top: 14px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: 1.3rem;
}

#simulateButton {
  min-height: 42px;
  padding: 0 18px;
  background: var(--orange);
  color: #111;
  font-weight: 800;
}

.slots {
  display: grid;
  gap: 10px;
}

.slot {
  min-height: 92px;
  padding: 12px;
  display: grid;
  grid-template-columns: 48px 1fr 32px;
  gap: 12px;
  align-items: center;
}

.slot__pos {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--orange-2);
  font-weight: 800;
}

.slot__name {
  margin: 0;
  font-weight: 800;
}

.slot__meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.slot__remove {
  width: 32px;
  height: 32px;
  background: rgba(255, 91, 97, 0.16);
  color: var(--danger);
  font-weight: 900;
}

.slot.is-empty {
  border-style: dashed;
}

.result {
  margin-top: 12px;
  padding: 16px;
  background: #050505;
  color: #fffaf0;
}

.result h3 {
  margin: 5px 0 0;
  font-size: 1.55rem;
}

.result p:last-of-type {
  color: rgba(255, 250, 240, 0.72);
  line-height: 1.55;
}

.meter {
  width: 100%;
  height: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ff4d00, var(--orange-2), var(--gold));
  transition: width 300ms ease;
}

.section-head--filters {
  align-items: flex-start;
}

.board-count {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.filter-panel {
  width: min(100%, 480px);
  display: grid;
  gap: 8px;
}

.search-box,
.select-row label {
  display: grid;
  gap: 5px;
}

.search-box span,
.select-row span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-box input,
.select-row select {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  background: #090909;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  padding: 0 10px;
}

.select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.filter {
  min-width: 42px;
  min-height: 34px;
  padding: 0 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
}

.filter.is-active {
  background: var(--orange);
  color: #111;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.player-card {
  min-height: 190px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 150px;
  padding: 18px;
  border: 1px dashed var(--line);
  background: rgba(17, 17, 17, 0.7);
  display: grid;
  align-content: center;
  gap: 6px;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state p {
  color: var(--muted);
}

.player-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 121, 24, 0.72);
}

.player-card.is-picked {
  opacity: 0.52;
}

.player-card__top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.34), transparent 24px),
    linear-gradient(135deg, #050505, var(--orange));
  color: #fff7ea;
  font-family: "Space Mono", monospace;
  font-weight: 700;
}

.player-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.player-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.chips,
.ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 5px 7px;
  background: rgba(255, 121, 24, 0.14);
  color: var(--orange-2);
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
}

.rating {
  flex: 1 1 62px;
  min-width: 62px;
  padding: 7px;
  background: var(--surface-2);
}

.rating span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rating strong {
  display: block;
  margin-top: 2px;
  font-size: 0.96rem;
}

.draft-button {
  min-height: 38px;
  width: 100%;
  background: var(--orange);
  color: #111;
  font-weight: 800;
}

.draft-button:disabled {
  cursor: not-allowed;
  background: #3b3b37;
  color: #80766b;
}

.load-more {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  background: #0d0d0d;
  border: 1px solid var(--line);
  color: var(--orange-2);
  font-weight: 800;
}

.load-more[hidden] {
  display: none;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

@media (max-width: 820px) {
  .layout,
  .scorebar {
    grid-template-columns: 1fr;
  }

  .roster {
    position: static;
  }

  .section-head,
  .section-head--filters,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .filters {
    justify-content: flex-start;
  }

  .filter-panel {
    width: 100%;
  }

  .icon-button {
    min-height: 48px;
  }
}

@media (max-width: 520px) {
  .app {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero {
    min-height: 260px;
    padding: 22px;
  }

  .slot {
    grid-template-columns: 42px 1fr 32px;
  }

  .slot__pos {
    width: 42px;
    height: 42px;
  }

  .select-row {
    grid-template-columns: 1fr;
  }
}
