:root {
  --color-text-primary: #fff;
  --color-text-secondary: rgba(255, 255, 255, 0.7);
  --color-bg-primary: #111;
  --color-bg-secondary: #1d1d1d;
  --color-highlight: #ff7d2e;
  --color-accent: #ff7d2e;
  --font-sans: "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  min-height: 100%;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
img { max-width: 100%; display: block; }

.discovery-shell {
  max-width: 1100px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 4rem;
}

.discovery-topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.discovery-topnav img { height: 28px; width: auto; }
.discovery-topnav a.cta {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}
.discovery-topnav a.cta:hover { color: #fff; }

/* Banner */
.artist-banner {
  position: relative;
  width: 100%;
  height: clamp(220px, 38vw, 380px);
  overflow: hidden;
  flex-shrink: 0;
}
.artist-banner img.banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.banner-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.35) 45%,
    rgba(0, 0, 0, 0.05) 100%
  );
}
.banner-content {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding: 0 1.5rem 1.5rem;
}
@media (min-width: 640px) {
  .banner-content { padding: 0 2rem 1.75rem; }
}
.artist-name {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Album header */
.album-header {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 1.5rem 1rem;
  align-items: flex-end;
  border-bottom: 1px solid var(--color-bg-secondary);
}
.album-header .cover {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
@media (min-width: 640px) {
  .album-header .cover { width: 192px; height: 192px; }
}
.album-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin: 0 0 0.5rem;
  line-height: 1.1;
}
.album-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}
.album-meta a:hover { color: #fff; text-decoration: underline; }
.album-meta .sep::before { content: "·"; margin-right: 0.75rem; color: rgba(255,255,255,0.35); }

/* Tabs */
.screen-tabs-header {
  display: flex;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
}
.screen-tabs-header label {
  position: relative;
  padding: 1rem 1.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  white-space: nowrap;
}
.screen-tabs-header label.active { color: #fff; }
.screen-tabs-header label input { position: absolute; opacity: 0; pointer-events: none; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Albums overview */
.artist-albums-overview {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin: 0 0 0.75rem;
  font-weight: 600;
}
.overview-top {
  display: grid;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .overview-top { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
.current-album {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  text-align: left;
  width: 100%;
}
.current-album img {
  width: 140px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
@media (min-width: 640px) {
  .current-album img { width: 180px; }
  .current-album { gap: 1.25rem; }
}
.current-album .year { font-size: 0.875rem; color: var(--color-text-secondary); }
.current-album .title {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0.35rem 0;
}
@media (min-width: 640px) {
  .current-album .title { font-size: 1.5rem; }
}
.current-album:hover .title { color: var(--color-accent); }
.current-album .count { font-size: 0.875rem; color: var(--color-text-secondary); }

.featured-songs-grid { display: flex; flex-direction: column; gap: 0.15rem; }
.featured-song {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  border-radius: 6px;
  padding: 0.35rem 0.25rem;
  transition: background 0.15s;
}
.featured-song:hover { background: rgba(255,255,255,0.05); }
.featured-song img {
  width: 48px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.featured-song .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.featured-song:hover .title { color: var(--color-accent); }
.featured-song .sub { font-size: 0.875rem; color: var(--color-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.section-head .section-title { margin: 0; }
.icon-btn {
  color: var(--color-text-secondary);
  padding: 0.25rem;
  line-height: 1;
}
.icon-btn:hover { color: #fff; }
.icon-btn svg { width: 1rem; height: 1rem; display: block; }
.icon-btn.rotated svg { transform: rotate(180deg); }
.icon-btn svg { transition: transform 0.2s; }

.albums-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}
.album-tile {
  flex-shrink: 0;
  width: 148px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .album-tile { width: 168px; }
}
.album-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: filter 0.15s;
}
.album-tile:hover img { filter: brightness(1.1); }
.album-tile .name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.album-tile:hover .name { color: var(--color-accent); }
.album-tile .year { font-size: 0.875rem; color: var(--color-text-secondary); }

.for-fans-of {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.for-fans-name {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

/* Song list */
.songs-pane, .info-pane, .albums-pane { padding: 0.5rem 0 2rem; }
.song-list { list-style: none; margin: 0; padding: 0; }
.song-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  height: 64px;
  padding: 0 1.5rem;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}
.song-item:hover { background: rgba(255,255,255,0.05); }
.song-item .thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}
.song-item .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-item:hover .title { color: var(--color-accent); }
.song-item .sub { font-size: 0.875rem; color: var(--color-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-item .len { color: var(--color-text-secondary); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.song-item.album-track { grid-template-columns: 2.5rem 1fr auto; }
.song-item .track-num { color: var(--color-text-secondary); text-align: center; font-variant-numeric: tabular-nums; }

.info-pane {
  padding: 1.5rem;
  max-width: 48rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}
.info-pane .genre-line {
  color: var(--color-text-primary);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}
.info-pane .bio-text {
  margin: 0;
}
.info-pane .bio-text p {
  margin: 0 0 1rem;
}
.info-pane .bio-text p:last-child {
  margin-bottom: 0;
}
.info-pane .bio-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  list-style: disc;
}
.info-pane .bio-list li {
  margin: 0.25rem 0;
}
.info-pane .bio-list:last-child {
  margin-bottom: 0;
}
.info-pane .bio-link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.info-pane .bio-link:hover {
  color: var(--color-accent);
}

.other-albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem;
}

.play-all-btn {
  margin: 1rem 1.5rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}
.play-all-btn:hover { background: rgba(255,255,255,0.14); }

/* Login modal */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  padding: 1rem;
}
.login-overlay.open { display: flex; }
.login-card {
  width: 100%;
  max-width: 288px;
  background: #111;
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 20px 50px rgba(0,0,0,0.55);
}
.login-card .logo-wrap { text-align: center; margin-bottom: 1.5rem; }
.login-card .logo-wrap img { display: inline-block; width: 156px; height: auto; }
.login-card h2 {
  margin: 1rem 0 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}
.login-card label { display: block; margin-bottom: 0.75rem; }
.login-card input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: #1a1a1a;
  color: #fff;
  outline: none;
}
.login-card input:focus { border-color: rgba(255,255,255,0.35); }
.login-card button[type="submit"] {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 1rem;
  background: #fff;
  color: #000;
  font-weight: 700;
  border-radius: 0.35rem;
}
.login-card button[type="submit"]:hover { background: #f3f3f3; }
.login-card .links {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.login-card .links a { text-decoration: underline; }
.login-card .error-msg {
  display: none;
  color: #ff6b6b;
  font-size: 0.875rem;
  margin: 0.5rem 0 0;
  text-align: center;
}
.login-card.error .error-msg { display: block; }
.login-card.error { animation: shake 0.4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.login-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: rgba(255,255,255,0.7);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.5rem;
}
.login-close:hover { color: #fff; }

.empty-note {
  padding: 1.5rem;
  color: var(--color-text-secondary);
}


/* Album embed preview (Current Album) */
.embed-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 110;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  padding: 1rem;
}
.embed-overlay.open { display: flex; }
.embed-overlay-content {
  background: transparent;
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.embed-overlay-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 1rem;
  min-height: 30px;
  padding: 0 2rem;
}
.embed-overlay-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
}
.close-embed-btn {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #999;
  font-size: 1.5rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  line-height: 1;
  padding: 0;
}
.close-embed-btn:hover { color: #fff; }
.embed-player-frame {
  width: 420px;
  max-width: 100%;
  height: 560px;
  margin: 0 auto;
}
iframe#embed-player {
  border: none;
  display: block;
  margin: 0 auto;
  width: 420px;
  height: 560px;
  max-width: 100%;
}
