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

html, body { height: 100%; }

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #2b2140, #14101f 72%);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: #fff;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.stage {
  position: relative;
  width: min(96vw, 64vh, 480px);
  aspect-ratio: 480 / 720;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 4px rgba(255, 255, 255, .06);
  touch-action: none;
}

canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.hidden { display: none !important; }

/* HUD */
.hud {
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  display: flex; gap: 8px; flex-wrap: wrap;
  pointer-events: none;
}
.chip {
  display: flex; align-items: center; gap: 7px;
  background: rgba(20, 14, 32, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px);
  padding: 6px 11px;
  border-radius: 12px;
  font-size: 13px;
}
.chip span { opacity: .75; white-space: nowrap; }
.chip b { font-size: 15px; color: #ffd93d; }
.chip.danger { flex: 1 1 100%; }
.bar {
  flex: 1; min-width: 90px; height: 8px;
  background: rgba(255, 255, 255, .15);
  border-radius: 6px; overflow: hidden;
}
.bar i {
  display: block; height: 100%; width: 100%;
  background: #7ee08a; border-radius: 6px;
  transition: width .18s linear, background .3s;
}

/* Панель-оверлей */
.panel {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 8, 20, .55);
  backdrop-filter: blur(4px);
  padding: 18px;
}
.panel-card {
  width: 100%; max-width: 340px;
  background: linear-gradient(160deg, rgba(46, 32, 70, .96), rgba(28, 20, 44, .96));
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}
.paw { font-size: 40px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-8deg); } }
.panel-card h1 { font-size: 24px; margin: 8px 0 10px; }
.panel-card p { font-size: 14px; line-height: 1.5; opacity: .9; }
.stats {
  margin: 12px 0; padding: 10px;
  background: rgba(255, 255, 255, .08);
  border-radius: 12px; font-size: 14px;
}
.stats b { color: #ffd93d; }
.btn {
  margin-top: 14px; width: 100%;
  padding: 13px; font-size: 17px; font-weight: 700;
  color: #2a1a08;
  background: linear-gradient(180deg, #ffd93d, #ffb02e);
  border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 6px 0 #c97f14;
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #c97f14; }
.hint { margin-top: 12px; font-size: 12px !important; opacity: .65 !important; }
