/* =========================================================
   ZY Music · 静态演示版
   Dark glass / aurora theme
   ========================================================= */

:root {
  --bg: #0b0a1a;
  --bg-2: #14122b;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-2: rgba(255, 255, 255, 0.085);
  --panel-strong: rgba(20, 18, 43, 0.86);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f4f2ff;
  --soft: #c7c3e6;
  --muted: #8b87ad;
  --violet: #a78bfa;
  --blue: #667eea;
  --purple: #764ba2;
  --pink: #f472b6;
  --cyan: #22d3ee;
  --green: #34d399;
  --grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --grad-soft: linear-gradient(135deg, rgba(102, 126, 234, 0.22), rgba(118, 75, 162, 0.22));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.8);
  --font: "Inter", "Segoe UI", -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --player-h: 86px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(102, 126, 234, 0.22), transparent 60%),
    radial-gradient(800px 600px at 95% 0%, rgba(244, 114, 182, 0.13), transparent 60%),
    linear-gradient(180deg, #0b0a1a 0%, #12102a 52%, #0b0a1a 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: calc(var(--player-h) + 28px);
}
body.player-hidden { padding-bottom: 40px; }
body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

::selection { background: rgba(167, 139, 250, 0.35); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- backdrops ---------- */
.aurora { position: fixed; inset: 0; z-index: -3; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.aurora__a { width: 620px; height: 620px; top: -260px; left: -160px; background: rgba(102,126,234,.35); }
.aurora__b { width: 560px; height: 560px; top: 10%; right: -240px; background: rgba(244,114,182,.22); }
.aurora__c { width: 700px; height: 700px; bottom: -380px; left: 30%; background: rgba(34,211,238,.14); }

.user-bg {
  position: fixed; inset: 0; z-index: -2;
  background-image: var(--user-bg, none);
  background-size: cover; background-position: center;
  opacity: var(--user-bg-opacity, 0);
  transition: opacity .4s ease;
  pointer-events: none;
}
.user-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,10,26,.55), rgba(11,10,26,.9));
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 90;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(11, 10, 26, 0.55);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.topbar.is-scrolled { background: rgba(11, 10, 26, 0.84); border-bottom-color: var(--line); }
.topbar-inner {
  width: min(100% - 40px, 1240px);
  height: 66px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 11px; background: var(--grad);
  font-family: var(--mono); font-size: 12px; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 10px 24px -12px rgba(102,126,234,.9);
}
.brand-text { font-size: 17px; font-weight: 750; letter-spacing: .02em; }
.brand-text em { font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: var(--muted); margin-left: 6px; vertical-align: 2px; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  position: relative; padding: 7px 11px; border-radius: 9px;
  font-size: 13.5px; color: var(--muted); transition: color .18s ease, background .18s ease;
}
.main-nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.main-nav a.is-active { color: var(--text); background: rgba(255,255,255,.075); }
.main-nav a.is-active::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px;
  border-radius: 2px; background: var(--grad);
}
.nav-badge {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px;
  margin-left: 4px; padding: 0 4px; border-radius: 999px;
  background: var(--pink); color: #200b1e; font-size: 10px; font-weight: 800;
  vertical-align: 1px;
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255,255,255,.04); color: var(--soft);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { color: #fff; border-color: var(--line-strong); background: rgba(255,255,255,.09); }
.site-link {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  color: var(--muted); padding: 8px 4px; transition: color .18s ease;
}
.site-link:hover { color: var(--cyan); }
.site-link--back {
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: .01em;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: var(--soft);
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.site-link--back:hover {
  color: #fff;
  border-color: var(--line-strong);
  background: rgba(255,255,255,.09);
}
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.045); color: var(--soft); font-size: 12.5px;
  transition: border-color .18s ease, background .18s ease;
}
.user-chip:hover { border-color: var(--line-strong); background: rgba(255,255,255,.08); }
.user-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--bg-2); }
.user-chip span { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn {
  display: none; width: 36px; height: 36px; padding: 9px;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.04);
}
.menu-btn span { display: block; height: 1.5px; background: var(--soft); margin: 4px 0; border-radius: 2px; transition: .2s ease; }

