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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f4f8;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

.container {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 32px 24px;
  width: 100%;
  max-width: 480px;
  text-align: center;
}

h1 {
  font-size: 1.6rem;
  color: #2d3748;
  margin-bottom: 28px;
}

/* ビート表示 */
.beat-display {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.beat-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 4px solid #cbd5e0;
  transition: background 0.05s ease, box-shadow 0.05s ease;
}

.beat-circle.active {
  background: #4299e1;
  border-color: #2b6cb0;
  box-shadow: 0 0 24px rgba(66,153,225,0.7);
}

.beat-circle.accent {
  background: #e53e3e;
  border-color: #9b2c2c;
  box-shadow: 0 0 28px rgba(229,62,62,0.8);
}

/* BPM表示 */
.bpm-display {
  margin-bottom: 20px;
}

#bpmDisplay {
  font-size: 3.5rem;
  font-weight: 700;
  color: #2d3748;
}

.bpm-label {
  font-size: 1.2rem;
  color: #718096;
  margin-left: 6px;
}

/* BPMコントロール */
.bpm-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  justify-content: center;
}

.btn-adjust {
  background: #edf2f7;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  transition: background 0.15s;
  min-width: 44px;
}

.btn-adjust:hover {
  background: #e2e8f0;
}

#bpmSlider {
  flex: 1;
  min-width: 80px;
  accent-color: #4299e1;
  cursor: pointer;
}

/* 直接入力 */
.bpm-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 0.9rem;
  color: #4a5568;
}

#bpmInput {
  width: 80px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  text-align: center;
  color: #2d3748;
}

#bpmInput:focus {
  outline: none;
  border-color: #4299e1;
}

/* スタート/ストップボタン */
.btn-start {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  background: #4299e1;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-bottom: 20px;
}

.btn-start:hover {
  background: #3182ce;
}

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

.btn-start.running {
  background: #e53e3e;
}

.btn-start.running:hover {
  background: #c53030;
}

/* ビートカウンター */
.beat-counter {
  font-size: 1rem;
  color: #a0aec0;
  min-height: 24px;
}

/* スマホ対応 */
@media (max-width: 400px) {
  .container {
    padding: 24px 16px;
  }

  .beat-circle {
    width: 90px;
    height: 90px;
  }

  #bpmDisplay {
    font-size: 2.8rem;
  }

  .btn-adjust {
    padding: 8px 8px;
    min-width: 38px;
    font-size: 0.8rem;
  }
}
