* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --line: rgba(255,255,255,0.08);
  --muted: rgba(255,255,255,0.45);
  --purple: #a855f7;
  --pink: #ff2d75;
  --blue: #60a5fa;
  --green: #4ade80;
  --red: #f87171;
  --orange: #f97316;
  --gold: #f59e0b;
  --discord: #5865F2;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(168,85,247,0.22), transparent),
    radial-gradient(ellipse 60% 40% at 0% 10%, rgba(255,45,117,0.15), transparent),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(96,165,250,0.07), transparent),
    #000;
  color: white;
  min-height: 100vh;
}

/* ─── HEADER ─── */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0 7%;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.80);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 950;
  letter-spacing: -0.8px;
  text-decoration: none;
  color: white;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.archive-link {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: color 0.15s;
}
.archive-link:hover { color: rgba(255,255,255,0.70); }

.status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* ─── SOCIAL LINKS ─── */
.social-links {
  display: flex;
  gap: 8px;
}

.social-link {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.14s;
  background: rgba(255,255,255,0.04);
}

.social-link:hover {
  background: rgba(255,255,255,0.10);
  color: white;
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

.social-link.discord:hover {
  background: rgba(88,101,242,0.18);
  border-color: rgba(88,101,242,0.4);
  color: #7289da;
}

/* ─── PULSE ─── */
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 12px var(--purple);
  animation: pulse 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .3; transform: scale(.65); }
}

/* ─── HERO ─── */
.hero {
  padding: 86px 7% 48px;
  position: relative;
}

.hero-grid {
  position: relative;
  min-height: 340px;
  padding-right: 420px; /* reserves space for mockup */
}

.hero-left {
  position: relative;
  z-index: 2;
}

.hero-right {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 400px;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.hero-right img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 60px rgba(168,85,247,0.25));
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: rgba(255,255,255,0.70);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  background: rgba(255,255,255,0.04);
  text-transform: lowercase;
}

h1 {
  font-size: clamp(44px, 7.5vw, 96px);
  line-height: .88;
  letter-spacing: -4.5px;
  font-weight: 950;
}