/* ---------- layout ---------- */
.view { width: min(100% - 40px, 1240px); margin-inline: auto; padding: 34px 0 40px; min-height: 60vh; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.eyebrow {
  margin: 0 0 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--violet);
}
.page-title { margin: 0; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -.025em; font-weight: 800; }
.page-sub { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; max-width: 52em; }
.section { margin-top: 38px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title { margin: 0; font-size: 19px; font-weight: 720; letter-spacing: -.01em; }
.section-title span { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .12em; margin-left: 8px; }
.section-link { font-size: 12.5px; color: var(--muted); transition: color .18s ease; }
.section-link:hover { color: var(--cyan); }

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 17px; border-radius: 10px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 650; line-height: 1.2; white-space: nowrap;
  transition: transform .18s ease, filter .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 12px 28px -14px rgba(102,126,234,.8); }
.btn--primary:hover { filter: brightness(1.07); }
.btn--ghost { border-color: var(--line-strong); background: rgba(255,255,255,.045); color: var(--soft); }
.btn--ghost:hover { background: rgba(255,255,255,.09); color: #fff; }
.btn--soft { background: rgba(167,139,250,.14); border-color: rgba(167,139,250,.28); color: #ddd6fe; }
.btn--pink { background: linear-gradient(135deg, #f472b6, #a78bfa); color: #1b0d24; }
.btn--danger { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.3); color: #fca5a5; }
.btn--sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.ghost-btn {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 11.5px;
  transition: color .18s ease, border-color .18s ease;
}
.ghost-btn:hover { color: var(--text); border-color: var(--line-strong); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12px; color: var(--soft); font-weight: 600; }
.field .hint { font-size: 11px; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.045);
  color: var(--text); font-size: 13.5px; outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.input::placeholder, .textarea::placeholder { color: rgba(139,135,173,.8); }
.input:focus, .textarea:focus, .select:focus {
  border-color: rgba(167,139,250,.55); background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 3px rgba(167,139,250,.12);
}
.textarea { resize: vertical; min-height: 92px; line-height: 1.7; }
.select { appearance: none; -webkit-appearance: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---------- glass ---------- */
.glass {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 34px 34px 30px; border-radius: 24px;
  border: 1px solid rgba(167,139,250,.2);
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(167,139,250,.18), transparent 60%),
    radial-gradient(80% 120% at 0% 100%, rgba(34,211,238,.1), transparent 60%),
    rgba(255,255,255,.045);
}
.hero::after {
  content: ""; position: absolute; width: 300px; height: 300px; right: -110px; top: -140px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.08);
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px;
  border-radius: 999px; border: 1px solid rgba(52,211,153,.3);
  background: rgba(52,211,153,.08); color: #a7f3d0; font-size: 11px; letter-spacing: .04em;
}
.hero__badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(52,211,153,.8); }
.hero h1 {
  margin: 18px 0 12px; font-size: clamp(32px, 5vw, 58px); line-height: 1.05;
  letter-spacing: -.04em; font-weight: 850;
  background: linear-gradient(120deg, #fff 15%, #c4b5fd 55%, #67e8f9 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0; color: var(--soft); max-width: 46em; font-size: 14.5px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.hero__stat strong { display: block; font-family: var(--mono); font-size: 24px; line-height: 1; color: #fff; }
.hero__stat span { font-size: 11.5px; color: var(--muted); }
.hero__note { margin-top: 18px; font-size: 11.5px; color: var(--muted); }

/* ---------- feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.feature {
  display: flex; flex-direction: column; gap: 9px; padding: 18px;
  border-radius: 15px; border: 1px solid var(--line); background: var(--panel);
  cursor: pointer; text-align: left; color: inherit;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.feature:hover { transform: translateY(-3px); border-color: rgba(167,139,250,.35); background: var(--panel-2); }
.feature__icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--grad-soft); border: 1px solid rgba(167,139,250,.2); color: #c4b5fd; }
.feature strong { font-size: 14px; }
.feature span { font-size: 11.5px; color: var(--muted); }

/* ---------- music grid/cards ---------- */
.music-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.music-card {
  position: relative; padding: 10px; border-radius: 15px; border: 1px solid transparent;
  background: rgba(255,255,255,.035); cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.music-card:hover { background: rgba(255,255,255,.07); border-color: var(--line); transform: translateY(-3px); }
.music-card.is-playing { border-color: rgba(167,139,250,.45); background: rgba(167,139,250,.1); }
.music-card__cover { position: relative; aspect-ratio: 1; border-radius: 11px; overflow: hidden; background: var(--grad-soft); }
.music-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.music-card__play {
  position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--grad); color: #fff; display: grid; place-items: center;
  opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.8);
}
.music-card:hover .music-card__play { opacity: 1; transform: none; }
.music-card.is-playing .music-card__play { opacity: 1; transform: none; }
.music-card__play svg { width: 15px; height: 15px; }
.music-card__meta { padding: 9px 2px 2px; }
.music-card__name { display: block; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-card__artist { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-card__like { position: absolute; top: 14px; right: 14px; border: 0; background: rgba(0,0,0,.28); color: #fff; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; opacity: 0; transition: opacity .2s ease; backdrop-filter: blur(6px); }
.music-card:hover .music-card__like { opacity: 1; }
.music-card__like.is-liked { color: var(--pink); opacity: 1; }

/* list rows */
.song-list { display: flex; flex-direction: column; gap: 2px; }
.song-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  transition: background .16s ease;
}
.song-row:hover { background: rgba(255,255,255,.05); }
.song-row.is-playing { background: rgba(167,139,250,.1); }
.song-row__idx { width: 22px; font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; flex: 0 0 22px; }
.song-row__cover { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex: 0 0 38px; background: var(--grad-soft); }
.song-row__main { flex: 1; min-width: 0; }
.song-row__name { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-row__artist { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-row__time { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.song-row__actions { display: flex; gap: 4px; opacity: .65; }
.song-row:hover .song-row__actions { opacity: 1; }
.mini-btn { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); display: grid; place-items: center; font-size: 13px; }
.mini-btn:hover { background: rgba(255,255,255,.08); color: var(--text); }
.mini-btn.is-liked { color: var(--pink); }

/* ---------- playlists ---------- */
.playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 14px; }
.playlist-card {
  display: flex; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.playlist-card:hover { background: var(--panel-2); border-color: rgba(167,139,250,.3); transform: translateY(-2px); }
.playlist-card__cover { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: 0 0 64px; background: var(--grad-soft); }
.playlist-card__main { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.playlist-card__name { font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-card__meta { margin-top: 3px; font-size: 11px; color: var(--muted); }

/* ---------- community ---------- */
.community-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.feed { display: flex; flex-direction: column; gap: 14px; }
.post {
  padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel);
}
.post__head { display: flex; align-items: center; gap: 10px; }
.avatar { border-radius: 50%; object-fit: cover; background: var(--bg-2); flex: 0 0 auto; }
.avatar--sm { width: 32px; height: 32px; }
.avatar--md { width: 42px; height: 42px; }
.avatar--lg { width: 82px; height: 82px; }
.post__who { flex: 1; min-width: 0; }
.post__name { font-size: 13px; font-weight: 650; }
.post__time { font-size: 10.5px; color: var(--muted); }
.post__content { margin: 13px 0 0; white-space: pre-wrap; word-break: break-word; color: var(--soft); font-size: 14px; }
.post__foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.post__action { border: 0; background: transparent; color: var(--muted); font-size: 11.5px; display: inline-flex; align-items: center; gap: 5px; }
.post__action:hover { color: var(--text); }
.comments { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 9px; }
.comment__body { flex: 1; min-width: 0; }
.comment__bubble { padding: 8px 11px; border-radius: 11px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.05); font-size: 12.5px; color: var(--soft); word-break: break-word; }
.comment__text { white-space: pre-wrap; }
.comment__name { font-size: 11px; color: #c4b5fd; font-weight: 650; }
.comment__meta { display: flex; gap: 10px; margin-top: 4px; font-size: 10.5px; color: var(--muted); }
.comment__meta button { border: 0; background: transparent; color: var(--muted); font-size: 10.5px; padding: 0; }
.comment__meta button:hover { color: var(--text); }
.comment--nested { margin-left: 34px; }
.comment-form { display: flex; gap: 8px; margin-top: 12px; }
.comment-form .input { padding: 8px 11px; font-size: 12.5px; }
.composer { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.composer__row { display: flex; gap: 10px; align-items: flex-start; }
.composer .textarea { min-height: 82px; }
.composer__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.composer__count { font-size: 10.5px; color: var(--muted); }
.side-card { padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.side-card h3 { margin: 0 0 10px; font-size: 13px; }
.side-card p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.mini-user { display: flex; align-items: center; gap: 9px; padding: 7px 0; }
.mini-user__name { flex: 1; font-size: 12.5px; }
.mini-user .btn { padding: 5px 9px; font-size: 10.5px; }

/* ---------- upload ---------- */
.upload-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.panel { padding: 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); }
.panel h2 { margin: 0 0 4px; font-size: 18px; }
.panel .sub { margin: 0 0 20px; font-size: 12px; color: var(--muted); }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 150px; padding: 20px; border-radius: 14px; border: 1px dashed rgba(167,139,250,.35);
  background: rgba(167,139,250,.045); text-align: center; cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.dropzone:hover, .dropzone.is-drag { background: rgba(167,139,250,.1); border-color: rgba(167,139,250,.65); }
.dropzone strong { font-size: 13px; }
.dropzone span { font-size: 11.5px; color: var(--muted); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone__icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid rgba(167,139,250,.25); color: #ddd6fe; font-size: 17px; }
.file-pill { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 7px 10px; border-radius: 9px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font-size: 11.5px; color: var(--soft); }
.file-pill button { margin-left: auto; border: 0; background: transparent; color: var(--muted); }
.cover-preview { width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--grad-soft); border: 1px solid var(--line); }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-tips { margin-top: 14px; padding: 12px 14px; border-radius: 11px; background: rgba(34,211,238,.05); border: 1px solid rgba(34,211,238,.15); font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.progress { height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 12px; }
.progress__bar { height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .3s ease; }

/* ---------- play / detail ---------- */
.play-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 30px; align-items: start; }
.play-cover { width: 100%; aspect-ratio: 1; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--grad-soft); }
.play-cover img { width: 100%; height: 100%; object-fit: cover; }
.play-info h1 { margin: 6px 0 8px; font-size: clamp(26px, 4vw, 40px); line-height: 1.15; letter-spacing: -.025em; }
.play-artist { color: var(--soft); font-size: 14px; }
.play-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; color: #ddd6fe; background: rgba(167,139,250,.12); border: 1px solid rgba(167,139,250,.24); }
.play-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0; }
.play-meta { display: flex; flex-wrap: wrap; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.play-meta strong { color: var(--soft); font-weight: 600; }
.play-comments { margin-top: 22px; }
.comments-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.comments-title h2 { margin: 0; font-size: 16px; }
.comments-title span { font-size: 11px; color: var(--muted); }

/* ---------- profile ---------- */
.profile-hero {
  position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(100% 130% at 100% 0%, rgba(167,139,250,.18), transparent 60%), var(--panel);
  padding: 26px;
}
.profile-hero__row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile-hero .avatar { border: 2px solid rgba(255,255,255,.18); }
.profile-hero__main { flex: 1; min-width: 200px; }
.profile-name { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.profile-username { margin: 3px 0 0; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.profile-bio { margin: 9px 0 0; color: var(--soft); font-size: 13px; max-width: 46em; }
.profile-stats { display: flex; gap: 22px; margin-top: 14px; }
.profile-stat strong { display: block; font-family: var(--mono); font-size: 17px; }
.profile-stat span { font-size: 10.5px; color: var(--muted); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-tabs { display: flex; gap: 4px; margin: 24px 0 18px; border-bottom: 1px solid var(--line); }
.profile-tabs button {
  position: relative; padding: 9px 13px; border: 0; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 600;
}
.profile-tabs button.is-active { color: var(--text); }
.profile-tabs button.is-active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 2px; background: var(--grad); border-radius: 2px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 16px; }
.profile-post { padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.profile-post p { margin: 0; color: var(--soft); font-size: 13px; white-space: pre-wrap; }
.profile-post time { display: block; margin-top: 8px; font-size: 10.5px; color: var(--muted); }

/* ---------- auth ---------- */
.auth-wrap { width: min(100%, 430px); margin: 40px auto; }
.auth-card { padding: 30px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.02em; }
.auth-card .sub { margin: 0 0 22px; color: var(--muted); font-size: 12.5px; }
.auth-card .field + .field { margin-top: 14px; }
.auth-card .btn { margin-top: 18px; }
.auth-alt { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.auth-alt a { color: var(--violet); }
.demo-box { margin-top: 16px; padding: 12px 14px; border-radius: 11px; background: rgba(34,211,238,.05); border: 1px solid rgba(34,211,238,.14); font-size: 11.5px; color: var(--muted); }
.demo-box code { font-family: var(--mono); color: #a5f3fc; }

/* ---------- messages ---------- */
.messages-layout { display: grid; grid-template-columns: 290px minmax(0,1fr); gap: 0; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; min-height: 520px; }
.convo-list { border-right: 1px solid var(--line); padding: 10px; }
.convo-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px;
  border: 0; border-radius: 11px; background: transparent; color: inherit; text-align: left;
}
.convo-item:hover { background: rgba(255,255,255,.05); }
.convo-item.is-active { background: rgba(167,139,250,.12); }
.convo-item__main { flex: 1; min-width: 0; }
.convo-item__name { font-size: 12.5px; font-weight: 650; }
.convo-item__last { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-item__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); flex: 0 0 7px; }
.chat { display: flex; flex-direction: column; min-height: 520px; }
.chat__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat__head strong { font-size: 13.5px; }
.chat__body { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 520px; }
.msg { max-width: 76%; padding: 9px 12px; border-radius: 13px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.msg--in { align-self: flex-start; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.06); border-bottom-left-radius: 4px; color: var(--soft); }
.msg--out { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.msg__time { margin-top: 4px; font-size: 9.5px; opacity: .6; }
.chat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat__form .input { flex: 1; }
.chat-empty { flex: 1; display: grid; place-items: center; color: var(--muted); font-size: 12.5px; padding: 30px; text-align: center; }

/* ---------- notifications ---------- */
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif { display: flex; gap: 12px; padding: 14px 16px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); align-items: flex-start; }
.notif.is-unread { border-color: rgba(167,139,250,.3); background: rgba(167,139,250,.07); }
.notif__icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: #ddd6fe; font-size: 14px; }
.notif__main { flex: 1; min-width: 0; }
.notif__text { font-size: 12.5px; color: var(--soft); }
.notif__text strong { color: var(--text); }
.notif__time { font-size: 10px; color: var(--muted); margin-top: 2px; }
.notif__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); flex: 0 0 7px; margin-top: 6px; }

/* ---------- player ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  height: var(--player-h);
  display: grid; grid-template-columns: minmax(180px, 0.9fr) minmax(300px, 1.4fr) minmax(120px, .6fr);
  align-items: center; gap: 18px; padding: 10px 22px calc(10px + env(safe-area-inset-bottom));
  background: rgba(15, 13, 32, 0.9);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -20px 50px -30px rgba(0,0,0,.9);
  transition: transform .3s ease, opacity .3s ease;
}
.player.is-hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }
.player__track { display: flex; align-items: center; gap: 11px; min-width: 0; }
.player__cover { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 9px; overflow: hidden; background: var(--grad-soft); }
.player__cover img { width: 100%; height: 100%; object-fit: cover; }
.player__meta { min-width: 0; display: flex; flex-direction: column; }
.player__meta strong { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__meta span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__like { border: 0; background: transparent; color: var(--muted); font-size: 16px; width: 30px; height: 30px; }
.player__like.is-liked { color: var(--pink); }
.player__center { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.player__controls { display: flex; justify-content: center; align-items: center; gap: 12px; }
.ctrl-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--soft); }
.ctrl-btn:hover { color: #fff; background: rgba(255,255,255,.07); }
.ctrl-btn svg { width: 17px; height: 17px; }
.ctrl-btn--play { width: 38px; height: 38px; background: #fff; color: #15122b; box-shadow: 0 8px 20px -10px rgba(255,255,255,.5); }
.ctrl-btn--play:hover { background: #fff; transform: scale(1.04); }
.ctrl-btn--play .i-pause { display: none; }
.ctrl-btn--play.is-playing .i-play { display: none; }
.ctrl-btn--play.is-playing .i-pause { display: block; }
.mode-btn { border: 0; background: transparent; color: var(--muted); font-size: 10.5px; padding: 4px 6px; border-radius: 6px; }
.mode-btn:hover { color: var(--text); background: rgba(255,255,255,.06); }
.player__progress { display: flex; align-items: center; gap: 9px; }
.player__progress span { font-family: var(--mono); font-size: 9.5px; color: var(--muted); width: 34px; text-align: center; flex: 0 0 34px; }
.player__progress input[type=range] { flex: 1; height: 4px; appearance: none; -webkit-appearance: none; border-radius: 999px; background: rgba(255,255,255,.16); outline: none; cursor: pointer; }
.player__progress input[type=range]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(167,139,250,.2); }
.player__progress input[type=range]::-moz-range-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: #fff; }
.player__right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.player__right .icon-btn { width: 30px; height: 30px; border-color: transparent; background: transparent; }

/* ---------- toast / modal ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--player-h) + 18px); z-index: 300;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  max-width: min(90vw, 420px); padding: 10px 16px; border-radius: 11px;
  background: rgba(20,18,43,.96); border: 1px solid var(--line-strong);
  color: var(--soft); font-size: 12.5px; box-shadow: var(--shadow);
  transition: opacity .22s ease, transform .22s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { border-color: rgba(248,113,113,.4); color: #fecaca; }
body.player-hidden .toast { bottom: 26px; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  padding: 20px; background: rgba(6,5,16,.7); backdrop-filter: blur(8px);
  animation: fadeIn .16s ease;
}
.modal {
  width: min(520px, 100%); max-height: 86vh; overflow-y: auto;
  padding: 24px; border-radius: 20px; border: 1px solid var(--line-strong);
  background: #15122b; box-shadow: 0 40px 100px -30px rgba(0,0,0,.9);
  animation: popIn .18s ease;
}
.modal--wide { width: min(720px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-head p { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); }
.modal-close { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.985); } }

.search-modal .input { font-size: 15px; padding: 13px 15px; }
.search-results { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.search-group { margin-top: 12px; }
.search-group h4 { margin: 0 0 6px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-family: var(--mono); }
.search-hit { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: inherit; text-align: left; }
.search-hit:hover { background: rgba(255,255,255,.06); }
.search-hit img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--grad-soft); }
.search-hit strong { display: block; font-size: 12.5px; }
.search-hit span { display: block; font-size: 10.5px; color: var(--muted); }

/* crop modal */
.crop-stage { position: relative; width: min(320px, 100%); aspect-ratio: 1; margin: 0 auto; background: #0c0a18; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.crop-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-range { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 11px; color: var(--muted); }
.crop-range input { flex: 1; }

/* empty / loading */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 46px 20px; border-radius: 16px; border: 1px dashed var(--line); color: var(--muted);
  text-align: center; font-size: 12.5px;
}
.empty strong { color: var(--soft); font-size: 14px; }
.loading { display: grid; place-items: center; min-height: 50vh; color: var(--muted); font-size: 12.5px; }
.skeleton { height: 16px; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.1), rgba(255,255,255,.05)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.site-footer {
  width: min(100% - 40px, 1240px); margin: 30px auto 0; padding: 22px 0 12px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap;
  color: var(--muted); font-size: 11px;
}
.site-footer a { color: var(--violet); }
.site-footer a:hover { color: var(--cyan); }
.site-footer span:first-child { color: var(--soft); font-weight: 600; }
.noscript { padding: 40px; color: #fff; text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.spacer { flex: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .community-layout { grid-template-columns: 1fr; }
  .community-layout .side-col { display: none; }
  .upload-layout { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .play-layout { grid-template-columns: 280px minmax(0,1fr); gap: 22px; }
}
@media (max-width: 820px) {
  :root { --player-h: 74px; }
  .topbar-inner { width: min(100% - 28px, 1240px); gap: 10px; }
  .main-nav {
    position: absolute; top: 66px; left: 14px; right: 14px;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px; border-radius: 14px; border: 1px solid var(--line);
    background: rgba(15,13,32,.97); box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 11px 12px; font-size: 14px; }
  .main-nav a.is-active::after { display: none; }
  .menu-btn { display: block; }
  #search-btn { display: none; }
  .user-chip span { display: none; }
  .user-chip { padding: 3px; }
  .view { width: min(100% - 28px, 1240px); padding-top: 24px; }
  .hero { padding: 26px 22px; }
  .hero__stats { gap: 20px; }
  .hero__stat strong { font-size: 20px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .play-layout { grid-template-columns: 1fr; }
  .play-cover { max-width: 300px; margin-inline: auto; }
  .messages-layout { grid-template-columns: 1fr; }
  .convo-list { border-right: 0; border-bottom: 1px solid var(--line); }
  .messages-layout.has-chat .convo-list { display: none; }
  .messages-layout:not(.has-chat) .chat { display: none; }
  .chat__body { max-height: 48vh; }
  .player { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "track right" "center center"; gap: 4px 10px; padding: 7px 12px calc(7px + env(safe-area-inset-bottom)); }
  .player__track { grid-area: track; }
  .player__right { grid-area: right; }
  .player__center { grid-area: center; }
  .player__like { display: none; }
  .player__right .ghost-btn { display: none; }
  .player__progress span { font-size: 9px; width: 30px; flex-basis: 30px; }
  .player__cover { width: 40px; height: 40px; flex-basis: 40px; }
  .player__controls { gap: 16px; }
  .ctrl-btn--play { width: 34px; height: 34px; }
  .toast { bottom: calc(var(--player-h) + 12px); }
}
@media (max-width: 540px) {
  .view { width: min(100% - 22px, 1240px); }
  .topbar-inner { width: min(100% - 22px, 1240px); }
  .hero { border-radius: 18px; }
  .hero h1 { font-size: 34px; }
  .hero__actions .btn { flex: 1; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .feature { padding: 14px; }
  .music-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .music-card { padding: 8px; }
  .playlist-grid { grid-template-columns: 1fr; }
  .profile-hero { padding: 20px; }
  .profile-hero__row { gap: 14px; }
  .profile-name { font-size: 22px; }
  .profile-actions { width: 100%; }
  .modal { padding: 18px; border-radius: 16px; }
  .modal-head h2 { font-size: 17px; }
  .page-title { font-size: 28px; }
  .section { margin-top: 28px; }
  .player__meta strong { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
