/* coszls media site — dark, single accent, responsive */

:root {
  --bg: #0a0b0f;
  --surface: #14161d;
  --surface-2: #1b1e27;
  --line: #262a35;
  --text: #e9ebf1;
  --muted: #8b93a7;
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, .16);
  --radius: 14px;
  --player-h: 78px;
  --top-h: 62px;
  --tab-h: 58px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--top-h);
  padding: 0 22px;
  background: rgba(10, 11, 15, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 9px; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--accent), #b39dff);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.brand-name { font-size: 17px; font-weight: 650; letter-spacing: .2px; }

.nav { display: flex; gap: 4px; margin-left: 6px; }

.nav a {
  padding: 7px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  transition: .15s;
}

.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.on { color: var(--text); background: var(--accent-soft); }

.search { margin-left: auto; }

.search input {
  width: 260px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  outline: none;
  transition: .15s;
}

.search input:focus { border-color: var(--accent); background: var(--surface-2); }
.search input::placeholder { color: var(--muted); }

/* ------------------------------------------------------------------- main */

.view {
  padding: 26px 22px calc(var(--player-h) + 34px);
  max-width: 1420px;
  margin: 0 auto;
  min-height: calc(100vh - var(--top-h));
}

.section { margin-bottom: 34px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 15px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 620;
}

.section-head .more { color: var(--muted); font-size: 13px; }
.section-head .more:hover { color: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 16px;
}

.grid.wide { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }

/* ------------------------------------------------------------- card style */

.card {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px;
  transition: .16s;
  cursor: pointer;
}

.card:hover { background: var(--surface-2); border-color: var(--line); transform: translateY(-2px); }
.card.playing { border-color: var(--accent); }

.card-art {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  background: var(--surface-2);
}

.card-art img { width: 100%; height: 100%; object-fit: cover; }

.card-art .glyph {
  font-size: 30px;
  font-weight: 700;
  color: rgba(255, 255, 255, .9);
  letter-spacing: 1px;
}

.card-art .play-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 13, .55);
  opacity: 0;
  transition: .16s;
  font-size: 26px;
}

.card:hover .play-hint { opacity: 1; }

.card-title {
  font-size: 14px;
  font-weight: 560;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-sub {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------- list rows */

.rows { display: flex; flex-direction: column; gap: 2px; }

.row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.row:hover { background: var(--surface-2); }
.row.playing .row-title { color: var(--accent); }

.row-idx {
  width: 24px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.row-body { min-width: 0; flex: 1; }

.row-title {
  font-size: 14px;
  font-weight: 520;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.row-end {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 6px;
  border-radius: 8px;
  line-height: 1;
}

.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn.on { color: var(--accent); }

.row .icon-btn { opacity: 0; }
.row:hover .icon-btn, .row .icon-btn.on { opacity: 1; }

/* ------------------------------------------------------------------ misc */

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}

.empty strong { display: block; margin-bottom: 8px; color: var(--text); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.chip {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.chip:hover { color: var(--text); }
.chip.on { color: #fff; background: var(--accent); border-color: var(--accent); }

.hero {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 18px;
  margin-bottom: 28px;
  background: var(--surface);
  border-radius: var(--radius);
}

.hero-art {
  width: 108px;
  height: 108px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 700;
}

.hero h1 { margin: 0 0 6px; font-size: 22px; font-weight: 650; }
.hero p { margin: 0; color: var(--muted); font-size: 13.5px; }

.btn {
  padding: 9px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 560;
}

.btn.ghost { background: var(--surface-2); color: var(--text); }

/* ---------------------------------------------------------------- player */

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(320px, 2fr) minmax(180px, 1fr);
  align-items: center;
  gap: 18px;
  height: var(--player-h);
  padding: 0 20px;
  background: rgba(17, 19, 25, .94);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}

.pl-track { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }

.pl-art {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 9px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 700;
  overflow: hidden;
}

.pl-art img { width: 100%; height: 100%; object-fit: cover; }

.pl-meta { min-width: 0; }

.pl-title { font-size: 13.5px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pl-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }

.pl-controls { display: flex; align-items: center; gap: 6px; }

.ctl {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  transition: .14s;
}

.ctl:hover { color: var(--text); background: var(--surface-2); }
.ctl[aria-pressed="true"] { color: var(--accent); }
.ctl:disabled { opacity: .35; cursor: default; }

.ctl-main {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
}

.ctl-main:hover { background: #8b6dff; color: #fff; }

.ctl-mobile { display: none; }

.pl-seek {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
}

.pl-seek .t {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 34px;
  text-align: center;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 16px;
  background: transparent;
  outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 3px;
  background: var(--line);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--text);
}

input[type="range"]:hover::-webkit-slider-thumb { background: var(--accent); }

input[type="range"]::-moz-range-track { height: 4px; border-radius: 3px; background: var(--line); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--text); }

.pl-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.pl-right .volume { max-width: 88px; }

/* ----------------------------------------------------------------- queue */

.queue {
  position: fixed;
  right: 16px;
  bottom: calc(var(--player-h) + 14px);
  width: 330px;
  max-height: min(58vh, 520px);
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .5);
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.queue-list { margin: 0; padding: 6px; list-style: none; overflow-y: auto; }

.queue-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  cursor: pointer;
}

.queue-list li:hover { background: var(--surface-2); }
.queue-list li.on { color: var(--accent); }
.queue-list .q-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-list .q-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- sheet */

.sheet { position: fixed; inset: 0; z-index: 90; }

.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .58); }

.sheet-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 82vh;
  overflow-y: auto;
  padding: 22px 22px calc(var(--player-h) + 24px);
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
}

