:root {
  --bg0: #070a0f;
  --bg1: #0d1219;
  --card: rgba(22, 30, 44, 0.72);
  --stroke: rgba(120, 162, 220, 0.14);
  --text: #e8eef9;
  --muted: #93a4bd;
  --accent: #34d399;
  --accent2: #22c55e;
  --accent-dim: rgba(52, 211, 153, 0.12);
  --blue: #60a5fa;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  font-synthesis-weight: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(52, 211, 153, 0.08), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(96, 165, 250, 0.07), transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1));
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.title-block h1 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.title-block p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(15, 22, 33, 0.65);
  font-size: 0.78rem;
  color: var(--muted);
  backdrop-filter: blur(10px);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(0.92);
  }
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.metric {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.metric .k {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric .v {
  margin-top: 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.toolbar label {
  font-size: 0.82rem;
  color: var(--muted);
}

.toolbar input[type="search"] {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(10, 14, 22, 0.55);
  color: var(--text);
  outline: none;
}

.toolbar input[type="search"]:focus {
  border-color: rgba(52, 211, 153, 0.35);
}

.toolbar .meta {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--muted);
}

.card {
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead th {
  text-align: left;
  padding: 0.85rem 1rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--stroke);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

thead th:hover {
  color: var(--text);
}

thead th .hint {
  font-weight: 400;
  opacity: 0.55;
  margin-left: 0.25rem;
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.018);
}

tbody tr:hover {
  background: rgba(52, 211, 153, 0.06);
}

tbody td {
  padding: 0.65rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(120, 162, 220, 0.08);
}

tbody tr:last-child td {
  border-bottom: none;
}

.channel {
  font-weight: 600;
  letter-spacing: -0.01em;
  word-break: break-word;
  max-width: 340px;
}

.bar-cell {
  min-width: 160px;
}

.bar-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.25), var(--accent), var(--accent2));
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.22);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.num {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}

.num-wrap {
  transition: color 0.2s ease, transform 0.2s ease;
}

.num-wrap.tick {
  color: var(--accent);
  transform: scale(1.04);
}

.muted-row td {
  color: var(--muted);
  font-style: italic;
}

.foot {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
}

.foot a {
  color: var(--blue);
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .channel {
    max-width: 220px;
  }
}
