:root {
  color-scheme: light dark;
  --bg: #ecfeff;
  --fg: #083344;
  --surface: #ffffff;
  --accent: #0891b2;
  --muted: #e0f2fe;
  --shadow: rgba(8, 51, 68, 0.15);
}

[data-theme="dark"] {
  --bg: #082f36;
  --fg: #e0f2fe;
  --surface: #0f3d47;
  --accent: #22d3ee;
  --muted: #124f5c;
  --shadow: rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font: 16px/1.6 system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  transition: background .25s, color .25s;
}

.card {
  max-width: 32rem;
  margin: 1.5rem;
  padding: 2.5rem;
  text-align: center;
  background: var(--surface);
  border-radius: 1rem;
  box-shadow: 0 20px 50px var(--shadow);
}

.badge {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 999px;
  background: var(--muted);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}

h1 { margin: 1rem 0 .5rem; font-size: 2rem; }
p { margin: 0 0 1.5rem; opacity: .75; }
code { background: var(--muted); padding: .1em .4em; border-radius: .3em; }

.counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.counter button {
  width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
  border: none;
  border-radius: .75rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.counter button:hover { filter: brightness(1.1); }

output {
  min-width: 3rem;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
}

.theme-toggle {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  padding: .5rem 1rem;
  border-radius: .75rem;
  cursor: pointer;
}
