:root {
  --focus: #d9534f;
  --short: #2f9e8f;
  --long: #3b6fd8;
  --text: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--focus);
  transition: background 0.4s ease;
}
body[data-mode="short"] { background: var(--short); }
body[data-mode="long"] { background: var(--long); }

main {
  width: min(440px, 100% - 32px);
  text-align: center;
  padding: 32px 16px;
  border-radius: 20px;
  background: rgb(255 255 255 / 0.12);
}

h1 { margin: 0 0 16px; font-size: 1.4rem; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  background: transparent;
}

.modes { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.modes button.active { background: rgb(0 0 0 / 0.18); font-weight: 600; }

.clock {
  font-size: clamp(4rem, 20vw, 6.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 16px 0;
}

.controls { display: flex; justify-content: center; gap: 12px; }
.controls button {
  min-width: 120px;
  padding: 12px 20px;
  font-size: 1.1rem;
  background: rgb(255 255 255 / 0.2);
}
.controls .primary { background: #fff; color: #222; font-weight: 700; }

.count { opacity: 0.9; }
footer { margin-top: 16px; font-size: 0.85rem; opacity: 0.8; }
a { color: inherit; }
