/* ================================================================
   GigsJam 2.0 — Complete Stylesheet
   ================================================================ */

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

:root {
  --primary:       #f04e23;
  --primary-dark:  #c93d18;
  --primary-light: #ff7a54;
  --bg:            #0f0f1a;
  --bg2:           #131320;
  --bg3:           #1a1a2e;
  --bg4:           #212138;
  --surface:       #1e1e33;
  --surface2:      #252545;
  --border:        rgba(255,255,255,0.08);
  --border2:       rgba(255,255,255,0.14);
  --text:          #f0f0f8;
  --text2:         #9090b8;
  --text3:         #555580;
  --success:       #22c55e;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-xs:     6px;
  --shadow:        0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg:     0 8px 48px rgba(0,0,0,0.7);
  --nav-h:         64px;
  --player-h:      72px;
  --font:          'Inter', system-ui, -apple-system, sans-serif;
  --font-display:  'Space Grotesk', 'Inter', sans-serif;
  --ease:          0.2s ease;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.has-player { padding-bottom: var(--player-h); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, textarea, select { font-family: inherit; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--surface2); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 900;
  background: rgba(15,15,26,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.5rem; }
.logo-text { color: var(--primary); }

/* Search */
.nav-search { flex: 1; max-width: 460px; }
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box i.fa-search {
  position: absolute;
  left: 14px;
  color: var(--text3);
  font-size: .85rem;
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  font-size: .9rem;
  transition: var(--ease);
}
.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface2);
  box-shadow: 0 0 0 3px rgba(240,78,35,.15);
}
.search-box input::placeholder { color: var(--text3); }
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
}
.search-dropdown.open { display: block; }
.sd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background var(--ease);
}
.sd-item:hover { background: var(--bg4); }
.sd-item img {
  width: 40px; height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg4);
  flex-shrink: 0;
}
.sd-item img.round { border-radius: 50%; }
.sd-meta { flex: 1; min-width: 0; }
.sd-name { font-size: .88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-sub  { font-size: .74rem; color: var(--text2); }
.sd-badge {
  font-size: .68rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--bg4);
  color: var(--text3);
  flex-shrink: 0;
}
.sd-more {
  display: block;
  text-align: center;
  padding: 12px;
  font-size: .82rem;
  color: var(--primary);
  border-top: 1px solid var(--border);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: .88rem;
  font-weight: 500;
  transition: var(--ease);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--primary); }

