/* ========================================
   Music Artist Website – Dark Modern Theme
   With Albums + Continuous Play
   ======================================== */

:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  --text: #e8e8ed;
  --text-muted: #9a9aa8;
  --accent: #7c5cff;
  --accent-hover: #9b82ff;
  --border: #2a2a35;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: 0.25s ease;
}


/* ========== Themes ========== */
[data-theme="violet"] {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  --text: #e8e8ed;
  --text-muted: #9a9aa8;
  --accent: #7c5cff;
  --accent-hover: #9b82ff;
  --border: #2a2a35;
}

[data-theme="cyan"] {
  --bg: #070b0e;
  --bg-elevated: #0c1419;
  --bg-card: #101a21;
  --text: #e6f4f8;
  --text-muted: #7fa3b0;
  --accent: #2ee6ff;
  --accent-hover: #7af0ff;
  --border: #1c303a;
}

[data-theme="ember"] {
  --bg: #0e0908;
  --bg-elevated: #16100e;
  --bg-card: #1c1412;
  --text: #f3eae6;
  --text-muted: #b0948a;
  --accent: #ff5a3c;
  --accent-hover: #ff7d65;
  --border: #3a2822;
}

[data-theme="matrix"] {
  --bg: #070b08;
  --bg-elevated: #0c140f;
  --bg-card: #101a14;
  --text: #e6f5ea;
  --text-muted: #7eab8c;
  --accent: #2dff6a;
  --accent-hover: #78ff9d;
  --border: #1c3024;
}

[data-theme="slate"] {
  --bg: #0b0b0d;
  --bg-elevated: #121216;
  --bg-card: #18181d;
  --text: #ececf0;
  --text-muted: #9696a3;
  --accent: #a0a0b0;
  --accent-hover: #c4c4d0;
  --border: #2c2c35;
}

/* ========== Light mode ========== */
[data-mode="light"] {
  --bg: #e8e8ec;
  --bg-elevated: #f0f0f4;
  --bg-card: #f3f3f7;
  --text: #2a2a34;
  --text-muted: #6e6e7c;
  --border: #d0d0da;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}

[data-mode="light"] .header {
  background: rgba(232, 232, 236, 0.92);
}

[data-mode="light"] .theme-toggle,
[data-mode="light"] .lang-switcher,
[data-mode="light"] .btn-radio,
[data-mode="light"] .continuous-toggle,
[data-mode="light"] .theme-dropdown,
[data-mode="light"] .mode-toggle {
  background: #f3f3f7;
}

[data-mode="light"] .hero-bg {
  opacity: 0.28;
}

[data-mode="light"] body {
  background: var(--bg);
}


.mode-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), color var(--transition);
  padding: 0;
  font-size: 0.95rem;
}

.mode-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-menu {
  position: relative;
}

.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition);
  padding: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
}

.theme-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  gap: 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.55rem;
  box-shadow: var(--shadow);
  z-index: 200;
}

.theme-menu.open .theme-dropdown {
  display: flex;
}

.theme-btn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-btn:hover {
  transform: scale(1.15);
}

.theme-btn.active {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.3);
}