@media (min-width: 900px) {
  .sheet-panel {
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: min(760px, 92vw);
    max-height: 80vh;
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--line);
  }
}

.sheet-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.sheet-head .sheet-art { width: 96px; height: 96px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 26px; font-weight: 700; overflow: hidden; }
.sheet-head .sheet-art img { width: 100%; height: 100%; object-fit: cover; }
.sheet-head h3 { margin: 0 0 4px; font-size: 18px; }
.sheet-head .sheet-sub { color: var(--muted); font-size: 13px; }
.sheet-actions { display: flex; gap: 10px; margin: 16px 0 22px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- tabbar */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 65;
  display: none;
  height: var(--tab-h);
  background: rgba(17, 19, 25, .97);
  border-top: 1px solid var(--line);
}

.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}

.tabbar a.on { color: var(--accent); }
.tab-ico { font-size: 16px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-h) + 24px);
  transform: translateX(-50%);
  z-index: 100;
  padding: 9px 18px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}

.skeleton { padding: 60px 0; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .topbar { gap: 10px; padding: 0 14px; height: 56px; }
  .nav { display: none; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .brand-name { display: none; }

  .view { padding: 18px 14px calc(var(--player-h) + var(--tab-h) + 26px); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }

  .player {
    bottom: var(--tab-h);
    grid-template-columns: 1fr auto;
    height: 62px;
    padding: 0 12px;
    gap: 10px;
  }

  .pl-center { display: none; }
  .pl-right .volume,
  .pl-right #btn-rate { display: none; }
  .pl-right .ctl-mobile { display: grid; }
  .tabbar { display: flex; }

  .player.expanded {
    bottom: 0;
    top: 0;
    height: auto;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
    padding: 42px 26px;
    background: linear-gradient(180deg, #14161d, #0a0b0f 70%);
  }

  .player.expanded .pl-track { flex-direction: column; text-align: center; gap: 18px; }
  .player.expanded .pl-art { width: min(64vw, 262px); height: min(64vw, 262px); border-radius: 18px; font-size: 56px; }
  .player.expanded .pl-title { font-size: 19px; }
  .player.expanded .pl-sub { font-size: 14px; }
  .player.expanded .pl-center { display: flex; }
  .player.expanded .pl-seek { max-width: none; }
  .player.expanded .pl-right { justify-content: center; }
  .player.expanded .pl-right .volume,
  .player.expanded .pl-right #btn-rate { display: grid; }
  .player.expanded .ctl-close { display: grid !important; }

  .queue { left: 10px; right: 10px; width: auto; bottom: calc(var(--player-h) + var(--tab-h) + 10px); }

  .hero { flex-direction: column; align-items: flex-start; gap: 14px; padding: 16px; }
  .hero-art { width: 84px; height: 84px; font-size: 26px; }
  .hero h1 { font-size: 19px; }
}

@media (min-width: 861px) {
  .ctl-close { display: none !important; }
}
