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

:root {
  /* Brand - Espresso palette */
  --accent: #FEBA17;
  --accent-rgb: 254, 186, 23;
  --accent-light: #F8F4E1;
  --accent-dark: #c99a0e;
  --pink: #7a3d4a;
  --pink-rgb: 122, 61, 74;
  --cream: #F8F4E1;
  --berry: #7a3d4a;
  --plum: #351328;
  --plum-rgb: 53, 19, 40;

  /* Surfaces */
  --bg: #1a0a14;
  --card: #231018;
  --card-border: #3a1f2c;
  --surface: #231018;
  --border: #3a1f2c;

  /* Text */
  --text: #e4e4ef;
  --text-bright: #fff;
  --text-muted: #8888a0;
  --text-black: #000;

  /* Status */
  --success: #4ade80;
  --success-rgb: 74, 222, 128;
  --error: #f87171;
  --sparkle: #fbbf24;
  --sparkle-rgb: 251, 191, 36;
  --pending: #334155;

  /* Reactions */
  --stat-fire: #f97316;
  --stat-meh: #eab308;
  --stat-nope: #ef4444;

  /* Platforms */
  --spotify: #1DB954;
  --spotify-rgb: 29, 185, 84;
  --spotify-light: #1ed760;
  --youtube: #FF0000;
  --youtube-rgb: 255, 0, 0;
  --apple: #FA243C;
  --apple-rgb: 250, 36, 60;
  --deezer: #EF5466;
  --deezer-rgb: 239, 84, 102;
  --deezer-music: #a238ff;
  --suno: #8B5CF6;
  --suno-rgb: 139, 92, 246;
  --soundcloud: #ff5500;
  --amazon: #00a8e1;
  --tidal: #fff;
}

body {
  background: radial-gradient(circle at 50% 45%, var(--plum) 0%, var(--bg) 70%);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

/* Nav */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 48rem;
  margin: 0 auto;
}
.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}
.logo-img {
  height: 32px;
  width: auto;
}
.wordmark {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -1px;
  text-transform: lowercase;
  line-height: 1;
  white-space: nowrap;
}
.wm-song { color: var(--cream); }
.wm-drop { color: var(--accent); }
.flat-d {
  display: inline-block;
  transform: scaleX(-1);
  font-size: 1.5em;
  line-height: 1;
  vertical-align: 0.02em;
  clip-path: inset(10% 0 0 0);
  overflow: visible;
  margin-left: 0;
  margin-right: -0.04em;
  color: var(--accent);
}
.nav-links { display: flex; gap: 1rem; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-bright); }

/* Main */
main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Hero */
.hero { text-align: center; padding-top: 4rem; }
.hero h1 { font-size: 3rem; font-weight: 700; line-height: 1.15; margin-bottom: 1rem; }
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--cream));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.subtitle { color: var(--text-muted); font-size: 1.125rem; max-width: 28rem; margin: 0 auto 2.5rem; }
.steps { display: flex; gap: 2rem; justify-content: center; margin-top: 4rem; color: var(--text-muted); font-size: 0.875rem; }
.step { display: flex; flex-direction: column; align-items: center; gap: 0; }
.step-icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); margin-bottom: 0.25rem; }

/* Shared card glow */
.card-glow {
  border: 1px solid rgba(var(--pink-rgb), 0.5);
  box-shadow: 0 0 15px rgba(var(--pink-rgb), 0.15), 0 0 0px rgba(var(--pink-rgb), 0.1), 0 0 0px rgba(var(--pink-rgb), 0.05);
}

/* Feature cards (home) */
.feature-cards { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 2rem; max-width: 340px; margin-left: auto; margin-right: auto; }
.feature-card { display: flex; align-items: center; gap: 0.85rem; background: var(--surface); border-radius: 14px; padding: 0.9rem 1rem; text-decoration: none; color: inherit; text-align: left; transition: border-color 0.15s, transform 0.15s; }
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-card-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(var(--accent-rgb),0.12); border: 1px solid rgba(var(--accent-rgb),0.25); display: flex; align-items: center; justify-content: center; color: var(--accent-light); flex-shrink: 0; }
.feature-card-icon svg { width: 22px; height: 22px; }
.feature-card-body { flex: 1; min-width: 0; }
.feature-card-body h2 { font-size: 0.95rem; font-weight: 700; color: var(--text-bright); margin-bottom: 0.15rem; }
.feature-card-body p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; margin: 0; }
.feature-card-cta { font-size: 0.75rem; color: var(--accent-light); font-weight: 500; flex-shrink: 0; }

