/* ===================================================
   NOBODY — Music Gallery
   Dark/Light theme with all features
   =================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------- Theme Variables ---------- */
:root,
[data-theme="dark"] {
  --bg:       #0a0a0a;
  --bg-card:  #111111;
  --bg-hover: #1a1a1a;
  --surface:  #161616;
  --border:   #222222;
  --text:     #e8e8e8;
  --text-dim: #777777;
  --accent:   #ffffff;
  --accent2:  #c0c0c0;
  --red:      #ff3333;
  --player-bg: rgba(12, 12, 12, 0.95);
  --header-bg: rgba(10, 10, 10, 0.92);
  --search-bg: #111111;
  --wave-color: #333333;
  --wave-active: #ffffff;
  --toast-bg: #222222;
}

[data-theme="light"] {
  --bg:       #f5f5f5;
  --bg-card:  #ffffff;
  --bg-hover: #ebebeb;
  --surface:  #e8e8e8;
  --border:   #d4d4d4;
  --text:     #1a1a1a;
  --text-dim: #636363;
  --accent:   #0a0a0a;
  --accent2:  #444444;
  --player-bg: rgba(245, 245, 245, 0.95);
  --header-bg: rgba(245, 245, 245, 0.92);
  --search-bg: #ffffff;
  --wave-color: #cccccc;
  --wave-active: #0a0a0a;
  --toast-bg: #ffffff;
}

:root {
  --radius:   12px;
  --radius-sm:6px;
  --font:     'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body:'Inter', system-ui, sans-serif;
  --player-h: 80px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: var(--player-h);
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; color: inherit; font-family: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* ---------- HEADER / NAV ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.3s, padding 0.3s, backdrop-filter 0.3s;
}

.header.scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(40px) saturate(1.2);
  -webkit-backdrop-filter: blur(40px) saturate(1.2);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.nav__links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  transition: color 0.3s;
  text-transform: uppercase;
}

.nav__link:hover,
.nav__link.active {
  color: var(--accent);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-dim);
  transition: color 0.3s, background 0.3s;
}

.theme-toggle:hover {
  color: var(--accent);
  background: rgba(128,128,128,0.1);
}

/* Burger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  z-index: 101;
}

.nav__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transition: transform 0.3s, opacity 0.3s;
}

.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: -60px;
  width: calc(100% + 120px);
  height: calc(100% + 120px);
  z-index: 0;
  filter: blur(60px);
}

.hero__grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
}

.hero__content {
  position: relative;
  text-align: center;
  z-index: 2;
}

.hero__subtitle {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.hero__title {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(5rem, 15vw, 14rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin-bottom: 32px;
}

.hero__title-line { display: block; }

.hero__desc {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 440px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 60px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero__cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.hero__cta:hover::after {
  transform: translateX(100%);
}

.hero__cta:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.35);
}

.hero__cta-icon { font-size: 0.7rem; }

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 2;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 120px 0;
  scroll-margin-top: 80px;
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 60px;
  margin-bottom: 20px;
}

.section__title {
  font-family: var(--font);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section__desc {
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* ---------- SEARCH BAR ---------- */
.tracks__search-wrapper {
  position: relative;
  max-width: 400px;
  margin: 0 auto 24px;
}

.tracks__search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.tracks__search {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--search-bg);
  border: 1px solid var(--border);
  border-radius: 60px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s;
}

.tracks__search::placeholder {
  color: var(--text-dim);
}

.tracks__search:focus {
  border-color: var(--accent);
}

/* ---------- TRACKS FILTERS ---------- */
.tracks__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 48px;
}

