@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

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

:root {
  --bg: #07070f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(255, 255, 255, 0.14);
  --text: #eeeef6;
  --muted: rgba(255, 255, 255, 0.42);
  --accent: #4f2092;
  --accent-2: #a78bfa;
  --apple: #fc3c44;
  --spotify: #1db954;
  --like: #60a5fa;
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 50% at 10% 40%, rgba(124, 106, 240, 0.13) 0%, transparent 100%),
    radial-gradient(ellipse 50% 40% at 88% 12%, rgba(168, 85, 247, 0.09) 0%, transparent 100%),
    radial-gradient(ellipse 40% 40% at 65% 88%, rgba(79, 70, 229, 0.08) 0%, transparent 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Landing page ── */
.hero {
  max-width: 640px;
  margin: 0 auto;
  padding: 100px 24px;
  text-align: center;
}
.hero h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px; }
.tagline {
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  font-weight: 600;
}
.hero p { color: var(--muted); margin-bottom: 40px; font-size: 1.05rem; }
.btn-add-slack img { display: block; margin: 0 auto; }
.steps { margin-top: 64px; text-align: left; display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; align-items: flex-start; gap: 14px; color: var(--muted); }
.num {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
  box-shadow: 0 0 16px rgba(124, 106, 240, 0.4);
}
code {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.875rem;
  color: var(--accent-2);
}

/* ── Header ── */
.site-logo {
  position: fixed;
  top: 16px;
  left: 20px;
  z-index: 50;
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.site-logo:hover { opacity: 1; }
.site-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

header {
  padding: 48px 24px 0;
  max-width: 900px;
  margin: 0 auto;
}
header::after {
  content: '';
  display: block;
  height: 1px;
  margin-top: 24px;
  background: linear-gradient(90deg, transparent, rgba(124, 106, 240, 0.4), transparent);
}
header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}
header h1 span {
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.subtitle { color: var(--muted); margin-top: 4px; font-size: 0.9rem; }

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.back-link:hover { color: var(--text); }

.user-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  border-radius: 20px;
  transition: opacity 0.15s;
}
.user-link:hover { opacity: 0.75; }

main { max-width: 900px; margin: 0 auto; padding: 28px 24px 80px; }

/* ── Glassy pill nav ── */
.app-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 16px 24px 0;
  pointer-events: none;
}
.app-nav {
  pointer-events: all;
  display: flex;
  align-items: center;
  background: rgba(12, 10, 26, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 5px 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.04) inset;
  gap: 2px;
  overflow: visible;
}
.app-nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 4px;
  border-radius: 999px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin: -10px 0;
  position: relative;
  z-index: 1;
}
.app-nav-logo:hover { transform: scale(1.12) translateY(-2px); }
.app-nav-logo img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: block;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 6px 24px rgba(124, 106, 240, 0.65),
    0 2px 8px rgba(0, 0, 0, 0.5);
}
.app-nav-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  margin: 0 2px;
}
.app-nav-link {
  padding: 6px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.app-nav-link:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.07); }
.app-nav-link.active {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(167, 139, 250, 0.6);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

/* ── Workspace hero ── */
.workspace-hero {
  text-align: center;
  padding: 72px 24px 56px;
}
.workspace-hero-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.5rem, 11vw, 8.5rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 45%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}
.workspace-hero-sub {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}
@media (max-width: 600px) {
  .workspace-hero { padding: 36px 20px 28px; }
  .app-nav-link { padding: 6px 12px; font-size: 0.8rem; }
  .app-nav-logo img { width: 28px; height: 28px; }
}

.empty { color: var(--muted); text-align: center; padding: 80px 0; font-size: 1.05rem; }

.empty-state {
  text-align: center;
  padding: 100px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-state-icon {
  font-size: 3rem;
  filter: grayscale(0.5) opacity(0.5);
  margin-bottom: 8px;
}
.empty-state-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.7);
}
.empty-state-desc {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 320px;
  line-height: 1.6;
}
.empty-state-link {
  margin-top: 8px;
  color: var(--accent-2);
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.empty-state-link:hover { opacity: 1; }

/* ── Page nav (History / Stats) ── */
.page-nav { display: flex; gap: 4px; margin-top: 20px; }
.page-tab {
  padding: 6px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.page-tab:hover { color: var(--text); }
.page-tab.active { color: var(--accent-2); border-bottom-color: var(--accent); }

/* ── Toolbar ── */
.toolbar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }

/* ── Period filter ── */
.period-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.period-tab {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.18s;
}
.period-tab:hover {
  color: var(--text);
  border-color: rgba(124, 106, 240, 0.4);
  background: rgba(124, 106, 240, 0.1);
}
.period-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 106, 240, 0.4), rgba(168, 85, 247, 0.25));
  border-color: rgba(124, 106, 240, 0.55);
  box-shadow: 0 0 16px rgba(124, 106, 240, 0.2);
}

