:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #111119;
  color: #f5f2ff;
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: clamp(1rem, 5vw, 3rem);
  place-items: center;
  background: radial-gradient(ellipse at 50% 12%, #29203f, #111119 62%);
}

.counter {
  width: min(100%, 28rem);
  padding: clamp(1.25rem, 5vw, 2.5rem);
  border: 1px solid #383247;
  border-radius: 1.75rem;
  background: #1a1824;
  box-shadow: 0 1.5rem 5rem #09070f80;
}

h1 {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: clamp(1.4rem, 5vw, 2rem);
  letter-spacing: -0.035em;
}

.display {
  display: grid;
  min-height: 10rem;
  padding: 1rem;
  place-items: center;
  border: 1px solid #3d3154;
  border-radius: 1.125rem;
  background: radial-gradient(ellipse at 50% 95%, #2c2042, #15131e 75%);
}

output {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  color: #d8c7ff;
  font-size: clamp(3rem, 14vw, 5.5rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  line-height: 1;
}

.actions {
  display: grid;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

button {
  min-height: 3rem;
  padding: 0.625rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

button:focus-visible {
  outline: 2px solid #f5f2ff;
  outline-offset: 3px;
}

.primary {
  background: #c8afff;
  color: #211435;
}

.primary:hover {
  background: #dccaff;
}

.primary:active {
  background: #b99af7;
}

.secondary {
  border-color: #494155;
  background: transparent;
  color: #e1d9ef;
}

.secondary:hover {
  background: #30283d;
}

.secondary:active {
  background: #40344f;
}
