:root {
  --bg: #101114;
  --panel: #191b20;
  --panel-2: #20232a;
  --text: #f4f1ea;
  --muted: #a7a59f;
  --line: #30343d;
  --accent: #36d19a;
  --accent-2: #f0c75e;
  --danger: #ff6f61;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

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

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #15171b;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #07120d;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-block h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.brand-block p,
.eyebrow,
#currentArtist,
#heroCopy,
.country-notes,
.section-heading span,
.track-meta,
.detail-card p,
.comment-meta,
.lyrics-note {
  color: var(--muted);
}

.brand-block p {
  margin: 4px 0 0;
  font-size: 13px;
}

.control-group {
  display: grid;
  gap: 8px;
}

.control-group label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

select,
input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 12px;
  outline: none;
}

select:focus,
input:focus {
  border-color: var(--accent);
}

.country-notes {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.55;
}

.main-panel {
  min-width: 0;
  padding: 24px;
}

.hero {
  min-height: 150px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #1c2323 0%, #1b1d25 52%, #221f1a 100%);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow);
}

.hero h2 {
  margin: 5px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

#heroCopy {
  margin: 0;
  max-width: 720px;
  line-height: 1.55;
}

.metric-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.metric {
  border: 1px solid var(--line);
  background: rgba(16, 17, 20, 0.7);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 112px;
}

.metric strong {
  display: block;
  color: var(--accent-2);
  font-size: 22px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.content-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(310px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.track-list-panel,
.player-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  min-width: 0;
}

.track-list-panel {
  max-height: calc(100vh - 222px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.section-heading {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading h3 {
  margin: 0;
  font-size: 17px;
}

.track-list {
  overflow: auto;
  padding: 8px;
}

.track-row {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  text-align: left;
  padding: 12px 10px;
  border-radius: 8px;
  cursor: pointer;
}

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

.track-row.active {
  background: #173328;
  border-color: rgba(54, 209, 154, 0.42);
}

.track-rank {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--panel-2);
  display: grid;
  place-items: center;
  color: var(--accent-2);
  font-weight: 800;
}

.track-name {
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-meta {
  margin-top: 4px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-panel {
  padding: 18px;
}

.player-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.player-topline h3 {
  margin: 4px 0 4px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: 0;
}

.rank-pill {
  min-width: 56px;
  height: 44px;
  border-radius: 8px;
  background: var(--accent-2);
  color: #171309;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.mode-tabs,
.info-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.mode-tabs button,
.info-tabs button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
}

.mode-tabs button.active,
.info-tabs button.active {
  background: var(--accent);
  color: #07120d;
  border-color: var(--accent);
  font-weight: 800;
}

.video-frame {
  width: 100%;
  height: clamp(176px, 16vw, 232px);
  background: #050506;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.video-frame.song-frame {
  height: clamp(156px, 14vw, 192px);
}

.video-frame.mv-frame {
  aspect-ratio: 16 / 9;
  height: auto;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.provider-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.provider-links a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}

.provider-links a:hover {
  border-color: var(--accent);
}

.details-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

.detail-card,
.info-panel {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 13px 14px;
}

.detail-card h4,
.info-panel h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  border-radius: 999px;
  padding: 6px 9px;
  background: #2c3038;
  color: #e7e2d8;
  font-size: 12px;
}

.tag.primary {
  background: rgba(54, 209, 154, 0.18);
  color: #79f0bf;
}

.info-panel {
  display: none;
  line-height: 1.62;
}

.info-panel.active {
  display: block;
}

.info-panel p {
  margin: 0 0 10px;
}

.comment {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}

.comment:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.comment blockquote {
  margin: 0;
  color: #f0eee8;
}

.comment-meta {
  margin-top: 6px;
  font-size: 12px;
}

.lyrics-note {
  font-size: 13px;
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .track-list-panel {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .main-panel,
  .sidebar {
    padding: 16px;
  }

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

  .metric-strip {
    justify-content: flex-start;
  }

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