/* Pomodoro 타이머 전용 스타일 */

nav { max-width: 720px; }
main { max-width: 720px; }

.subtitle {
  color: var(--text-sub);
  margin-bottom: 1.25rem;
}

/* 타이머 스테이지 */
.timer-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
  --phase-color: var(--primary);
  transition: background 0.3s;
}

.timer-stage[data-phase="work"] {
  --phase-color: #6366f1;
  background: linear-gradient(135deg, var(--surface) 70%, rgba(99, 102, 241, 0.08));
}

.timer-stage[data-phase="short"] {
  --phase-color: #22c55e;
  background: linear-gradient(135deg, var(--surface) 70%, rgba(34, 197, 94, 0.08));
}

.timer-stage[data-phase="long"] {
  --phase-color: #14b8a6;
  background: linear-gradient(135deg, var(--surface) 70%, rgba(20, 184, 166, 0.08));
}

.phase-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phase-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--phase-color);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--phase-color);
  border-radius: 999px;
}

@media (prefers-color-scheme: dark) {
  .phase-label {
    background: rgba(0, 0, 0, 0.25);
  }
}

.mute-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s;
}

.mute-btn:hover {
  border-color: var(--phase-color);
}

/* 원형 진행 바 */
.circle-wrap {
  position: relative;
  width: 280px;
  height: 280px;
}

.progress-svg {
  width: 100%;
  height: 100%;
  transform: rotate(0deg);
}

.progress-svg .track {
  stroke: var(--border);
  opacity: 0.5;
}

.progress-svg .progress {
  stroke: var(--phase-color);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s linear, stroke 0.3s;
}

.time-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  pointer-events: none;
}

.time-num {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 3.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.cycle-info {
  font-size: 0.82rem;
  color: var(--text-sub);
  font-weight: 600;
}

/* 컨트롤 버튼 */
.controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ctrl-btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.ctrl-btn:hover {
  border-color: var(--phase-color);
  color: var(--phase-color);
}

.ctrl-btn.primary {
  background: var(--phase-color);
  color: #fff;
  border-color: var(--phase-color);
}

.ctrl-btn.primary:hover {
  filter: brightness(1.08);
  color: #fff;
}

/* 사이클 점 */
.dots {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, transform 0.2s;
}

.dot.done {
  background: var(--phase-color);
}

.dot.active {
  background: var(--phase-color);
  transform: scale(1.4);
}

/* 설정 패널 */
.settings {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin-bottom: 1.5rem;
}

.settings summary {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  padding: 0.3rem 0;
  user-select: none;
}

.settings summary:hover {
  color: var(--primary);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.set-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.set-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sub);
}

.set-field input {
  padding: 0.5rem 0.65rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.set-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

@media (max-width: 600px) {
  .timer-stage { padding: 1.2rem 1rem; }
  .circle-wrap { width: 240px; height: 240px; }
  .time-num { font-size: 2.8rem; }
  .ctrl-btn { padding: 0.55rem 0.95rem; font-size: 0.82rem; }
  .settings-grid { grid-template-columns: 1fr; }
}
