:root {
  --bg: #0a0605;
  --bg-2: #150a08;
  --ember: #ff5a2e;
  --ember-2: #ffb020;
  --loss: #ff2d2d;
  --loss-glow: rgba(255, 45, 45, 0.55);
  --paused: #6b7280;
  --text: #f3ece7;
  --text-dim: #a89a92;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.09);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(ellipse at 50% -10%, var(--bg-2), var(--bg) 60%);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

#embers {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 46rem;
  width: 100%;
}

.counter {
  font-variant-numeric: tabular-nums;
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 6.5rem);
  line-height: 1;
  color: var(--loss);
  text-shadow: 0 0 18px var(--loss-glow), 0 0 46px var(--loss-glow);
  display: inline-flex;
  align-items: baseline;
  gap: 0.05em;
  white-space: nowrap;
  animation: pulse 1.4s ease-in-out infinite;
}

body.paused .counter {
  color: var(--text);
  text-shadow: none;
  animation: none;
  opacity: 0.92;
}

@keyframes pulse {
  0%, 100% { text-shadow: 0 0 18px var(--loss-glow), 0 0 46px var(--loss-glow); }
  50% { text-shadow: 0 0 28px var(--loss-glow), 0 0 70px var(--loss-glow); }
}

.cent { font-size: 0.6em; }
.sep { font-size: 0.6em; opacity: 0.75; }
.currency {
  font-size: 0.42em;
  margin-left: 0.28em;
  font-weight: 600;
  color: var(--text-dim);
  align-self: center;
}

.status {
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  font-size: 0.9rem;
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--loss);
  box-shadow: 0 0 10px var(--loss-glow);
  animation: blink 1.4s ease-in-out infinite;
}

body.paused .dot {
  background: var(--paused);
  box-shadow: none;
  animation: none;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.rate {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.projektion {
  margin-top: clamp(2rem, 6vh, 3.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.projektion label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.projektion input[type="date"] {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 0.5rem;
  padding: 0.45rem 0.7rem;
  color-scheme: dark;
}

.projektion input[type="date"]:focus {
  outline: none;
  border-color: rgba(255, 90, 46, 0.6);
}

.projektion-ergebnis {
  min-height: 1.2em;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: var(--ember-2);
}

@media (prefers-reduced-motion: reduce) {
  .counter, .dot { animation: none !important; }
}