/* ── Search / filter ── */
.search-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.search-input, .select-filter {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 9px 14px;
  font-size: 0.875rem;
  font-family: var(--font);
  outline: none;
  transition: all 0.2s;
}
.search-input { flex: 1; min-width: 180px; }
.search-input::placeholder { color: var(--muted); }
.search-input:focus, .select-filter:focus {
  border-color: rgba(124, 106, 240, 0.6);
  background: rgba(124, 106, 240, 0.07);
  box-shadow: 0 0 0 3px rgba(124, 106, 240, 0.15);
}
.select-filter option { background: #13131f; }

/* ── Shared meta ── */
.avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-hi);
  flex-shrink: 0;
}
.chosen-by { font-weight: 600; font-size: 0.78rem; color: var(--muted); }
.date { color: var(--muted); font-size: 0.74rem; opacity: 0.65; }
.links { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Hero card ── */
.song-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-top-color: var(--border-hi);
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.song-hero:hover { border-color: rgba(124, 106, 240, 0.4); }

.hero-bg {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center;
  filter: blur(50px) saturate(2);
  opacity: 0.2;
}
.song-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(7,7,15,0.75) 0%, rgba(7,7,15,0.55) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 36px;
}

.hero-artwork {
  width: 168px; height: 168px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 12px 48px rgba(0,0,0,0.7);
}
.hero-artwork-empty {
  width: 168px; height: 168px;
  border-radius: 14px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(124,106,240,0.25), rgba(168,85,247,0.15));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}

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

.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  margin-bottom: 10px;
}
.hero-track {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.hero-artist {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ── Songs grid ── */
.songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

/* ── Song tile ── */
.song-tile {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-top-color: var(--border-hi);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.song-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(124,106,240,0.35);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(124,106,240,0.12);
}

.tile-art-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124,106,240,0.15), rgba(79,70,229,0.08));
  flex-shrink: 0;
  position: relative;
}
.tile-art {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.song-tile:hover .tile-art { transform: scale(1.05); }
.tile-art-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; opacity: 0.35;
}

.tile-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tile-track {
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}
.tile-artist {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 10px;
}
.tile-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.tile-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .hero-inner { flex-direction: column; align-items: stretch; padding: 20px; gap: 20px; }
  .hero-artwork, .hero-artwork-empty { width: 100%; height: auto; aspect-ratio: 1; }
  .hero-track { font-size: 1.5rem; }
  .songs-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Play icons ── */
.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}
.play-icon:hover { transform: scale(1.1); }
.play-icon svg { display: block; }
.play-icon.apple {
  background: var(--apple);
  box-shadow: 0 2px 12px rgba(252, 60, 68, 0.4);
}
.play-icon.apple:hover { box-shadow: 0 4px 24px rgba(252, 60, 68, 0.65); }
.play-icon.apple svg { width: 20px; height: 20px; fill: #fff; }
.play-icon.spotify {
  background: var(--spotify);
  box-shadow: 0 2px 12px rgba(29, 185, 84, 0.4);
}
.play-icon.spotify:hover { box-shadow: 0 4px 24px rgba(29, 185, 84, 0.65); }
.play-icon.spotify svg { width: 22px; height: 22px; fill: #fff; }
.play-icon.youtube {
  background: #ff0000;
  box-shadow: 0 2px 12px rgba(255, 0, 0, 0.35);
}
.play-icon.youtube:hover { box-shadow: 0 4px 24px rgba(255, 0, 0, 0.6); }
.play-icon.youtube svg { width: 22px; height: 22px; fill: #fff; }

/* ── In-player play buttons ── */
.hero-play-btn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.hero-play-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}
.tile-play-btn {
  all: unset;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.18) 55%, transparent 100%);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.2s;
  color: #fff;
}
.tile-play-btn::before {
  content: '';
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6d5ce7 0%, #a855f7 55%, #c026d3 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 24px rgba(124, 106, 240, 0.55);
}
.tile-play-btn svg {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.5));
}
.song-tile:hover .tile-play-btn { opacity: 1; }

/* ── Play All fixed launcher ── */
#play-all-fixed[hidden] { display: none; }
#play-all-fixed {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 12px 14px;
  background: linear-gradient(135deg, #6d5ce7 0%, #a855f7 55%, #c026d3 100%);
  border-radius: 60px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 20px 60px rgba(124, 106, 240, 0.65),
    0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
#play-all-fixed::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.18) 0%, transparent 50%);
  pointer-events: none;
}
#play-all-fixed:hover {
  transform: translateX(-50%) scale(1.04);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22) inset,
    0 28px 72px rgba(124, 106, 240, 0.8),
    0 8px 24px rgba(0, 0, 0, 0.45);
}
.play-all-art-stack {
  display: flex;
  align-items: center;
}
.play-all-art {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
  margin-left: -8px;
  flex-shrink: 0;
}
.play-all-art:first-child { margin-left: 0; }
.play-all-fixed-btn {
  all: unset;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.play-all-count {
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  padding: 3px 10px;
}

/* ── YouTube video panel (slides above pill) ── */
#yt-player-wrap {
  position: fixed;
  bottom: 104px;
  left: 50%;
  width: 340px;
  height: 191px;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  z-index: 199;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.65),
    0 1px 0 rgba(255, 255, 255, 0.1) inset;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(14px) scale(0.97);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#yt-player-wrap.yt-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