.gradient-text {
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 55%, var(--orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  margin-top: 26px;
  max-width: 600px;
  color: rgba(255,255,255,0.55);
  font-size: 17px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-actions button,
.hero-actions a {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.06);
  color: white;
  font-size: 14px;
  font-weight: 850;
  padding: 13px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.14s;
  letter-spacing: -0.1px;
  text-decoration: none;
}

.hero-actions button:hover,
.hero-actions a:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

.hero-actions .primary {
  border: none;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 4px 24px rgba(168,85,247,0.30);
}

.hero-actions .primary:hover {
  background: linear-gradient(135deg, #b66ff8, #ff4d88);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(168,85,247,0.40);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 6px;
  transition: color 0.15s;
}
.back-link:hover { color: white; }

/* ─── CHART SECTIONS ─── */
.section {
  padding: 34px 7%;
}

.chart-view {
  display: none;
}

.chart-view.active {
  display: block;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 20px;
}

.section-title h2 {
  font-size: 32px;
  letter-spacing: -1.2px;
  font-weight: 950;
}

.col-legend {
  display: flex;
  gap: 14px;
  color: rgba(255,255,255,0.30);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.small {
  color: rgba(255,255,255,0.38);
  font-size: 12px;
  font-weight: 700;
  margin-top: 3px;
}

.countdown-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(168,85,247,0.08) 0%, rgba(255,45,117,0.05) 100%);
}

.countdown-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.countdown-time {
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.5px;
  color: white;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── CHART CARD ─── */
.chart-card {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, #0e0e0e 0%, #070707 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 32px 80px rgba(0,0,0,0.50);
}

.col-header,
.chart-row {
  display: grid;
  grid-template-columns: 58px 58px 1fr 52px 52px 52px;
  gap: 12px;
  align-items: center;
  padding: 11px 20px;
}

.daily-cols,
.daily-row {
  grid-template-columns: 58px 58px 1fr 120px;
}

.music-cols,
.music-row {
  grid-template-columns: 58px 58px 1fr;
}

.col-header {
  color: rgba(255,255,255,0.22);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 1.6px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
  text-align: center;
  text-transform: uppercase;
}

.col-header > div {
  min-width: 0;
  white-space: nowrap;
}

.col-header div:nth-child(3) {
  text-align: left;
}

.chart-row {
  min-height: 76px;
  border-bottom: 1px solid rgba(255,255,255,0.055);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.chart-row > div {
  min-width: 0;
}

.chart-row:last-child {
  border-bottom: none;
}

.chart-row:hover {
  background: rgba(255,255,255,0.038);
}

/* top 3 glow */
.chart-row.beats-viral { background: linear-gradient(90deg, rgba(249,115,22,0.12) 0%, transparent 70%); }
.chart-row.beats-viral:hover { background: linear-gradient(90deg, rgba(249,115,22,0.18) 0%, transparent 70%); }
.chart-row.rank-1 { background: linear-gradient(90deg, rgba(245,158,11,0.07) 0%, transparent 60%); }
.chart-row.rank-2 { background: linear-gradient(90deg, rgba(156,163,175,0.05) 0%, transparent 60%); }
.chart-row.rank-3 { background: linear-gradient(90deg, rgba(180,120,60,0.05) 0%, transparent 60%); }
.chart-row.rank-1:hover { background: linear-gradient(90deg, rgba(245,158,11,0.11) 0%, transparent 60%); }

.rank {
  text-align: center;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -1px;
}

.rank-1 .rank { color: var(--gold); }
.rank-2 .rank { color: rgba(200,210,220,0.9); }
.rank-3 .rank { color: rgba(180,120,60,0.9); }

.move {
  margin-top: 5px;
  font-size: 9px;
  font-weight: 950;
  text-align: center;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.3px;
}

.new { color: var(--blue); }
.re  { color: var(--orange); }
.up  { color: var(--green); }
.down { color: var(--red); }

.cover-wrap {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cover {
  width: 48px;
  height: 48px;
  object-fit: cover;
}

.cover-fallback {
  color: rgba(255,255,255,0.22);
  font-size: 18px;
}

.song-cell {
  min-width: 0;
  overflow: hidden;
}

.song-title {
  font-size: 14px;
  font-weight: 880;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.artist {
  margin-top: 4px;
  color: rgba(255,255,255,0.40);
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.artist a:hover {
  color: rgba(255,255,255,0.72);
}

.num {
  text-align: center;
  color: rgba(255,255,255,0.50);
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
  flex-shrink: 0;
}

.streams {
  text-align: right;
  color: white;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
  flex-shrink: 0;
}

.radio-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
  white-space: nowrap;
}

.radio-audience {
  font-size: 13px;
  font-weight: 850;
  color: #fff;
  line-height: 1;
}

.radio-spins {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  line-height: 1;
}

.details {
  display: none;
  grid-column: 1 / -1;
  padding: 4px 0 16px 70px;
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chart-row.open .details {
  display: block;
}

.stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.stat-label {
  color: rgba(255,255,255,0.26);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 5px;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.8px;
}

.loading, .empty {
  padding: 50px 20px;
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-weight: 800;
}

/* ─── FOOTER ─── */
footer {
  padding: 36px 7%;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: rgba(255,255,255,0.7);
}

.footer-brand img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.7;
}

.footer-center {
  color: rgba(255,255,255,0.30);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.20);
}

.footer-legal a {
  color: rgba(255,255,255,0.30);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-legal a:hover { color: rgba(255,255,255,0.60); }

.footer-socials {
  display: flex;
  gap: 8px;
}

/* ─── PLAYLISTS ─── */
#playlistsSection {
  padding-top: 0;
  padding-bottom: 8px;
}

.playlists-header {
  margin-bottom: 16px;
}

.playlists-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.4px;
}

.playlists-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}
.playlists-scroll::-webkit-scrollbar { display: none; }

.playlist-card {
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
}

.playlist-cover-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.playlist-cover-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-cover-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 140px;
}

.playlist-song {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 140px;
}

.playlist-artist {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 140px;
  margin-top: -5px;
}

/* ─── GENRE PILLS ─── */
.genre-pills {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.genre-pill {
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.60);
  font-size: 12px;
  font-weight: 850;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
  letter-spacing: 0.1px;
  font-family: inherit;
}

.genre-pill:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
  color: white;
  transform: translateY(-1px);
}

.genre-pill.active {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 14px rgba(168,85,247,0.30);
}

.genre-pill.active:hover {
  background: linear-gradient(135deg, #b66ff8, #ff4d88);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(168,85,247,0.40);
}

/* ─── MOBILE ─── */
@media (max-width: 760px) {
  header { padding: 0 20px; }
  .brand span { display: none; }
  .status { display: none; }
  .hero, .section { padding-left: 20px; padding-right: 20px; }
  h1 { letter-spacing: -2.5px; }
  .subtitle { font-size: 15px; }
  .hero-grid { padding-right: 0; min-height: unset; }
  .hero-right { display: none; }

  .col-header,
  .chart-row {
    grid-template-columns: 40px 48px 1fr 34px 34px 34px;
    gap: 8px;
    padding: 10px 14px;
  }

  .music-cols,
  .music-row {
    grid-template-columns: 40px 48px 1fr;
  }

  .daily-cols,
  .daily-row {
    grid-template-columns: 40px 48px 1fr 70px;
  }

  .cover-wrap, .cover { width: 44px; height: 44px; }
  .rank { font-size: 18px; }
  .song-title {
    font-size: 13px;
  }
  .song-cell { min-width: 0; overflow: hidden; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-brand { display: none; }
}
