:root {
  --bg: #1a1a2e;
  --surface: #16213e;
  --panel: #0f3460;
  --accent: #e94560;
  --accent2: #f5a623;
  --accent3: #4cff91;
  --text: #eaeaea;
  --text-dim: #8892a4;
  --ts: 42px;       /* tile size */
  --tg: 3px;        /* tile gap */
  --tr: 8px;        /* tile radius */
  --bottom-bar-h: 56px;
  --glow: 0 0 12px rgba(233,69,96,0.7);
}

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

body {
  background: var(--bg); color: var(--text);
  font-family: 'Nunito', sans-serif;
  min-height: var(--cvh100, 100vh); display: flex; flex-direction: column;
  align-items: center; overflow-x: hidden; overflow-y: auto;
}

/* ── SCREENS ── */
.screen { display: none; flex-direction: column; align-items: center; width: 100%; flex: 1; }
.screen.active { display: flex; }

/* ── SPLASH SCREEN ── */
#screen-splash {
  justify-content: center; align-items: center;
  background: var(--bg); min-height: var(--cvh100, 100vh);
  position: relative; overflow: hidden;
}
#splash-container {
  position: relative; width: 400px; height: 400px;
}
#splash-svg {
  width: 100%; height: 100%;
  opacity: 0;
  animation: splashFadeIn 4s ease forwards;
}
.splash-text {
  font-family: 'Boogaloo', cursive;
  font-size: 34px;
  letter-spacing: 4px;
}
#splash-fireworks {
  position: absolute; inset: 0;
  pointer-events: none;
}
/* Individual firework spark */
.spark {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  pointer-events: none;
  animation: sparkFly var(--dur) ease-out forwards;
}
@keyframes splashFadeIn {
  0%   { opacity: 0;    filter: brightness(0.2); }
  30%  { opacity: 0.4;  filter: brightness(0.5); }
  60%  { opacity: 0.85; filter: brightness(1);   }
  80%  { opacity: 1;    filter: brightness(1.3) drop-shadow(0 0 12px #f5a623); }
  100% { opacity: 1;    filter: brightness(1.4) drop-shadow(0 0 18px #f5a623); }
}
@keyframes sparkFly {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}
@keyframes splashExit {
  from { opacity: 1; }
  to   { opacity: 0; }
}
#screen-splash.exiting { animation: splashExit 0.8s ease forwards; }

/* ── NAME SCREEN ADDITIONS ── */
#name-new-section { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
#name-returning-section { width: 100%; display: flex; justify-content: center; }

/* ── WELCOME OVERLAY ── */
#welcome-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,10,20,0.88); z-index: 402;
  align-items: center; justify-content: center; padding: 24px;
}
#welcome-overlay.active { display: flex; animation: fadeIn 0.5s ease; }

/* ── CONFIRM REPLACE OVERLAY ── */
#confirm-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,10,20,0.88); z-index: 403;
  align-items: center; justify-content: center; padding: 24px;
}
#confirm-overlay.active { display: flex; animation: fadeIn 0.3s ease; }

/* ── NAME SCREEN ── */
#screen-name {
  justify-content: center;
  padding: 40px 32px calc(var(--bottom-bar-h) + 24px);
  gap: 24px; min-height: var(--cvh100, 100vh);
}
.name-title {
  font-family: 'Boogaloo', cursive; font-size: 2.8rem; color: var(--accent);
  letter-spacing: 2px; text-align: center; line-height: 1.1;
}
.name-subtitle { color: var(--text-dim); font-size: 0.95rem; text-align: center; }
.name-input {
  width: 100%; max-width: 280px; background: var(--surface);
  border: 2px solid var(--panel); border-radius: 12px; color: var(--text);
  font-family: 'Nunito', sans-serif; font-size: 1.2rem;
  padding: 12px 16px; text-align: center; outline: none; transition: border-color 0.2s;
}
.name-input:focus { border-color: var(--accent); }
.name-input::placeholder { color: var(--text-dim); }

.btn-primary {
  background: var(--accent); color: #fff;
  font-family: 'Boogaloo', cursive; font-size: 1.3rem; letter-spacing: 1px;
  border: none; border-radius: 12px; padding: 12px 40px;
  cursor: pointer; transition: background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:active { transform: scale(0.96); }
.btn-primary:hover  { background: #c73652; }

.btn-secondary {
  background: var(--panel); color: var(--text);
  font-family: 'Boogaloo', cursive; font-size: 1.1rem; letter-spacing: 1px;
  border: 1px solid var(--text-dim); border-radius: 12px; padding: 10px 28px;
  cursor: pointer; transition: background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.btn-secondary:active { transform: scale(0.96); }
.btn-secondary:hover  { background: #1a3a6e; }

/* ── Y8 login button (name screen guest view) ── */
.btn-y8-login {
  background: transparent; color: var(--text-dim);
  font-family: 'Nunito', sans-serif; font-size: 0.9rem;
  border: 1px solid var(--text-dim); border-radius: 10px; padding: 8px 20px;
  cursor: pointer; transition: color 0.2s, border-color 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent; margin-top: 6px;
}
.btn-y8-login:active { transform: scale(0.96); }
.btn-y8-login:hover  { color: var(--text); border-color: var(--text); }

/* ── Y8 "Not you? Log out" link-style button ── */
.btn-link {
  background: none; border: none; color: var(--text-dim);
  font-family: 'Nunito', sans-serif; font-size: 0.82rem;
  cursor: pointer; text-decoration: underline; padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}
.btn-link:hover { color: var(--text); }

/* ── Y8 section on name screen ── */
#name-y8-section {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}

/* ── LEVEL SELECT ── */
#screen-levels { padding-bottom: calc(var(--bottom-bar-h) + 12px); }
.levels-header {
  width: 100%; background: var(--surface); border-bottom: 2px solid var(--panel);
  padding: 14px 20px 10px; display: flex; align-items: center; justify-content: space-between;
}
.levels-title { font-family: 'Boogaloo', cursive; font-size: 1.6rem; color: var(--accent); letter-spacing: 1px; }
.player-greeting { color: var(--text-dim); font-size: 0.85rem; }
.levels-body { width: 100%; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }

.level-btn {
  width: 100%; background: var(--surface); border: 2px solid var(--panel);
  border-radius: 14px; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.level-btn:active { transform: scale(0.98); }
.level-btn:hover  { border-color: var(--accent2); background: #1c2a50; }
.level-btn.completed { border-color: var(--accent3); }
.level-btn-left  { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.level-btn-num   { font-family: 'Boogaloo', cursive; font-size: 1.3rem; color: var(--accent2); letter-spacing: 1px; }
.level-btn-desc  { font-size: 0.78rem; color: var(--text-dim); }
.level-btn-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.level-best-row  { display: flex; gap: 10px; align-items: center; }
.level-best       { font-family: 'Boogaloo', cursive; font-size: 0.9rem; color: var(--accent3); }
.level-best-turns { font-family: 'Boogaloo', cursive; font-size: 0.9rem; color: var(--accent2); }
.level-badge-locked { font-size: 0.7rem; background: var(--panel); color: var(--text-dim); padding: 2px 8px; border-radius: 10px; }

/* ── GAME SCREEN ── */
#screen-game { flex-direction: column; padding-bottom: calc(var(--bottom-bar-h) + 12px); }
#header {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 6px; background: var(--surface);
  border-bottom: 2px solid var(--panel); flex-shrink: 0;
}
#game-title { font-family: 'Boogaloo', cursive; font-size: 1.6rem; color: var(--accent); letter-spacing: 1px; line-height: 1; }
#level-badge {
  background: var(--panel); color: var(--accent2);
  font-family: 'Boogaloo', cursive; font-size: 1rem;
  padding: 4px 12px; border-radius: 20px; border: 1px solid var(--accent2); letter-spacing: 1px;
}
#game-area {
  flex: 1; width: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 12px 8px; gap: 14px;
}

/* ── RECTANGLE (position:relative container for absolute tiles) ── */
.rectangle {
  position: relative;
  /* width = 7 tiles + 6 gaps + 2*padding */
  width:  calc(7 * var(--ts) + 6 * var(--tg) + 12px);
  /* height = 4 tiles + 3 gaps + 2*padding */
  height: calc(4 * var(--ts) + 3 * var(--tg) + 12px);
  background: var(--surface); border: 2px solid var(--panel);
  border-radius: 14px; padding: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  overflow: visible;
}

/* ── DISPLAY BOX (absolutely positioned in center) ── */
.display-box {
  position: absolute;
  left:   calc(var(--ts) + var(--tg) + 6px);
  top:    calc(var(--ts) + var(--tg) + 6px);
  width:  calc(5 * var(--ts) + 4 * var(--tg));
  height: calc(2 * var(--ts) + var(--tg));
  background: var(--panel); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  overflow: hidden; z-index: 1;
}
.display-fruit { font-size: 3.2rem; animation: popIn 0.25s cubic-bezier(0.34,1.56,0.64,1); filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }
.display-box.active   { border-color: var(--accent); box-shadow: inset 0 2px 8px rgba(0,0,0,0.4), 0 0 16px rgba(233,69,96,0.4); }
.display-box.match    { border-color: var(--accent3); box-shadow: inset 0 2px 8px rgba(0,0,0,0.4), 0 0 24px rgba(76,255,145,0.5); background: rgba(76,255,145,0.08); }
.display-box.mismatch { border-color: var(--accent); box-shadow: inset 0 2px 8px rgba(0,0,0,0.4), 0 0 24px rgba(233,69,96,0.5); }

/* ── TILES (absolutely positioned, move via left/top transitions) ── */
.tile {
  position: absolute;
  width: var(--ts); height: var(--ts);
  border-radius: var(--tr); cursor: pointer;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.08);
  user-select: none; -webkit-tap-highlight-color: transparent;
  -webkit-user-drag: none; user-drag: none;
  /* transition set dynamically per level */
  will-change: left, top;
  z-index: 2;
}
.tile.selected {
  border-color: var(--accent);
  box-shadow: var(--glow);
  z-index: 20;
  /* scale via filter so it doesn't affect layout position */
  filter: drop-shadow(0 0 6px rgba(233,69,96,0.9));
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.tile.gone { opacity: 0; pointer-events: none; transition: opacity 0.35s ease !important; }
.tile-stripe { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }

/* ── BOTTOM BAR ── */
#bottom-bar {
  width: 100%; height: var(--bottom-bar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; background: var(--surface);
  border-top: 2px solid var(--panel);
  position: fixed; bottom: 0; left: 0; z-index: 100;
  transition: height 0.2s;
}
#bottom-bar.double-line { height: 76px; }
#bottom-center { display: flex; flex-direction: column; align-items: center; gap: 2px; }
#timer-display { font-family: 'Boogaloo', cursive; font-size: 1.5rem; color: var(--accent2); letter-spacing: 2px; min-width: 80px; }
#turn-display  { font-family: 'Boogaloo', cursive; font-size: 1rem; color: var(--text-dim); letter-spacing: 1px; }
#matches-remaining { font-family: 'Boogaloo', cursive; font-size: 1rem; color: var(--accent3); letter-spacing: 1px; }
#matches-remaining span { color: var(--accent2); }
#bottom-right { display: flex; align-items: center; gap: 8px; }
#pause-btn {
  background: var(--panel); border: 1px solid var(--text-dim); color: var(--text);
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; transition: background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
#pause-btn:hover { background: var(--accent2); border-color: var(--accent2); }
#settings-btn {
  background: var(--panel); border: 1px solid var(--text-dim); color: var(--text);
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem; transition: background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
#settings-btn:hover { background: var(--accent); border-color: var(--accent); }

/* ── STATUS ── */
#status-msg { font-family: 'Boogaloo', cursive; font-size: 1rem; color: var(--text-dim); letter-spacing: 1px; min-height: 1.4rem; text-align: center; }

/* ── PAUSE OVERLAY ── */
#pause-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,10,20,0.88); z-index: 190;
  align-items: center; justify-content: center; padding: 24px;
}
#pause-overlay.active { display: flex; animation: fadeIn 0.3s ease; }
.pause-card {
  background: var(--surface); border: 2px solid var(--accent2);
  border-radius: 20px; padding: 36px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  box-shadow: 0 0 40px rgba(245,166,35,0.2);
}
.pause-title {
  font-family: 'Boogaloo', cursive; font-size: 2.2rem;
  color: var(--accent2); letter-spacing: 2px;
}

/* ── LEVEL COMPLETE OVERLAY ── */
#overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,10,20,0.88); z-index: 200;
  align-items: center; justify-content: center; padding: 24px;
}
#overlay.active { display: flex; }
.overlay-card {
  background: var(--surface); border: 2px solid var(--accent3);
  border-radius: 20px; padding: 28px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 100%; max-width: 340px; box-shadow: 0 0 40px rgba(76,255,145,0.2);
}
.overlay-emoji { font-size: 2.8rem; }
.overlay-title { font-family: 'Boogaloo', cursive; font-size: 1.8rem; color: var(--accent3); letter-spacing: 1px; text-align: center; }
.overlay-stats { display: flex; gap: 20px; align-items: center; justify-content: center; width: 100%; }
.overlay-stat  { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; background: var(--panel); border-radius: 12px; padding: 10px 8px; }
.overlay-stat-label { font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase; }
.overlay-stat-value { font-family: 'Boogaloo', cursive; font-size: 1.8rem; color: var(--accent2); letter-spacing: 2px; }
.overlay-stat-value.green { color: var(--accent3); }
.overlay-records { font-size: 0.82rem; color: var(--text-dim); text-align: center; line-height: 1.6; }
.overlay-records span { color: var(--accent3); font-weight: 700; }
.overlay-btns { display: flex; gap: 12px; width: 100%; margin-top: 4px; }
.overlay-btns .btn-primary,
.overlay-btns .btn-secondary { flex: 1; text-align: center; padding: 12px 8px; font-size: 1rem; }

/* ── SETTINGS PANEL ── */
#settings-panel {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 480px;
  background: var(--surface); border: 2px solid var(--panel); border-bottom: none;
  border-radius: 20px 20px 0 0; z-index: 150;
  padding: 16px 24px calc(var(--bottom-bar-h) + 24px);
  transition: transform 0.35s cubic-bezier(0.32,0.72,0,1);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
  max-height: calc(var(--cvh, 1vh) * 85); overflow-y: auto;
}
#settings-panel.open { transform: translateX(-50%) translateY(0); }
#settings-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 149; }
#settings-overlay.active { display: block; }

.settings-handle { width: 40px; height: 4px; background: var(--text-dim); border-radius: 2px; margin: 0 auto 14px; opacity: 0.5; }
.settings-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.settings-title  { font-family: 'Boogaloo', cursive; font-size: 1.3rem; color: var(--text); letter-spacing: 1px; }
.settings-close-btn {
  background: var(--panel); border: 1px solid var(--text-dim); color: var(--text);
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.9rem; line-height: 1;
  transition: background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent; flex-shrink: 0;
}
.settings-close-btn:hover { background: var(--accent); border-color: var(--accent); }
.settings-row    { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.settings-label  { font-size: 0.95rem; color: var(--text); }

.toggle { position: relative; width: 48px; height: 26px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--panel); border-radius: 13px; cursor: pointer; transition: background 0.2s; }
.toggle-slider:before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: var(--text-dim); border-radius: 50%; transition: transform 0.2s, background 0.2s; }
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider:before { transform: translateX(22px); background: #fff; }

.theme-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.theme-chip {
  background: #2d6fc4; border: 2px solid transparent;
  border-radius: 20px; padding: 5px 14px;
  font-family: 'Boogaloo', cursive; font-size: 0.9rem; color: var(--text);
  cursor: pointer; transition: border-color 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.theme-chip.active { border-color: var(--accent2); color: var(--accent2); }

.settings-name-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.settings-name-input {
  flex: 1; background: var(--panel); border: 1px solid var(--text-dim);
  border-radius: 8px; color: var(--text); font-family: 'Nunito', sans-serif;
  font-size: 0.95rem; padding: 7px 10px; outline: none;
}
.settings-name-input:focus { border-color: var(--accent); }
.btn-small {
  background: var(--accent); color: #fff; font-family: 'Boogaloo', cursive;
  font-size: 0.9rem; border: none; border-radius: 8px; padding: 7px 14px;
  cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}

.btn-view {
  background: #2d6fc4; color: var(--text); font-family: 'Boogaloo', cursive;
  font-size: 0.9rem; border: 1px solid var(--text-dim); border-radius: 8px; padding: 7px 14px;
  cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  text-decoration: none; display: inline-block;
}

.stats-section-title { font-family: 'Boogaloo', cursive; font-size: 1.05rem; color: var(--accent2); letter-spacing: 1px; margin: 14px 0 8px; }
.stats-grid  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat-cell   { background: #2d6fc4; border-radius: 10px; padding: 12px 6px; text-align: center; }
.stat-cell-level { font-family: 'Boogaloo', cursive; font-size: 0.9rem; color: var(--text); margin-bottom: 6px; }
.stat-cell-rows  { display: flex; flex-direction: column; gap: 4px; }
.stat-row  { display: flex; align-items: center; justify-content: center; gap: 4px; }
.stat-icon { font-size: 1.2rem; }
.stat-val  { font-family: 'Boogaloo', cursive; font-size: 1.1rem; }
.stat-val.time   { color: var(--accent3); }
.stat-val.turns  { color: var(--accent2); }
.stat-val.locked { color: var(--text); font-size: 1rem; }

/* Theme picker disabled state for levels 9-12 */
.theme-picker.disabled { opacity: 0.4; pointer-events: none; }
.theme-disabled-note { font-size: 0.78rem; color: var(--text-dim); margin-top: 4px; font-style: italic; }

.btn-level-select {
  width: 100%; margin-top: 14px; background: transparent;
  border: 1px solid var(--text-dim); color: var(--text-dim);
  font-family: 'Boogaloo', cursive; font-size: 1rem; border-radius: 10px; padding: 10px;
  cursor: pointer; letter-spacing: 0.5px; transition: border-color 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-level-select:hover { border-color: var(--accent2); color: var(--accent2); }

/* ── INSTRUCTIONS OVERLAY ── */
#instructions-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,10,20,0.82); z-index: 401;
  align-items: center; justify-content: center; padding: 24px;
}
#instructions-overlay.active { display: flex; animation: fadeIn 0.5s ease; }
#instructions-overlay.fading { animation: fadeOut 0.6s ease forwards; }

#instructions-overlay-2 {
  display: none; position: fixed; inset: 0;
  background: rgba(10,10,20,0.82); z-index: 400;
  align-items: center; justify-content: center; padding: 24px;
}
#instructions-overlay-2.active { display: flex; animation: fadeIn 0.5s ease; }
#instructions-overlay-2.fading { animation: fadeOut 0.6s ease forwards; }

.instr-card {
  background: var(--surface); border: 2px solid var(--accent2);
  border-radius: 20px; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 14px;
  width: 100%; max-width: 360px; box-shadow: 0 0 40px rgba(245,166,35,0.2);
}
.instr-title { font-family: 'Boogaloo', cursive; font-size: 1.6rem; color: var(--accent2); letter-spacing: 1px; text-align: center; }
.instr-body  { font-size: 0.95rem; color: var(--text); line-height: 1.65; }
.instr-body p { margin-bottom: 8px; }
.instr-body p:last-child { margin-bottom: 0; }
.instr-highlight { color: var(--accent2); font-weight: 700; }
.instr-dismiss   { font-family: 'Boogaloo', cursive; font-size: 0.85rem; color: var(--text-dim); text-align: center; letter-spacing: 0.5px; }

/* ── ANIMATIONS ── */
@keyframes popIn   { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes matchPop {
  0%   { transform: scale(1.15); opacity: 1; }
  60%  { transform: scale(1.3);  opacity: 0.5; }
  100% { transform: scale(0);    opacity: 0; }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-4px); } 40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); } 80% { transform: translateX(3px); }
}
.shake-anim { animation: shake 0.35s ease; }