/* User menu */
.nav-user { position: relative; }
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--ease);
}
.nav-user-btn:hover { border-color: var(--border2); background: var(--surface2); }
.nav-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.nav-user-name { font-size: .88rem; font-weight: 500; }
.nav-user-btn .fa-chevron-down { font-size: .7rem; color: var(--text2); }
.user-drop {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 190px;
  overflow: hidden;
  z-index: 1000;
}
.user-drop.open { display: block; }
.user-drop a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: .88rem;
  color: var(--text2);
  transition: background var(--ease);
}
.user-drop a:hover { background: var(--bg4); color: var(--text); }
.user-drop a i { width: 16px; text-align: center; }
.user-drop hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.nav-hamburger {
  display: none;
  padding: 8px;
  color: var(--text);
  font-size: 1.2rem;
}
@media (max-width: 860px) {
  .nav-search { display: none; }
  .nav-link { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open { display: flex; flex-direction: column; position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--bg2); padding: 16px; border-bottom: 1px solid var(--border); z-index: 899; }
  .nav-links.open .nav-link { display: flex; width: 100%; padding: 12px 16px; }
  .nav-links.open .btn { width: 100%; justify-content: center; }
  .nav-links.open .nav-user { width: 100%; }
}

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.page-wrap { padding-top: var(--nav-h); min-height: 100vh; }
.container { max-width: 1300px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: 500px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 24px;
  font-size: .88rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(240,78,35,.35);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border2);
}
.btn-ghost:hover { background: var(--surface); }
.btn-surface {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-surface:hover { background: var(--surface2); }
.btn-danger {
  background: rgba(239,68,68,.15);
  color: var(--danger);
  border-color: rgba(239,68,68,.3);
}
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-sm { padding: 7px 16px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-icon {
  width: 38px; height: 38px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
}
.btn-icon.btn-sm { width: 32px; height: 32px; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-control {
  width: 100%;
  padding: 11px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .92rem;
  transition: var(--ease);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface2);
  box-shadow: 0 0 0 3px rgba(240,78,35,.12);
}
.form-control::placeholder { color: var(--text3); }
textarea.form-control { resize: vertical; min-height: 90px; line-height: 1.6; }
.form-hint { font-size: .76rem; color: var(--text3); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash {
  position: fixed;
  top: calc(var(--nav-h) + 14px);
  right: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  z-index: 2000;
  max-width: 380px;
  animation: slideInRight .25s ease;
  box-shadow: var(--shadow);
}
.flash-close { color: inherit; opacity: .6; margin-left: auto; flex-shrink: 0; padding: 2px; }
.flash-close:hover { opacity: 1; }
.flash-success { background: #14532d; border: 1px solid #16a34a; color: #86efac; }
.flash-error   { background: #450a0a; border: 1px solid #b91c1c; color: #fca5a5; }
.flash-info    { background: #1e3a5f; border: 1px solid #2563eb; color: #93c5fd; }
.flash-warning { background: #451a03; border: 1px solid #d97706; color: #fcd34d; }
.flash-inline  { position: static; max-width: 100%; margin-bottom: 16px; animation: none; }
@keyframes slideInRight { from { opacity:0; transform: translateX(16px); } to { opacity:1; transform: translateX(0); } }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card-body { padding: 16px; }

/* Music card */
.music-card { position: relative; }
.mc-thumb {
  position: relative;
  overflow: hidden;
  background: var(--bg3);
  aspect-ratio: 1 / 1;
}
.mc-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.music-card:hover .mc-thumb img { transform: scale(1.06); }
.mc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--ease);
}
.music-card:hover .mc-overlay { opacity: 1; }
.play-circle {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  padding-left: 3px;
  box-shadow: 0 4px 16px rgba(240,78,35,.5);
  transition: transform .18s;
}
.play-circle:hover { transform: scale(1.1); }
.mc-body { padding: 13px 14px; }
.mc-title {
  font-size: .92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.mc-sub {
  font-size: .78rem;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Artist card variation */
.artist-card .mc-thumb {
  aspect-ratio: auto;
  padding: 20px 20px 0;
  background: transparent;
}
.artist-card .mc-thumb img {
  width: 100%; aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--border);
}
.artist-card .mc-body { text-align: center; padding: 10px 14px 16px; }

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5,1fr); gap: 18px; }
.grid-6 { display: grid; grid-template-columns: repeat(6,1fr); gap: 16px; }

@media (max-width: 1200px) {
  .grid-6 { grid-template-columns: repeat(5,1fr); }
  .grid-5 { grid-template-columns: repeat(4,1fr); }
}
@media (max-width: 1024px) {
  .grid-6 { grid-template-columns: repeat(4,1fr); }
  .grid-5 { grid-template-columns: repeat(3,1fr); }
  .grid-4 { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 768px) {
  .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 440px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2,1fr); gap: 12px; }
}

/* ============================================================
   SECTION / HEADINGS
   ============================================================ */
.section { padding: 36px 0; }
.section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}
.section-link { font-size: .82rem; color: var(--primary); }
.section-link:hover { color: var(--primary-light); }

/* ============================================================
   HERO / BANNER
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 440px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--bg3);
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .18;
  filter: blur(2px);
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,15,26,.9) 0%, rgba(240,78,35,.08) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 64px 0;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}
.hero h1 span { color: var(--primary); }
.hero p {
  font-size: 1.05rem;
  color: var(--text2);
  max-width: 480px;
  margin-bottom: 28px;
  line-height: 1.7;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Artist hero */
.artist-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 32px;
  overflow: hidden;
}
.artist-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  filter: blur(4px) brightness(.3);
  transform: scale(1.05);
}
.artist-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}
.artist-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 24px;
}
.artist-big-img {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  flex-shrink: 0;
}
.artist-hero-meta h1 { font-size: clamp(1.6rem,4vw,2.6rem); margin-bottom: 6px; }
.verified-badge { color: var(--primary); margin-left: 6px; font-size: .8em; }
.artist-stats {
  display: flex;
  gap: 24px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.a-stat-num { font-size: 1.05rem; font-weight: 700; color: var(--primary); display: block; }
.a-stat-lbl { font-size: .72rem; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag {
  padding: 3px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: .74rem;
  color: var(--text2);
  transition: var(--ease);
}
.tag:hover { border-color: var(--primary); color: var(--primary); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* Album hero */
.album-hero {
  display: flex;
  gap: 32px;
  padding: 40px 0;
  align-items: flex-end;
}
.album-cover-big {
  width: 220px; height: 220px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-lg);
}
.album-hero-meta { flex: 1; }
.album-hero-meta .type-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text3);
  margin-bottom: 8px;
}
.album-hero-meta h1 { font-size: clamp(1.5rem,3.5vw,2.4rem); margin-bottom: 8px; }
.album-artist-link { color: var(--primary); font-size: 1rem; font-weight: 500; }
.album-info-line { font-size: .84rem; color: var(--text2); margin: 6px 0 16px; }
@media (max-width: 640px) {
  .album-hero { flex-direction: column; align-items: flex-start; }
  .album-cover-big { width: 160px; height: 160px; }
  .artist-hero-inner { flex-direction: column; align-items: flex-start; }
  .artist-big-img { width: 100px; height: 100px; }
}

