@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #16203d;
  --panel: #202d54;
  --panel-2: #2c407b;
  --border: #3a4d82;
  --text: #eef6fa;
  --muted: #93a8c4;
  --accent: #6fb8dd;
  --accent-2: #82c8e5;
  --accent-text: #0a2333;
  --green: #38d976;
  --red: #ff5470;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
}

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Navbar ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 27, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(130, 200, 229, 0.22);
}
.navbar .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  gap: 16px;
}
/* Explicit column placement — without this, hiding .nav-links on mobile removes it
   from the grid entirely, which shifts brand/nav-right into columns 1 and 2 instead
   of staying centered in column 2 and right-aligned in column 3. */
.navbar .wrap > .nav-links { grid-column: 1; }
.navbar .wrap > .brand { grid-column: 2; }
.navbar .wrap > .nav-right { grid-column: 3; }
.brand {
  justify-self: center;
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
}
.brand:hover { opacity: 0.8; }
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}
.navbar .wrap > .nav-links { justify-self: end; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  text-transform: lowercase;
  color: #9fc3d1;
  white-space: nowrap;
}
.nav-links a:hover { color: #eef6fb; }
.nav-links a.active {
  background: var(--accent-2);
  color: var(--accent-text);
  font-weight: 700;
}
.nav-icon {
  width: 15px;
  height: 15px;
  display: block;
}
.nav-icon[src*="trophy"] {
  width: 22.5px;
  height: 22.5px;
}
/* Icons are colored to match --accent-2 — invisible on the active pill's matching
   background, so force them dark there like the active label text already is. */
.nav-links a.active .nav-icon,
.mobile-nav-panel a.active .nav-icon {
  filter: brightness(0);
}
.nav-right {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 3px;
  border: 1px solid rgba(130, 200, 229, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: #eef6fb;
  font-size: 16px;
  cursor: pointer;
}

.mobile-nav-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0 24px 16px;
  background: rgba(10, 14, 27, 0.96);
  border-bottom: 1px solid rgba(130, 200, 229, 0.22);
}
.mobile-nav-panel a {
  padding: 12px 14px;
  border-radius: 3px;
  color: #9fc3d1;
  font-size: 15px;
  font-weight: 600;
  text-transform: lowercase;
  text-align: center;
}
.mobile-nav-panel a .nav-icon { display: inline-block; vertical-align: middle; margin-right: 6px; }
.mobile-nav-panel a.active {
  background: var(--accent-2);
  color: var(--accent-text);
  font-weight: 700;
}
.mobile-nav-panel.open { display: flex; }

/* ---- Hero ---- */
.hero {
  position: relative;
  margin-top: 24px;
  border-radius: 8px;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  background: url('/images/rose-new-trick-header.webp') center / cover no-repeat, radial-gradient(130% 120% at 75% 0%, #14232a 0%, #0a1216 50%, #060a0d 100%);
  border: 1px solid var(--border);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Bottom-heavy scrim guarantees legibility under the bottom-anchored text on any
     crop (mobile included); the diagonal layer adds the side-lit desktop look on
     top without weakening that base coverage. */
  background:
    linear-gradient(260deg, transparent 30%, rgba(6,10,13,0.5) 58%, rgba(6,10,13,0.82) 100%),
    linear-gradient(0deg, rgba(6,10,13,0.85) 0%, rgba(6,10,13,0.35) 45%, rgba(6,10,13,0.1) 75%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  max-width: 520px;
  color: #eef6fa;
}
.badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 3px;
  background: var(--accent-2);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
  font-size: 64px;
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  text-transform: lowercase;
}
.hero h1 span { display: block; }
.hero p { color: #b9ccd3; margin: 0 0 20px; font-size: 15px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  padding: 12px 20px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 13px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent-2); color: var(--accent-text); }
.btn-ghost { background: rgba(255,255,255,0.06); border-color: var(--border); color: var(--text); }
.btn-icon {
  width: 15px;
  height: 15px;
  display: block;
  /* .btn-primary always sits on the light accent background, same as the icon's own
     fill — force it dark so it doesn't disappear, same fix as the active nav icons. */
  filter: brightness(0);
}

/* ---- Section ---- */
.section { margin-top: 44px; scroll-margin-top: 84px; }
.section-title {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
  font-size: 26px;
  text-transform: lowercase;
  letter-spacing: -0.005em;
  border-bottom: 2px solid var(--accent-2);
  display: inline-block;
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.section-title .keep-case { text-transform: none; }
.section-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
  max-width: 620px;
}

/* ---- Upcoming release banner ---- */
.release-banner {
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px;
  text-align: center;
}
.release-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: lowercase;
  margin-bottom: 10px;
}
.release-title {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
  font-size: 44px;
  text-transform: lowercase;
}
.countdown {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}
.countdown-unit {
  background: rgba(130, 200, 229, 0.14);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  min-width: 64px;
}
.countdown-value {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
  font-size: 28px;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.countdown-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 4px;
  text-transform: lowercase;
}
.countdown-live {
  font-size: 22px;
  font-weight: 800;
  color: var(--red);
}
.release-banner .hero-actions { justify-content: center; margin-top: 24px; }
.release-banner .section-sub { margin-left: auto; margin-right: auto; }

/* ---- Link grid (listen/buy/community/official) ---- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.link-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px;
  transition: border-color 0.15s;
}
.link-card:hover { border-color: var(--accent); }
.link-header { display: flex; align-items: center; gap: 10px; }
.link-icon { width: 28px; height: 28px; display: block; flex-shrink: 0; object-fit: cover; border-radius: 4px; }
.link-icon[src*="Threads"] { width: 22px; height: 22px; }
.link-icon[src*="xlogo"] { width: 22px; height: 22px; }
.link-icon-letter {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1;
  display: block;
  flex-shrink: 0;
}
.link-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.link-note { color: var(--muted); font-size: 12px; }

/* ---- Accomplishments ---- */
.accolade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.accolade-tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
}
.accolade-value {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
  font-size: 30px;
  color: var(--accent-2);
}
.accolade-label { font-size: 13px; font-weight: 600; margin-top: 4px; }
.accolade-note { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.accolade-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 2; }

/* ---- Goal cards ---- */
.goal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
.goal-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--accent);
  background: rgba(130,200,229,0.18);
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.goal-title { font-weight: 700; font-size: 16px; margin-bottom: 12px; }
.goal-values { display: flex; align-items: baseline; gap: 6px; font-size: 20px; font-weight: 700; }
.goal-values .goal-total { color: var(--muted); font-size: 14px; font-weight: 500; }
.progress-bar {
  height: 8px;
  border-radius: 3px;
  background: var(--panel-2);
  overflow: hidden;
  margin: 12px 0 8px;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}
