:root {
  --bg: #0c0b10;
  --bg-2: #15131c;
  --card: #1b1824;
  --line: #2c2838;
  --text: #f2eef8;
  --muted: #a39cb3;
  --gold: #f0b65a;
  --rose: #e0567a;
  --violet: #8b6cf0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Rubik", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
body.has-player { padding-bottom: 120px; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }

/* Nav */
nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px clamp(16px, 5vw, 64px);
  background: rgba(12, 11, 16, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
nav .logo { font-weight: 800; letter-spacing: .5px; text-decoration: none; white-space: nowrap; }
nav .logo span { color: var(--gold); }
nav ul { display: flex; gap: 20px; list-style: none; font-size: .95rem; }
nav ul a { text-decoration: none; color: var(--muted); transition: color .2s; }
nav ul a:hover { color: var(--text); }
.user { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); }
.user img { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); }
.user .email { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user a { color: var(--text); }
.signin-btn {
  text-decoration: none; padding: 7px 18px; border-radius: 999px;
  background: var(--gold); color: #1a1205; font-weight: 600; font-size: .9rem; white-space: nowrap;
}

/* Hero */
.hero {
  position: relative;
  min-height: 86vh;
  display: grid; place-items: center; text-align: center;
  padding: 80px 16px;
  overflow: hidden;
}
.hero-photos {
  position: absolute; inset: -10%;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  transform: rotate(-6deg);
  opacity: .32;
  filter: saturate(.8);
}
.hero-photos img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(139,108,240,.35), transparent 50%),
    radial-gradient(circle at 75% 70%, rgba(224,86,122,.3), transparent 50%),
    radial-gradient(ellipse at center, rgba(12,11,16,.55), var(--bg) 75%);
}
.hero-inner { position: relative; z-index: 1; }
.eyebrow { color: var(--gold); letter-spacing: 4px; font-size: .9rem; text-transform: uppercase; }
.hero h1 {
  font-family: "Frank Ruhl Libre", serif;
  font-size: clamp(3.4rem, 13vw, 9rem);
  line-height: 1;
  margin: 12px 0 18px;
  background: linear-gradient(120deg, #fff 20%, var(--gold) 60%, var(--rose));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: #cfc8dc; max-width: 560px; margin: 0 auto 32px; font-size: 1.15rem; }
.btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  padding: 12px 26px; border-radius: 999px; text-decoration: none; font-weight: 600;
  border: 1px solid var(--line); transition: transform .2s, background .2s;
  background: rgba(27,24,36,.6);
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--gold); color: #1a1205; border-color: var(--gold); }

.eq { display: flex; gap: 5px; justify-content: center; height: 40px; align-items: flex-end; margin-bottom: 24px; }
.eq i { width: 6px; background: var(--gold); border-radius: 3px; animation: bounce 1s ease-in-out infinite; }
.eq i:nth-child(2n) { background: var(--rose); animation-delay: -.3s; }
.eq i:nth-child(3n) { background: var(--violet); animation-delay: -.6s; }
@keyframes bounce { 0%,100% { height: 20%; } 50% { height: 100%; } }

section { padding: 88px clamp(16px, 5vw, 64px); max-width: 1200px; margin: 0 auto; }
.sec-head { margin-bottom: 36px; }
.sec-head h2 { font-family: "Frank Ruhl Libre", serif; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.1; }
.sec-head p { color: var(--muted); margin-top: 8px; }

/* Song cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.song {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.song:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 14px 40px rgba(240,182,90,.12); }
.song.playing { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose), 0 14px 40px rgba(224,86,122,.2); }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); transition: transform .5s; }
.song:hover .thumb img { transform: scale(1.42); }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(27,24,36,.9), transparent 55%); }
.thumb .play-ico {
  position: absolute; inset: 0; margin: auto; z-index: 1;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(240,182,90,.95); color: #1a1205;
  display: grid; place-items: center; font-size: 1.3rem;
  opacity: 0; transform: scale(.8); transition: all .25s;
}
.song:hover .play-ico, .song.playing .play-ico { opacity: 1; transform: none; }
.thumb .num {
  position: absolute; bottom: 8px; right: 14px; z-index: 1;
  font-family: "Frank Ruhl Libre", serif; font-size: 2.2rem; line-height: 1; color: rgba(255,255,255,.85);
}
.song-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.song h3 { font-size: 1.25rem; font-weight: 600; }
.song .meta { color: var(--muted); font-size: .88rem; min-height: 1.4em; }
.note-preview {
  font-size: .85rem; color: #d8d0e6; background: rgba(139,108,240,.12);
  border-inline-start: 3px solid var(--violet); padding: 6px 10px; border-radius: 6px; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-wrap;
}
.actions { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); transition: all .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--text); }
.icon-btn.fav-on { color: var(--rose); border-color: var(--rose); background: rgba(224,86,122,.1); }
.icon-btn.has-note { color: var(--violet); border-color: var(--violet); }

/* Favorites */
#favorites[hidden] { display: none; }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; padding: 32px; text-align: center; }

/* Album */
.album-wrap { background: linear-gradient(180deg, var(--bg) 0%, #120d17 30%, #120d17 70%, var(--bg) 100%); }
.album { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 56px; align-items: start; }
.album-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 14px; }
.cover {
  position: relative;
  aspect-ratio: 1; border-radius: 20px; overflow: hidden;
  background: #0d0a12;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(224,86,122,.18);
  display: grid; place-items: center;
}
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.4); filter: grayscale(.4) contrast(1.1) brightness(.55); }
.cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 25%, rgba(224,86,122,.35), rgba(13,10,18,.7) 70%); z-index: 1; }
.cover svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.cover .title {
  position: relative; z-index: 3; text-align: center;
  font-family: "Frank Ruhl Libre", serif; font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.05;
  text-shadow: 0 4px 30px rgba(0,0,0,.6);
}
.cover .title small { display: block; font-family: "Rubik"; font-size: .9rem; color: #cfc8dc; letter-spacing: 3px; margin-top: 14px; }
.stills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stills button { aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.stills button:hover { transform: translateY(-2px); border-color: var(--gold); }
.stills img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.5); }