/* Buttons */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--text-black);
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
  display: inline-block; padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.875rem;
  font-weight: 500; cursor: pointer; text-decoration: none; text-align: center;
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--text-bright); }
.btn-lg { font-size: 1.125rem; padding: 1rem 2rem; }
.btn-full { width: 100%; margin-top: 1rem; }
.btn-reveal-now {
  display: inline-block; padding: 0.55rem 1.25rem; border-radius: 8px; font-size: 0.875rem;
  font-weight: 600; cursor: pointer; border: 1px solid var(--accent); color: var(--accent);
  background: transparent; transition: background 0.15s, color 0.15s;
}
.btn-reveal-now:hover { background: var(--accent); color: var(--text-black); }
.btn-reveal-now:disabled { opacity: 0.5; cursor: not-allowed; }
.drop-creator-actions { margin-top: 1.5rem; display: flex; justify-content: flex-end; }
.reveal-confirm-inline {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; justify-content: flex-end;
}
.reveal-confirm-msg { font-size: 0.8rem; color: var(--text-muted); max-width: 280px; text-align: right; }

/* Submit page */
.page-submit { max-width: 28rem; margin: 0 auto; }
.page-submit h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.link-form { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.link-form input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text-bright);
  font-size: 1rem;
  outline: none;
}
.link-form input::placeholder { color: var(--text-muted); }
.link-form input:focus { border-color: var(--accent); }
.link-input {
  width: 100%;
  display: block;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text-bright);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  resize: none;
  box-sizing: border-box;
}
.link-input::placeholder { color: var(--text-muted); }
.link-input:focus { border-color: var(--accent); }
.error { color: var(--error); font-size: 0.875rem; margin-bottom: 1rem; }

/* Song card */
.song-card {
  background: var(--card);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.song-card-inner { display: flex; gap: 1rem; align-items: center; }
.song-thumb {
  width: 5rem;
  height: 5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  display: block;
}
.song-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--card-border);
  font-size: 1.5rem;
}
.song-info { min-width: 0; }
.song-title {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-artist {
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.375rem; }
.platform-badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}
.platform-spotify { color: var(--spotify); border: 1px solid rgba(var(--spotify-rgb),0.25); background: rgba(var(--spotify-rgb),0.08); }
.platform-youtube { color: var(--youtube); border: 1px solid rgba(var(--youtube-rgb),0.25); background: rgba(var(--youtube-rgb),0.08); }
.platform-apple-music { color: var(--apple); border: 1px solid rgba(var(--apple-rgb),0.25); background: rgba(var(--apple-rgb),0.08); }
.platform-deezer { color: var(--deezer); border: 1px solid rgba(var(--deezer-rgb),0.25); background: rgba(var(--deezer-rgb),0.08); }
.platform-suno { color: var(--suno); border: 1px solid rgba(var(--suno-rgb),0.25); background: rgba(var(--suno-rgb),0.08); }
.vibe-label-sm { color: var(--text-muted); font-size: 0.75rem; }

/* Vibe tags */
.vibe-label { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 0.75rem; }
.vibe-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.vibe-tag {
  cursor: pointer;
}
.vibe-tag input { display: none; }
.vibe-tag span {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  transition: all 0.2s;
}
.vibe-tag input:checked + span {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
}
.vibe-tag:hover span { border-color: var(--accent-light); }

/* Discover */
.page-discover { text-align: center; max-width: 28rem; margin: 0 auto; }
.page-discover h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.page-discover .song-card { text-align: left; margin-top: 2rem; }
.success-banner {
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}
.empty-state { padding-top: 3rem; }
.empty-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }

/* Reactions */
.reactions { display: flex; gap: 1rem; justify-content: center; margin-top: 1.5rem; }
.react-btn {
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
  padding: 0.5rem;
}
.react-btn:hover { transform: scale(1.3); }
.react-thanks { color: var(--text-muted); font-size: 0.875rem; margin-top: 1.5rem; }
.next-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent-light);
  text-decoration: none;
  font-size: 0.875rem;
}
.next-link:hover { text-decoration: underline; }

