:root {
  --bg: #f3f5fb;
  --surface: #ffffff;
  --surface-2: #f7f9fe;
  --text: #0b1020;
  --muted: #5e667a;
  --accent: #3157e0;
  --accent-2: #7843e9;
  --success: #16a34a;
  --border: #dbe2f1;
  --shadow: 0 18px 40px rgba(27, 41, 74, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Segoe UI, Roboto, sans-serif;
  background: linear-gradient(180deg, #f7f8fc 0%, var(--bg) 100%);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}

.aurora {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.18;
  z-index: -1;
}

.aurora-1 {
  top: -80px;
  left: -120px;
  background: #6f6bff;
}

.aurora-2 {
  right: -100px;
  top: 160px;
  background: #9a57ff;
}

.container {
  width: min(1160px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.menu {
  display: flex;
  gap: 22px;
}

.menu a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  color: #2e3a57;
  font-weight: 600;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.12);
}

.main-layout {
  padding: 36px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  margin-bottom: 14px;
}

.badge {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e8ecf8;
  color: #27324d;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.hint {
  margin: 10px 0 0;
  color: #66708a;
  font-size: 12px;
}

h1 {
  margin: 12px 0 8px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
}

h1 span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.cta-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-list {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-list span {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  color: #36405d;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #131826, #212f56);
  color: #fff;
  box-shadow: 0 12px 20px rgba(33, 47, 86, 0.28);
}

.btn-ghost {
  background: #fff;
  color: #141824;
  border-color: var(--border);
}

.hero-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.panel-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cards.compact {
  margin: 0;
}

.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: #dfe6fb;
}

.card-total::before { background: linear-gradient(90deg, #3563eb, #5d7cf4); }
.card-last-song::before { background: linear-gradient(90deg, #6d55e8, #9a73ff); }
.card-unique::before { background: linear-gradient(90deg, #0ea5a4, #24c2bf); }
.card-top::before { background: linear-gradient(90deg, #d97706, #f59e0b); }
.card-online::before { background: linear-gradient(90deg, #16a34a, #22c55e); }

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(42, 58, 100, 0.12);
}

.card.mini {
  padding: 14px;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
}

.metric {
  margin: 0;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
}

.metric.small {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 600;
}

.metric.mini {
  font-size: 24px;
}

.rank-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.features-section {
  margin: 8px 0 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.features-header h2 {
  margin: 10px 0 0;
  font-size: 28px;
  line-height: 1.15;
}

.features-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feature-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f8faff);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.rank-section table tr:hover td {
  background: #f7f9ff;
}

.stats-strip {
  margin: 16px 0 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(90deg, #eef2ff, #f2ebff);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.stats-strip article {
  padding: 16px;
  border-right: 1px solid #d9ddf1;
}

.stats-strip article:last-child {
  border-right: none;
}

.stats-strip strong {
  display: block;
  font-size: 20px;
  color: #1e2b4a;
}

.stats-strip span {
  font-size: 12px;
  color: #55607f;
}

.rank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.rank-header h2 {
  margin: 0;
  font-size: 18px;
}

.updated {
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

td {
  font-size: 14px;
}

td:last-child {
  font-weight: 700;
  color: var(--success);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 18px;
}

@media (max-width: 760px) {
  .topbar-inner {
    gap: 8px;
  }

  .menu {
    display: none;
  }

  .online-pill {
    font-size: 11px;
    padding: 7px 10px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-strip article:nth-child(2n) {
    border-right: none;
  }
}
