:root {
  --bg: #0a0a0a;
  --fg: #e8e8e8;
  --accent: #d4a017;
  --accent-dim: #a67c00;
  --muted: #666;
  --card: #141414;
  --radius: 12px;
}

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

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

#app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 100px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #222;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.version {
  font-size: 12px;
  color: var(--muted);
}

/* Stage */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 32px;
  text-align: center;
}

.title {
  font-size: clamp(2rem, 8vw, 3.2rem);
  font-weight: 300;
  margin-bottom: 8px;
}

.title span {
  color: var(--accent);
  font-weight: 600;
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

/* Voices */
.voices {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}

.btn-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #333;
  background: var(--card);
  color: var(--fg);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.btn-circle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.voice-num {
  font-size: 24px;
  font-weight: 600;
  min-width: 32px;
  color: var(--fg);
}

.voice-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
  min-height: 32px;
}

.pill {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid #333;
  font-size: 13px;
  color: var(--muted);
}

.pill.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* Modes */
.modes {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.mode {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #333;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.mode.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

/* Lyrics */
.lyrics {
  width: 100%;
  min-height: 180px;
  max-height: 280px;
  overflow-y: auto;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 20px;
  text-align: left;
}

.line {
  padding: 6px 0;
  font-size: 18px;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}

.line.active {
  color: var(--fg);
  font-weight: 600;
  transform: scale(1.02);
}

.line.past {
  color: #444;
}

.line.placeholder {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

/* Progress */
.progress-wrap {
  width: 100%;
  height: 4px;
  background: #222;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s linear;
}

.time-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

/* Controls */
.controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(transparent, #0a0a0a 30%);
  max-width: 640px;
  margin: 0 auto;
}

.btn-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #000;
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #333;
  background: var(--card);
  color: var(--fg);
  font-size: 18px;
  cursor: pointer;
}

.btn-clap {
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.btn-start {
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.btn-start:hover,
.btn-play:hover {
  filter: brightness(1.1);
}

/* Playing state */
body.is-playing .btn-play::before {
  content: "⏸";
}
body.is-playing .btn-play {
  font-size: 0;
}
body.is-playing .btn-play::before {
  font-size: 22px;
}
