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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0a0a0a;
  color: #f5f5f5;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.screen { display: none; width: 100%; }
.screen.active { display: flex; justify-content: center; align-items: center; min-height: 100dvh; }

.container {
  max-width: 393px;
  width: 100%;
  padding: 2rem 1.5rem;
  text-align: center;
}

/* Landing */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.btn-primary {
  background: #fff;
  color: #0a0a0a;
  border: none;
  border-radius: 12px;
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
}
.btn-primary:active { transform: scale(0.97); opacity: 0.9; }

/* Record */
.label {
  color: #888;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

blockquote {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #ccc;
  border-left: 3px solid #333;
  padding-left: 1rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.timer {
  font-size: 2rem;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.5rem;
  color: #666;
}
.timer.active { color: #f5f5f5; }

.progress-bar {
  width: 100%;
  height: 4px;
  background: #222;
  border-radius: 2px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: #ef4444;
  border-radius: 2px;
  transition: width 0.2s linear;
}

.btn-record {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #444;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
  margin-bottom: 0.75rem;
}
.btn-record:hover { border-color: #666; }
.btn-record.recording { border-color: #ef4444; }

.rec-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ef4444;
  display: block;
  transition: border-radius 0.2s, width 0.2s, height 0.2s;
}
.btn-record.recording .rec-dot {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.hint {
  color: #666;
  font-size: 0.8rem;
}

.error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}
.hidden { display: none; }

/* Loading */
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #333;
  border-top-color: #fff;
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  color: #888;
  font-size: 0.95rem;
}

/* Reveal */
h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.player-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: 60px;
  text-align: right;
  flex-shrink: 0;
}
.player-label.original { color: #4ade80; }
.player-label.clone { color: #a78bfa; }

audio {
  flex: 1;
  height: 40px;
  min-width: 0;
}
audio::-webkit-media-controls-panel { background: #1a1a1a; }

.compare-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #111;
  border-radius: 12px;
}

.btn-compare {
  background: none;
  border: 1px solid #333;
  color: #f5f5f5;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s;
}
.btn-compare:hover { border-color: #555; }
.btn-compare.playing { border-color: #a78bfa; color: #a78bfa; }

.slider-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slider-label {
  font-size: 0.7rem;
  color: #666;
  text-transform: uppercase;
  width: 36px;
}

#mix-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: linear-gradient(to right, #4ade80, #a78bfa);
  border-radius: 2px;
  outline: none;
}
#mix-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.btn-secondary {
  background: none;
  border: 1px solid #333;
  color: #f5f5f5;
  border-radius: 12px;
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s;
}
.btn-secondary:hover { border-color: #555; }
