/* 쿠킹 멀티 타이머 전용 스타일 */

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

/* 프리셋 바 */
.presets-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  padding: 0.7rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.presets-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-right: 0.4rem;
  white-space: nowrap;
}

.preset-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.preset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface);
}
.preset-btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  margin-left: auto;
}
.preset-btn.primary:hover {
  filter: brightness(1.08);
  color: #fff;
}

.empty-hint {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-sub);
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

/* 타이머 카드 그리드 */
.timers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.timer-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem 1.1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.timer-card.danger {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}
.timer-card.danger .timer-display {
  color: #ef4444;
  animation: pulse 1s ease-in-out infinite;
}
.timer-card.done {
  border-color: var(--primary);
  background: rgba(102, 126, 234, 0.07);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.18);
}
.timer-card.done .timer-display {
  color: var(--primary);
  animation: pulse 0.7s ease-in-out infinite;
  font-size: 2rem;
  letter-spacing: 0.02em;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* 헤더 (제목 + 삭제) */
.timer-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.timer-title {
  flex: 1;
  padding: 0.35rem 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
  min-width: 0;
}
.timer-title:hover {
  background: var(--bg);
}
.timer-title:focus {
  border-color: var(--primary);
  background: var(--bg);
}

.timer-remove {
  width: 28px;
  height: 28px;
  font-size: 1rem;
  line-height: 1;
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.timer-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error);
  color: var(--error);
}

/* 타이머 디스플레이 */
.timer-display {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 2.6rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.1;
  padding: 0.4rem 0;
  font-variant-numeric: tabular-nums;
}

/* 분/초 입력 */
.timer-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.timer-num {
  width: 64px;
  padding: 0.4rem 0.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  -moz-appearance: textfield;
}
.timer-num::-webkit-outer-spin-button,
.timer-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.timer-num:focus {
  border-color: var(--primary);
}
.timer-num:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.timer-sep {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-sub);
}

/* 컨트롤 버튼 */
.timer-controls {
  display: flex;
  gap: 0.4rem;
}

.timer-controls button {
  flex: 1;
  padding: 0.55rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  border: 1px solid var(--border);
}

.btn-start {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-start:hover {
  filter: brightness(1.08);
}

.btn-reset {
  background: var(--bg);
  color: var(--text-sub);
}
.btn-reset:hover {
  border-color: var(--text-sub);
  color: var(--text);
}

.btn-stop-alarm {
  background: var(--error);
  color: #fff;
  border-color: var(--error);
  animation: stopFlash 0.9s ease-in-out infinite;
}
.btn-stop-alarm:hover {
  filter: brightness(1.05);
}

@keyframes stopFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.78; }
}

@media (max-width: 480px) {
  .preset-btn { padding: 0.35rem 0.65rem; font-size: 0.78rem; }
  .preset-btn.primary { width: 100%; margin-left: 0; }
  .timer-display { font-size: 2.2rem; }
  .timer-card.done .timer-display { font-size: 1.7rem; }
}
