:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --sidebar: #0f1117;
  --panel: #141821;
  --panel-soft: #171c26;
  --panel-hover: #1a202b;
  --border: #252b36;
  --border-soft: #1e2430;
  --text: #f2f4f8;
  --muted: #8d96a8;
  --muted-2: #687386;
  --blue: #2f81f7;
  --blue-soft: #183358;
  --green: #37d67a;
  --yellow: #f0b93f;
  --red: #ff5f63;
  --purple: #a971ff;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 18px 14px;
  border-right: 1px solid var(--border-soft);
  background: var(--sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 8px 18px;
}

.brand-logo,
.empty-icon,
.game-art {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  background: #232936;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.brand-logo {
  width: 34px;
  height: 34px;
  transform: rotate(-8deg);
  background: linear-gradient(145deg, #2f81f7, #192436);
}

.brand-logo i,
.empty-icon i,
.game-art i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #0f1117;
  transform: rotate(8deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.pro-pill {
  display: block;
  margin: 0 8px 14px;
  border: 1px solid rgba(47, 129, 247, 0.42);
  border-radius: 7px;
  padding: 9px 12px;
  background: var(--blue-soft);
  color: #b8d6ff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.nav {
  display: grid;
  gap: 2px;
}

.nav p {
  margin: 16px 10px 5px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  border-radius: 7px;
  padding: 0 10px;
  color: #c9d0dc;
  font-size: 13px;
  font-weight: 600;
}

.nav a:hover,
.nav a.active {
  background: #1a202b;
  color: var(--text);
}

.nav span,
.panel-title span {
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(47, 129, 247, 0.16);
  color: #91c0ff;
  font-size: 10px;
  font-weight: 800;
}

.sidebar-footer {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}

.sidebar-footer div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-footer strong {
  color: #d6dce7;
  font-size: 12px;
}

.sidebar-footer small {
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.4;
}

.page {
  min-width: 0;
  margin-left: 248px;
  padding: 16px 18px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.search {
  display: flex;
  align-items: center;
  width: min(620px, 100%);
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #10141c;
  color: var(--muted);
}

.search span {
  border-right: 1px solid var(--border);
  padding: 0 12px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 11px 12px;
  background: transparent;
  color: var(--text);
}

.search input::placeholder {
  color: #667185;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.top-actions a,
.top-actions button,
.filters button,
.panel-title button,
.pro-panel button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 12px;
  background: #151a23;
  color: #d8dee9;
  font-weight: 700;
}

.top-actions a,
.pro-panel button {
  border-color: rgba(47, 129, 247, 0.44);
  background: #183358;
  color: #b8d6ff;
}

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

.summary-card,
.panel {
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--panel);
}

.summary-card {
  display: grid;
  gap: 5px;
  min-height: 94px;
  padding: 14px;
}

.summary-card span,
.panel-title p,
.game-cell small,
.table-head,
.notice-row span {
  color: var(--muted);
}

.summary-card span {
  font-size: 12px;
  font-weight: 700;
}

.summary-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 24px;
  letter-spacing: 0;
}

.summary-card small {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 10px;
  margin-bottom: 10px;
}

.panel {
  overflow: hidden;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 14px;
}

h2,
p {
  margin: 0;
}

h2 {
  font-size: 16px;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 34px 18px 36px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
}

.empty-state strong {
  color: #dce2ed;
  font-size: 15px;
}

.empty-state p,
.pro-panel p {
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.pro-panel {
  background:
    linear-gradient(180deg, rgba(47, 129, 247, 0.08), transparent 120px),
    var(--panel);
}

.pro-panel p {
  padding: 16px 16px 0;
}

.pro-panel button {
  margin: 16px;
}

.table-title {
  align-items: flex-start;
}

.table-title p {
  margin-top: 4px;
  font-size: 12px;
}

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

.filters button {
  min-height: 32px;
  color: #c5ccd8;
  font-size: 12px;
}

.notice-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 14px;
  border: 1px solid rgba(240, 185, 63, 0.22);
  border-radius: 7px;
  padding: 10px 12px;
  background: rgba(240, 185, 63, 0.08);
  color: #e8cf8a;
  font-size: 12px;
}

.notice-row a {
  margin-left: auto;
  color: #ffd36b;
  font-weight: 800;
}

.game-table {
  width: 100%;
  overflow-x: auto;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 42px minmax(310px, 1.6fr) minmax(165px, 0.8fr) minmax(98px, 0.55fr) minmax(92px, 0.55fr) minmax(108px, 0.6fr) minmax(92px, 0.55fr) minmax(92px, 0.55fr) minmax(76px, 0.45fr);
  align-items: center;
  min-width: 1160px;
  column-gap: 12px;
  padding: 0 14px;
}

.table-head {
  min-height: 36px;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: #10141c;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.table-row {
  min-height: 74px;
  border-bottom: 1px solid var(--border-soft);
  color: #dce2ec;
}

.table-row:last-child {
  border-bottom: 0;
}

.table-row:hover {
  background: var(--panel-hover);
}

.rank {
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 800;
}

.game-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.game-art {
  width: 46px;
  height: 46px;
}

.game-art.real-thumb {
  display: block;
  object-fit: cover;
}

.game-art.cyan { background: linear-gradient(145deg, #2f81f7, #1aa7a8); }
.game-art.pink { background: linear-gradient(145deg, #d95087, #7d58d8); }
.game-art.lime { background: linear-gradient(145deg, #37d67a, #93c74d); }
.game-art.red { background: linear-gradient(145deg, #ff5f63, #c78137); }
.game-art.blue { background: linear-gradient(145deg, #2f81f7, #354dd8); }
.game-art.green { background: linear-gradient(145deg, #37d67a, #1b734a); }

.game-cell strong,
.game-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-cell strong {
  margin-bottom: 5px;
  color: #f0f3f8;
  font-size: 13px;
}

.game-cell small {
  max-width: 440px;
  font-size: 12px;
}

.tag-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-cell em,
.tag-cell small {
  border-radius: 999px;
  padding: 4px 7px;
  background: #202633;
  color: #c2cad8;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.tag-cell small {
  color: var(--muted);
}

.number {
  color: #e5eaf2;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.players {
  color: #ffffff;
}

.locked {
  color: #b6becb;
}

.momentum {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(141, 150, 168, 0.12);
  color: #c5ccd8;
  font-size: 12px;
  font-weight: 800;
}

.scout-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  padding: 16px;
}

.scout-hero p {
  max-width: 680px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.scout-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
}

.scout-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.scout-filters input {
  width: 110px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 10px;
  background: #10141c;
  color: var(--text);
}

.scout-filters button,
.card-actions a {
  min-height: 34px;
  border: 1px solid rgba(47, 129, 247, 0.44);
  border-radius: 7px;
  padding: 0 12px;
  background: #183358;
  color: #b8d6ff;
  font-weight: 800;
}

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

.rising-card {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.rising-top {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.rising-top strong,
.rising-top small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rising-top small,
.signal-grid span,
.thumb-read span {
  color: var(--muted);
  font-size: 12px;
}

.score {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(55, 214, 122, 0.32);
  border-radius: 7px;
  background: rgba(55, 214, 122, 0.12);
  color: #9af0bd;
  font-weight: 900;
}

.rising-card > p {
  color: #cbd3df;
  font-size: 13px;
  line-height: 1.5;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.signal-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  padding: 9px;
  background: #10141c;
}

.signal-grid strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.thumb-read {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.thumb-read div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #252b36;
}

.thumb-read i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.thumb-read strong {
  color: #dce2ed;
  font-size: 12px;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}

.card-actions a {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 1080px) {
  .summary-grid,
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pro-panel {
    grid-column: span 2;
  }

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

@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .sidebar-footer {
    position: static;
    margin: 16px 8px 0;
  }

  .page {
    margin-left: 0;
    padding: 12px;
  }

  .topbar,
  .table-title {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .filters {
    justify-content: stretch;
  }

  .top-actions a,
  .top-actions button,
  .filters button {
    flex: 1;
  }

  .summary-grid,
  .dashboard-grid,
  .pro-panel {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .notice-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .notice-row a {
    margin-left: 0;
  }

  .scout-hero,
  .scout-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .scout-filters input,
  .scout-filters button {
    width: 100%;
  }

  .rising-grid {
    grid-template-columns: 1fr;
  }

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