:root {
  --bg-deep: #0c1412;
  --ink: #e8f2ec;
  --ink-muted: #8aa396;
  --accent: #3dcf9a;
  --danger: #ff7a6e;
  --font-ui: "Outfit", sans-serif;
  --font-time: "Space Grotesk", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg-deep);
  overflow: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(61, 207, 154, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(45, 120, 95, 0.25), transparent 50%),
    radial-gradient(ellipse 40% 35% at 10% 70%, rgba(20, 60, 50, 0.35), transparent 45%),
    linear-gradient(165deg, #0a1210 0%, #13221c 45%, #0c1412 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 242, 236, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 242, 236, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  pointer-events: none;
}

.app {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(12px, 2vw, 28px);
}

.display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 75vh;
  animation: rise-in 0.7s ease-out both;
}

.brand {
  margin: 0 0 0.35em;
  font-size: clamp(0.85rem, 1.6vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--accent);
  text-indent: 0.35em;
}

.time {
  font-family: var(--font-time);
  font-weight: 700;
  font-size: clamp(5rem, 28vmin, 16rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-shadow: 0 0 60px rgba(61, 207, 154, 0.15);
  transition: color 0.35s ease, transform 0.35s ease;
}

.time.running {
  color: #f3fff8;
}

.time.warning {
  color: #ffe1a8;
}

.time.danger {
  color: var(--danger);
  animation: pulse-soft 1s ease-in-out infinite;
}

.time.done {
  animation: flash-done 0.6s ease-out 3;
}

.colon {
  display: inline-block;
  margin: 0 -0.05em;
  opacity: 0.85;
  animation: blink 1s steps(1) infinite;
  animation-play-state: paused;
}

.time.running .colon {
  animation-play-state: running;
}

.status {
  margin: 0.6em 0 0;
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  min-height: 1.4em;
}

.btn {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  padding: 0.75em 1.6em;
  min-width: 140px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  margin-top: 1.2em;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  color: #062016;
  background: var(--accent);
  box-shadow: 0 8px 24px rgba(61, 207, 154, 0.25);
}

.btn-primary:hover {
  background: #52e0ab;
}

.btn[hidden] {
  display: none;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

@keyframes flash-done {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