/* ============================================================
   SONG ROWS / TRACK LIST
   ============================================================ */
.song-list { display: flex; flex-direction: column; }
.song-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--ease);
  position: relative;
}
.song-row:hover { background: var(--surface); }
.song-row.is-playing { background: rgba(240,78,35,.08); }
.song-num {
  width: 26px;
  text-align: center;
  font-size: .84rem;
  color: var(--text3);
  flex-shrink: 0;
}
.song-row.is-playing .song-num { color: var(--primary); }
.song-thumb {
  width: 44px; height: 44px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
}
.song-info { flex: 1; min-width: 0; }
.song-name {
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-row.is-playing .song-name { color: var(--primary); }
.song-artist {
  font-size: .78rem;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-artist a:hover { color: var(--primary); }
.song-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--ease);
}
.song-row:hover .song-actions { opacity: 1; }
.song-duration {
  font-size: .78rem;
  color: var(--text3);
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}
.sa-btn {
  width: 30px; height: 30px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  color: var(--text2);
  transition: var(--ease);
}
.sa-btn:hover { background: var(--bg4); color: var(--text); }
.sa-btn.liked { color: var(--primary); }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tabs::-webkit-scrollbar { height: 0; }
.tab-btn {
  padding: 11px 20px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text2);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--ease);
  white-space: nowrap;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover:not(.active) { color: var(--text); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============================================================
   CHIPS / FILTERS
   ============================================================ */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text2);
  cursor: pointer;
  transition: var(--ease);
}
.chip:hover, .chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse at 60% 0%, rgba(240,78,35,.08) 0%, transparent 60%), var(--bg);
}
.auth-box {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .emoji { font-size: 2.8rem; display: block; margin-bottom: 10px; }
.auth-logo h2 { font-size: 1.7rem; margin-bottom: 4px; }
.auth-logo p { color: var(--text2); font-size: .9rem; }
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.divider span { font-size: .78rem; color: var(--text3); }
.auth-footer { text-align: center; font-size: .88rem; color: var(--text2); margin-top: 16px; }
.auth-footer a { color: var(--primary); font-weight: 500; }

/* ============================================================
   PROFILE
   ============================================================ */
.profile-cover {
  height: 220px;
  background: var(--bg3);
  background-size: cover;
  background-position: center;
  position: relative;
}
.profile-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-top: -56px;
  padding-bottom: 20px;
  flex-wrap: wrap;
}
.profile-pic {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 5px solid var(--bg);
  object-fit: cover;
  flex-shrink: 0;
  position: relative;
}
.profile-name-row { flex: 1; min-width: 0; }
.profile-name { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.profile-handle { color: var(--text2); font-size: .88rem; margin-top: 2px; }
.profile-stats { display: flex; gap: 24px; margin-top: 10px; flex-wrap: wrap; }
.pstat { cursor: pointer; }
.pstat strong { display: block; font-size: 1rem; font-weight: 700; }
.pstat span { font-size: .74rem; color: var(--text2); text-transform: uppercase; letter-spacing: .04em; }
.profile-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin: 20px 0 24px;
  overflow-x: auto;
}
.profile-tab {
  padding: 10px 20px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text2);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--ease);
  white-space: nowrap;
}
.profile-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.profile-tab-pane { display: none; }
.profile-tab-pane.active { display: block; }