#yt-player-wrap iframe { display: block; width: 100%; height: 100%; }

/* ── Now Playing pill ── */
#player-bar[hidden] { display: none; }

#player-bar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  background: rgba(22, 22, 34, 0.65);
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset;
  z-index: 200;
  white-space: nowrap;
}
#player-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.07) 0%, transparent 50%);
  pointer-events: none;
}
.player-art {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.player-info {
  min-width: 140px;
  max-width: 220px;
  overflow: hidden;
}
.player-track {
  font-size: 0.87rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.player-artist {
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.player-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.player-counter {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  min-width: 34px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.player-btn {
  all: unset;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.12s, background 0.12s;
}
.player-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.player-btn-primary {
  width: 36px;
  height: 36px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}
.player-btn-primary:hover { background: rgba(255, 255, 255, 0.22); }
.player-shuffle-btn { color: rgba(255, 255, 255, 0.38); }
.player-shuffle-btn--active { color: var(--accent-2); }
.player-shuffle-btn--active:hover { color: var(--accent-2); opacity: 0.8; }
.player-video-btn { color: rgba(255, 255, 255, 0.38); }
.player-video-btn--active { color: rgba(255, 255, 255, 0.9); }
.player-video-btn--active:hover { color: #fff; }
.player-close {
  color: rgba(255, 255, 255, 0.35);
  margin-left: 2px;
}

/* ── Thumb fly animation ── */
@keyframes thumbFly {
  0%   { transform: translateY(0) translateX(0) scale(1);   opacity: 1; }
  70%  { opacity: 0.7; }
  100% { transform: translateY(calc(var(--rise, 100px) * -1)) translateX(var(--drift, 0px)) scale(0.5); opacity: 0; }
}
.thumb-fly {
  position: fixed;
  font-size: 1.15rem;
  pointer-events: none;
  user-select: none;
  z-index: 300;
  animation: thumbFly 2s ease-out forwards;
}

/* ── Reactions ── */
.reactions { display: flex; gap: 8px; }
.reaction {
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
}
.reaction.like {
  color: var(--like);
  border-color: rgba(96, 165, 250, 0.2);
  background: rgba(96, 165, 250, 0.07);
}
.reaction[data-names]:not([data-names=""]) {
  position: relative;
  cursor: default;
}
.reaction[data-names]:not([data-names=""]):hover::after {
  content: attr(data-names);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 14, 26, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-style: normal;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ── Stats page ── */
.stat-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-top-color: var(--border-hi);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}
.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.stat-section {
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-top-color: var(--border-hi);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 12px;
}
.stat-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 16px;
}
.empty-inline { color: var(--muted); font-size: 0.9rem; }

.stat-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.stat-row { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; }
.stat-name { flex: 1; min-width: 0; overflow: hidden; }
.stat-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-name .stat-aside { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-aside { color: var(--muted); font-size: 0.78rem; flex-shrink: 0; }
.stat-likes { color: var(--like); font-size: 0.8rem; flex-shrink: 0; font-weight: 600; text-align: right; min-width: 44px; }

/* ── Monthly activity ── */
.activity-bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 12px; font-size: 0.78rem; }
.bar-label { color: var(--muted); width: 72px; flex-shrink: 0; text-align: right; }
.bar-track {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  height: 7px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 6px;
  animation: barIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--bar-i, 0) * 60ms);
}
@keyframes barIn {
  from { width: 0 !important; }
}
.bar-count { color: var(--muted); width: 24px; text-align: right; flex-shrink: 0; }

.stat-rank {
  width: 18px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.stat-art {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: cover;
}

/* ── Comments ── */
.hero-comment {
  position: relative;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  font-style: italic;
  margin: 16px 0 24px;
  padding: 14px 16px 14px 22px;
  line-height: 1.6;
}
.hero-comment::before {
  content: '\201C';
  position: absolute;
  top: -2px;
  left: 12px;
  font-size: 2.8rem;
  line-height: 1;
  font-style: normal;
  font-family: Georgia, serif;
  color: #fff;
  opacity: 0.3;
  pointer-events: none;
}

.comment-toggle {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  color: var(--accent-2);
  background: rgba(124, 106, 240, 0.1);
  border: 1px solid rgba(124, 106, 240, 0.2);
  border-radius: 20px;
  padding: 3px 10px;
  margin-top: 8px;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s;
}
.comment-toggle:hover {
  background: rgba(124, 106, 240, 0.18);
  border-color: rgba(124, 106, 240, 0.38);
}
.tile-comment {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
  line-height: 1.5;
  background: rgba(124, 106, 240, 0.07);
  border-left: 2px solid rgba(124, 106, 240, 0.45);
  border-radius: 0 6px 6px 0;
  padding: 8px 10px;
  margin-bottom: 10px;
}
