
/* Simple full-screen landing with a hue-animating gradient background */
:root{
  --hue: 210; /* default hue */
  --hue-speed: 6; /* degrees per second; increase for visible change */
  --sat: 70%;
  --light1: 22%;
  --light2: 12%;
}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial;color:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden}

/* Use the animated CSS variable --hue to build a soft gradient */
body{
  margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial;color:#222;display:flex;align-items:center;justify-content:center;overflow:hidden;
  /* fixed beige background */
  background-color: #f5f5dc;
  touch-action: none; /* prevent scrolling/zooming on mobile */
  -webkit-tap-highlight-color: transparent;
}

#stage{position:relative;width:100%;height:100vh}

.emoji{position:absolute;display:inline-block;user-select:none;pointer-events:auto;will-change:transform,opacity;animation-name:bounce;animation-timing-function:cubic-bezier(.22,.9,.3,1);animation-iteration-count:infinite}

/* quick pop transition applied right before removing the emoji */
.emoji.pop{
  transition: transform 180ms ease-out, opacity 180ms ease-out;
  transform: scale(1.6) translateY(-6px) !important;
  opacity: 0 !important;
}

@keyframes bounce{
  0%{transform:translateY(0) scale(1);opacity:1}
  50%{transform:translateY(-30px) scale(1.08);opacity:0.95}
  100%{transform:translateY(0) scale(1);opacity:1}
}

/* bigger, higher bounce for urgent mode */
.emoji.big-bounce{ animation-name: big-bounce !important }
@keyframes big-bounce{
  0%{transform:translateY(0) scale(1);opacity:1}
  35%{transform:translateY(-48px) scale(1.09);opacity:0.98}
  50%{transform:translateY(-64px) scale(1.12);opacity:0.95}
  100%{transform:translateY(0) scale(1);opacity:1}
}

.hint{position:fixed;left:12px;bottom:12px;font-size:13px;opacity:0.8}

@media (prefers-reduced-motion: reduce) {
  .emoji { animation-iteration-count: 1; animation-duration: 0.001s; }
}

/* Modern top-left pop counter */
.pop-counter{
  position:fixed;left:14px;top:14px;z-index:9999;display:flex;flex-direction:column;gap:6px;
  background: rgba(0,0,0,0.48);color:#fff;padding:10px 12px;border-radius:12px;box-shadow:0 6px 18px rgba(0,0,0,0.2);
  backdrop-filter: blur(6px);font-family: system-ui,Segoe UI,Roboto, -apple-system;min-width:96px
}
.pop-counter .pop-row{display:flex;justify-content:space-between;align-items:center}
.pop-counter .label{font-size:11px;opacity:0.85;margin-right:8px}
.pop-counter .num{font-weight:700;font-size:16px}
.pop-counter .muted .label{opacity:0.65}

@media (max-width:420px){
  .pop-counter{left:10px;top:10px;padding:8px;border-radius:10px}
  .pop-counter .num{font-size:14px}
}

/* wild mode styling - make last two more visible and above others */
.emoji.wild{z-index:9998;transition:left 160ms ease-out, top 160ms ease-out;animation:none !important}

/* congrats tab (hidden by default) */
.congrats-tab{position:fixed;left:0;top:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0.15);opacity:0;pointer-events:none;z-index:10000;transition:opacity 250ms}
.congrats-tab .congrats-inner{background:linear-gradient(90deg,#ffd966,#ff7ab6);color:#111;padding:40px 60px;border-radius:20px;box-shadow:0 10px 30px rgba(0,0,0,0.25);display:flex;flex-direction:column;align-items:center;gap:20px;transform:scale(0.9);transition:transform 320ms cubic-bezier(.2,.9,.2,1)}
.congrats-tab .congrats-msg{font-weight:800;font-size:32px;text-align:center}
.congrats-tab .congrats-close{display:none} /* hide close button */
.congrats-tab.show{opacity:1;pointer-events:auto}
.congrats-tab.show .congrats-inner{transform:scale(1)}

/* Refresh button styling */
.refresh-btn{background:#fff;color:#333;border:none;padding:12px 24px;font-size:18px;font-weight:700;border-radius:10px;cursor:pointer;box-shadow:0 4px 10px rgba(0,0,0,0.15);transition:transform 0.1s}
.refresh-btn:active{transform:scale(0.96)}

@media (max-width: 600px) {
  .congrats-tab .congrats-inner{padding:24px 32px;width:85%}
  .congrats-tab .congrats-msg{font-size:24px}
}