/* ============================================================
   CHART PAGE
   ============================================================ */
.chart-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.chart-row:last-child { border: none; }
.chart-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: rgba(255,255,255,.12);
  width: 44px;
  text-align: right;
  flex-shrink: 0;
}
.chart-thumb {
  width: 54px; height: 54px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
}
.chart-info { flex: 1; min-width: 0; }
.chart-title { font-size: .94rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-sub   { font-size: .8rem; color: var(--text2); }
.chart-plays { font-size: .76rem; color: var(--text3); }

/* ============================================================
   PERSISTENT MUSIC PLAYER
   ============================================================ */
.player-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--player-h);
  background: rgba(18,18,30,.98);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 800;
  display: none;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
}
.logged-in .player-bar { display: flex; }

/* Left: song info */
.pb-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.pb-thumb {
  width: 48px; height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
}
.pb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pb-meta { overflow: hidden; flex: 1; }
.pb-song   { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-artist { font-size: .76rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-like   { color: var(--text3); padding: 8px; transition: color var(--ease); flex-shrink: 0; }
.pb-like:hover { color: var(--primary); }
.pb-like.liked { color: var(--primary); }

/* Centre: controls */
.pb-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 2;
  max-width: 500px;
}
.pb-btns { display: flex; align-items: center; gap: 8px; }
.pb-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  font-size: .95rem;
  transition: var(--ease);
}
.pb-btn:hover { color: var(--text); background: var(--surface); }
.pb-btn.active { color: var(--primary); }
.pb-play {
  width: 40px; height: 40px;
  background: var(--primary);
  color: #fff !important;
  border-radius: 50%;
  font-size: 1rem;
}
.pb-play:hover { background: var(--primary-dark) !important; transform: scale(1.06); }
.pb-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.pb-time { font-size: .7rem; color: var(--text3); flex-shrink: 0; }
.pb-track {
  flex: 1;
  height: 4px;
  background: var(--bg4);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.pb-fill { height: 100%; background: var(--primary); border-radius: 2px; width: 0%; }
.pb-track:hover .pb-fill { background: var(--primary-light); }

/* Right: volume etc */
.pb-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
}
.vol-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg4);
  border-radius: 2px;
  cursor: pointer;
  outline: none;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
}

@media (max-width: 700px) {
  .pb-right  { display: none; }
  .pb-progress { display: none; }
  .pb-center { flex: 1.5; }
}

/* ============================================================
   QUEUE PANEL
   ============================================================ */
.queue-panel {
  position: fixed;
  right: -320px;
  bottom: var(--player-h);
  top: var(--nav-h);
  width: 300px;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 799;
  transition: right .28s ease;
  overflow-y: auto;
}
.queue-panel.open { right: 0; }
.queue-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg2);
  z-index: 1;
}
.queue-hd h3 { font-size: .95rem; font-weight: 600; }
.queue-close { color: var(--text2); padding: 4px 8px; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text2);
}
.empty-state i { font-size: 3rem; color: var(--text3); display: block; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--text); }
.empty-state p  { font-size: .9rem; max-width: 320px; margin: 0 auto; }

/* ============================================================
   SETUP PAGE
   ============================================================ */
