:root {
  --ink: #20110c;
  --tomato: #dc2626;
  --pepper: #f97316;
  --rice: #fff7d6;
  --green: #0f766e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(ellipse 32rem 24rem at var(--cursor-x, 18%) var(--cursor-y, 18%), rgba(220, 38, 38, 0.24), transparent 72%),
    radial-gradient(ellipse 28rem 24rem at 82% 16%, rgba(249, 115, 22, 0.26), transparent 70%),
    linear-gradient(135deg, #fff7ed, #ffedd5 48%, #fef3c7);
  color: var(--ink);
  overflow-x: hidden;
  position: relative;
}

body::before {
  animation: kitchenHeat 10s ease-in-out infinite alternate;
  background:
    radial-gradient(ellipse 8rem 18rem at 18% 90%, rgba(249, 115, 22, 0.18), transparent 70%),
    radial-gradient(ellipse 8rem 20rem at 42% 96%, rgba(220, 38, 38, 0.14), transparent 70%),
    radial-gradient(ellipse 8rem 18rem at 74% 92%, rgba(245, 158, 11, 0.18), transparent 70%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

body::after {
  background-image:
    linear-gradient(rgba(32,17,12,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32,17,12,0.035) 1px, transparent 1px);
  background-size: 62px 62px;
  content: "";
  inset: 0;
  mask-image: radial-gradient(ellipse 82% 70% at 50% 34%, black 12%, transparent 86%);
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

.game-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
  position: relative;
  z-index: 1;
}

.hud {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 120px 120px auto auto;
  margin-bottom: 14px;
}

.eyebrow {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin: 0;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.9;
  margin: 0;
}

.hud article,
button,
canvas {
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(32, 17, 12, 0.12);
}

.hud article {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  padding: 13px;
}

.hud span {
  color: #8a6b5d;
  display: block;
  font-weight: 800;
}

.hud strong {
  font-size: 1.7rem;
}

button {
  align-self: stretch;
  background: var(--tomato);
  border: 0;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 13px 18px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

#pauseBtn {
  background: #0f766e;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.legend span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(32, 17, 12, 0.08);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 24px rgba(32, 17, 12, 0.08);
  font-weight: 900;
  padding: 9px 12px;
}

canvas {
  background: linear-gradient(180deg, #fff3d0, #fed7aa);
  border: 1px solid rgba(32, 17, 12, 0.12);
  display: block;
  width: 100%;
}

@keyframes kitchenHeat {
  from { transform: translateY(0) scale(1); filter: blur(0); }
  to { transform: translateY(-18px) scale(1.05); filter: blur(2px); }
}

.hint {
  color: #7c5a4a;
  font-weight: 800;
}

@media (max-width: 760px) {
  .hud {
    grid-template-columns: 1fr 1fr;
  }
}
