﻿/* ---------- Splash + auth ---------- */

.splash {
  width: 100%; /* the boot splash host is a row-flex container - without this the column packs left */
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  animation: splashin 0.4s ease both;
}
.splash-stage { width: 96px; height: 96px; }
.splash-icon {
  width: 100%; height: 100%;
  border-radius: 24px;
  animation: logopop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.splash .brand {
  font-size: 26px; font-weight: 800; letter-spacing: -0.5px;
  animation: brandup 0.55s 0.18s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.splash .eq {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 14px;
  animation: brandup 0.55s 0.28s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.splash .eq i {
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, #8b5cf6, #ec4899);
  animation: eqbar 0.9s ease-in-out infinite;
}
.splash .eq i:nth-child(1) { animation-delay: 0s; }
.splash .eq i:nth-child(2) { animation-delay: 0.15s; }
.splash .eq i:nth-child(3) { animation-delay: 0.3s; }
.splash .eq i:nth-child(4) { animation-delay: 0.1s; }
.splash .eq i:nth-child(5) { animation-delay: 0.22s; }
.splash.bye { animation: splashout 0.34s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes splashin { from { opacity: 0; } }
@keyframes logopop { from { transform: scale(0.55) rotate(-6deg); opacity: 0; } }
@keyframes brandup { from { opacity: 0; transform: translateY(10px); } }
@keyframes eqbar { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
@keyframes splashout { to { opacity: 0; transform: scale(1.05); } }

.authwrap {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 26px calc(30px + var(--safe-bottom));
  max-width: 480px;
  margin: 0 auto;
}
/* Staggered entrance cascade for the auth card */
.authwrap > * { animation: authup 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.authwrap > *:nth-child(1) { animation-delay: 0s; }
.authwrap > *:nth-child(2) { animation-delay: 0.05s; }
.authwrap > *:nth-child(3) { animation-delay: 0.1s; }
.authwrap > *:nth-child(4) { animation-delay: 0.15s; }
.authwrap > *:nth-child(5) { animation-delay: 0.2s; }
.authwrap > *:nth-child(6) { animation-delay: 0.24s; }
.authwrap > *:nth-child(7) { animation-delay: 0.28s; }
.authwrap > *:nth-child(8) { animation-delay: 0.32s; }
.authwrap > *:nth-child(9) { animation-delay: 0.36s; }
.authwrap > *:nth-child(10) { animation-delay: 0.4s; }
@keyframes authup { from { opacity: 0; transform: translateY(14px); } }

.gbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  color: #1f1f27;
  font-weight: 700;
  font-size: 14px;
}
.gbtn .gicon { display: flex; }
.gbtn .gicon svg { width: 18px; height: 18px; }
.gbtn.hidden { display: none; }
.gsihost { display: none; justify-content: center; min-height: 40px; }
.gsihost.on { display: flex; }
.gsihost.on ~ .gbtn { display: none; }
.ordiv {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.ordiv::before, .ordiv::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.authwrap .logo {
  width: 64px; height: 64px;
  border-radius: 19px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 18px;
}
.authwrap .logo svg { width: 32px; height: 32px; }
.authwrap h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.4px; }
.authwrap .sub { color: var(--text-2); font-size: 13px; margin: 6px 0 24px; }
.authwrap .field { margin-bottom: 12px; }
.authwrap .field label { display: block; font-size: 11px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.authwrap .err { color: var(--danger); font-size: 12px; min-height: 18px; margin: 6px 0 2px; }
.authwrap .swap { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-2); }
.authwrap .swap b { color: var(--violet); cursor: pointer; }

/* ---------- Discover ---------- */

.discover-top { display: flex; align-items: center; gap: 10px; padding: 20px 20px 8px; }
.discover-top h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; }
.discover-top .iconbtn { margin-left: auto; }

.discover-gap { height: 10px; }

/* ---------- Library ---------- */

.libhead { display: flex; align-items: center; padding: 22px 20px 2px; }
.libhead .ht { flex: 1; }
.libhead h1 { font-size: 22px; font-weight: 800; }
.libhead .hsub { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.libhead .plus {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--violet);
}
.libhead .plus svg { width: 20px; height: 20px; }

.libsearch { display: flex; gap: 10px; padding: 12px 20px 4px; }
.libsearch .searchwrap { flex: 1; position: relative; }
.libsearch input { border-radius: 50px; padding: 11px 16px; }
.libsearch .sortbtn {
  width: 44px;
  border-radius: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
}
.libsearch .sortbtn svg { width: 18px; height: 18px; }

/* Playlist rows share the exact geometry of song rows (.row) so tab flips
   never shift content: same padding, 52px cover, 68px height. */
.playlistitem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 16px;
  border-radius: 14px;
  width: 100%;
  text-align: left;
}
.playlistitem .collage {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--elevated);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  flex-shrink: 0;
}
.playlistitem .collage img { width: 100%; height: 100%; object-fit: cover; }
.playlistitem .collage .ph { background: var(--surface); }
.playlistitem .pmeta { flex: 1; min-width: 0; }
.playlistitem .pname { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlistitem .psub { font-size: 11px; color: var(--text-2); margin-top: 2px; }
/* Pinned virtual playlist (Liked) - not deletable, hearts are its membership */
.playlistitem.pinned .pname { color: var(--violet); }

/* ---------- Profile ---------- */

.hero { display: flex; align-items: center; gap: 14px; padding: 6px 20px 0; }
.hero .avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--elevated);
  flex-shrink: 0;
}
.hero .hm { flex: 1; min-width: 0; }
.hero .hname { font-size: 18px; font-weight: 700; }
.hero .hhandle { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.bio { padding: 10px 20px 0; font-size: 13px; color: var(--text-2); white-space: pre-wrap; }

.stats {
  display: flex;
  margin: 16px 20px 4px;
  background: var(--surface);
  border-radius: 16px;
  padding: 12px 0;
}
.stat { flex: 1; text-align: center; }
.stat .n { font-size: 16px; font-weight: 800; }
.stat .l { font-size: 10px; color: var(--text-2); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.4px; }

.profile-actions { display: flex; gap: 10px; padding: 12px 20px 2px; }

/* ---------- Playlist page ---------- */

.plhead { display: flex; align-items: center; gap: 16px; padding: 8px 20px 0; }
.plhead .collage {
  width: 92px; height: 92px;
  border-radius: 18px;
  background: var(--elevated);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  flex-shrink: 0;
}
.plhead .collage img { width: 100%; height: 100%; object-fit: cover; }
.plhead .collage.single img { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.plhead .pm { flex: 1; min-width: 0; }
.plhead .pname { font-size: 20px; font-weight: 800; }
.plhead .psub { font-size: 12px; color: var(--text-2); margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.plhead .psub svg { width: 12px; height: 12px; }

.playall { display: flex; padding: 14px 20px 4px; }
.playall .solidbtn { flex: 1; }

/* ---------- Settings ---------- */

.setgroup { margin: 14px 20px 0; background: var(--surface); border-radius: 16px; overflow: hidden; }
.setitem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.setitem:last-child { border-bottom: none; }
.setitem .si { flex: 1; min-width: 0; }
.setitem .st { font-size: 14px; font-weight: 600; }
.setitem .ss { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.setitem select { width: 150px; flex-shrink: 0; padding: 8px 10px; font-size: 13px; }

/* ---------- Create placeholder ---------- */

.createwrap {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px;
  text-align: center;
}
.createwrap .big {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 34px rgba(139, 92, 246, 0.4);
}
.createwrap .big svg { width: 40px; height: 40px; }
.createwrap h1 { font-size: 22px; font-weight: 800; }
.createwrap p { color: var(--text-2); font-size: 13px; max-width: 300px; line-height: 1.5; }

/* ---------- Paywall ---------- */

.paywrap {
  padding: 4px 20px calc(28px + var(--safe-bottom));
  max-width: 480px;
  margin: 0 auto;
}
.paybal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.paybal .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--grad);
}
.paytitle { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; margin: 16px 0 4px; }
.payfeat { list-style: none; margin: 6px 0 18px; }
.payfeat li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-1);
  padding: 5px 0;
}
.payfeat svg { width: 15px; height: 15px; color: #a78bfa; flex-shrink: 0; }

.payplans { display: flex; gap: 9px; align-items: stretch; }
.payplan {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 15px 11px 13px;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  text-align: left;
  min-width: 0;
}
.payplan.on {
  border-color: #8b5cf6;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.14), rgba(236, 72, 153, 0.07)), var(--surface);
}
.payplan .badge {
  position: absolute;
  top: -9px;
  left: 10px;
  padding: 2.5px 8px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.payplan .pname { font-size: 12px; font-weight: 700; color: var(--text-2); }
.payplan .phead { font-size: 13px; font-weight: 800; line-height: 1.25; }
.payplan .pprice { font-size: 19px; font-weight: 800; margin-top: 5px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.payplan .psub { font-size: 9.5px; color: var(--text-2); line-height: 1.35; }

.paygo { margin-top: 16px; }
.paysub { text-align: center; font-size: 11px; color: var(--text-2); margin-top: 9px; }

.payh3 { font-size: 15px; font-weight: 800; margin: 24px 0 2px; }
.paypack .pprice { font-size: 15px; font-weight: 800; color: var(--text-1); }
.paypack .pprice.sm { margin-left: auto; }
.paypack:disabled { opacity: 0.55; }

.payrestore {
  display: block;
  margin: 14px auto 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #a78bfa;
}
.payfine {
  margin-top: 14px;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--text-2);
}