.setup-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--bg);
}
.setup-box {
  max-width: 600px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.check-row:last-child { border: none; }
.check-ok  { color: var(--success); }
.check-err { color: var(--danger); }

/* ============================================================
   SIDEBAR LAYOUT
   ============================================================ */
.two-col { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.two-col-wide { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
@media (max-width: 900px) {
  .two-col, .two-col-wide { grid-template-columns: 1fr; }
  .two-col aside, .two-col-wide aside { display: none; }
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-primary  { color: var(--primary) !important; }
.text-muted    { color: var(--text2); }
.text-center   { text-align: center; }
.fw-bold       { font-weight: 700; }
.fw-semi       { font-weight: 600; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.flex-1 { flex: 1; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rounded   { border-radius: var(--radius); }
.rounded-full { border-radius: 50%; }
.hidden  { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Skeleton loader */
.skel {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Spinner */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap { display: flex; justify-content: center; align-items: center; padding: 60px; }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }

/* Band styles for bg sections */
.bg-band { background: var(--bg2); }
.bg-band2 { background: var(--bg3); }

/* ================================================================
   COMPATIBILITY ALIASES  (maps v1 class names → v2 styles)
   ================================================================ */

/* Artist hero aliases */
.artist-hero { position:relative; min-height:340px; display:flex; align-items:flex-end; padding-bottom:32px; overflow:hidden; }
.artist-hero-bg { position:absolute; inset:0; background-size:cover; background-position:center top; filter:blur(4px) brightness(.3); transform:scale(1.05); }
.artist-hero-overlay { position:absolute; inset:0; background:linear-gradient(to top,var(--bg) 0%,rgba(0,0,0,.2) 60%,transparent 100%); }
.artist-hero-content { position:relative; z-index:2; display:flex; align-items:flex-end; gap:24px; }
.artist-avatar { width:150px; height:150px; border-radius:50%; object-fit:cover; border:4px solid var(--primary); box-shadow:0 8px 32px rgba(0,0,0,.6); flex-shrink:0; }
.artist-meta h1 { font-family:var(--font-display); font-size:clamp(1.6rem,4vw,2.6rem); margin-bottom:6px; }
.verified { color:var(--primary); margin-left:6px; font-size:.8em; }
.artist-stats { display:flex; gap:24px; margin:12px 0; flex-wrap:wrap; }
.artist-stat { }
.artist-stat-num { font-size:1.05rem; font-weight:700; color:var(--primary); display:block; }
.artist-stat-label { font-size:.72rem; color:var(--text2); text-transform:uppercase; letter-spacing:.05em; }
.artist-tags { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }

/* Album hero aliases */
.album-hero { display:flex; gap:32px; padding:40px 0; align-items:flex-end; }
.album-cover { width:220px; height:220px; border-radius:var(--radius); object-fit:cover; flex-shrink:0; box-shadow:var(--shadow-lg); }
.album-meta h1 { font-family:var(--font-display); font-size:clamp(1.5rem,3.5vw,2.4rem); margin-bottom:8px; }
.album-meta .album-artist { color:var(--primary); font-size:1rem; font-weight:500; margin-bottom:6px; display:block; }
.album-meta .album-info { font-size:.84rem; color:var(--text2); margin-bottom:16px; }

/* Music card aliases (v1 used music-card-thumb, mc-body, etc.) */
.music-card { position:relative; }
.music-card-thumb { position:relative; overflow:hidden; background:var(--bg3); aspect-ratio:1/1; }
.music-card-thumb img { width:100%; height:100%; object-fit:cover; transition:transform .4s ease; }
.music-card:hover .music-card-thumb img { transform:scale(1.06); }
.music-card-play { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.45); opacity:0; transition:opacity var(--ease); }
.music-card:hover .music-card-play { opacity:1; }
.play-btn-circle { width:52px; height:52px; border-radius:50%; background:var(--primary); color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.1rem; padding-left:3px; box-shadow:0 4px 16px rgba(240,78,35,.5); transition:transform .18s; }
.play-btn-circle:hover { transform:scale(1.1); }
.music-card-body { padding:13px 14px; }
.music-card-title { font-size:.92rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:3px; }
.music-card-sub { font-size:.78rem; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Artist card (circle) */
.artist-card .music-card-thumb { aspect-ratio:auto; padding:20px 20px 0; background:transparent; }
.artist-card .music-card-thumb img { width:100%; aspect-ratio:1; border-radius:50%; border:3px solid var(--border); }
.artist-card .music-card-body { text-align:center; }

/* Song row aliases */
.song-row-thumb  { width:44px; height:44px; border-radius:var(--radius-xs); object-fit:cover; background:var(--bg3); flex-shrink:0; }
.song-row-info   { flex:1; min-width:0; }
.song-row-name   { font-size:.9rem; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.song-row.playing .song-row-name { color:var(--primary); }
.song-row.playing { background:rgba(240,78,35,.08); }
.song-row.playing .song-num { color:var(--primary); }
.song-row-artist { font-size:.78rem; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.song-row-actions { display:flex; align-items:center; gap:2px; opacity:0; transition:opacity var(--ease); }
.song-row:hover .song-row-actions { opacity:1; }
.song-row-duration { font-size:.78rem; color:var(--text3); min-width:36px; text-align:right; flex-shrink:0; }
.song-action-btn { width:30px; height:30px; border-radius:var(--radius-xs); display:flex; align-items:center; justify-content:center; font-size:.82rem; color:var(--text2); transition:var(--ease); }
.song-action-btn:hover { background:var(--bg4); color:var(--text); }
.song-action-btn.liked { color:var(--primary); }

/* Profile aliases */
.profile-cover { height:220px; background:var(--bg3); background-size:cover; background-position:center; position:relative; }
.profile-info { display:flex; align-items:flex-end; gap:20px; margin-top:-56px; padding-bottom:20px; flex-wrap:wrap; }
.profile-avatar { width:120px; height:120px; border-radius:50%; border:5px solid var(--bg); object-fit:cover; flex-shrink:0; }
.profile-name { font-family:var(--font-display); font-size:1.6rem; font-weight:700; line-height:1.2; }
.profile-username { color:var(--text2); font-size:.88rem; margin-top:2px; }
.profile-stats { display:flex; gap:24px; margin-top:10px; flex-wrap:wrap; }
.profile-stat { cursor:pointer; }
.profile-stat strong { display:block; font-size:1rem; font-weight:700; }
.profile-stat span { font-size:.74rem; color:var(--text2); text-transform:uppercase; letter-spacing:.04em; }
.profile-tabs { display:flex; gap:2px; border-bottom:2px solid var(--border); margin:20px 0 24px; overflow-x:auto; }
.profile-tab { padding:10px 20px; font-size:.88rem; font-weight:500; color:var(--text2); border-bottom:2px solid transparent; margin-bottom:-2px; cursor:pointer; transition:var(--ease); white-space:nowrap; }
.profile-tab.active { color:var(--primary); border-bottom-color:var(--primary); }
.profile-tab-content { display:none; padding-bottom:40px; }
.profile-tab-content.active-tab { display:block; }

/* Tab system (v1) */
.tab-content { display:none; }
.tab-content.active { display:block; }

/* Chart row aliases */
.chart-row-wrap { display:flex; align-items:center; gap:16px; padding:12px 0; border-bottom:1px solid var(--border); }
.chart-row-wrap:last-child { border:none; }
.chart-number { font-family:var(--font-display); font-size:1.6rem; font-weight:700; color:rgba(255,255,255,.12); width:44px; text-align:right; flex-shrink:0; }

/* Auth flash inline */
.flash-message { position:fixed; top:calc(var(--nav-h)+14px); right:20px; display:flex; align-items:flex-start; gap:12px; padding:14px 18px; border-radius:var(--radius-sm); font-size:.88rem; z-index:2000; max-width:380px; animation:slideInRight .25s ease; box-shadow:var(--shadow); }
.flash-success { background:#14532d; border:1px solid #16a34a; color:#86efac; }
.flash-error   { background:#450a0a; border:1px solid #b91c1c; color:#fca5a5; }
.flash-info    { background:#1e3a5f; border:1px solid #2563eb; color:#93c5fd; }

/* Section helpers */
.section { padding:36px 0; }
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:22px; }
.section-title { font-family:var(--font-display); font-size:1.3rem; font-weight:700; }
.section-link { font-size:.82rem; color:var(--primary); }

/* Button small aliases */
.btn-ghost { background:transparent; color:var(--text); border:1px solid var(--border2); }
.btn-ghost:hover { background:var(--surface); }

/* Grid aliases */
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
.grid-6 { display:grid; grid-template-columns:repeat(6,1fr); gap:16px; }
@media(max-width:1200px){.grid-6{grid-template-columns:repeat(5,1fr)}}
@media(max-width:1024px){.grid-6{grid-template-columns:repeat(4,1fr)}.grid-4{grid-template-columns:repeat(3,1fr)}}
@media(max-width:768px){.grid-4,.grid-6{grid-template-columns:repeat(2,1fr)}}

/* Setup page aliases */
.setup-wrap { max-width:640px; margin:60px auto; padding:0 24px; }
.setup-step { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:28px; margin-bottom:16px; }
.status-ok  { color:var(--success); }
.status-err { color:var(--danger); }

/* Misc v1 classes */
.text-primary { color:var(--primary)!important; }
.fw-bold { font-weight:700; }
.mt-4 { margin-top:16px; }
.mb-4 { margin-bottom:16px; }

/* ── Video toggle button (Fix 3) ─────────────────────────── */
#pbVideoToggle {
  font-size: .72rem;
  letter-spacing: .02em;
  padding: 0 8px;
  min-width: 36px;
  color: var(--text2);
  transition: color .2s, background .2s;
}
#pbVideoToggle.active,
#pbVideoToggle:hover {
  color: #ff4444;
}
#pbVideoToggle i {
  font-size: 1rem;
}

/* ── Floating video overlay (Fix 3) ──────────────────────── */
/* ── YouTube Video Player Overlay ─────────────────────────────────────── */
#ytVideoOverlay {
  display: none;
  position: fixed;
  bottom: 88px;
  right: 20px;
  width: 340px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.7);
  z-index: 8000;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,.1);
  flex-direction: column;
  user-select: none;
}
#ytVideoOverlay.visible { display: flex; }

/* drag handle / title bar */
#ytVidHeader {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0,0,0,.55);
  cursor: grab;
  flex-shrink: 0;
}
#ytVidHeader:active { cursor: grabbing; }
#ytVidTitle {
  flex: 1;
  font-size: .78rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#ytVidHeader .yvp-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 6px;
  font-size: .8rem;
  line-height: 1;
  transition: color .15s, background .15s;
}
#ytVidHeader .yvp-btn:hover { color: #fff; background: rgba(255,255,255,.12); }

/* video area */
#ytVidScreen {
  position: relative;
  width: 340px;
  height: 191px;         /* 16:9 */
  background: #000;
  flex-shrink: 0;
  overflow: hidden;
}
#ytVidScreen iframe,
#ytVidScreen #ytPlayer {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: none;
  display: block;
}

/* info bar */
#ytVidInfo {
  padding: 8px 12px 4px;
  flex-shrink: 0;
}
#ytVidSong {
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#ytVidArtist {
  font-size: .73rem;
  color: rgba(255,255,255,.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* progress */
#ytVidProgress {
  margin: 6px 12px 0;
  height: 3px;
  background: rgba(255,255,255,.15);
  border-radius: 2px;
  cursor: pointer;
  flex-shrink: 0;
}
#ytVidProgressFill {
  height: 100%;
  background: var(--primary, #6c63ff);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
  transition: width .5s linear;
}
#ytVidProgress:hover { height: 5px; margin-top: 5px; }

/* controls */
#ytVidControls {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 10px;
  flex-shrink: 0;
}
.yvp-ctrl {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: .85rem;
  line-height: 1;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.yvp-ctrl:hover  { color: #fff; background: rgba(255,255,255,.1); }
.yvp-ctrl.active { color: var(--primary, #6c63ff); }
.yvp-ctrl.big {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary, #6c63ff);
  color: #fff;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}
.yvp-ctrl.big:hover { background: var(--primary-dark, #5a52d5); color: #fff; }

#ytVidTimes {
  font-size: .68rem;
  color: rgba(255,255,255,.45);
  flex: 1;
  text-align: center;
}

#ytVidVolWrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
#ytVidVol {
  -webkit-appearance: none;
  appearance: none;
  width: 58px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,.2);
  outline: none;
  cursor: pointer;
}
#ytVidVol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