.filter-btn {
  font-size: 0.8rem;
  padding: 8px 20px;
  border-radius: 60px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  text-transform: capitalize;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.filter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ---------- TRACK LIST ---------- */
.tracks__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.track {
  display: grid;
  grid-template-columns: 48px 48px 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: transparent;
  transition: background 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.track:hover {
  background: var(--bg-hover);
  transform: translateX(4px);
}

.track.playing {
  background: var(--surface);
}

.track__number {
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  width: 48px;
  position: relative;
}

.track__number .num { transition: opacity 0.2s; }

.track__play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.track:hover .track__number .num,
.track.playing .track__number .num { opacity: 0; }

.track:hover .track__play-icon,
.track.playing .track__play-icon { opacity: 1; }

.track.playing .track__play-icon { color: var(--accent); }

/* Track cover thumbnail */
.track__cover {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  color: var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.track:hover .track__cover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.track__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

img.lazy { opacity: 0; }
img.lazy.loaded { opacity: 1; }

.track:hover .track__cover img {
  transform: scale(1.1);
}

/* Equalizer animation */
.track__eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.track__eq span {
  display: block;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: eqBar 0.8s ease-in-out infinite alternate;
}

.track__eq span:nth-child(1) { height: 30%; animation-delay: 0s; }
.track__eq span:nth-child(2) { height: 70%; animation-delay: 0.15s; }
.track__eq span:nth-child(3) { height: 50%; animation-delay: 0.3s; }
.track__eq span:nth-child(4) { height: 90%; animation-delay: 0.1s; }

@keyframes eqBar {
  0%   { height: 20%; }
  100% { height: 100%; }
}

.track__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.track__title {
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track.playing .track__title { color: var(--accent); }

.track__tags {
  display: flex;
  gap: 6px;
}

.track__tag {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.track__duration {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  min-width: 40px;
  text-align: right;
}

/* Share button */
.track__share {
  opacity: 0;
  transition: opacity 0.25s;
  padding: 6px;
  border-radius: 6px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}

.track:hover .track__share { opacity: 1; }

.track__share:hover {
  color: var(--accent);
  background: rgba(128,128,128,0.1);
}



/* ---------- RELEASES ---------- */
.releases__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.release-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.3s;
  cursor: pointer;
}

.release-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  border-color: var(--accent);
}

.release-card__cover {
  aspect-ratio: 1;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 4rem;
  font-weight: 700;
  color: var(--border);
  overflow: hidden;
}

.release-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.release-card:hover .release-card__cover img {
  transform: scale(1.06);
}

.release-card__info {
  padding: 20px;
}

.release-card__title {
  font-family: var(--font);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.release-card__meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  gap: 12px;
}

.release-card__type {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- ABOUT ---------- */
.about-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.about__image-placeholder {
  aspect-ratio: 1;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 8rem;
  font-weight: 700;
  color: var(--border);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}

.about__image-placeholder:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.about__image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.about__image-placeholder:hover img {
  transform: scale(1.05);
}

.about__content .section__tag { display: inline-block; }
.about__content .section__title { text-align: left; }

.about__text {
  color: var(--text-dim);
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.8;
}

.about__stats {
  display: flex;
  gap: 48px;
  margin-top: 40px;
}

.about__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about__stat-number {
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 700;
}

.about__stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* ---------- CONTACT ---------- */
.contact-section {
  border-top: 1px solid var(--border);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.contact__grid { max-width: 600px; }

.contact__text {
  color: var(--text-dim);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact__social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s;
}

.contact__social:hover {
  border-color: var(--accent);
  background: var(--surface);
}

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: calc(var(--player-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--toast-bg);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- SHARED TRACK PAGE ---------- */
.shared-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: var(--player-h);
  background: var(--bg);
}

.shared-page__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--bg-card) 0%, var(--bg) 70%);
  opacity: 0.6;
}

.shared-page__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 40px;
  max-width: 420px;
  animation: sharedFadeIn 0.6s ease-out;
}

@keyframes sharedFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.shared-page__cover {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  margin-bottom: 8px;
}

.shared-page__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shared-page__cover span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 64px;
  font-weight: 700;
  color: var(--text-dim);
  opacity: 0.3;
}

.shared-page__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.shared-page__artist {
  font-size: 14px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.shared-page__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.shared-page__tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
}

.shared-page__play {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 14px 36px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 50px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.shared-page__play:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.shared-page__home {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.shared-page__home:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ---------- PLAYER BAR ---------- */
.player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--player-h);
  background: var(--player-bg);
  backdrop-filter: blur(30px);
  border-top: 1px solid var(--border);
  z-index: 200;
  display: flex;
  align-items: center;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.player.visible { transform: translateY(0); }

.player__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 2fr auto;
  align-items: center;
  gap: 24px;
}

.player__track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player__cover {
  width: 48px;
  height: 48px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--border);
  flex-shrink: 0;
  border: 1px solid var(--border);
  overflow: hidden;
}

.player__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player__meta { min-width: 0; }

.player__title {
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__artist {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Player controls */
.player__controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player__btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, transform 0.2s, color 0.2s;
  color: var(--text-dim);
}

.player__btn:hover {
  color: var(--accent);
  background: rgba(128,128,128,0.1);
}

.player__btn--play {
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: var(--bg) !important;
}

.player__btn--play:hover {
  transform: scale(1.08);
}

.player__btn--mode {
  width: 32px;
  height: 32px;
}

.player__btn--mode.active {
  color: var(--accent);
}

/* Waveform */
.player__progress-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player__waveform-container {
  flex: 1;
  height: 32px;
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
}

.player__waveform {
  width: 100%;
  height: 100%;
  display: block;
}

.player__waveform-progress {
  display: none;
}

.player__time {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
}

/* Volume */
.player__volume-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player__volume {
  width: 80px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  cursor: pointer;
}

.player__volume-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  width: 100%;
}

/* Loading spinner for waveform */
.player__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.player__loading.active {
  opacity: 1;
}

.player__loading-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: loadPulse 1.2s ease-in-out infinite;
}

.player__loading-dot:nth-child(2) { animation-delay: 0.15s; }
.player__loading-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes loadPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* Error state */
.player__error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--red);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.player__error.active {
  opacity: 1;
}

