:root {
  --bg: #111827;
  --panel: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --ring: rgba(255, 255, 255, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 197, 94, 0.12), transparent 35%),
    radial-gradient(circle at 80% 90%, rgba(239, 68, 68, 0.12), transparent 40%),
    var(--bg);
  color: var(--text);
}

.app {
  min-height: 100%;
  display: grid;
  place-items: center;
  gap: 1rem;
  padding: 1.25rem;
  position: relative;
}

.minimal-toggle {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.minimal-toggle input {
  width: 1rem;
  height: 1rem;
}

.minimal-toggle.is-hidden {
  display: none;
}

body.minimal-mode #statusLabel,
body.minimal-mode #countdownLabel,
body.minimal-mode .helper-text {
  display: none;
}

body.minimal-mode .focus-button:hover #countdownLabel {
  display: block;
}

.focus-button {
  width: min(62vmin, 360px);
  height: min(62vmin, 360px);
  border-radius: 50%;
  border: 8px solid var(--ring);
  color: #111;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 700;
  user-select: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 250ms ease;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.focus-button:hover {
  transform: translateY(-2px) scale(1.01);
}

.focus-button:active {
  transform: translateY(0) scale(0.99);
}

.focus-button:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 4px;
}

.state-green {
  background: var(--green);
}

.state-yellow {
  background: var(--yellow);
}

.state-red {
  background: var(--red);
}

.is-flashing {
  animation: flash 900ms steps(2, start) infinite;
}

@keyframes flash {
  50% {
    filter: brightness(0.5);
  }
}

#statusLabel {
  font-size: clamp(1.1rem, 2.9vmin, 1.5rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.countdown {
  font-size: clamp(2.1rem, 7.5vmin, 3.7rem);
  line-height: 1;
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.6vmin, 1.1rem);
  text-align: center;
}
