:root {
  --bg: #12121a;
  --bg-elevated: #1b1b26;
  --text: #f2eee8;
  --text-dim: #a8a3b0;
  --accent: #d7a24a;
  --accent-2: #a83c54;
  --player-h: 124px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  padding-bottom: calc(var(--player-h) + var(--safe-bottom) + 16px);
}

.site-header {
  text-align: center;
  padding: 40px 20px 24px;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(28px, 7vw, 44px);
  letter-spacing: 0.02em;
  font-weight: 700;
}

.site-header p {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 15px;
}

.albums {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.album {
  background: var(--bg-elevated);
  border-radius: 16px;
  overflow: hidden;
}

.album-header {
  display: flex;
  gap: 16px;
  padding: 20px;
  align-items: center;
}

.album-cover {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

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

.album-info h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.album-info p {
  margin: 0 0 12px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.4;
}

.play-album-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #1a1408;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.play-album-btn:active { transform: scale(0.97); }

.tracklist {
  list-style: none;
  margin: 0;
  padding: 0 8px 12px;
}

.track {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 12px;
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.track:active { background: rgba(255,255,255,0.05); }

.track-num {
  width: 22px;
  text-align: right;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  flex-shrink: 0;
}

.track-icon {
  width: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.track-icon svg { width: 16px; height: 16px; }

.track-titles { min-width: 0; flex: 1; }

.track-title {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-sub {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track.active .track-title { color: var(--accent); font-weight: 700; }
.track.active .track-num { color: var(--accent); }

.track-dur {
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--player-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(20,20,28,0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 44px;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  z-index: 100;
}

.player-bar.visible { transform: translateY(0); }

.player-cover {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.player-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.player-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-sub {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.player-btn {
  background: none;
  border: none;
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.player-btn svg { width: 20px; height: 20px; }

.player-btn.play-pause {
  background: var(--accent);
  color: #1a1408;
  width: 44px;
  height: 44px;
}

.player-btn.play-pause svg { width: 20px; height: 20px; }

.progress-row {
  position: absolute;
  top: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.1);
}

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

.site-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  padding: 30px 20px 10px;
}

.player-btn.lyrics-active { color: var(--accent); }

.stop-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 44px;
  background: none;
  border: none;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.stop-btn::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  position: absolute;
}

.stop-btn svg {
  width: 13px;
  height: 13px;
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .player-bar { max-width: 720px; margin: 0 auto; left: 0; right: 0; border-radius: 16px 16px 0 0; }
}

.lyrics-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 150;
}

.lyrics-scrim.visible { opacity: 1; pointer-events: auto; }

.lyrics-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 720px;
  margin: 0 auto;
  height: min(75vh, 640px);
  background: var(--bg-elevated);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.4);
  transform: translateY(100%);
  transition: transform 0.28s ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
}

.lyrics-panel.visible { transform: translateY(0); }

.lyrics-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.lyrics-panel-title {
  font-size: 17px;
  font-weight: 700;
}

.lyrics-panel-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}

.lyrics-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.lyrics-close-btn svg { width: 18px; height: 18px; }

.lyrics-panel-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 22px 32px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
}

.lyrics-panel-body .lyric-line {
  margin: 0 0 14px;
}

.lyrics-panel-body .section-tag {
  margin: 20px 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.lyrics-panel-body .section-tag:first-child {
  margin-top: 0;
}

.video-section {
  margin-top: 36px;
  padding-bottom: 8px;
}

.video-header {
  align-items: flex-start;
  padding-bottom: 8px;
}

.video-header .album-info p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 0;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-tracklist {
  list-style: decimal;
  margin: 0;
  padding: 16px 20px 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-tracklist li {
  font-size: 14px;
  line-height: 1.4;
}

.video-tracklist .track-title {
  display: inline;
  white-space: normal;
  color: var(--text);
}

.video-tracklist .track-sub {
  display: block;
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 1px;
}

.lyrics-empty {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.lyrics-note {
  color: var(--text-dim);
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