/* Track duration auto-calculated */
.track__duration--loading {
  color: var(--border);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about__image-placeholder {
    max-width: 250px;
    margin: 0 auto;
    font-size: 5rem;
  }

  .about__content { text-align: center; }
  .about__content .section__tag { display: inline-block; }
  .about__content .section__title { text-align: center; }
  .about__text { text-align: center; }
  .about__stats { justify-content: center; }
  .about__stat { align-items: center; }

  /* Contact — center on mobile */
  .contact-section { text-align: center; }
  .contact__grid {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .contact__info { display: flex; flex-direction: column; align-items: center; }
  .contact__text { text-align: center; }
  .contact__links { justify-content: center; }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    padding: 100px 40px 40px;
    gap: 24px;
    border-left: 1px solid var(--border);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
  }

  .nav__links.open { right: 0; }
  .nav__burger { display: flex; }

  .hero__title {
    font-size: clamp(4rem, 18vw, 8rem);
  }

  .hero__desc {
    font-size: 0.9rem;
    padding: 0 20px;
    margin-bottom: 36px;
  }

  .hero__cta {
    padding: 14px 32px;
    font-size: 0.85rem;
  }

  .section { padding: 60px 0; }
  .section__header { margin-bottom: 32px; }
  .section__desc { font-size: 0.85rem; padding: 0 16px; }

  /* Remove min-height on about/contact — too much blank space on mobile */
  .about-section,
  .contact-section {
    min-height: auto;
  }

  /* Horizontal scrollable filters */
  .tracks__filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-bottom: 24px;
  }
  .tracks__filters::-webkit-scrollbar { display: none; }
  .filter-btn { white-space: nowrap; flex-shrink: 0; }

  /* Reduce gap between desc and search */
  .tracks__search-wrapper { margin-top: -8px; }

  /* Increase body padding so player doesn't cover content */
  body { padding-bottom: 120px; }

  /* Player mobile — compact 2-row layout */
  .player {
    height: auto;
    min-height: auto;
  }

  .player__inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px 12px;
    padding: 8px 16px 10px;
  }

  .player__track-info {
    grid-column: 1;
    grid-row: 1;
  }

  .player__cover { width: 40px; height: 40px; flex-shrink: 0; }

  .player__controls {
    grid-column: 2;
    grid-row: 1;
    gap: 2px;
  }

  .player__progress-wrapper {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    gap: 8px;
  }

  .player__waveform-container {
    height: 24px;
  }

  .player__btn { width: 36px; height: 36px; }
  .player__btn--play { width: 44px; height: 44px; }
  .player__btn--mode { display: none; }

  .player__volume-wrapper { display: none; }

  .track {
    grid-template-columns: 32px 40px 1fr auto;
    gap: 8px;
    padding: 10px 12px;
  }

  .track__number {
    width: 32px;
    font-size: 0.8rem;
  }

  .track__share { display: none; }

  .track__cover {
    width: 40px;
    height: 40px;
  }

  .track__title {
    font-size: 0.88rem;
  }

  .releases__grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }

  .release-card__info { padding: 14px; }
  .release-card__title { font-size: 0.95rem; }

  /* Contact */
  .contact__grid { padding: 0 16px; }
  .contact__links { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .hero {
    min-height: 85vh;
  }

  .hero__title {
    font-size: clamp(3rem, 20vw, 6rem);
  }

  .hero__subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    margin-bottom: 16px;
  }

  .hero__scroll { bottom: 24px; }

  .section { padding: 48px 0; }
  .container { padding: 0 16px; }

  .section__title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .track {
    grid-template-columns: 24px 36px 1fr auto;
    gap: 6px;
    padding: 8px 10px;
  }

  .track__number {
    width: 24px;
    font-size: 0.7rem;
  }

  .track__cover {
    width: 36px;
    height: 36px;
  }

  .track__title { font-size: 0.82rem; }
  .track__tag { font-size: 0.6rem; }
  .track__duration { font-size: 0.7rem; min-width: 34px; }

  .about__stat-number { font-size: 1.6rem; }

  .about__stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
  }

  .about__stat { align-items: center; text-align: center; }

  /* Player more compact on small screens */
  body { padding-bottom: 110px; }
  .player__inner { padding: 6px 12px 8px; gap: 4px 8px; }
  .player__cover { width: 36px; height: 36px; }
  .player__title { font-size: 0.8rem; }
  .player__artist { font-size: 0.62rem; }
  .player__btn--play { width: 40px; height: 40px; }
  .player__btn { width: 32px; height: 32px; }
  .player__time { font-size: 0.62rem; }
  .player__waveform-container { height: 20px; }

  .shared-page__cover { width: 160px; height: 160px; }
  .shared-page__title { font-size: 22px; }
}

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Empty state */
.tracks__empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.tracks__empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.tracks__empty p { font-size: 0.9rem; }

/* ---------- Section Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Micro-interactions ---------- */
.track:active {
  transform: translateX(2px) scale(0.995);
}

.release-card:active {
  transform: translateY(-2px) scale(0.98);
}

.filter-btn:active {
  transform: translateY(0) scale(0.95);
}

.hero__cta:active {
  transform: scale(0.98);
}

/* Stat numbers pulse on hover */
.about__stat-number {
  transition: transform 0.3s ease, color 0.3s ease;
}
.about__stat:hover .about__stat-number {
  transform: scale(1.1);
  color: var(--accent);
}

/* Nav links underline slide */
.nav__link {
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease, left 0.3s ease;
}
.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
  left: 0;
}

/* SoundCloud link hover */
.contact__link {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact__link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
