:root {
  color-scheme: dark;
  --bg: #12091d;
  --bg-deep: #0d0616;
  --sidebar: #21182d;
  --sidebar-active: #3a3045;
  --panel: rgba(35, 24, 48, .92);
  --panel-soft: rgba(48, 37, 60, .78);
  --panel-hover: rgba(67, 52, 82, .72);
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #fff;
  --muted: #b8a9c8;
  --dim: #8c7c9d;
  --purple: #a64df5;
  --purple-2: #7f35dc;
  --pink: #ff5f9c;
  --orange: #ff8a3d;
  --cyan: #31d6ff;
  --green: #42f09d;
  --shadow: 0 18px 44px rgba(0, 0, 0, .26);
  font-family: Inter, "Segoe UI", Arial, Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 42% 0%, rgba(96, 38, 154, .28), transparent 32%),
    linear-gradient(180deg, #170b25 0%, var(--bg-deep) 100%);
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
  letter-spacing: 0;
}

button { cursor: pointer; }
h1, h2, p, dl { margin: 0; }

.music-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(560px, 1fr) 330px;
  background: linear-gradient(180deg, rgba(22, 12, 34, .96), rgba(13, 6, 22, .98));
}

.sidebar,
.right-queue {
  min-width: 0;
  background: rgba(30, 21, 42, .96);
  border-right: 1px solid var(--line);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow: hidden;
}

.brand {
  min-height: 118px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 24px 16px;
  color: var(--text);
  text-decoration: none;
}

.brand-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.36), transparent 42%),
    linear-gradient(135deg, #22d3ee, #a855f7 55%, #fb7185);
  box-shadow: 0 16px 34px rgba(166, 77, 245, .28);
  font-weight: 900;
}

.brand strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: #ddd4e8;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.side-nav button {
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 20px 0 24px;
  border: 0;
  background: transparent;
  color: #ddd5e6;
  font-weight: 750;
  position: relative;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.side-nav button:hover,
.side-nav button.active {
  background: var(--sidebar-active);
  color: #fff;
}

.side-nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  inset-block: 0;
  width: 4px;
  background: var(--purple);
}

.nav-ico {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #e9def5;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  font-size: 13px;
}

.side-nav b {
  padding: 3px 6px;
  border-radius: 4px;
  background: #ff163f;
  color: #fff;
  font-size: 9px;
}

.login-card {
  align-self: end;
  margin: 20px;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #b951f4, #8e43da);
  text-align: center;
  box-shadow: var(--shadow);
}

.login-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.outline-pill,
.new-playlist {
  min-height: 32px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-weight: 850;
}

.outline-pill {
  width: 100%;
  margin-top: 12px;
}

.outline-pill.solid {
  background: #fff;
  color: var(--purple-2);
}

.side-footer {
  border-top: 1px solid var(--line);
  padding: 16px 20px;
}

.new-playlist {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  color: #ded7e8;
}

.new-playlist span {
  min-width: 28px;
  font-size: 13px;
  line-height: 1;
  font-weight: 950;
}

.center-stage {
  min-width: 0;
  padding: 16px 60px 44px;
  background:
    linear-gradient(180deg, rgba(38, 20, 58, .72), transparent 210px),
    rgba(15, 7, 24, .84);
}

.topbar {
  min-height: 58px;
  display: grid;
  grid-template-columns: 78px minmax(260px, 520px) 1fr;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 8;
  padding-block: 4px 10px;
  background: linear-gradient(180deg, rgba(22, 10, 34, .96), rgba(22, 10, 34, .70));
  backdrop-filter: blur(14px);
}

.history-buttons {
  display: flex;
  gap: 14px;
}

.history-buttons button,
.round-action,
.avatar-action,
.page-btn,
.play-all {
  border: 0;
  color: #fff;
  display: grid;
  place-items: center;
}

.history-buttons button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #9282a4;
  background: transparent;
  font-size: 30px;
  line-height: 1;
}

.search-pill {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: #30263b;
  padding: 0 16px;
}

.search-pill span {
  width: 18px;
  height: 18px;
  overflow: hidden;
  color: transparent;
  border: 2px solid #d9d0e3;
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.search-pill span::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  background: #d9d0e3;
  transform: rotate(45deg);
  border-radius: 2px;
}

.search-pill input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-weight: 650;
}

.search-pill input::placeholder { color: #c6bbd1; }

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.upgrade,
.purple-btn,
.action-card button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  font-weight: 850;
  box-shadow: 0 14px 32px rgba(166, 77, 245, .24);
}

.upgrade {
  flex: 0 0 auto;
  white-space: nowrap;
}

.round-action,
.avatar-action {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2b2137;
  font-size: 18px;
}

