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

:root {
  --bg: #fafafa;
  --fg: #1a1a1a;
  --card-bg: #f0f0f0;
  --card-border: #e0e0e0;
  --accent: #d4a017;
  --accent-dim: rgba(212, 160, 23, 0.2);
  --muted: #888;
  --progress-bg: #ddd;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --fg: #e8e8e8;
    --card-bg: #141414;
    --card-border: #2a2a2a;
    --accent: #e8b830;
    --accent-dim: rgba(232, 184, 48, 0.15);
    --muted: #777;
    --progress-bg: #333;
    --shadow: 0 2px 12px rgba(0,0,0,0.3);
  }
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}

.logo {
  margin-top: 10vh;
  width: 160px;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.player {
  margin-top: 32px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.song-name {
  font-size: 1.2rem;
  font-weight: 600;
  min-height: 1.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-wrap {
  margin-top: 12px;
  width: 100%;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--progress-bg);
  border-radius: 2px;
  overflow: hidden;
  cursor: default;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s linear;
}

.progress-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.controls {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.controls button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.controls button:hover { opacity: 0.85; }
.controls button:disabled { opacity: 0.4; cursor: default; }

.controls button.stop {
  background: transparent;
  color: var(--fg);
  border: 1.5px solid var(--card-border);
}

.stats {
  margin-top: 28px;
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.stats-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.stats-grid .label { color: var(--muted); }
.stats-grid .value { text-align: right; font-family: "SF Mono", "Fira Code", monospace; }

.stats.hidden { display: none; }

footer {
  margin-top: auto;
  padding: 16px 0;
  text-align: center;
  width: 100%;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
}

footer a:hover { text-decoration: underline; }
