:root {
  color-scheme: dark;
  --bg: #101114;
  --sidebar: #15171b;
  --panel: #1d2026;
  --panel-2: #262a32;
  --text: #f7f7f8;
  --muted: #b8bec9;
  --line: #363b46;
  --accent: #c4ced4;
  --accent-strong: #ffffff;
  --black: #050505;
  --danger: #d44;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: var(--accent-strong);
}

.app-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  overflow: hidden;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}

.back-link {
  width: max-content;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.back-link:hover {
  color: var(--text);
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.season {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.roster-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-right: 4px;
  overflow: auto;
}

.player-button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  width: 100%;
  padding: 9px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.player-button:hover,
.player-button.active {
  background: var(--panel-2);
  border-color: var(--accent);
}

.mini-number {
  display: grid;
  place-items: center;
  min-height: 38px;
  color: var(--accent);
  font-weight: 900;
  background: var(--black);
  border: 1px solid var(--accent);
  border-radius: 6px;
}

.player-name {
  display: block;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.player-view {
  min-width: 0;
  padding: 24px;
}

.empty-state {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
  padding: 26px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.logo {
  width: min(620px, 82vw);
  height: auto;
  margin-bottom: 24px;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 138px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.identity,
.number-card,
.section,
.videos {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.identity {
  padding: 18px;
}

.identity h2 {
  margin: 0 0 10px;
  font-size: 32px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fact {
  padding: 7px 9px;
  color: var(--muted);
  font-size: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.number-card {
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--black);
}

.number-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.number {
  color: var(--accent);
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tab-button {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--text);
  cursor: pointer;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.tab-button:hover,
.tab-button.active {
  color: var(--black);
  background: var(--accent);
  border-color: var(--accent);
}

.section {
  overflow: hidden;
}

.section h3,
.videos h3 {
  margin: 0;
  padding: 13px 14px;
  font-size: 18px;
  background: #111214;
  border-bottom: 1px solid var(--line);
}

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

td {
  padding: 10px 12px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  width: 230px;
  color: var(--muted);
}

.videos {
  margin-top: 18px;
  padding-bottom: 6px;
  overflow: hidden;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.video-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 132px;
  padding: 14px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.video-card:hover {
  border-color: var(--accent);
}

.video-card strong {
  font-size: 16px;
}

.video-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.sources {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.error {
  padding: 18px;
  color: #fff;
  background: #3a1717;
  border: 1px solid var(--danger);
  border-radius: 8px;
}

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

  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .roster-list {
    max-height: 260px;
  }

  .player-view {
    padding: 14px;
  }

  .hero,
  .video-grid {
    grid-template-columns: 1fr;
  }

  td:first-child {
    width: 48%;
  }
}
