:root {
  --bg1: #2b0a0a;
  --bg2: #5c1010;
  --accent: #ff5a1f;
  --text: #fff5eb;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, var(--bg2), var(--bg1) 70%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 24px;
  text-align: center;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

.floating-names {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-name {
  position: absolute;
  bottom: -10%;
  white-space: nowrap;
  font-weight: 700;
  color: rgba(255, 154, 102, 0.4);
  font-size: clamp(1rem, 4.5vw, 1.7rem);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  animation-name: float-up;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes float-up {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translate(var(--drift, 40px), -125vh) rotate(var(--rotate, 6deg)); opacity: 0; }
}

.name-badge {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.name-input {
  width: 42vw;
  max-width: 160px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.85rem;
  backdrop-filter: blur(4px);
}

.name-input::placeholder {
  color: rgba(255, 245, 235, 0.5);
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 4px;
  letter-spacing: 0.02em;
}

.sub {
  opacity: 0.8;
  margin: 0 0 24px;
  font-size: 0.95rem;
}

.count {
  font-size: clamp(4rem, 22vw, 7rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 28px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 24px rgba(255, 90, 31, 0.5);
}

.chili-btn {
  width: min(55vw, 220px);
  height: min(55vw, 220px);
  border-radius: 50%;
  border: none;
  font-size: min(28vw, 110px);
  line-height: 1;
  background: radial-gradient(circle at 35% 30%, #ff7a3d, var(--accent) 70%);
  box-shadow: 0 10px 30px rgba(255, 90, 31, 0.45), inset 0 -6px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.08s ease, filter 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.chili-btn:active:not(:disabled) {
  transform: scale(0.93);
}

.chili-btn.pulse {
  animation: pulse 0.3s ease;
}

.chili-btn:disabled,
.chili-btn.cooling {
  filter: grayscale(0.6) brightness(0.7);
  box-shadow: none;
  cursor: not-allowed;
}

@keyframes pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.status {
  margin-top: 16px;
  min-height: 1.2em;
  font-size: 0.9rem;
  opacity: 0.85;
}

.conn {
  margin-top: 6px;
  min-height: 1.2em;
  font-size: 0.8rem;
  opacity: 0.6;
}
