/* Sticker Slice — TOKEHUNT palette: deep navy, neon cyan, lime green, pixel-terminal type. */

:root {
  --navy: #04101d;
  --panel: #081a2e;
  --panel-edge: #14374f;
  --cyan: #3fd9ff;
  --cyan-dim: #8fb3c7;
  --lime: #b8f235;
  --lime-btn: #7dc832;
  --danger: #ff5470;
  --font: "Courier New", ui-monospace, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--navy);
  color: #dff3ff;
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: .06em;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

#gameShell { position: fixed; inset: 0; }

#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hidden { display: none !important; }

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

#hud {
  position: absolute;
  top: calc(6px + env(safe-area-inset-top));
  left: 10px; right: 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  pointer-events: none;
  text-transform: uppercase;
}
#hud strong { display: block; font-size: 22px; color: var(--cyan); text-shadow: 0 0 12px rgba(63,217,255,.55); }
#hud small { display: block; font-size: 10px; color: var(--cyan-dim); }
.hudSide { text-align: center; background: rgba(8,26,46,.82); border: 1px solid var(--panel-edge); border-radius: 10px; padding: 5px 10px; min-width: 74px; }
.hudSide:last-of-type strong { color: var(--lime); text-shadow: 0 0 12px rgba(184,242,53,.5); }
#scoreBlock { text-align: center; background: rgba(8,26,46,.82); border: 1px solid var(--panel-edge); border-radius: 10px; padding: 5px 16px; }
#scoreBlock strong { font-size: 26px; }

#cravedRow {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.cravedThumb {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(8,26,46,.85);
  border: 1px solid var(--lime);
  box-shadow: 0 0 10px rgba(184,242,53,.35);
}
#virusStrikes { display: flex; gap: 5px; margin-left: 8px; }
#virusStrikes i {
  width: 11px; height: 11px; border-radius: 50%;
  background: #12283c; border: 1px solid var(--panel-edge);
}
#virusStrikes i.hit { background: var(--danger); border-color: var(--danger); box-shadow: 0 0 9px rgba(255,84,112,.7); }

/* ------------------------------------------------------------- overlays --- */

.overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  background: rgba(2,8,16,.72);
  z-index: 5;
}

.panel {
  width: min(360px, 100%);
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 16px;
  padding: 22px 20px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.55), inset 0 0 40px rgba(63,217,255,.04);
  text-transform: uppercase;
}

h1 { font-size: 34px; line-height: 1.02; color: var(--cyan); text-shadow: 0 0 18px rgba(63,217,255,.6); }
h1 span { color: var(--lime); text-shadow: 0 0 18px rgba(184,242,53,.55); }
h2 { font-size: 22px; color: var(--cyan); text-shadow: 0 0 14px rgba(63,217,255,.55); margin-bottom: 12px; }
.tagline { margin: 8px 0 14px; font-size: 11px; color: var(--cyan-dim); letter-spacing: .28em; }

.petCard {
  display: flex; align-items: center; gap: 12px;
  background: rgba(4,16,29,.7);
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  text-align: left;
}
.petFace { font-size: 34px; filter: drop-shadow(0 0 10px rgba(63,217,255,.5)); }
.petMeta { flex: 1; }
.petMeta b { display: block; font-size: 11px; color: var(--cyan); }
.petMeta small { display: block; font-size: 10px; color: var(--lime); margin: 2px 0 5px; }

.xpBar {
  height: 9px; border-radius: 5px;
  background: #0a2036; border: 1px solid var(--panel-edge);
  overflow: hidden;
}
.xpBar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #6fb52a, var(--lime));
  box-shadow: 0 0 10px rgba(184,242,53,.6);
  transition: width .9s cubic-bezier(.2,.7,.2,1);
}
.xpBar.big { height: 13px; margin: 7px 0 5px; }

.howList { list-style: none; text-align: left; margin-bottom: 14px; }
.howList li { font-size: 10.5px; color: var(--cyan-dim); padding: 4px 0; letter-spacing: .05em; }
.howList b { color: var(--cyan); margin-right: 6px; }
.howList b.good { color: var(--lime); }
.howList b.bad { color: var(--danger); }