.album-info .tag { display: inline-block; color: var(--rose); border: 1px solid var(--rose); padding: 3px 12px; border-radius: 999px; font-size: .8rem; margin-bottom: 14px; }
.album-info h2 { font-family: "Frank Ruhl Libre", serif; font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1.05; }
.album-info .lead { color: var(--muted); margin: 16px 0 26px; font-size: 1.08rem; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 34px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; }
.fact b { display: block; font-size: 1.6rem; color: var(--gold); }
.fact span { color: var(--muted); font-size: .85rem; }

.tracks { list-style: none; border-top: 1px solid var(--line); }
.tracks li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px; border-bottom: 1px solid var(--line);
  transition: background .2s;
}
.tracks li:hover { background: rgba(255,255,255,.03); }
.tracks li.playing { background: rgba(224,86,122,.08); }
.tracks li.playing .t { color: var(--rose); }
.tracks .tplay {
  width: 44px; height: 44px; flex: none; border-radius: 10px; overflow: hidden; position: relative; background: var(--card);
  display: grid; place-items: center; color: var(--muted);
}
.tracks .tplay img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.5); }
.tracks .tplay span {
  position: relative; z-index: 1; width: 100%; height: 100%; display: grid; place-items: center;
  background: rgba(0,0,0,.35); color: #fff; opacity: 0; transition: opacity .2s;
}
.tracks li:hover .tplay span, .tracks li.playing .tplay span { opacity: 1; }
.tracks .tmain { flex: 1; min-width: 0; }
.tracks .t { font-size: 1.05rem; display: block; }
.tracks .tnote { font-size: .8rem; color: var(--violet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tracks .badge { font-size: .72rem; color: var(--gold); border: 1px solid rgba(240,182,90,.4); padding: 2px 10px; border-radius: 999px; }
.tracks .icon-btn { padding: 6px 9px; }
.note { color: var(--muted); font-size: .85rem; margin-top: 14px; }

.writers { margin-top: 34px; }
.writers h4 { font-size: 1rem; margin-bottom: 10px; color: var(--muted); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { background: var(--card); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-size: .9rem; }

footer { text-align: center; color: var(--muted); padding: 40px 16px 60px; font-size: .85rem; border-top: 1px solid var(--line); }

/* Player */
.player {
  position: fixed; z-index: 30; left: 16px; bottom: 16px;
  width: 380px; max-width: calc(100vw - 32px);
  background: rgba(21,19,28,.96); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  transform: translateY(140%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.player.open { transform: none; }
.player .video { aspect-ratio: 16 / 9; min-height: 200px; background: #000; }
.player .video iframe, .player .video > div { width: 100%; height: 100%; border: 0; display: block; }
.player .bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.player .now { flex: 1; min-width: 0; }
.player .now b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .now small { color: var(--muted); font-size: .78rem; }
.player .ctrl { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: all .2s; }
.player .ctrl:hover { background: var(--card); color: var(--text); }

/* Notes dialog */
dialog {
  margin: auto; width: min(520px, calc(100vw - 32px));
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 20px; padding: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
dialog::backdrop { background: rgba(5,4,8,.7); backdrop-filter: blur(4px); }
dialog h3 { font-family: "Frank Ruhl Libre", serif; font-size: 1.8rem; }
dialog .sub { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
dialog textarea {
  width: 100%; min-height: 180px; resize: vertical;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font: inherit; line-height: 1.6;
}
dialog textarea:focus { outline: none; border-color: var(--violet); }
dialog .row { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 12px; }
dialog .status { color: var(--muted); font-size: .85rem; }
dialog .btn { cursor: pointer; }

.toast {
  position: fixed; z-index: 40; top: 76px; left: 50%; transform: translate(-50%, -20px);
  background: var(--card); border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px;
  font-size: .9rem; opacity: 0; pointer-events: none; transition: all .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Login page */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; overflow: hidden; }
.login-bg {
  position: fixed; inset: -10%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  transform: rotate(-6deg); opacity: .28;
}
.login-bg img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.login-body::after {
  content: ""; position: fixed; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(139,108,240,.3), transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(224,86,122,.25), transparent 50%),
              radial-gradient(ellipse at center, rgba(12,11,16,.6), var(--bg) 80%);
}
.login-card {
  position: relative; z-index: 1; text-align: center;
  width: min(420px, 100%); padding: 40px 28px;
  background: rgba(21,19,28,.85); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.login-card h1 {
  font-family: "Frank Ruhl Libre", serif; font-size: 3.2rem; line-height: 1;
  background: linear-gradient(120deg, #fff 20%, var(--gold) 60%, var(--rose));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-card p { color: var(--muted); margin: 14px 0 26px; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #1f1f1f; text-decoration: none; font-weight: 600;
  padding: 13px 20px; border-radius: 999px; transition: transform .2s, box-shadow .2s;
}
.google-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,255,255,.15); }
.login-card .back { display: inline-block; margin-top: 18px; color: var(--muted); font-size: .9rem; }

@media (max-width: 820px) {
  .album { grid-template-columns: 1fr; gap: 32px; }
  .album-side { position: relative; top: 0; max-width: 380px; width: 100%; margin: 0 auto; }
  nav ul { display: none; }
  .hero-photos { grid-template-columns: repeat(2, 1fr); }
  .user .email { display: none; }
}
@media (max-width: 520px) {
  .player { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; }
  body.has-player { padding-bottom: 320px; }
  .facts { gap: 8px; }
}
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .eq i { animation: none; height: 60%; }
  .reveal { opacity: 1; transform: none; }
}