/* Auth */
.nav-user {
  color: var(--accent-light);
  font-size: 0.875rem;
  font-weight: 500;
}
.page-login, .page-check-email {
  max-width: 24rem;
  margin: 0 auto;
  text-align: center;
  padding-top: 3rem;
}
.page-login h1, .page-check-email h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.login-form {
  margin-top: 1.5rem;
}
.login-form input[type="email"] {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text-bright);
  font-size: 1rem;
  outline: none;
  margin-bottom: 0.75rem;
}
.login-form input[type="email"]::placeholder { color: var(--text-muted); }
.login-form input[type="email"]:focus { border-color: var(--accent); }
.check-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.resend-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent-light);
  text-decoration: none;
  font-size: 0.875rem;
}
.resend-link:hover { text-decoration: underline; }

/* Stats */
.page-stats { max-width: 40rem; margin: 0 auto; }
.page-stats h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.25rem; }
.stats-list { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.stats-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}
.stats-rank {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.875rem;
  min-width: 2rem;
  text-align: center;
}
.stats-song { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
.thumb-wrap {
  position: relative;
  flex-shrink: 0;
}
.thumb-platform-icon {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
  border: 1px solid rgba(0,0,0,0.3);
  pointer-events: none;
  font-size: 0;
}
.thumb-platform-icon.platform-spotify    { background: var(--spotify); }
.thumb-platform-icon.platform-youtube    { background: var(--youtube); }
.thumb-platform-icon.platform-apple-music { background: var(--apple); }
.thumb-platform-icon.platform-deezer { background: var(--deezer); }
.thumb-platform-icon.platform-suno { background: var(--suno); }
.stats-thumb {
  width: 3rem;
  height: 3rem;
  border-radius: 0.375rem;
  object-fit: cover;
  display: block;
}
.stats-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-border);
  font-size: 1rem;
}
.stats-info { min-width: 0; }
.stats-title {
  display: block;
  font-weight: 600;
  color: var(--text-bright);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-title:hover { color: var(--accent-light); }
.stats-artist {
  display: block;
  color: var(--text-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-reactions { display: flex; gap: 0.375rem; flex-shrink: 0; }
.stat-pill {
  font-size: 0.8125rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background: rgba(255,255,255,0.05);
}
.stat-fire { color: var(--stat-fire); }
.stat-meh { color: var(--stat-meh); }
.stat-nope { color: var(--stat-nope); }

/* Song page */
.page-song { max-width: 28rem; margin: 0 auto; text-align: center; }
.platform-links { display: flex; gap: 1rem; justify-content: flex-start; flex-wrap: wrap; margin: 0.75rem 0 0.5rem; }
.platform-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity 0.15s;
}
.platform-icon-btn svg { width: 1em; height: 1em; }
.platform-icon-btn:hover { opacity: 0.7; }
.pi-spotify    { color: var(--spotify); }
.pi-youtube    { color: var(--youtube); }
.pi-apple, .pi-itunes, .pi-appleMusic { color: var(--apple); }
.pi-deezer     { color: var(--deezer-music); }
.pi-youtubeMusic { color: var(--youtube); }
.pi-suno       { color: var(--suno); }
.pi-tidal      { color: var(--tidal); }
.pi-soundcloud { color: var(--soundcloud); }
.pi-amazon     { color: var(--amazon); }

/* Small platform link buttons (cards) */
.platform-icon-links { display: inline-flex; gap: 0.75rem; align-items: center; }
.platform-icon-sm {
  display: inline-flex; align-items: center; gap: 0.2rem;
  text-decoration: none; font-size: 0.7rem; font-weight: 500;
  transition: opacity 0.15s;
}
.platform-icon-sm svg { width: 0.85em; height: 0.85em; }
.platform-icon-sm:hover { opacity: 0.7; }
.song-card-lg { margin-bottom: 1.5rem; }
.song-thumb-lg { width: 6rem; height: 6rem; }
.song-title-lg { font-size: 1.375rem; font-weight: 700; color: var(--text-bright); text-align: left; }
.song-artist-lg { color: var(--text-muted); font-size: 1rem; text-align: left; }
.song-stats-bar { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1.5rem; }
.song-stats-bar .stat-pill { font-size: 1rem; padding: 0.375rem 0.75rem; border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.1); cursor: pointer; transition: transform 0.15s, border-color 0.15s; }
.song-stats-bar .stat-pill:hover:not(.reacted) { transform: scale(1.1); border-color: rgba(255,255,255,0.25); }
.song-stats-bar .stat-pill.reacted { opacity: 0.5; cursor: default; }
.share-section { margin-top: 1.5rem; margin-bottom: 1rem; }
.share-label { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 0.75rem; }
.share-actions { display: flex; gap: 1.5rem; justify-content: center; }
.btn-share {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s;
}
.btn-share:hover { border-color: var(--accent); }
.btn-action-icon { display: inline-flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none; background: none; border: none; padding: 0; cursor: pointer; font: inherit; }
.btn-action-icon .feature-card-icon { width: 48px; height: 48px; }
.btn-action-icon span { font-size: 0.75rem; color: var(--accent-light); font-weight: 500; }
.btn-action-icon:hover .feature-card-icon { border-color: var(--accent-light); }
.copied-msg { color: var(--accent-light); font-size: 0.8125rem; margin-top: 0.5rem; }

/* Swap */
.swap-icon { display: block; margin-bottom: 1rem; color: var(--accent-light); }
.swap-icon svg { width: 3rem; height: 3rem; }
.swap-icon-sm { font-size: 1.25rem; }
.page-swap-pending { text-align: center; max-width: 28rem; margin: 0 auto; padding-top: 2rem; }
.swap-link-box {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem;
}
.swap-link-box input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text-bright);
  font-size: 0.875rem;
  outline: none;
}
.swap-share-row { margin-top: 1rem; }
.swap-waiting { color: var(--text-muted); font-size: 0.875rem; margin-top: 2rem; }
.swap-invite-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}
.swap-invite-cover {
  width: 32px; height: 32px; border-radius: 6px; flex-shrink: 0;
  background-size: cover; background-position: center;
  filter: blur(4px) brightness(0.75); transform: scale(1.05); overflow: hidden;
}
.swap-invite-cover-blank {
  background: rgba(var(--accent-rgb),0.15); display: flex; align-items: center; justify-content: center;
  font-size: 1rem; filter: none; transform: none;
}
.page-swap-result { text-align: center; max-width: 42rem; margin: 0 auto; }
.page-swap-result h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.25rem; }
.swap-cards {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
}
.swap-card-wrapper { flex: 1 1 0; max-width: 20rem; min-width: 0; display: flex; flex-direction: column; }
.swap-card-wrapper .song-card { flex: 1; }
.swap-label { color: var(--text-muted); font-size: 0.8125rem; margin-bottom: 0.5rem; }
.swap-arrow { font-size: 2rem; color: var(--accent-light); padding: 20px 0 12px; }
.swap-arrow svg { transform: rotate(90deg); }