.bestCard {
  background: rgba(4,16,29,.7);
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  padding: 9px 12px 11px;
  margin-bottom: 16px;
}
.bestCard span { font-size: 10px; color: var(--cyan-dim); }
.bestCard strong { display: block; font-size: 27px; color: var(--cyan); text-shadow: 0 0 14px rgba(63,217,255,.5); }
.bestCard small { font-size: 10px; color: var(--lime); }

.primaryBtn {
  width: 100%;
  font: inherit; letter-spacing: .14em; text-transform: uppercase;
  font-size: 17px;
  color: #0c2405;
  background: linear-gradient(180deg, #96dd3f, var(--lime-btn));
  border: 0; border-radius: 12px;
  padding: 14px 0;
  box-shadow: 0 5px 0 #47761a, 0 10px 24px rgba(125,200,50,.35);
  cursor: pointer;
}
.primaryBtn:active { transform: translateY(3px); box-shadow: 0 2px 0 #47761a; }
.primaryBtn:disabled { filter: grayscale(.6) brightness(.7); box-shadow: none; cursor: default; }

.secondaryBtn {
  font: inherit; letter-spacing: .12em; text-transform: uppercase;
  font-size: 12px;
  color: var(--cyan);
  background: transparent;
  border: 1px solid var(--panel-edge); border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
}

/* ----------------------------------------------------------- deal splash --- */

.dealPanel { background: transparent; border: 0; box-shadow: none; }
.dealRow { display: flex; justify-content: center; gap: 14px; margin: 8px 0 14px; }
.dealSlot {
  width: 92px;
  background: var(--panel);
  border: 1px solid var(--lime);
  border-radius: 14px;
  padding: 8px 6px;
  box-shadow: 0 0 18px rgba(184,242,53,.3);
  animation: dealPop .35s cubic-bezier(.2,1.6,.4,1) backwards;
}
.dealSlot:nth-child(2) { animation-delay: .12s; }
.dealSlot:nth-child(3) { animation-delay: .24s; }
.dealSlot canvas { width: 76px; height: 76px; display: block; margin: 0 auto; }
.dealSlot small { display: block; font-size: 8.5px; color: var(--lime); margin-top: 4px; letter-spacing: .08em; }
.dealHint { font-size: 11px; color: var(--cyan-dim); letter-spacing: .2em; }
@keyframes dealPop { from { transform: scale(.3); opacity: 0; } }

/* -------------------------------------------------------------- results --- */

.compactPanel { padding: 18px 18px 16px; }
.resultIcon { font-size: 34px; margin-bottom: 4px; }
.finalScore small { display: block; font-size: 10px; color: var(--cyan-dim); }
.finalScore strong { display: block; font-size: 38px; color: var(--cyan); text-shadow: 0 0 16px rgba(63,217,255,.55); margin-bottom: 8px; }

.xpEarn { margin-bottom: 12px; }
.xpEarn small { font-size: 10px; color: var(--cyan-dim); }
.xpEarn small b { color: var(--lime); }
.lvlRow { display: block; color: var(--lime) !important; }
.lvlRow em { font-style: normal; color: #0c2405; background: var(--lime); border-radius: 6px; padding: 1px 7px; margin-left: 8px; animation: lvlFlash .5s steps(2) infinite; }
@keyframes lvlFlash { 50% { filter: brightness(1.5); } }

.resultGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 10px; }
.resultGrid div { background: rgba(4,16,29,.7); border: 1px solid var(--panel-edge); border-radius: 10px; padding: 7px 4px; }
.resultGrid small { display: block; font-size: 9px; color: var(--cyan-dim); }
.resultGrid strong { font-size: 18px; color: var(--cyan); }

.newBest { color: var(--lime); font-size: 13px; margin-bottom: 6px; animation: lvlFlash .6s steps(2) infinite; }
.retryHint { font-size: 10px; color: var(--cyan-dim); letter-spacing: .18em; margin-bottom: 12px; }