.goal-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.goal-pct { color: var(--accent-2); font-weight: 700; }

/* ---- Stat tiles ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.stat-tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
}
.stat-label { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.stat-value { font-size: 30px; font-weight: 800; }
.stat-value.small { font-size: 16px; font-weight: 700; color: var(--muted); }
.stat-delta { font-size: 12px; margin-top: 8px; font-weight: 600; }
.stat-delta.up { color: var(--green); }
.stat-delta.live { color: var(--accent); }

/* ---- Tables ---- */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: lowercase;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--panel-2); }
.rank-cell { font-weight: 800; color: var(--accent); width: 50px; }
.track-name { font-weight: 700; }
.track-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.delta-up { color: var(--green); font-size: 12px; margin-left: 6px; }
.delta-down { color: var(--red); font-size: 12px; margin-left: 6px; }
.stream-up { color: var(--green); }
.stream-down { color: var(--red); }

/* ---- Country chips ---- */
.country-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 4px 10px;
  font-size: 12px;
}
.country-chip .pos { color: var(--accent-2); font-weight: 700; }

/* ---- Region tabs / pills ---- */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pill-btn {
  padding: 8px 16px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: lowercase;
  cursor: pointer;
}
.pill-btn.active {
  background: var(--accent-2);
  color: var(--accent-text);
  border-color: transparent;
}

/* ---- Awards ---- */
.award-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.award-status {
  padding: 6px 14px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  text-transform: lowercase;
}
.award-status.active { background: rgba(56,217,118,0.15); color: var(--green); }
.award-status.closed { background: rgba(147,168,196,0.15); color: var(--muted); }

/* ---- Video grid ---- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.video-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.video-card img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.video-meta { padding: 14px; }
.video-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.video-stats { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

.footer {
  margin: 60px 0 30px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgb(10, 14, 27);
  border-radius: 12px;
  padding: 14px 26px;
  margin-bottom: 18px;
}
.footer-brand-icon {
  height: 36px;
  width: auto;
  display: block;
}
.footer-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}
.footer-brand-word {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
  font-size: 17px;
  color: #eef6fb;
  letter-spacing: -0.01em;
}
.footer-brand-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--accent-2);
  margin-top: 3px;
}

.notice {
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 14px 18px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 20px;
}
.notice strong { color: var(--accent-2); }

@media (max-width: 720px) {
  .hero h1 { font-size: 40px; }
  .nav-links { display: none; }
  .nav-right { justify-self: end; }
  .mobile-menu-btn { display: block; }
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrap table { min-width: 560px; }

  /* Charts page tables specifically: drop the secondary columns instead of forcing
     horizontal scroll — Rank/Track/primary-metric are what actually matters at this
     width, and cramming 4-5 columns into ~325px was what made the page feel cut off. */
  .table-wrap table.spotify-chart-table,
  .table-wrap table.apple-chart-table,
  .table-wrap table.melon-chart-table { min-width: 0; width: 100%; }
  .spotify-chart-table th:nth-child(4), .spotify-chart-table td:nth-child(4),
  .spotify-chart-table th:nth-child(5), .spotify-chart-table td:nth-child(5) { display: none; }
  .apple-chart-table th:nth-child(4), .apple-chart-table td:nth-child(4) { display: none; }
  .melon-chart-table th:nth-child(3), .melon-chart-table td:nth-child(3) { display: none; }
}