/* Profile / Dashboard */
.page-profile { max-width: 42rem; margin: 0 auto; }
.profile-heading { font-size: 1.75rem; font-weight: 700; margin-bottom: 0; }
.profile-name-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 2rem; }
.profile-name-edit-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.25rem; border-radius: 6px; transition: color 0.15s; }
.profile-name-edit-btn:hover { color: var(--accent-light); }
.profile-name-form { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 2rem; }
.profile-name-input { max-width: 14rem; }
.profile-name-cancel { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; }
.profile-name-cancel:hover { color: var(--text-bright); }
.profile-section { margin-bottom: 2.5rem; }
.profile-section h2 { font-size: 1rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.profile-count { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 0.75rem; padding: 0.1rem 0.5rem; color: var(--text-muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.profile-empty { color: var(--text-muted); font-size: 0.9rem; }
.profile-empty a { color: var(--accent-light); text-decoration: none; }
.swap-list, .song-list { display: flex; flex-direction: column; gap: 0.5rem; }
.swap-row, .song-row { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem 1rem; text-decoration: none; color: inherit; transition: border-color 0.15s; position: relative; }
.swap-row:hover, .song-row:hover { border-color: var(--accent-light); }
.swap-row-songs { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
.swap-row-song { display: flex; align-items: center; gap: 0.5rem; min-width: 0; flex: 1; }
.swap-row-waiting { opacity: 0.45; }
.swap-row-arrow { color: var(--accent-light); flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(var(--accent-rgb),0.15); border: 1px solid rgba(var(--accent-rgb),0.3); }
.swap-row-info { display: flex; flex-direction: column; min-width: 0; }
.swap-row-title { font-size: 0.875rem; font-weight: 600; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swap-row-artist { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swap-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; background: var(--bg); }
.swap-row-completed { border: 2px solid var(--success); }
.swap-row-pending { border: 2px solid var(--pending); }
.swap-sparkle { position: absolute; top: 0.5rem; right: 0.5rem; width: 20px; height: 20px; color: var(--sparkle); pointer-events: none; animation: sparkle-pulse 2.8s ease-in-out infinite; }
@keyframes sparkle-pulse {
  0%,100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 2px rgba(var(--sparkle-rgb),.5)); }
  35% { transform: scale(1.3) rotate(20deg); filter: drop-shadow(0 0 6px rgba(var(--sparkle-rgb),1)) drop-shadow(0 0 14px rgba(var(--sparkle-rgb),.4)); }
  70% { transform: scale(.9) rotate(-8deg); filter: drop-shadow(0 0 3px rgba(var(--sparkle-rgb),.6)); }
}
.nav-user { color: var(--accent-light); text-decoration: none; font-weight: 500; }
.nav-user:hover { color: var(--text-bright); }

/* ── Drop list (profile) ──────────────────────────────────────────────────── */
.drop-list { display: flex; flex-direction: column; gap: 0.5rem; }
.drop-row {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.65rem 0.85rem;
  text-decoration: none; color: inherit; transition: border-color 0.15s;
}
.drop-row:hover { border-color: var(--accent); }
.drop-row-collecting { border-color: var(--border); }
.drop-row-revealed { border-color: rgba(var(--success-rgb),0.35); }
.drop-row-cover {
  width: 36px; height: 36px; border-radius: 6px; flex-shrink: 0;
  background-size: cover; background-position: center;
  filter: blur(5px) brightness(0.75); transform: scale(1.05); overflow: hidden;
}
.drop-row.drop-row-revealed .drop-row-cover {
  filter: none; transform: none;
}
.drop-row-cover-blank {
  background: rgba(var(--accent-rgb),0.15); border: 1px solid rgba(var(--accent-rgb),0.2);
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  filter: none; transform: none;
}
.drop-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.drop-row-prompt { font-size: 0.88rem; font-weight: 500; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-row-meta { font-size: 0.75rem; color: var(--text-muted); }
.drop-row-time { flex-shrink: 0; text-align: right; }
.drop-row-countdown { font-size: 0.85rem; font-weight: 600; color: var(--accent-light); font-variant-numeric: tabular-nums; }
.drop-row-revealed { font-size: 0.78rem; color: var(--success); font-weight: 500; }

/* ── Group Drop ───────────────────────────────────────────────────────────── */
.page-drop { max-width: 600px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.drop-join-prompt { font-size: 1.5rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.5rem; }
.drop-join-teaser { margin-top: 1.5rem; }
.drop-join-covers { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.drop-join-cover {
  width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0;
  background-size: cover; background-position: center;
  filter: blur(4px) brightness(0.8);
  transform: scale(1.05);
  overflow: hidden;
}
.drop-join-cover-blank {
  background: rgba(var(--accent-rgb),0.15); border: 1px solid rgba(var(--accent-rgb),0.2);
}
.drop-join-who { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.drop-header { margin-bottom: 1.75rem; }
.drop-title { font-size: 1.5rem; font-weight: 700; color: var(--text-bright); margin: 0 0 0.25rem; }
.drop-prompt { font-size: 0.95rem; color: var(--text-muted); margin: 0; font-style: italic; }
.drop-meta { text-align: center; margin-bottom: 1.75rem; }
.drop-countdown-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 0 0 0.25rem; }
.drop-countdown { font-size: 3rem; font-weight: 700; color: var(--accent-light); margin: 0 0 0.5rem; font-variant-numeric: tabular-nums; }
.drop-lock-msg { font-size: 0.8rem; color: var(--text-muted); margin: 0.25rem 0 0; }
.drop-revealed-badge { font-size: 1.1rem; font-weight: 600; color: var(--success); margin: 0 0 0.25rem; }
.drop-revealed-badge svg { color: var(--sparkle); filter: drop-shadow(0 0 6px rgba(var(--sparkle-rgb),0.6)) drop-shadow(0 0 12px rgba(var(--sparkle-rgb),0.3)); }

/* Participants */
.drop-participants { margin-bottom: 1.75rem; }
.drop-participants h2 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.75rem; }
.participant-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.participant-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.8rem; color: var(--text-bright); display: flex; align-items: center; gap: 0.35rem; }
.chip-check { color: var(--success); font-size: 0.7rem; }
.chip-cover { width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0; background-size: cover; background-position: center; filter: blur(3px) brightness(0.8); transform: scale(1.05); overflow: hidden; }

/* Submit form */
.drop-submit-section h2 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.75rem; }
.drop-submit-form { display: flex; flex-direction: column; gap: 0.75rem; }
.drop-submit-form textarea { background: var(--card); border: 1px solid var(--card-border); border-radius: 0.5rem; padding: 0.75rem 1rem; color: var(--text-bright); font-size: 1rem; resize: none; font-family: inherit; outline: none; }
.drop-submit-form textarea:focus { border-color: var(--accent); }

/* Already submitted state */
.drop-submitted-state { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.drop-own-song { display: flex; align-items: center; gap: 0.875rem; background: var(--card); border-radius: 0.75rem; padding: 0.875rem 1rem; text-align: left; }
.drop-own-song-thumb { width: 52px; height: 52px; border-radius: 0.375rem; object-fit: cover; flex-shrink: 0; }
.drop-own-song-placeholder { width: 52px; height: 52px; border-radius: 0.375rem; background: var(--card-border); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.drop-own-song-info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.drop-own-song-title { font-size: 0.95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-own-song-artist { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-own-song-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-light); margin-bottom: 0.1rem; }
.drop-hint { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

/* Invite section */
.drop-invite { margin-top: 1.75rem; }
.drop-invite h2 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.75rem; }
.drop-invite-row { display: flex; gap: 0.5rem; }
.drop-invite-input { flex: 1; background: var(--card); border: 1px solid var(--card-border); border-radius: 0.5rem; padding: 0.65rem 0.875rem; color: var(--text-muted); font-size: 0.8rem; min-width: 0; outline: none; }

/* Results grid */
.drop-results { margin-bottom: 1.75rem; }
.drop-result-grid { display: flex; flex-direction: column; gap: 1rem; }
.drop-result-card { background: var(--surface); border-radius: 14px; padding: 1rem; display: flex; gap: 0.75rem; align-items: flex-start; flex-wrap: wrap; }
.drop-result-card > .platform-icon-links,
.drop-result-card > .btn-secondary { flex-basis: 100%; margin-top: 0.15rem; }
.drop-result-thumb-wrap { position: relative; flex-shrink: 0; }
.drop-result-thumb { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; display: block; background: var(--card); }
.song-thumb-placeholder.drop-result-thumb { display: flex; align-items: center; justify-content: center; background: var(--bg); font-size: 1.75rem; }
.drop-result-platform { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.3); font-size: 0; padding: 0; min-width: 0; color: transparent; }
.drop-result-platform.platform-spotify { background: var(--spotify); }
.drop-result-platform.platform-youtube { background: var(--youtube); }
.drop-result-platform.platform-apple-music { background: var(--apple); }
.drop-result-platform.platform-deezer { background: var(--deezer); }
.drop-result-platform.platform-suno { background: var(--suno); }
.drop-result-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.drop-result-track { font-size: 0.95rem; font-weight: 600; color: var(--text-bright); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-result-artist { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.drop-result-note { font-size: 0.8rem; color: var(--text-muted); font-style: italic; margin: 0.15rem 0; }
.drop-result-dropper { font-size: 0.75rem; color: var(--accent-light); margin: 0.25rem 0 0; }
.drop-result-listen { margin-top: 0.5rem; align-self: flex-start; }
.btn-sm { font-size: 0.75rem; padding: 0.3rem 0.75rem; }

/* ── Card Reveal Animation ────────────────────────────────────────────── */
.drop-result-grid.animating { perspective: 1200px; }

.card-flip {
  position: relative;
  perspective: 1000px;
}
.card-flip .card-flip-inner {
  position: relative;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}
.card-flip.flipped .card-flip-inner { transform: rotateY(180deg); }

.card-front, .card-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.card-front {
  transform: rotateY(180deg);
}
.card-back {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  overflow: hidden; z-index: 2;
}
.card-back-thumb {
  width: 72px; height: 72px; border-radius: 8px; object-fit: cover;
  filter: blur(12px) brightness(0.6); transform: scale(1.15); flex-shrink: 0;
}
.card-back-mystery {
  font-size: 1.75rem; opacity: 0.5;
}

/* Pre-flip glow pulse */
.card-flip:not(.flipped) .card-back {
  animation: card-glow-pulse 1.8s ease-in-out infinite alternate;
}
@keyframes card-glow-pulse {
  from { border-color: rgba(var(--pink-rgb), 0.5); box-shadow: 0 0 0 rgba(var(--pink-rgb),0); }
  to   { border-color: rgba(var(--pink-rgb), 0.8); box-shadow: 0 0 20px rgba(var(--pink-rgb),0.2); }
}

/* Post-flip bounce */
.card-flip.flipped .card-flip-inner {
  animation: card-land 0.4s 0.7s ease both;
}
@keyframes card-land {
  0%   { scale: 1; }
  50%  { scale: 1.03; }
  100% { scale: 1; }
}

/* Revealed badge fade-in */
.drop-revealed-badge.animate-in, .drop-lock-msg.animate-in {
  opacity: 0; animation: fade-in 0.5s ease forwards;
}
@keyframes fade-in { to { opacity: 1; } }

/* Result actions */
.drop-result-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Spotify button */
.btn-spotify {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.875rem;
  font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--spotify); border: 1px solid transparent; color: var(--text-black);
  transition: background 0.15s, opacity 0.15s;
}
.btn-spotify:hover { background: var(--spotify-light); }

/* Spotify callback page */
.page-spotify-callback {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh;
}
.sp-status {
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem; text-align: center; max-width: 26rem;
}
.sp-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--spotify);
  animation: sp-spin 0.8s linear infinite;
}
@keyframes sp-spin { to { transform: rotate(360deg); } }
.sp-msg { color: var(--text-muted); font-size: 0.95rem; }
.sp-error { color: var(--error); font-size: 0.95rem; }
.sp-success-icon { font-size: 3rem; }
.sp-success-title { font-size: 1.5rem; font-weight: 700; margin: 0; }
.sp-success-name { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.sp-success-count { color: var(--text-muted); font-size: 0.85rem; margin: 0; }
.sp-skip-note { color: var(--sparkle); font-size: 0.85rem; margin: 0; }
.sp-success-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin-top: 0.5rem; }

/* Create form */
.drop-create-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.label-optional { font-size: 0.7rem; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.timer-presets { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.timer-btn { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 1rem; color: var(--text-muted); font-size: 0.85rem; cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.timer-btn:hover, .timer-btn.active { border-color: var(--accent-light); color: var(--text-bright); }

/* Inline icons */
.icon-inline {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}
.icon-vibe {
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.1em;
  margin-right: 2px;
}

/* Hourglass flip animation */
.hourglass {
  display: inline-block;
  animation: hourglassFlip 4s ease-in-out infinite;
}
@keyframes hourglassFlip {
  0%, 45% { transform: rotate(0deg); }
  50%, 95% { transform: rotate(180deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile */
@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .steps { gap: 1rem; }
  .link-form { flex-direction: column; }
  .swap-cards { flex-direction: column; align-items: center; width: 100%; }
  .swap-arrow { padding: 0; }
  .swap-card-wrapper { max-width: 320px; width: 100%; }
  .swap-card-wrapper .song-card { text-align: left; }

  /* Song cards full width */
  .song-card { width: 100%; box-sizing: border-box; }

  /* Drop result cards full width */
  .drop-result-card { width: 100%; box-sizing: border-box; }

  /* Nav */
  nav { padding: 0.75rem 1rem; gap: 0.5rem; flex-wrap: wrap; }
  .logo-img { height: 32px; }
  .nav-links { gap: 0.625rem; font-size: 0.8125rem; flex-wrap: wrap; }

  /* Profile swap rows */
  .swap-row { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .swap-row-songs { flex-direction: row; align-items: flex-start; gap: 0.375rem; }
  .swap-row-song { flex-direction: column; align-items: center; text-align: center; flex: 1; min-width: 0; padding: 0; gap: 0.2rem; }
  .swap-row-info { width: 100%; }
  .swap-row-arrow { width: 32px; height: 32px; flex-shrink: 0; margin-top: 4px; }
  .swap-row-arrow svg { width: 18px; height: 18px; transform: rotate(90deg); }
  .swap-row-status { align-self: flex-end; }
}
