/* Encorely — visual identity */
:root {
  --bg: #0E0E0E;
  --bg-elevated: #161618;
  --bg-card: #1A1A1D;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #F5F5F5;
  --text-dim: rgba(245, 245, 245, 0.62);
  --text-faint: rgba(245, 245, 245, 0.38);
  --purple: #6C5CE7;
  --pink: #FF4D8D;
  --blue: #00D1FF;
  --spotify: #1DB954;
  --gradient: linear-gradient(105deg, #6C5CE7 0%, #FF4D8D 50%, #00D1FF 100%);
  --gradient-soft: linear-gradient(105deg, rgba(108,92,231,0.18), rgba(255,77,141,0.18) 50%, rgba(0,209,255,0.18));
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  min-height: 100vh;
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

/* Ambient noise + gradient backdrop */
.ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.ambient::before {
  content: ''; position: absolute; inset: -20%;
  background:
    radial-gradient(ellipse 60% 50% at 18% 20%, rgba(108,92,231,0.22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 82% 30%, rgba(255,77,141,0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(0,209,255,0.14), transparent 60%);
  filter: blur(40px);
  animation: drift 24s ease-in-out infinite alternate;
}
.ambient::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) rotate(0deg); }
  100% { transform: translate3d(-3%, 4%, 0) rotate(8deg); }
}

.app {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ── Topbar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(14,14,14,0.85), rgba(14,14,14,0.4));
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.topbar.scrolled { border-bottom-color: var(--border); }

.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  letter-spacing: -0.02em;
  cursor: pointer;
}
.logo-mark {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gradient);
  position: relative;
  box-shadow: 0 0 24px rgba(108,92,231,0.5);
}
.logo-mark::after {
  content: ''; position: absolute; inset: 7px;
  border-radius: 50%;
  background: var(--bg);
}
.logo-mark::before {
  content: ''; position: absolute; inset: 11px;
  border-radius: 50%;
  background: var(--gradient);
}

.topbar-nav { display: flex; align-items: center; gap: 28px; }
.topbar-link {
  font-size: 13px; color: var(--text-dim);
  transition: color 0.2s;
}
.topbar-link:hover { color: var(--text); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 0 0 0 rgba(108,92,231,0);
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  box-shadow: 0 0 38px rgba(108,92,231,0.55), 0 0 18px rgba(255,77,141,0.35);
  transform: translateY(-1px);
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-primary:hover::before { transform: translateX(100%); }

.btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-strong);
}

.btn-spotify {
  background: rgba(29,185,84,0.12);
  border: 1px solid rgba(29,185,84,0.3);
  color: #4ADE80;
}
.btn-spotify:hover {
  background: rgba(29,185,84,0.2);
  box-shadow: 0 0 24px rgba(29,185,84,0.25);
}
.btn-spotify.connected { background: rgba(29,185,84,0.18); border-color: rgba(29,185,84,0.45); }

.btn-large { padding: 14px 24px; font-size: 14.5px; }

/* ── Tags / pills ── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.pill-accent {
  background: rgba(108,92,231,0.14);
  border-color: rgba(108,92,231,0.35);
  color: #A99EFF;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: transform 0.22s ease, border-color 0.2s, box-shadow 0.3s;
}
.card:hover {
  border-color: rgba(108,92,231,0.4);
  box-shadow: 0 0 0 1px rgba(108,92,231,0.2), 0 12px 40px -12px rgba(108,92,231,0.4), 0 0 60px -20px rgba(0,209,255,0.3);
  transform: translateY(-2px);
}

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

/* Utility */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-display); }

/* Reusable focus glow */
.glow-purple { box-shadow: 0 0 0 1px rgba(108,92,231,0.5), 0 0 32px rgba(108,92,231,0.3); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.fade-up { animation: fade-up 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.fade-in { animation: fade-in 0.4s ease both; }

/* Floating music notes */
.floating-notes {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.note {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 400;
  opacity: 0;
  will-change: transform, opacity;
  animation-name: note-drift;
  animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
  animation-fill-mode: forwards;
  filter: blur(0.3px);
}
.note.hue-0 { color: rgba(108, 92, 231, 0.55); text-shadow: 0 0 18px rgba(108, 92, 231, 0.45); }
.note.hue-1 { color: rgba(255, 77, 141, 0.55); text-shadow: 0 0 18px rgba(255, 77, 141, 0.45); }
.note.hue-2 { color: rgba(0, 209, 255, 0.55); text-shadow: 0 0 18px rgba(0, 209, 255, 0.45); }

@keyframes note-drift {
  0%   { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.8); }
  15%  { opacity: 0.18; }
  85%  { opacity: 0.18; }
  100% { opacity: 0; transform: translate(var(--end-x), var(--end-y)) rotate(var(--rot)) scale(1); }
}

/* Bottom equalizer */
.equalizer {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  padding: 0 24px 18px;
  pointer-events: none;
  mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}
.equalizer span {
  width: 3px;
  height: 6px;
  border-radius: 999px;
  background: var(--gradient);
  animation-name: eq-pulse;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  opacity: 0.18;
  filter: blur(0.2px);
}
@keyframes eq-pulse {
  0%, 100% { height: 6px; opacity: 0.10; }
  50%      { height: 38px; opacity: 0.26; }
}

@media (prefers-reduced-motion: reduce) {
  .note, .equalizer span { animation: none; }
  .floating-notes, .equalizer { display: none; }
}

/* Track preview play button */
.row-play {
  border: none;
}
li:hover .row-play,
.row-play.is-playing,
.row-play:focus-visible {
  opacity: 1 !important;
}
.row-play.is-playing {
  background: var(--gradient) !important;
  box-shadow: 0 0 18px rgba(108,92,231,0.6);
}

.rec-card:hover {
  background: rgba(255,255,255,0.06) !important;
  border-color: var(--border-strong) !important;
  transform: translateY(-1px);
}

/* Terms modal markdown */
.terms-body h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 18px;
}
.terms-body h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 10px;
  letter-spacing: -0.01em;
}
.terms-body h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin: 18px 0 6px;
}
.terms-body p { margin: 0 0 12px; }
.terms-body ul {
  margin: 0 0 14px 18px;
  padding: 0;
}
.terms-body li { margin-bottom: 4px; }
.terms-body strong { color: var(--text); font-weight: 600; }
.terms-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}
.terms-body a {
  color: #A99EFF;
  text-decoration: none;
  border-bottom: 1px solid rgba(169,158,255,0.4);
}
.terms-body a:hover { border-bottom-color: #A99EFF; }
.terms-body code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: rgba(255,255,255,0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

.footer-link {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
}
.footer-link:hover { color: var(--text); }

/* Search submit button - icon only on mobile */
@media (max-width: 600px) {
  .search-submit .search-label { display: none; }
  .search-submit { padding: 11px 14px !important; }
}

/* Setlist Connect / Confirm boxes - stack on mobile */
@media (max-width: 720px) {
  .connect-box, .confirm-box {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
  }
  .connect-box .btn, .confirm-box .btn {
    width: 100%;
    justify-content: center;
  }
  .confirm-box > * { width: 100%; }
}

/* Setlist hero responsive grid */
.setlist-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 50px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 1000px) {
  .setlist-hero { grid-template-columns: 220px 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .setlist-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .setlist-hero-art {
    max-width: 260px;
    width: 100%;
  }
}
