/* Swarmageddon — bees in a bucket */

:root {
  --honey:   #ffc21a;
  --honey-d: #e09b00;
  --ink:     #0d0a03;
  --rage:    #ff3b1f;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
  touch-action: none;
}

.hidden { opacity: 0 !important; pointer-events: none !important; }

/* ------------------------------------------------------------------ stage */

#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  /* the whole stage jitters when the bees kick off — driven by --shake in JS */
  transform: translate3d(
    calc(var(--sx, 0) * 1px),
    calc(var(--sy, 0) * 1px), 0)
    scale(calc(1 + var(--shake, 0) * 0.035));
  will-change: transform;
}

#bee {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* saturate + contrast climb with agitation, so the picture "heats up" */
  filter: saturate(calc(1 + var(--shake, 0) * 0.9))
          contrast(calc(1 + var(--shake, 0) * 0.22));
}

#rage-tint {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%,
              rgba(255, 60, 20, 0.00) 30%,
              rgba(190, 20, 0, 0.55) 100%);
  opacity: var(--shake, 0);
  mix-blend-mode: multiply;
  transition: opacity 90ms linear;
  pointer-events: none;
}

#vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center,
              rgba(0,0,0,0) 45%, rgba(0,0,0,0.75) 100%);
  pointer-events: none;
}

/* -------------------------------------------------------------------- HUD */

#hud {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(env(safe-area-inset-top), 18px) 20px max(env(safe-area-inset-bottom), 22px);
  pointer-events: none;
  transition: opacity 350ms ease;
  text-shadow: 0 2px 14px rgba(0,0,0,0.85);
}

#hud-top { text-align: center; }

#wordmark {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--honey);
}
#wordmark span { color: #fff; }

#mood {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.9;
  transition: color 200ms linear;
}

#hud-bottom { text-align: center; }

#meter {
  height: 12px;
  border-radius: 99px;
  background: rgba(255,255,255,0.13);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
}

#meter-fill {
  height: 100%;
  width: calc(var(--shake, 0) * 100%);
  border-radius: 99px;
  background: linear-gradient(90deg, var(--honey) 0%, #ff8c00 55%, var(--rage) 100%);
  box-shadow: 0 0 18px rgba(255, 140, 0, calc(var(--shake, 0) * 0.9));
}

#meter-label {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  opacity: 0.65;
}

#hint {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.05em;
  opacity: 0.45;
}

/* ----------------------------------------------------------------- paused */

#paused {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 6, 2, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity 260ms ease;
}

.paused-inner { text-align: center; }
.paused-icon  { font-size: 62px; }
.paused-title { margin-top: 10px; font-size: 24px; font-weight: 800; letter-spacing: 0.04em; }
.paused-sub   { margin-top: 8px; font-size: 14px; opacity: 0.6; }

/* ------------------------------------------------------------------ start */

#start {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background:
    radial-gradient(ellipse at 50% 0%, #3a2a00 0%, transparent 62%),
    var(--ink);
  transition: opacity 420ms ease;
  overflow-y: auto;
}

.start-inner { text-align: center; max-width: 380px; }

.start-bee {
  width: 128px;
  height: 128px;
  border-radius: 30px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.6), 0 0 0 3px rgba(255,194,26,0.28);
  animation: hover 2.6s ease-in-out infinite;
}

@keyframes hover {
  0%, 100% { transform: translateY(0)     rotate(-1.5deg); }
  50%      { transform: translateY(-9px)  rotate(1.5deg);  }
}

#start h1 {
  margin-top: 22px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--honey);
  line-height: 1.05;
}
#start h1 span { color: #fff; }

.tagline {
  margin-top: 8px;
  font-size: 15px;
  font-style: italic;
  opacity: 0.62;
}

#start-btn {
  margin-top: 28px;
  width: 100%;
  padding: 19px 20px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--honey) 0%, var(--honey-d) 100%);
  color: #2a1c00;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.09em;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(255,170,0,0.32);
  transition: transform 90ms ease, box-shadow 90ms ease;
}
#start-btn:active { transform: scale(0.97); box-shadow: 0 4px 14px rgba(255,170,0,0.28); }
#start-btn:disabled { opacity: 0.55; }

.checklist {
  margin-top: 26px;
  list-style: none;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.85;
  opacity: 0.72;
}
.checklist b { color: var(--honey); }

#start-note {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.5;
  color: #ff9f7a;
  min-height: 1em;
}

@media (max-height: 680px) {
  .start-bee { width: 96px; height: 96px; }
  #start h1  { font-size: 28px; margin-top: 16px; }
  .checklist { margin-top: 18px; font-size: 12.5px; line-height: 1.7; }
  #start-btn { margin-top: 20px; padding: 16px; }
}
