/* 기본 토큰: 기존 페이지 톤과 일치 */
:root {
  --card-bg: #fff;
  --text-color: #333;
  --tag-bg: #00c2a8;
  --bg-color: #f5f7fa;
  --border-color: #ccc;
  --accent-color: #00c2a8;
}

html.dark-mode {
  --card-bg: #333335;
  --text-color: #eaeaea;
  --bg-color: #222223;
  --border-color: #555;
  --accent-color: #56e3cf;
}

/* 헤더/설명은 home.css의 스타일을 따르되 필요한 보강만 */
h1 {
  text-align: center;
  font-size: 2rem;
  margin-top: 2rem;
  color: var(--text-color);
}

.description {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  opacity: 0.9;
}

/* 카드 레이아웃 */
.stopwatch-card {
  width: 95%;
  max-width: 800px;
  margin: 1rem auto;
  padding: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 시간 표시 */
.time-display {
  font-variant-numeric: tabular-nums;
  text-align: center;
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: 0.04em;
  margin: 0.5rem 0 1rem;
  color: var(--text-color);
}

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

.controls button {
  padding: 0.7rem 1.1rem;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.controls button:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.controls button:active { transform: translateY(1px); }
.controls button.primary {
  background: var(--accent-color);
  color: #0c2a25;
  border: 1px solid transparent;
  font-weight: 700;
}
.controls button[disabled] { opacity: 0.55; cursor: not-allowed; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
}

/* 랩 리스트 */
.laps {
  margin-top: 1rem;
  max-height: 300px;
  overflow: auto;
  border-top: 1px dashed var(--border-color);
}

.lap-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(127,127,127,0.25);
  font-variant-numeric: tabular-nums;
  color: var(--text-color);
}

.lap-row small { opacity: 0.7; }
.lap-row .lap-time { font-weight: 700; }

/* 레이아웃(광고 영역 포함) */
.ad-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.main-content {
  flex: 1;
  min-width: 300px;
  max-width: 800px;
}

/* 반응형 */
@media (max-width: 768px) {
  .ad-container { flex-direction: column; align-items: center; }
}
