:root {
  --bg: #f4f4f6;
  --text: #1c1c1e;
  --muted: #6b6b70;
  --card: #ffffff;
  --bar-track: #e9e9ee;
  --accent: #0a84ff;
  --success: #34c759;
  --danger: #ff453a;
  --shadow: rgba(0, 0, 0, 0.06);
}

body.dark {
  --bg: #1c1c1e;
  --text: #f4f4f6;
  --muted: #98989f;
  --card: #2c2c2e;
  --bar-track: #3a3a3c;
  --shadow: rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  transition: background 0.2s ease, color 0.2s ease;
}

header {
  text-align: center;
  margin-bottom: 24px;
}

h1 {
  font-size: 1.8rem;
}

#date-text {
  color: var(--muted);
  margin-top: 4px;
}

#theme-btn {
  margin-top: 12px;
  padding: 8px 16px;
  font-size: 0.9rem;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--bar-track);
  border-radius: 999px;
  cursor: pointer;
}

main {
  width: 100%;
  max-width: 420px;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 2px 8px var(--shadow);
  padding: 20px;
  text-align: center;
}

.card h2 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.bar {
  height: 10px;
  background: var(--bar-track);
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0;
}

.bar-fill {
  height: 100%;
  background: var(--success);
  width: 0%;
  transition: width 0.3s ease;
}

.count {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.count.done {
  color: var(--success);
}

.card button {
  width: 100%;
  padding: 14px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.card button:active {
  transform: scale(0.97);
}

footer {
  margin-top: 28px;
}

#reset-btn {
  padding: 10px 22px;
  font-size: 1rem;
  background: var(--danger);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}