:root {
  --bg: #050607;
  --panel: #0f1115;
  --panel-2: #171a21;
  --card: #181b22;
  --card-hover: #232833;
  --line: rgba(255,255,255,.08);
  --text: #f7f7f7;
  --muted: #a7adb8;
  --soft: #6f7686;
  --green: #1db954;
  --green-2: #1ed760;
  --danger: #ff5f67;
  --yellow: #f8d66d;
  --radius: 18px;
  --shadow: 0 20px 80px rgba(0,0,0,.32);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(circle at 40% -10%, #203d2b 0, transparent 34%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: 1fr 96px;
  height: 100vh;
  gap: 10px;
  padding: 10px;
}
.sidebar, .main, .player, .panel {
  background: rgba(15,17,21,.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.sidebar { padding: 18px; overflow: hidden; }
.main { padding: 20px; overflow: hidden; display: flex; flex-direction: column; }
.player { grid-column: 1 / -1; padding: 12px 18px; display: grid; grid-template-columns: 1fr minmax(280px, 540px) 1fr; gap: 18px; align-items: center; }

.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.logo { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--green), #79f2b1); display: grid; place-items: center; color: #00160a; font-weight: 900; }
.brand h1 { font-size: 20px; margin: 0; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.nav-actions { display: grid; gap: 8px; margin-bottom: 20px; }
.btn {
  border: 0;
  background: #252a33;
  color: var(--text);
  padding: 11px 14px;
  border-radius: 999px;
  font-weight: 800;
  transition: .15s ease;
}
.btn:hover { background: #303643; transform: translateY(-1px); }
.btn.green { background: var(--green); color: #001a0a; }
.btn.green:hover { background: var(--green-2); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn.danger { background: rgba(255,95,103,.12); color: #ff9ca2; border: 1px solid rgba(255,95,103,.25); }
.btn.small { padding: 7px 10px; font-size: 12px; }

.section-title { font-size: 12px; color: var(--soft); letter-spacing: .08em; text-transform: uppercase; margin: 18px 0 8px; }
.playlist-list { display: grid; gap: 7px; overflow: auto; max-height: calc(100vh - 310px); padding-right: 4px; }
.playlist-chip { display: flex; justify-content: space-between; align-items: center; border: 0; width: 100%; text-align: left; padding: 11px 12px; border-radius: 12px; background: transparent; color: var(--muted); }
.playlist-chip:hover, .playlist-chip.active { background: #1e232c; color: var(--text); }
.playlist-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; background: var(--green); }

.hero { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 26px; min-height: 180px; border-radius: 28px; background: linear-gradient(135deg, rgba(29,185,84,.35), rgba(20,22,27,.95)); margin-bottom: 18px; }
.hero h2 { font-size: clamp(34px, 6vw, 70px); line-height: .9; margin: 0 0 10px; letter-spacing: -0.05em; }
.hero p { color: var(--muted); margin: 0; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #20242e;
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}
.input:focus, select:focus, textarea:focus { border-color: rgba(29,185,84,.7); box-shadow: 0 0 0 4px rgba(29,185,84,.12); }
.toolbar .input { max-width: 340px; }
.toolbar select { max-width: 190px; }

.track-list { overflow: auto; padding-right: 5px; display: grid; gap: 6px; }
.track-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
}
.track-row:hover, .track-row.active { background: var(--card-hover); border-color: var(--line); }
.cover { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: linear-gradient(135deg, #2f3642, #14181f); }
.title { font-weight: 850; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #2a2f3b; color: var(--text); display: grid; place-items: center; }
.icon-btn:hover { background: #3a4251; }
.icon-btn.liked { background: rgba(29,185,84,.18); color: var(--green-2); }

.now { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center; min-width: 0; }
.now .cover { width: 58px; height: 58px; }
.player-center { text-align: center; }
.player-controls { display: flex; gap: 10px; justify-content: center; align-items: center; margin-bottom: 9px; }
.play-big { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: #000; font-weight: 900; }
.progress { height: 5px; border-radius: 999px; background: #3b414d; overflow: hidden; }
.progress > div { height: 100%; width: 0%; background: #fff; }
.embed-box { justify-self: end; width: 180px; height: 76px; border-radius: 12px; overflow: hidden; background: #111; border: 1px solid var(--line); }
.embed-box iframe { width: 100%; height: 100%; border: 0; }
audio { width: 100%; max-width: 260px; }

.window-page { min-height: 100vh; overflow: auto; padding: 18px; background: var(--bg); }
.window-card { max-width: 760px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); }
.window-card h1 { margin: 0 0 8px; font-size: 28px; }
.window-card p { color: var(--muted); }
.form-grid { display: grid; gap: 12px; margin-top: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.list-card { display: grid; gap: 8px; margin-top: 16px; }
.item-card { padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 10px; }
.item-card .top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 6px; background: #222832; color: var(--muted); padding: 5px 9px; border-radius: 999px; font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: #10130f; border: 1px solid rgba(29,185,84,.3); color: #b4ffc9; padding: 12px 16px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; }
.empty { display: grid; place-items: center; min-height: 220px; border: 1px dashed var(--line); border-radius: 22px; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  body { overflow: auto; }
  .shell { grid-template-columns: 1fr; grid-template-rows: auto auto auto; height: auto; min-height: 100vh; }
  .player { grid-column: auto; grid-template-columns: 1fr; }
  .embed-box { justify-self: stretch; width: 100%; height: 170px; }
  .hero h2 { font-size: 42px; }
  .two { grid-template-columns: 1fr; }
}
