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

html {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a2e;
  color: #ffffff;
}

body {
  margin: 0;
  padding: 0;
}

#app {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
  padding-bottom: 40px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

h1 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: #e94560;
}

.settings-group {
  background: #16213e;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.settings-group h2 {
  font-size: 0.9rem;
  color: #a0a0a0;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.input-row {
  display: flex;
  gap: 12px;
}

.input-row label {
  flex: 1;
}

.input-row label span {
  display: block;
  font-size: 0.8rem;
  color: #a0a0a0;
  margin-bottom: 4px;
}

.input-with-unit {
  display: flex;
  align-items: center;
  background: #0f3460;
  border-radius: 8px;
}

.input-with-unit input {
  flex: 1;
  width: 100%;
  padding: 10px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.input-with-unit input:focus {
  outline: none;
}

.input-with-unit .unit {
  padding-right: 10px;
  color: #a0a0a0;
  font-size: 0.9rem;
}

.total-time {
  text-align: center;
  color: #a0a0a0;
  margin: 16px 0;
  font-size: 0.9rem;
}

.primary-btn {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  background: #e94560;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn:active {
  background: #ff6b6b;
}

/* Workout Screen */
#workout-screen.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 40px);
}

.workout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #16213e;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
}

#elapsed-time {
  font-size: 1rem;
  color: #a0a0a0;
}

.workout-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.phase-label {
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.phase-label.warmup { color: #fbbf24; }
.phase-label.work { color: #e94560; }
.phase-label.rest { color: #4ade80; }
.phase-label.cooldown { color: #60a5fa; }

.timer-ring {
  position: relative;
  width: 220px;
  height: 220px;
  margin-bottom: 20px;
}

.timer-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: #16213e;
  stroke-width: 8;
}

.ring-progress {
  fill: none;
  stroke: #e94560;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
}

.ring-progress.warmup { stroke: #fbbf24; }
.ring-progress.work { stroke: #e94560; }
.ring-progress.rest { stroke: #4ade80; }
.ring-progress.cooldown { stroke: #60a5fa; }

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  font-weight: 700;
}

.rep-counter {
  font-size: 1rem;
  color: #a0a0a0;
}

.workout-footer {
  margin-top: 20px;
}

.secondary-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: 2px solid #0f3460;
  border-radius: 12px;
  background: transparent;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

/* Complete Screen */
#complete-screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 40px);
  text-align: center;
}

.checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #4ade80;
  color: #1a1a2e;
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

#complete-screen h1 {
  margin-bottom: 10px;
}

#final-time {
  color: #a0a0a0;
  margin-bottom: 30px;
}

#done-btn {
  width: auto;
  padding: 14px 40px;
}