.theme-btn[data-theme="violet"] { background: #7c5cff; }
.theme-btn[data-theme="cyan"]   { background: #2ee6ff; }
.theme-btn[data-theme="ember"]  { background: #ff5a3c; }
.theme-btn[data-theme="matrix"] { background: #2dff6a; }
.theme-btn[data-theme="slate"]  { background: #a0a0b0; }

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

/* ========== Header ========== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switcher {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

.lang-btn:hover:not(.active) {
  color: var(--text);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 92, 255, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(83, 52, 131, 0.15), transparent),
    var(--bg);
  z-index: -1;
}

.hero-content { max-width: 700px; }

.hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator span::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scroll 1.8s infinite;
}

@keyframes scroll {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ========== Sections ========== */
.section { padding: 6rem 0; }

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  max-width: 520px;
}

/* ========== Music Header + Toggle ========== */
.music-section {
  background: var(--bg-elevated);
}

.music-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn-radio {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-radio:hover {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.12);
  color: var(--accent-hover);
}

.continuous-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: 0.3s;
}

.slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .slider {
  background: var(--accent);
}

.toggle-switch input:checked + .slider::before {
  transform: translateX(20px);
}

/* ========== Global Player ========== */
.global-player {
  display: none;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.global-player.active {
  display: flex;
}

.gp-cover {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #1a1a2e;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gp-cover:hover {
  transform: scale(3);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  z-index: 20;
  position: relative;
}

.gp-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gp-info {
  flex: 1;
  min-width: 0;
}

.gp-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.gp-title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gp-album {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Equalizer bars – driven by Web Audio API */
.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.global-player.active .eq-bars {
  opacity: 1;
}

.eq-bars span {
  width: 2.5px;
  background: var(--accent);
  border-radius: 1px;
  height: 3px;
  transition: height 0.05s ease;
}

.gp-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gp-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.gp-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.gp-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.gp-play {
  background: var(--accent) !important;
  color: #fff !important;
  width: 42px;
  height: 42px;
}

.gp-play .icon-pause { display: none; }
.gp-play.playing .icon-play { display: none; }
.gp-play.playing .icon-pause { display: block; }

.gp-progress {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 180px;
  flex-shrink: 0;
}

.gp-progress .progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}

.gp-progress .progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
}

.gp-progress .time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.gp-volume {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.gp-mute .icon-mute { display: none; }
.gp-mute.muted .icon-vol { display: none; }
.gp-mute.muted .icon-mute { display: block; }

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* ========== Albums Tree ========== */
.albums {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.album {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  transition: border-color var(--transition);
}

.album.open {
  border-color: rgba(124, 92, 255, 0.4);
}

.album-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}

.album-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.album-cover {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: visible;
  flex-shrink: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: block;
}

.album-cover:hover {
  z-index: 30;
}

.album-cover:hover img {
  transform: scale(1.5);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.album-meta {
  flex: 1;
  min-width: 0;
}

.album-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.album-type.compilation {
  color: #f59e0b;
}

.album-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.album-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.album-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.album-play-all {
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent);
  border: 1px solid rgba(124, 92, 255, 0.3);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.album-play-all:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.album-shuffle {
  background: rgba(124, 92, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.album-share {
  background: rgba(124, 92, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.album-share:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.album-shuffle:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.album-chevron {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.album.open .album-chevron {
  transform: rotate(180deg);
}

/* Tracks list (hidden by default) */
.album-tracks {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  border-top: 1px solid transparent;
}

.album.open .album-tracks {
  max-height: 420px;
  overflow-y: auto;
  border-top-color: var(--border);
}

/* Style de l'ascenseur */
.album-tracks::-webkit-scrollbar {
  width: 6px;
}
.album-tracks::-webkit-scrollbar-track {
  background: transparent;
}
.album-tracks::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.album-tracks::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.track {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.3rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  position: relative;
}

.track:last-child {
  border-bottom: none;
}

.track:hover {
  background: rgba(255, 255, 255, 0.03);
}

.track.playing {
  background: rgba(124, 92, 255, 0.08);
}

.track-thumb {
  width: 38px;
  height: 38px;
  border-radius: 5px;
  overflow: visible;
  flex-shrink: 0;
  background: transparent;
  position: relative;
  z-index: 1;
}

.track-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: block;
}

.track:hover .track-thumb {
  z-index: 25;
}

.track:hover .track-thumb img {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.track-num {
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.track-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.track-play:hover,
.track.playing .track-play {
  background: var(--accent);
  color: #fff;
}

.track-play svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.track-play .icon-pause { display: none; }
.track.playing .track-play .icon-play { display: none; }
.track.playing .track-play .icon-pause { display: block; }

.track-details {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
  gap: 1rem;
}

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

.track-duration {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.track-progress-mini {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
}

.track-progress-mini .progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
}

/* Streaming links */
.streaming-links {
  text-align: center;
}

.streaming-links p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.stream-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.stream-btn {
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}

.stream-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(124, 92, 255, 0.08);
}

/* ========== About ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.about-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #0a0a0f;
  display: block;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.about-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
}

.stat-number {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== Contact ========== */
.contact-section {
  background: var(--bg-elevated);
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  max-width: 900px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  transition: all var(--transition);
}

.contact-card:hover {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.08);
  transform: translateY(-2px);
}

.contact-icon {
  font-size: 1.4rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 92, 255, 0.12);
  border-radius: 10px;
  flex-shrink: 0;
}

.contact-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.contact-card span:last-child {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ========== Footer ========== */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-note {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ========== Responsive ========== */
@media (max-width: 800px) {
  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle { display: flex; }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-image {
    max-width: 360px;
    margin-inline: auto;
  }

  .hero { min-height: 90vh; }

  .global-player {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .gp-progress {
    width: 100%;
    order: 10;
  }

  .album-header {
    flex-wrap: wrap;
  }

  .album-actions {
    width: 100%;
    justify-content: space-between;
    margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn { width: 100%; }

  .album-cover {
    width: 56px;
    height: 56px;
  }

  .album-title {
    font-size: 1rem;
  }
}

/* ========== Loading state ========== */
.loading,
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  gap: 1.2rem;
}

.loading.hidden,
.loading-state.hidden {
  display: none !important;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state code {
  background: var(--bg-card);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
}


/* ========== Track toast ========== */
.track-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: min(90vw, 420px);
}

.track-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.track-toast img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1a1a2e;
}

.track-toast-text {
  min-width: 0;
}

.track-toast-title {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-toast-album {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== Listening stats ========== */
.top-tracks {
  margin-top: 2rem;
}

.top-tracks-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.top-tracks-list {
  list-style: none;
  counter-reset: top;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.top-tracks-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.top-tracks-list li::before {
  counter-increment: top;
  content: counter(top);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top-tracks-list .tt-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-tracks-list .tt-plays {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.track-share {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}
.track:hover .track-share {
  opacity: 1;
}
.track-share:hover {
  color: var(--accent);
  background: rgba(124, 92, 255, 0.12);
}

/* ========== Star ratings ========== */
.star-rating {
  display: inline-flex;
  gap: 1px;
  flex-shrink: 0;
  margin-left: 0.25rem;
}
.star-rating button {
  background: none;
  border: none;
  padding: 0 1px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--text-muted);
  opacity: 0.45;
  transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.star-rating button:hover,
.star-rating button.active {
  color: #f5c542;
  opacity: 1;
}
.star-rating button:hover {
  transform: scale(1.15);
}
.track:hover .star-rating button {
  opacity: 0.7;
}
.track:hover .star-rating button.active {
  opacity: 1;
}
.rating-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 2.2rem;
  text-align: right;
  flex-shrink: 0;
}

/* ========== Personal playlist ========== */
.playlist-btn {
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: border-color var(--transition), color var(--transition);
}
.playlist-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.track-add {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  transition: all 0.2s ease;
}
.track:hover .track-add { opacity: 1; }
.track-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.track-add.in-list {
  opacity: 1;
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(124, 92, 255, 0.12);
}

.playlist-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 92vw);
  height: 100vh;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 400;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}
.playlist-panel.open {
  transform: translateX(0);
}
.playlist-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.playlist-panel-header h3 {
  font-size: 1.1rem;
}
.playlist-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.playlist-close:hover { color: var(--text); }
.playlist-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}
.playlist-panel-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.playlist-panel-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
}
.playlist-panel-list li:hover {
  border-color: var(--accent);
}
.playlist-panel-list .pl-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playlist-panel-list .pl-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.2rem;
}
.playlist-panel-list .pl-remove:hover { color: #f87171; }
.playlist-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 2rem;
}
.playlist-empty.hidden { display: none; }

/* Loop button */
.gp-loop {
  position: relative;
}
.gp-loop .loop-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.gp-loop[data-mode="one"],
.gp-loop[data-mode="all"] {
  color: var(--accent);
  background: rgba(124, 92, 255, 0.15);
}
