/* GameDev Studio: styles of the easter-egg merge game (gamedev.js). Shared pieces (.board, .cell, .item,
   .chain, .burst, .confetti, .drag-ghost) live in assets/css/main.css. */
.board--gd { gap: 6px; }
.board--gd .item { font-size: 0; }
.board--gd .item img { width: 94%; height: 94%; }
.item--gen {
  --gen-1: #fff3df; --gen-2: #ffc779; /* generator glow, local to this component */
  position: relative; --c: var(--gen-2);
  background: radial-gradient(circle at 50% 35%, var(--gen-1), var(--gen-2));
  box-shadow: 0 4px 0 rgba(0,0,0,.28), inset 0 2px 0 rgba(255,255,255,.6), 0 0 0 2px rgba(247,122,17,.55);
}
.cell.is-gen .item { animation: gen-breathe 2.6s ease-in-out infinite; }
@keyframes gen-breathe { 50% { transform: scale(1.04); } }
.cell.is-gen.is-press .item { animation: none; transform: scale(.84); transition: transform .1s ease-out; }
.cell.is-gen.is-release .item { animation: gen-release .5s var(--ease-pop); }
@keyframes gen-release { from { transform: scale(.84); } to { transform: scale(1); } }
.gd-fly { position: fixed; z-index: 97; pointer-events: none; display: grid; place-items: center; }
.gd-fly .item { width: 86%; height: 86%; }
.gd-fly--big { z-index: 99; filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)); }
.board--gd .item { transition: transform .25s var(--ease-pop), translate .12s ease-out; }
.cell.is-match .item { box-shadow: 0 4px 0 rgba(0,0,0,.28), 0 0 0 3px rgba(255,224,138,.95), 0 0 18px rgba(255,200,60,.6); }
.cell.is-match.is-drop .item { transform: scale(1.14); }
.cell.is-suck .item { transform: scale(.72); transition: transform .17s ease-in; }
.gd-flash {
  position: absolute; inset: -12%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,246,220,.95) 0 28%, rgba(255,200,60,.55) 48%, transparent 70%);
  animation: gd-flash .45s ease-out forwards;
}
@keyframes gd-flash { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.gd__movesN { display: inline-block; }
.gd__movesN.is-bump { animation: bump .35s var(--ease-pop); }
@keyframes bump { 40% { transform: scale(1.35); color: var(--orange); } }

.gd-bolt {
  position: absolute; right: -6%; top: -6%; width: 34%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: var(--orange); box-shadow: 0 2px 0 var(--orange-deep), 0 0 0 2px var(--ink-2);
}
.gd-bolt svg { width: 64%; height: 64%; fill: var(--ink); }
.cell.is-shake .item { animation: shake .35s ease-in-out; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.gd { gap: 18px; }
.gd__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.gd__score { display: flex; gap: 8px; }
.gd__score > span {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--ink-3); font-size: 13px; font-weight: 700; color: var(--muted);
}
.gd__score b { font: 800 16px/1 var(--display); color: var(--paper); font-variant-numeric: tabular-nums; }
.gd__goal {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(247,122,17,.1); border: 1px solid rgba(247,122,17,.35);
}
.gd__goalText { font-weight: 700; font-size: 15px; line-height: 1.35; }
.gd__targets { display: flex; align-items: center; gap: 8px; flex: none; }
.gd__target {
  position: relative; width: 48px; aspect-ratio: 1; border-radius: 12px; background: var(--item); display: grid; place-items: center;
  filter: grayscale(1); opacity: .45; transition: opacity .4s, filter .4s, transform .4s var(--ease-pop);
}
.gd__target img { width: 88%; }
.gd__target.is-done { filter: none; opacity: 1; transform: scale(1.08); box-shadow: 0 0 0 3px var(--orange), 0 0 20px rgba(255,200,60,.7); }
.gd__target.is-done::after {
  content: "✓"; position: absolute; right: -6px; bottom: -6px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green); color: var(--paper); font: 900 12px/1 var(--body);
}
.gd__goalN { font: 900 22px/1 var(--display); color: var(--orange); min-width: 2.4em; text-align: right; }
.gd__row { display: flex; flex-direction: column; gap: 8px; }
.gd__rowHead { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.gd__count { color: var(--paper); font-variant-numeric: tabular-nums; }
.gd__bar { height: 6px; border-radius: 6px; background: var(--ink-3); overflow: hidden; }
.gd__bar i { display: block; height: 100%; background: var(--orange); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.gd__strip { display: grid; grid-template-columns: repeat(8, minmax(0, 40px)); gap: 5px; }
.gd__strip li { width: auto; border-radius: 10px; }
.gd__status { min-height: 2.6em; }
.gd__status.is-win { font: 900 clamp(22px, 2.4vw, 30px)/1.15 var(--display); color: var(--orange); }

@media (max-width: 600px) {
  .gd__strip { gap: 4px; }
  .gd__strip li { border-radius: 8px; }
  .board--gd { gap: 4px; padding: 7px; }
  .board--gd .cell { border-radius: 8px; }
  .gd__goal { padding: 12px; }
  .gd__goalText { font-size: 14px; }
  .gd__target { width: 40px; }
}

/* very narrow phones: let the board use the side gutters so cells stay at least 44px */
@media (max-width: 360px) {
  .board--gd { margin-inline: calc(var(--gutter) * -0.5); }
}
