@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0a0a0f;
  --surface: rgba(255,255,255,0.04);
  --border:  rgba(255,255,255,0.08);
  --text:    #e8eaf0;
  --muted:   #6070a0;
  --accent:  #00ffcc;
  --accent2: #7700ff;
  --font:    'Inter', sans-serif;
  --mono:    'JetBrains Mono', monospace;
}

html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }

/* ── Header ─────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(12px);
}

.back-link {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }

.logo { display: flex; align-items: baseline; gap: 8px; flex: 1; }
.logo-icon { font-size: 18px; }
.logo-text {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-shadow: 0 0 16px var(--accent);
}
.logo-sub { font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }

.header-meta { font-size: 10px; color: var(--muted); font-family: var(--mono); text-align: right; }

/* ── Arc Navigation ─────────────────────────────── */
.arc-nav {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,0.7);
}
.arc-nav::-webkit-scrollbar { display: none; }

.arc-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.arc-btn:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }
.arc-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,255,204,0.06);
  box-shadow: 0 0 12px rgba(0,255,204,0.15);
}
.arc-btn .arc-count { font-size: 9px; opacity: 0.6; }

/* ── Main Layout ────────────────────────────────── */
.main-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 110px);
}

/* ── Track Panel ────────────────────────────────── */
.track-panel {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-arc-name {
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 2px;
}

.panel-count { font-size: 10px; color: var(--muted); }

.volume-nav {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  overflow-x: auto;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.volume-nav::-webkit-scrollbar { display: none; }

.vol-btn {
  font-size: 9px;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.vol-btn:hover { color: var(--text); }
.vol-btn.active { border-color: var(--accent); color: var(--accent); }

.track-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.track-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}
.track-item:hover { background: rgba(255,255,255,0.03); }
.track-item.active {
  background: rgba(0,255,204,0.05);
  border-left-color: var(--accent);
}

.ti-num {
  font-size: 9px;
  font-family: var(--mono);
  color: var(--muted);
  width: 32px;
  flex-shrink: 0;
  text-align: right;
}
.ti-thumb {
  width: 36px; height: 36px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface);
}
.ti-info { flex: 1; min-width: 0; }
.ti-title {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  line-height: 1.3;
}
.track-item.active .ti-title { color: var(--accent); font-weight: 600; }
.ti-dur { font-size: 9px; color: var(--muted); font-family: var(--mono); }
.ti-link {
  flex-shrink: 0;
  font-size: 11px; color: var(--muted);
  text-decoration: none; padding: 2px 6px;
  border-radius: 4px; border: 1px solid transparent;
  transition: all 0.15s; line-height: 1;
}
.ti-link:hover { color: var(--accent); border-color: var(--accent); background: rgba(0,255,204,0.06); }


/* ── Player Section ─────────────────────────────── */
.player-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 28px;
  overflow: auto;
}

.cover-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.cover-bg {
  position: absolute; inset: 0;
  background: var(--accent2);
  filter: blur(30px);
  opacity: 0.4;
  transition: background 0.6s;
}
.cover-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.4s;
}
.cover-img[src=""] { opacity: 0; }
.cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.5));
}
.play-pulse {
  position: absolute; inset: 0;
  border-radius: 12px;
  box-shadow: 0 0 0 0 var(--accent);
  transition: box-shadow 0.1s;
  pointer-events: none;
}
.play-pulse.active {
  animation: pulse-ring 1.5s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(0,255,204,0.4); }
  100% { box-shadow: 0 0 0 20px rgba(0,255,204,0); }
}

.now-playing { text-align: center; max-width: 500px; }
.np-arc {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 6px;
}
.np-title { font-size: 18px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.np-caption {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  max-height: 52px;
  overflow: hidden;
  margin-bottom: 8px;
}
.np-meta { font-size: 9px; font-family: var(--mono); color: var(--muted); display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.np-meta span { padding: 2px 8px; border: 1px solid var(--border); border-radius: 10px; }

.progress-section {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 480px;
}
.time { font-size: 10px; font-family: var(--mono); color: var(--muted); width: 36px; flex-shrink: 0; }
.progress-bar {
  flex: 1; height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s linear;
  box-shadow: 0 0 6px var(--accent);
}

.controls { display: flex; align-items: center; gap: 20px; }
.ctrl-btn {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--muted);
  transition: color 0.15s, transform 0.1s;
  padding: 6px;
}
.ctrl-btn:hover { color: var(--text); transform: scale(1.1); }
.btn-play {
  font-size: 32px;
  color: var(--accent);
  border: 1px solid rgba(0,255,204,0.3);
  border-radius: 50%;
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
}
.ctrl-sm { font-size: 16px; }
.ctrl-btn.active { color: var(--accent); }

.volume-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
}
.vol-slider {
  width: 100px; appearance: none;
  height: 3px; border-radius: 2px;
  background: var(--border); outline: none; cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  appearance: none; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .main-layout { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .track-panel { display: none; }
  .player-section { padding: 20px; gap: 18px; }
  .cover-wrap { width: 200px; height: 200px; }
}