.avatar-action {
  background:
    linear-gradient(#f2e8ff, #f2e8ff) padding-box,
    linear-gradient(135deg, #30d6ff, #ff6aaf) border-box;
  border: 2px solid transparent;
  color: #8e3dea;
  font-weight: 900;
}

.quick-filters {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 0 12px;
}

.chip {
  min-height: 36px;
  min-width: 88px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #ded6e9;
  background: rgba(255,255,255,.065);
  font-weight: 850;
}

.chip.active,
.chip:hover {
  color: #fff;
  background: var(--purple);
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin: 6px 0 22px;
}

.filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.filters span,
dt {
  color: var(--dim);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: #e9e0f2;
  background: #21162f;
  outline: 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

h1 {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

p { color: var(--muted); }

.mini-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-tabs span {
  min-width: 108px;
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.mini-tabs span:first-child {
  background: var(--purple);
  border-color: transparent;
}

.voice-pane {
  min-width: 0;
}

.pane-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 36px;
  margin-bottom: 8px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-weight: 800;
}

.page-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  font-size: 24px;
}

.page-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.voice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 30px;
}

.voice-list > .status-box {
  grid-column: 1 / -1;
}

.voice-card {
  min-width: 0;
  min-height: 74px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto 64px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.voice-card:hover,
.voice-card.active {
  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.08);
}

.voice-card.active {
  box-shadow: inset 3px 0 0 var(--purple);
}

.play {
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255,255,255,.24), transparent 46%),
    linear-gradient(135deg, var(--purple), #2948ff 58%, var(--pink));
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  font-size: 18px;
  font-weight: 900;
  position: relative;
  overflow: hidden;
}

.play::before,
.play::after {
  content: "";
  position: absolute;
  inset: auto 10px 9px 10px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
}

.play::after {
  inset: 12px 13px auto 13px;
  height: 28px;
  opacity: .28;
  background:
    linear-gradient(90deg, transparent 0 14%, #fff 14% 19%, transparent 19% 32%, #fff 32% 37%, transparent 37% 52%, #fff 52% 57%, transparent 57% 70%, #fff 70% 75%, transparent 75%);
}

.voice-text {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.voice-text strong,
.voice-text span,
.voice-text code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-text strong {
  font-size: 15px;
  font-weight: 900;
}

.voice-text span {
  color: #b7a8c8;
  font-size: 13px;
}

code {
  color: #8b7c9d;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
}

.voice-badge {
  justify-self: end;
  min-width: 46px;
  border-radius: 5px;
  padding: 4px 7px;
  color: #24112f;
  background: #ffc928;
  font-size: 10px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.choose {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(166, 77, 245, .72);
  font-weight: 850;
}

.ranking-band {
  margin-top: 44px;
  padding: 24px 20px;
  border-radius: 8px;
  background:
    linear-gradient(100deg, rgba(166, 77, 245, .72), rgba(100, 37, 130, .95)),
    #4b146c;
  box-shadow: var(--shadow);
}

.band-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.band-head h2 {
  font-size: 30px;
  color: #ff905e;
}

.band-head h2 span {
  color: #ba7cff;
}

.play-all {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  color: #4c136f;
  font-size: 13px;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.rank-card {
  min-height: 110px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,.10);
}

.rank-card strong {
  font-size: 17px;
  font-weight: 900;
}

.rank-card small {
  display: block;
  margin-top: 6px;
  color: #cfc2dc;
}

.cover-stack {
  height: 82px;
  position: relative;
}

.cover-stack span {
  position: absolute;
  width: 70px;
  height: 70px;
  top: 6px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.26), transparent 44%),
    linear-gradient(135deg, #e14fff, #235dff 52%, #38f5d6);
  box-shadow: 0 12px 24px rgba(0,0,0,.3);
}

.cover-stack span:nth-child(1) { left: 0; transform: rotate(-6deg); }
.cover-stack span:nth-child(2) { left: 28px; transform: rotate(4deg); }
.cover-stack span:nth-child(3) { left: 56px; transform: rotate(10deg); }
.cover-stack.warm span {
  background:
    linear-gradient(135deg, rgba(255,255,255,.24), transparent 44%),
    linear-gradient(135deg, #ff7144, #f9d423 48%, #fb5da8);
}

.action-card {
  grid-template-columns: 1fr;
  place-items: center;
}

.action-card button {
  min-width: 190px;
  background: transparent;
  box-shadow: none;
  color: #ce70ff;
  text-transform: uppercase;
}

.right-queue {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 0;
  border-left: 1px solid var(--line);
  padding: 18px 20px;
  background: rgba(17, 8, 28, .96);
}

.queue-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
}

.queue-tabs button {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  color: #cfc5da;
  background: transparent;
  font-weight: 850;
}

.queue-tabs button.active {
  color: #fff;
  background: rgba(255,255,255,.18);
}

.selected-panel {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding: 44px 4px 20px;
}

.selected-cover {
  width: 152px;
  height: 152px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.24), transparent 46%),
    linear-gradient(135deg, #2dd4bf, #7c3aed 54%, #ff5f9c);
  box-shadow: 0 22px 42px rgba(0,0,0,.34);
  position: relative;
  overflow: hidden;
}

.selected-cover span {
  font-size: 44px;
  font-weight: 950;
  text-shadow: 0 8px 18px rgba(0,0,0,.32);
}

.cover-bars {
  position: absolute;
  inset: auto 16px 16px;
  height: 34px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 5px;
}

.cover-bars i {
  display: block;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
}

.cover-bars i:nth-child(1) { height: 16px; }
.cover-bars i:nth-child(2) { height: 28px; }
.cover-bars i:nth-child(3) { height: 22px; }
.cover-bars i:nth-child(4) { height: 34px; }
.cover-bars i:nth-child(5) { height: 18px; }

.selected-panel h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.selected-panel p {
  max-width: 260px;
  line-height: 1.45;
}

audio {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--purple);
}

.voice-info {
  display: grid;
  gap: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.voice-info div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 40px;
}

dd {
  margin: 0;
  min-width: 0;
  color: #e7dff0;
  overflow-wrap: anywhere;
}

.detail-actions {
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

.purple-btn {
  width: 100%;
}

.status-box {
  margin-top: 16px;
  min-height: 50px;
  padding: 14px;
  border-radius: 8px;
  color: #cbbede;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
}

.status-box.ok {
  color: #b7ffd9;
  border-color: rgba(66, 240, 157, .34);
}

.status-box.error {
  color: #ffd0df;
  border-color: rgba(255, 95, 156, .44);
}

button:hover {
  filter: brightness(1.08);
}

button:disabled {
  opacity: .46;
  cursor: not-allowed;
}

@media (max-width: 1280px) {
  .music-app {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .right-queue {
    grid-column: 2;
    position: static;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .center-stage { padding-inline: 34px; }
}

@media (max-width: 980px) {
  .music-app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto;
  }

  .brand { min-height: 82px; }
  .side-nav {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .side-nav button {
    flex: 0 0 auto;
    min-width: 128px;
    padding-inline: 14px;
  }

  .login-card,
  .side-footer {
    display: none;
  }

  .center-stage {
    padding: 12px 16px 28px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .history-buttons { display: none; }
  .top-actions { justify-content: flex-start; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { align-items: start; flex-direction: column; }
  .voice-list { grid-template-columns: 1fr; }
  .rank-grid { grid-template-columns: 1fr; }
  .right-queue { grid-column: 1; }
}

@media (max-width: 620px) {
  .brand strong { font-size: 25px; }
  .top-actions { display: grid; grid-template-columns: 1fr 40px 40px; }

  .upgrade {
    white-space: normal;
  }
  .upgrade { padding-inline: 12px; }
  .filters { grid-template-columns: 1fr; }
  .mini-tabs {
    width: 100%;
    overflow-x: auto;
  }
  .mini-tabs span { min-width: 94px; }
  .voice-card {
    grid-template-columns: 54px minmax(0, 1fr) 58px;
    min-height: 68px;
  }
  .play {
    width: 54px;
    height: 54px;
  }
  .voice-badge { display: none; }
  .choose { min-width: 54px; }
  .rank-card {
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
  }

  .cover-stack {
    width: 132px;
  }
}

/* Quiet, compact voice library. */
:root {--bg:#101820;--bg-deep:#101820;--sidebar:#17212b;--sidebar-active:#263646;--panel:#1b2733;--panel-soft:#243240;--panel-hover:#2b3c4d;--purple:#3975a8;--purple-2:#3975a8;--muted:#b5c2cf;--dim:#91a2b2;--shadow:none;}
body,.music-app,.center-stage {background:#101820;}
.sidebar,.right-queue,.topbar {background:#17212b;}
.brand-icon,.login-card,.upgrade,.ranking-band,.cover-stack,.cover-art,.selected-cover,.avatar {background:#263b50;box-shadow:none;color:#e4edf5;}
button {box-shadow:none!important;text-shadow:none!important;font-weight:600;}
.brand strong {font-size:25px;font-weight:650;}
.brand {min-height:90px;}
.section-head h1,.section-head h2 {font-size:24px;}
.voice-text strong {font-weight:600;}
.voice-text span,code {color:#acbac8;}
.play {background:#2c4155!important;box-shadow:none;width:44px;height:44px;}
.play::before,.play::after {display:none;}
.voice-card {grid-template-columns:44px minmax(0,1fr) auto 64px;min-height:66px;border-color:#263340;}
.voice-card:hover,.voice-card.active {background:#223243;}
.voice-badge {background:#2b3b4c;color:#c6d3df;font-weight:600;}
.choose,.upgrade {background:#31678f;border-radius:7px;box-shadow:none;}
.login-card {padding:16px;border:1px solid #334454;}
.ranking-band {display:none;}
.pill,.chip,.mini-tabs span,.filters select,.search-box {box-shadow:none;}
@media(max-width:620px){.voice-card{grid-template-columns:44px minmax(0,1fr) 58px;}}

.search-box,input,select,.filters select,.icon-btn {background:#22303e;color:#e0e8ef;border-color:#3a4a59;}
