/* 🏃‍♂️ Cadence Metronome - Obsidian Athletic Design (Screenshot 2 Match) */
:root {
  --bg: #070b12;
  --card-bg: #0f172a;
  --border: #1e293b;
  --border-light: #334155;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --green: #10b981;
  --green-glow: #34d399;
  --blue: #38bdf8;
  --red: #ef4444;
  --yellow: #f59e0b;
  --radius: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 14px 16px 24px;
}

.app-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-btn {
  background: #0f172a;
  border: 1px solid #0284c7;
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn:active {
  transform: scale(0.95);
  background: #0284c7;
  color: #ffffff;
}

.status-badge {
  background: #1e293b;
  border: 1px solid #334155;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.status-badge.active {
  background: #064e3b;
  border-color: #10b981;
  color: #34d399;
}

/* Card base */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Metronome Card */
.metronome-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.foot-indicator-row {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.foot-pill {
  padding: 6px 20px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  transition: all 0.1s ease;
}

.foot-pill.active-left {
  background: #064e3b;
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.45);
  transform: scale(1.04);
}

.foot-pill.active-right {
  background: #0c4a6e;
  border-color: #0284c7;
  color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
  transform: scale(1.04);
}

/* SPM Circle */
.spm-circle-wrapper {
  width: 175px;
  height: 175px;
  border-radius: 50%;
  background: #060d1a;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.6);
}

.spm-circle-wrapper:active {
  transform: scale(0.98);
}

.spm-circle-wrapper.beating {
  border-color: var(--green);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.35), inset 0 4px 20px rgba(0, 0, 0, 0.6);
}

.spm-circle-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.spm-num {
  font-size: 3.4rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.03em;
}

.spm-unit {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* Adjust Buttons */
.adjust-btn-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}

.adj-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 10px 0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.adj-btn:active {
  transform: scale(0.94);
  background: #334155;
}

/* Yellow Slider */
.slider-row {
  width: 100%;
  padding: 4px 0;
}

.yellow-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  background: #1e293b;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.yellow-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #d1d5db;
  border: 2px solid #9ca3af;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.yellow-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #d1d5db;
  border: 2px solid #9ca3af;
  cursor: pointer;
}

/* Presets Row */
.presets-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
}

.preset-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 10px 0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn.active {
  background: #064e3b;
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.preset-btn:active {
  transform: scale(0.95);
}

/* Play Button */
.play-btn {
  width: 100%;
  padding: 14px 0;
  border-radius: 12px;
  border: none;
  background: #10b981;
  color: #000000;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  transition: all 0.15s ease;
}

.play-btn.playing {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.play-btn:active {
  transform: scale(0.98);
}

/* Stats */
.stats-row {
  display: flex;
  width: 100%;
  justify-content: space-around;
  padding-top: 4px;
}

.stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
}

.stat-lbl {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Sound Card */
.sound-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.sound-tabs-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.sound-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.sound-chip {
  flex: 0 0 auto;
  background: #1e293b;
  border: 1px solid #334155;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sound-chip.active {
  background: #064e3b;
  border-color: #10b981;
  color: #34d399;
}

.volume-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.volume-header {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.vibrate-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.vibrate-cb {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}
