/* ═══════════════════════════════════════════════════
   PvZ3 — game.css
   Battle screen: HUD, plant tray, arena, grid,
   demons, projectiles, effects, lawnmowers
═══════════════════════════════════════════════════ */
@import url('plantsanimation/sunflower.css');
@import url('plantsanimation/peashooter.css');
@import url('plantsanimation/bonkchoy.css');
@import url('plantsanimation/icepea.css');
@import url('plantsanimation/sporepuff.css');
@import url('plantsanimation/lilybeam.css');
@import url('plantsanimation/voltlotus.css');
@import url('plantsanimation/glaciespore.css');
@import url('plantsanimation/demon.css');
@import url('plantsanimation/emberdoze.css');
@import url('plantsanimation/mushpuff.css');
@import url('plantsanimation/lavaburst.css');
@import url('plantsanimation/cosmbloom.css');
@import url('plantsanimation/glacierbud.css');
@import url('game_grid_enhanced.css');
@import url('gameeffects.css');


/* ─── Battle HUD ─────────────────────────────────── */
.battle-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  padding: 0 8px;
  background: rgba(0,0,0,0.80);
  border-bottom: 1px solid rgba(168,85,247,0.25);
  flex-shrink: 0;
  gap: 6px;
  z-index: 30;
  box-sizing: border-box;
  /* no position:absolute — it's a flex row child now */
}
.hud-left  { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.hud-right { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.sun-display {
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.5);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
}
.hud-level-info {
  font-size: 9px;
  color: rgba(168,85,247,0.7);
  letter-spacing: 1px;
}
.wave-display {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--white);
  line-height: 1;
}
.progress-bar {
  width: 100%;
  max-width: 110px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--red));
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s ease;
}
.btn-pause {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 12px;
  border-radius: 6px;
  padding: 2px 7px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  height: 22px;
}

/* ─── Plant Tray — vertical left strip ──────────── */
.plant-tray {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 3px 2px;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(0,0,0,0.7);
  border-right: 1px solid rgba(34,197,94,0.15);
  flex-shrink: 0;
  z-index: 25;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
.plant-tray::-webkit-scrollbar { display: none; }
#pause-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pause-box {
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0px, transparent 4px,
      rgba(0,0,0,0.025) 4px, rgba(0,0,0,0.025) 5px
    ),
    linear-gradient(160deg, #7a4e10 0%, #5a3408 50%, #7a4e10 100%);
  border: 3px solid #c8941a;
  border-bottom: 4px solid #4a2808;
  border-radius: 16px;
  padding: 24px 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow:
    0 8px 0 #3a1e08,
    0 10px 30px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,210,100,0.2);
  min-width: 200px;
}
.pause-box h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: #fef3c7;
  letter-spacing: 3px;
  text-shadow:
    -1px -1px 0 #3a5a10,  1px -1px 0 #3a5a10,
    -1px  1px 0 #3a5a10,  1px  1px 0 #3a5a10,
    0 3px 8px rgba(0,0,0,0.7);
  margin: 0;
}
.pause-box button {
  width: 100%;
  padding: 10px 24px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 1px;
  transition: transform 0.1s, box-shadow 0.1s;
}
.pause-box button:active { transform: translateY(2px); }
#btn-resume {
  background: linear-gradient(180deg, #22863a 0%, #166028 100%);
  border: 2px solid #4ade80;
  border-bottom: 3px solid #0d4020;
  color: #f0fff0;
  box-shadow: 0 4px 0 #0a2e18, 0 0 14px rgba(74,222,128,0.3);
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
#btn-quit-battle {
  background: linear-gradient(180deg, #7a4e10 0%, #5a3408 100%);
  border: 2px solid #c8941a;
  border-bottom: 3px solid #3e2405;
  color: #fef3c7;
  box-shadow: 0 4px 0 #2a1608;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.tray-card {
  flex-shrink: 0;
  width: 56px;
  height: 48px;
  max-height: 48px;
  background: linear-gradient(135deg, #1a0040, #0d0020);
  border: 1.5px solid var(--purple);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 3px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}
.tray-card img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  pointer-events: none;
  display: block;
}
.tray-card .tray-cost {
  font-size: 9px;
  font-weight: 800;
  position: absolute;
  bottom: 0;
  background: rgba(0,0,0,0.85);
  width: 100%;
  text-align: center;
  color: var(--gold);
  line-height: 1.3;
}
.tray-card.selected {
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(34,197,94,0.6);
  transform: scale(1.04);
}
.tray-card.cooldown { cursor: not-allowed; }
.tray-card .cooldown-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--white);
  border-radius: 7px;
}
.tray-card.no-sun { opacity: 0.5; cursor: not-allowed; }

/* ─── Battle Arena ───────────────────────────────── */
.battle-arena {
  position: absolute;
  height: 90%;
  inset: 0;
  overflow: hidden;
}
.arena-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ─── Grid Layout ────────────────────────────────── */
.grid-container {
  position: absolute;
  left: 28px;   /* lawnmower width */
  top: 0; bottom: 0; right: 0;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  z-index: 5;
}
.grid-row {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  position: relative;
  border-bottom: 1px solid rgba(0,0,0,0.18);
}
.grid-row:last-child { border-bottom: none; }

/* Base cell */
.grid-cell {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: filter 0.12s, box-shadow 0.12s;
}
.grid-cell.occupied { cursor: default; }
.grid-cell.occupied:hover { filter: none; }

/* ═══════════════════════════════════════════════════
   WORLD 1 — Nature Valley
   Rich garden turf with depth, soil, grass blades
═══════════════════════════════════════════════════ */

/* Arena background — sky + distant garden */
.arena-bg.world-1 {
  background:
    linear-gradient(180deg,
      #a8d8ea 0%,
      #87ceeb 25%,
      #b8e0a0 55%,
      #6aaa3a 70%,
      #3d7a1a 100%);
}

/* ── Lane rows: alternating light/dark turf strips ── */
.arena-bg.world-1 ~ .grid-container .grid-row:nth-child(odd) {
  background: linear-gradient(180deg,
    #5aaa28 0%,
    #4a9020 35%,
    #3a7818 65%,
    #2e6010 100%);
  box-shadow:
    inset 0 -3px 6px rgba(0,0,0,0.25),
    inset 0 2px 4px rgba(150,255,80,0.12);
}
.arena-bg.world-1 ~ .grid-container .grid-row:nth-child(even) {
  background: linear-gradient(180deg,
    #3e8818 0%,
    #326e12 35%,
    #26560e 65%,
    #1c4008 100%);
  box-shadow:
    inset 0 -3px 6px rgba(0,0,0,0.3),
    inset 0 1px 3px rgba(0,0,0,0.2);
}

/* ── Row border = visible lane divider with soil edge ── */
.arena-bg.world-1 ~ .grid-container .grid-row {
  border-bottom: 3px solid #1a3a08;
  position: relative;
}
.arena-bg.world-1 ~ .grid-container .grid-row:last-child {
  border-bottom: none;
}

/* Soil strip at bottom of each lane (the planting row) */
.arena-bg.world-1 ~ .grid-container .grid-row::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    #3d1f05 0%,
    #6b3a10 20%,
    #8b5018 40%,
    #6b3a10 60%,
    #4a2a08 80%,
    #3d1f05 100%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

/* ── Cell base: vertical grass blade texture ── */
.arena-bg.world-1 ~ .grid-container .grid-cell {
  border-right: 1px solid rgba(0,0,0,0.15);
  border-left: none; border-top: none; border-bottom: none;
  background:
    /* grass blade streaks */
    repeating-linear-gradient(
      175deg,
      transparent 0px,
      transparent 4px,
      rgba(80,200,30,0.07) 4px,
      rgba(80,200,30,0.07) 5px
    ),
    repeating-linear-gradient(
      185deg,
      transparent 0px,
      transparent 6px,
      rgba(0,0,0,0.05) 6px,
      rgba(0,0,0,0.05) 7px
    );
}

/* ── Perspective depth: darker bottom corners ── */
.arena-bg.world-1 ~ .grid-container .grid-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* top grass highlight — lit by sun */
    linear-gradient(180deg,
      rgba(180,255,100,0.12) 0%,
      transparent 30%,
      transparent 70%,
      rgba(0,0,0,0.18) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ── Soil patches on alternating cells for realism ── */
.arena-bg.world-1 ~ .grid-container .grid-cell:nth-child(odd)::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%;
  height: 30%;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%,
      rgba(70,35,8,0.28) 0%,
      transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* ── Left edge of each cell: subtle vertical shadow ── */
.arena-bg.world-1 ~ .grid-container .grid-cell:first-child {
  border-left: 1px solid rgba(0,0,0,0.1);
}

/* ── Hover: sun highlight glow ── */
.arena-bg.world-1 ~ .grid-container .grid-cell:not(.occupied):hover {
  background-color: rgba(150,255,80,0.18) !important;
  box-shadow:
    inset 0 0 0 2px rgba(120,230,50,0.6),
    inset 0 0 14px rgba(120,230,50,0.2);
  filter: brightness(1.2) saturate(1.3);
  transition: all 0.1s;
  z-index: 2;
}

/* ── Odd row cells slightly lighter (sun-facing) ── */
.arena-bg.world-1 ~ .grid-container .grid-row:nth-child(odd) .grid-cell {
  filter: brightness(1.08);
}
.arena-bg.world-1 ~ .grid-container .grid-row:nth-child(even) .grid-cell {
  filter: brightness(0.94);
}

/* ── Lawnmower column: soil strip on far left ── */
.arena-bg.world-1 ~ .lawnmowers-layer {
  background: linear-gradient(90deg,
    #2e1204 0%,
    #5a2e0a 40%,
    #3e1e06 100%);
  border-right: 2px solid #1a0c02;
}

/* ── Depth shadow at bottom of entire grid ── */
.arena-bg.world-1 ~ .grid-container {
  box-shadow:
    inset 0 -8px 20px rgba(0,0,0,0.4),
    inset 0 0 40px rgba(0,0,0,0.15);
}

/* ═══════════════════════════════════════════════════
   WORLD 2 — Sandstorm Dunes
   Sandy desert tiles with heat shimmer
═══════════════════════════════════════════════════ */
.arena-bg.world-2 {
  background: linear-gradient(180deg, #3d2200 0%, #1e1000 60%, #0e0800 100%);
}
.arena-bg.world-2 ~ .grid-container .grid-row:nth-child(odd) {
  background: linear-gradient(180deg, #b87a20 0%, #8c5a10 100%);
}
.arena-bg.world-2 ~ .grid-container .grid-row:nth-child(even) {
  background: linear-gradient(180deg, #8c5a10 0%, #6a4008 100%);
}
.arena-bg.world-2 ~ .grid-container .grid-cell {
  border: 1px solid rgba(180,120,30,0.30);
  background:
    repeating-linear-gradient(
      45deg,
      transparent, transparent 5px,
      rgba(255,200,80,0.06) 5px, rgba(255,200,80,0.06) 6px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent, transparent 8px,
      rgba(200,140,40,0.05) 8px, rgba(200,140,40,0.05) 9px
    );
}
/* Sand ripple on top */
.arena-bg.world-2 ~ .grid-container .grid-cell::before {
  content: '';
  position: absolute;
  top: 20%; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,220,120,0.50), transparent);
  pointer-events: none; z-index: 1;
}
/* Heat shimmer slide */
.arena-bg.world-2 ~ .grid-container .grid-cell::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,200,80,0.14), transparent);
  animation: sandShimmer 3.5s linear infinite;
  pointer-events: none; z-index: 1;
}
@keyframes sandShimmer {
  from { left: -60%; }
  to   { left: 120%; }
}
.arena-bg.world-2 ~ .grid-container .grid-cell:nth-child(2)::after { animation-delay: 0.4s; }
.arena-bg.world-2 ~ .grid-container .grid-cell:nth-child(3)::after { animation-delay: 0.9s; }
.arena-bg.world-2 ~ .grid-container .grid-cell:nth-child(4)::after { animation-delay: 1.4s; }
.arena-bg.world-2 ~ .grid-container .grid-cell:nth-child(5)::after { animation-delay: 1.9s; }
.arena-bg.world-2 ~ .grid-container .grid-cell:nth-child(6)::after { animation-delay: 2.4s; }
.arena-bg.world-2 ~ .grid-container .grid-cell:nth-child(7)::after { animation-delay: 2.9s; }
.arena-bg.world-2 ~ .grid-container .grid-cell:nth-child(8)::after { animation-delay: 0.2s; }
.arena-bg.world-2 ~ .grid-container .grid-cell:nth-child(9)::after { animation-delay: 1.1s; }
.arena-bg.world-2 ~ .grid-container .grid-cell:not(.occupied):hover {
  filter: brightness(1.30) saturate(1.3);
  box-shadow: inset 0 0 14px rgba(255,180,40,0.28);
}

/* ═══════════════════════════════════════════════════
   WORLD 3 — Sea Fortress
   Stone cobblestone with inner bevel + rivets
═══════════════════════════════════════════════════ */
.arena-bg.world-3 {
  background: linear-gradient(180deg, #0a1520 0%, #060e16 60%, #030810 100%);
}
.arena-bg.world-3 ~ .grid-container .grid-row:nth-child(odd) {
  background: linear-gradient(180deg, #2a4060 0%, #1c2e48 100%);
}
.arena-bg.world-3 ~ .grid-container .grid-row:nth-child(even) {
  background: linear-gradient(180deg, #1c2e48 0%, #101e30 100%);
}
.arena-bg.world-3 ~ .grid-container .grid-cell {
  border: 2px solid #0a1520;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.12),
              inset -1px -1px 0 rgba(0,0,0,0.45);
  background:
    repeating-linear-gradient(
      0deg, rgba(0,0,0,0.07) 0px, rgba(0,0,0,0.07) 1px,
      transparent 1px, transparent 6px
    ),
    repeating-linear-gradient(
      90deg, rgba(0,0,0,0.05) 0px, rgba(0,0,0,0.05) 1px,
      transparent 1px, transparent 6px
    );
}
/* Bevel shine top */
.arena-bg.world-3 ~ .grid-container .grid-cell::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, rgba(100,160,220,0.25) 0%, transparent 100%);
  pointer-events: none; z-index: 1;
}
/* Barnacle/rivet every 4th cell */
.arena-bg.world-3 ~ .grid-container .grid-cell:nth-child(4n)::after {
  content: '';
  position: absolute;
  width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle, #5080a0 0%, #203050 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,0.7);
  top: 4px; right: 4px;
  pointer-events: none; z-index: 1;
}
.arena-bg.world-3 ~ .grid-container .grid-cell:not(.occupied):hover {
  filter: brightness(1.35);
  box-shadow: inset 0 0 12px rgba(80,160,255,0.20),
              inset 1px 1px 0 rgba(255,255,255,0.12),
              inset -1px -1px 0 rgba(0,0,0,0.45);
}

/* ═══════════════════════════════════════════════════
   WORLD 4 — Lava Pits
   Charred black ground with glowing lava cracks
═══════════════════════════════════════════════════ */
.arena-bg.world-4 {
  background: linear-gradient(180deg, #0f000f 0%, #080008 60%, #030003 100%);
}
.arena-bg.world-4 ~ .grid-container .grid-row:nth-child(odd) {
  background: linear-gradient(180deg, #1e0800 0%, #120400 100%);
}
.arena-bg.world-4 ~ .grid-container .grid-row:nth-child(even) {
  background: linear-gradient(180deg, #120400 0%, #080200 100%);
}
.arena-bg.world-4 ~ .grid-container .grid-cell {
  border: 1px solid rgba(180,60,0,0.25);
  background:
    radial-gradient(ellipse 80% 55% at 50% 100%, rgba(200,80,0,0.18) 0%, transparent 100%),
    repeating-linear-gradient(
      45deg,
      rgba(0,0,0,0.15) 0px, rgba(0,0,0,0.15) 2px,
      transparent 2px, transparent 8px
    );
}
/* Glowing lava crack on bottom */
.arena-bg.world-4 ~ .grid-container .grid-cell::before {
  content: '';
  position: absolute;
  bottom: 0; left: 15%; right: 15%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,100,0,0.80), transparent);
  animation: lavaCrack 2.5s ease-in-out infinite;
  pointer-events: none; z-index: 1;
}
@keyframes lavaCrack {
  0%,100% { opacity: 0.4; box-shadow: none; }
  50%      { opacity: 1.0; box-shadow: 0 0 8px rgba(255,80,0,0.90); }
}
/* Ember glow from below */
.arena-bg.world-4 ~ .grid-container .grid-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 110%, rgba(255,60,0,0.12) 0%, transparent 65%);
  animation: emberGlow 3s ease-in-out infinite;
  pointer-events: none; z-index: 1;
}
@keyframes emberGlow {
  0%,100% { opacity: 0.5; }
  50%      { opacity: 1.0; }
}
.arena-bg.world-4 ~ .grid-container .grid-cell:nth-child(even)::before { animation-delay: 1.25s; }
.arena-bg.world-4 ~ .grid-container .grid-cell:nth-child(3n)::after   { animation-delay: 0.8s; }
.arena-bg.world-4 ~ .grid-container .grid-cell:not(.occupied):hover {
  filter: brightness(1.5) saturate(2);
  box-shadow: inset 0 0 16px rgba(255,80,0,0.35);
}

/* ═══════════════════════════════════════════════════
   WORLD 5 — Cyber Neon
   Dark circuit board with glowing cyan grid traces
═══════════════════════════════════════════════════ */
.arena-bg.world-5 ~ .grid-container .grid-row:nth-child(odd) {
  background: linear-gradient(180deg, #001520 0%, #000d14 100%);
}
.arena-bg.world-5 ~ .grid-container .grid-row:nth-child(even) {
  background: linear-gradient(180deg, #000d14 0%, #00080d 100%);
}
.arena-bg.world-5 ~ .grid-container .grid-cell {
  border: 1px solid rgba(0,255,180,0.22);
  box-shadow: inset 0 0 6px rgba(0,255,180,0.05);
  background:
    repeating-linear-gradient(
      0deg, transparent, transparent 5px,
      rgba(0,255,180,0.03) 5px, rgba(0,255,180,0.03) 6px
    ),
    repeating-linear-gradient(
      90deg, transparent, transparent 5px,
      rgba(0,255,180,0.03) 5px, rgba(0,255,180,0.03) 6px
    );
}
/* Glowing bottom trace */
.arena-bg.world-5 ~ .grid-container .grid-cell::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(0,255,180,0.75) 50%, transparent 95%);
  pointer-events: none; z-index: 1;
}
/* Blinking corner node */
.arena-bg.world-5 ~ .grid-container .grid-cell::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(0,255,180,0.80);
  box-shadow: 0 0 5px rgba(0,255,180,1.0);
  animation: neonBlink 2s ease-in-out infinite;
  pointer-events: none; z-index: 1;
}
@keyframes neonBlink {
  0%,100% { opacity: 0.3; }
  50%      { opacity: 1.0; }
}
.arena-bg.world-5 ~ .grid-container .grid-cell:nth-child(even)::after { animation-delay: 1s; }
.arena-bg.world-5 ~ .grid-container .grid-cell:nth-child(3n)::after   { animation-delay: 0.5s; }
.arena-bg.world-5 ~ .grid-container .grid-cell:not(.occupied):hover {
  filter: brightness(1.4);
  box-shadow: inset 0 0 16px rgba(0,255,180,0.30);
}

/* ═══════════════════════════════════════════════════
   WORLD 6 — Jungle Abyss
   Dense dark jungle floor, mossy mud + root veins
═══════════════════════════════════════════════════ */
.arena-bg.world-6 ~ .grid-container .grid-row:nth-child(odd) {
  background: linear-gradient(180deg, #1a3d0a 0%, #0f2605 100%);
}
.arena-bg.world-6 ~ .grid-container .grid-row:nth-child(even) {
  background: linear-gradient(180deg, #142e07 0%, #0a1c03 100%);
}
.arena-bg.world-6 ~ .grid-container .grid-cell {
  border-right: 1px solid rgba(30,80,10,0.45);
  border-bottom: 1px solid rgba(50,20,5,0.35);
  border-top: none; border-left: none;
  background:
    radial-gradient(ellipse 90% 50% at 50% 100%, rgba(60,30,5,0.30) 0%, transparent 100%),
    repeating-linear-gradient(
      15deg, transparent, transparent 9px,
      rgba(0,0,0,0.06) 9px, rgba(0,0,0,0.06) 10px
    );
}
/* Moss highlight on top */
.arena-bg.world-6 ~ .grid-container .grid-cell::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%; height: 3px;
  background: linear-gradient(90deg, transparent, rgba(90,210,40,0.30), transparent);
  pointer-events: none; z-index: 1;
}
/* Root vein diagonal */
.arena-bg.world-6 ~ .grid-container .grid-cell:nth-child(odd)::after {
  content: '';
  position: absolute;
  top: 35%; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(80,40,10,0.50), transparent);
  transform: rotate(-6deg);
  pointer-events: none; z-index: 1;
}
.arena-bg.world-6 ~ .grid-container .grid-cell:not(.occupied):hover {
  filter: brightness(1.45) saturate(1.6);
  box-shadow: inset 0 0 12px rgba(80,220,40,0.20);
}

/* ═══════════════════════════════════════════════════
   WORLD 7 — Ice Age
   Ancient deep-blue glacier with pressure cracks
═══════════════════════════════════════════════════ */
.arena-bg.world-7 ~ .grid-container .grid-row:nth-child(odd) {
  background: linear-gradient(180deg, #c0deff 0%, #88b8e8 100%);
}
.arena-bg.world-7 ~ .grid-container .grid-row:nth-child(even) {
  background: linear-gradient(180deg, #88b8e8 0%, #5090c8 100%);
}
.arena-bg.world-7 ~ .grid-container .grid-cell {
  border: 1px solid rgba(255,255,255,0.38);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.32),
              inset 0 -2px 4px rgba(0,60,120,0.22);
  background:
    repeating-linear-gradient(
      30deg,  transparent, transparent 6px, rgba(255,255,255,0.08) 6px, rgba(255,255,255,0.08) 7px
    ),
    repeating-linear-gradient(
      -30deg, transparent, transparent 6px, rgba(200,230,255,0.05) 6px, rgba(200,230,255,0.05) 7px
    );
}
/* Pressure crack vertical */
.arena-bg.world-7 ~ .grid-container .grid-cell::before {
  content: '';
  position: absolute;
  top: 15%; bottom: 15%; left: 48%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.60), transparent);
  pointer-events: none; z-index: 1;
}
.arena-bg.world-7 ~ .grid-container .grid-cell:nth-child(even)::before {
  left: 28%; transform: rotate(18deg);
}
.arena-bg.world-7 ~ .grid-container .grid-cell:not(.occupied):hover {
  filter: brightness(1.22) saturate(0.7);
  box-shadow: inset 0 0 14px rgba(180,230,255,0.30);
}

/* ═══════════════════════════════════════════════════
   WORLD 8 — Spooky Mansion
   Dark wood floorboards with candlelight amber flicker
═══════════════════════════════════════════════════ */
.arena-bg.world-8 ~ .grid-container .grid-row:nth-child(odd) {
  background: linear-gradient(180deg, #2e1c0a 0%, #1c0e05 100%);
}
.arena-bg.world-8 ~ .grid-container .grid-row:nth-child(even) {
  background: linear-gradient(180deg, #201408 0%, #140a04 100%);
}
.arena-bg.world-8 ~ .grid-container .grid-cell {
  border-right: 2px solid rgba(0,0,0,0.60);
  border-bottom: 1px solid rgba(80,40,10,0.28);
  border-top: 1px solid rgba(120,70,20,0.18);
  border-left: none;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px,
      transparent 1px, transparent 5px
    ),
    linear-gradient(180deg, rgba(100,50,10,0.10) 0%, rgba(40,15,0,0.18) 100%);
}
/* Wood grain line */
.arena-bg.world-8 ~ .grid-container .grid-cell::before {
  content: '';
  position: absolute;
  top: 30%; left: 5%; right: 5%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180,100,30,0.28), transparent);
  pointer-events: none; z-index: 1;
}
/* Candlelight flicker */
.arena-bg.world-8 ~ .grid-container .grid-cell::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,140,20,0.10) 0%, transparent 70%);
  animation: candleFlicker 3.2s ease-in-out infinite;
  pointer-events: none; z-index: 1;
}
@keyframes candleFlicker {
  0%,100% { opacity: 0.45; }
  22%      { opacity: 1.00; }
  48%      { opacity: 0.25; }
  70%      { opacity: 0.85; }
}
.arena-bg.world-8 ~ .grid-container .grid-cell:nth-child(even)::after { animation-delay: 1.3s; }
.arena-bg.world-8 ~ .grid-container .grid-cell:nth-child(3n)::after   { animation-delay: 0.7s; }
.arena-bg.world-8 ~ .grid-container .grid-cell:not(.occupied):hover {
  filter: brightness(1.6) sepia(0.4);
  box-shadow: inset 0 0 14px rgba(255,140,20,0.25);
}

/* ═══════════════════════════════════════════════════
   WORLD 9 — Crystal Caverns
   Deep blue gem floor with random sparkling facets
═══════════════════════════════════════════════════ */
.arena-bg.world-9 ~ .grid-container .grid-row:nth-child(odd) {
  background: linear-gradient(180deg, #0a2040 0%, #051428 100%);
}
.arena-bg.world-9 ~ .grid-container .grid-row:nth-child(even) {
  background: linear-gradient(180deg, #051428 0%, #030c1c 100%);
}
.arena-bg.world-9 ~ .grid-container .grid-cell {
  border: 1px solid rgba(140,200,255,0.20);
  box-shadow: inset 0 0 8px rgba(80,160,255,0.07);
  background:
    repeating-linear-gradient(
      60deg,  transparent, transparent 7px, rgba(120,190,255,0.05) 7px, rgba(120,190,255,0.05) 8px
    ),
    repeating-linear-gradient(
      -60deg, transparent, transparent 7px, rgba(180,230,255,0.04) 7px, rgba(180,230,255,0.04) 8px
    );
}
/* Crystal facet edge */
.arena-bg.world-9 ~ .grid-container .grid-cell::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(200,240,255,0.70) 35%,
    rgba(255,255,255,0.90) 50%,
    rgba(200,240,255,0.70) 65%, transparent 100%
  );
  pointer-events: none; z-index: 1;
}
/* Twinkle spark — staggered per column */
.arena-bg.world-9 ~ .grid-container .grid-cell::after {
  content: '';
  position: absolute;
  width: 4px; height: 4px; border-radius: 50%;
  background: white;
  box-shadow: 0 0 6px 2px rgba(180,230,255,0.90);
  top: 20%; left: 25%;
  animation: crystalSpark 2.8s ease-in-out infinite;
  pointer-events: none; z-index: 2;
}
@keyframes crystalSpark {
  0%,78%,100% { opacity: 0; transform: scale(0); }
  83%         { opacity: 1; transform: scale(1.3); }
  93%         { opacity: 0.5; transform: scale(0.7); }
}
.arena-bg.world-9 ~ .grid-container .grid-cell:nth-child(2)::after  { animation-delay: 0.5s; top: 65%; left: 70%; }
.arena-bg.world-9 ~ .grid-container .grid-cell:nth-child(3)::after  { animation-delay: 1.1s; top: 30%; left: 80%; }
.arena-bg.world-9 ~ .grid-container .grid-cell:nth-child(4)::after  { animation-delay: 1.7s; top: 72%; left: 18%; }
.arena-bg.world-9 ~ .grid-container .grid-cell:nth-child(5)::after  { animation-delay: 2.2s; top: 15%; left: 55%; }
.arena-bg.world-9 ~ .grid-container .grid-cell:nth-child(6)::after  { animation-delay: 0.3s; top: 80%; left: 42%; }
.arena-bg.world-9 ~ .grid-container .grid-cell:nth-child(7)::after  { animation-delay: 1.9s; top: 42%; left: 10%; }
.arena-bg.world-9 ~ .grid-container .grid-cell:nth-child(8)::after  { animation-delay: 0.8s; top: 58%; left: 88%; }
.arena-bg.world-9 ~ .grid-container .grid-cell:nth-child(9)::after  { animation-delay: 1.4s; top: 22%; left: 62%; }
.arena-bg.world-9 ~ .grid-container .grid-cell:not(.occupied):hover {
  filter: brightness(1.5) saturate(1.8);
  box-shadow: inset 0 0 16px rgba(150,220,255,0.28);
}

/* ═══════════════════════════════════════════════════
   WORLD 10 — Sky Castle
   White marble/cloud tiles, gold inlay + heaven rays
═══════════════════════════════════════════════════ */
.arena-bg.world-10 ~ .grid-container .grid-row:nth-child(odd) {
  background: linear-gradient(180deg, #e8eeff 0%, #ccd8f8 100%);
}
.arena-bg.world-10 ~ .grid-container .grid-row:nth-child(even) {
  background: linear-gradient(180deg, #ccd8f8 0%, #b0c0ee 100%);
}
.arena-bg.world-10 ~ .grid-container .grid-cell {
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.85),
    inset -1px -1px 0 rgba(160,170,220,0.28);
  background:
    radial-gradient(ellipse 130% 80% at 50% 0%, rgba(255,255,255,0.55) 0%, transparent 60%);
}
/* Gold inlay inner border */
.arena-bg.world-10 ~ .grid-container .grid-cell::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(220,180,60,0.22);
  border-radius: 1px;
  pointer-events: none; z-index: 1;
}
/* Heavenly diagonal light ray */
.arena-bg.world-10 ~ .grid-container .grid-cell::after {
  content: '';
  position: absolute;
  top: -20%; left: -20%; width: 55%; height: 140%;
  background: linear-gradient(135deg, rgba(255,255,255,0.24) 0%, transparent 100%);
  animation: heavenRay 5s ease-in-out infinite;
  pointer-events: none; z-index: 1;
}
@keyframes heavenRay {
  0%,100% { opacity: 0.35; }
  50%      { opacity: 0.90; }
}
.arena-bg.world-10 ~ .grid-container .grid-cell:nth-child(even)::after { animation-delay: 2.5s; }
.arena-bg.world-10 ~ .grid-container .grid-cell:not(.occupied):hover {
  filter: brightness(1.18);
  box-shadow:
    inset 0 0 18px rgba(220,180,60,0.28),
    inset 1px 1px 0 rgba(255,255,255,0.85);
}
/* ─── Row separator lines (depth feel) ──────────── */
.grid-row {
  border-bottom: 1px solid rgba(0,0,0,0.15);
}
.grid-row:last-child { border-bottom: none; }

/* Plant inside cell */
.plant-entity {
  position: absolute;
  width: 85%;
  height: 85%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  z-index: 6;
  pointer-events: none;
  animation: plantPlace 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.plant-entity {
  position: absolute;
  width: 85%;
  height: 85%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  z-index: 6;
  pointer-events: none;
  animation: plantPlace 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
@keyframes plantPlace {
  from { transform: translate(-50%, -50%) scale(0) rotate(-10deg); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1) rotate(0deg);  opacity: 1; }
}
.plant-hp-bar {
  position: absolute;
  bottom: 2px;
  left: 5%;
  width: 90%;
  height: 4px;
  background: rgba(0,0,0,0.5);
  border-radius: 2px;
  overflow: hidden;
  z-index: 7;
}
.plant-hp-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.2s, background 0.2s;
}
.plant-hp-fill.mid  { background: var(--orange); }
.plant-hp-fill.low  { background: var(--red); }

/* Sunflower pulse ring */
.sun-pulse {
  position: absolute;
  width: 60%;
  height: 60%;
  border: 2px solid rgba(251,191,36,0.7);
  border-radius: 50%;
  animation: sunPulse 1s ease-out forwards;
  pointer-events: none;
  z-index: 8;
}
@keyframes sunPulse {
  from { transform: scale(0.5); opacity: 1; }
  to   { transform: scale(2.5); opacity: 0; }
}

/* ─── Sun Token ──────────────────────────────────── */
.sun-token {
  position: absolute;
  width: 56px;
  height: 56px;
  background: radial-gradient(circle, #ffe066 0%, #fbbf24 60%, #d97706 100%);
  border-radius: 50%;
  border: 2px solid #fde68a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  z-index: 100;
  pointer-events: all !important;
  animation: sunDrop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 12px rgba(251,191,36,0.8);
  transition: transform 0.1s;
}
.sun-token:active { transform: scale(0.85); }
@keyframes sunDrop {
  0%   { transform: scale(0);    opacity: 0; }
  30%  { transform: scale(1.4);  opacity: 1; }
  50%  { transform: scale(0.85); opacity: 1; }
  70%  { transform: scale(1.15); opacity: 1; }
  85%  { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}
.sun-token.collecting {
  animation: sunCollect 0.3s ease-in forwards;
}
@keyframes sunCollect {
  to { transform: scale(0) translateY(-40px); opacity: 0; }
}

/* ─── Coin Token ─────────────────────────────────── */
.coin-token {
  position: absolute;
  width: 28px;
  height: 28px;
  background: radial-gradient(circle, #ffd700, #b8860b);
  border-radius: 50%;
  border: 2px solid #ffe066;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  z-index: 20;
  animation: coinDrop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 8px rgba(255,215,0,0.7);
}
@keyframes coinDrop {
  from { transform: scale(0) translateY(-15px); opacity: 0; }
  to   { transform: scale(1) translateY(0);     opacity: 1; }
}

/* ─── Lawnmowers ─────────────────────────────────── */
.lawnmowers-layer {
  position: absolute;
  left: 0;
  top: 136px;
  width: 72px;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
}
.lawnmower {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: default;
  transition: transform 0.1s;
}
.lawnmower.active {
  animation: mowerSpin 0.5s linear infinite;
}
.lawnmower.gone { opacity: 0; }
@keyframes mowerSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── Demons Layer ───────────────────────────────── */
.demons-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}
.demon-entity {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  /* No transition — position updated every frame */
}
.demon-entity img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8));
}
.demon-hp-bar {
  width: 60px;
  height: 5px;
  background: rgba(0,0,0,0.6);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 2px;
}
.demon-hp-fill {
  height: 100%;
  background: var(--red);
  border-radius: 3px;
  transition: width 0.1s;
}
.demon-entity.frozen img {
  filter: drop-shadow(0 0 8px var(--ice-blue)) hue-rotate(160deg) brightness(1.3);
}
.demon-entity.stunned img {
  filter: brightness(0.6) saturate(0);
}
/* Demon hit flash */
.demon-entity.hit img {
  filter: brightness(3) saturate(0) drop-shadow(0 0 6px #fff);
}

/* ─── Projectiles Layer ──────────────────────────── */
.projectiles-layer {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
}
.projectile {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.projectile.pea {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, #86efac, #22c55e);
  box-shadow: 0 0 8px rgba(34,197,94,0.8);
}
.projectile.ice-pea {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, #e0f2fe, #67e8f9);
  box-shadow: 0 0 10px rgba(103,232,249,0.9);
}
.projectile.bonk {
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #fde68a, #f59e0b);
  box-shadow: 0 0 10px rgba(245,158,11,0.8);
  border-radius: 4px;
}

/* ─── Effects Layer ──────────────────────────────── */
.effects-layer {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}
.effect-hit {
  position: absolute;
  font-size: 20px;
  font-weight: 900;
  color: var(--white);
  text-shadow: 0 0 8px rgba(255,255,255,0.8);
  pointer-events: none;
  animation: floatUp 0.7s ease-out forwards;
  z-index: 20;
}
.effect-hit.crit { color: var(--gold); font-size: 26px; }
.effect-hit.freeze { color: var(--ice-blue); }
@keyframes floatUp {
  from { transform: translateY(0);   opacity: 1; }
  to   { transform: translateY(-40px); opacity: 0; }
}
.effect-explosion {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--orange) 40%, transparent 70%);
  animation: explode 0.4s ease-out forwards;
  pointer-events: none;
  z-index: 16;
}
@keyframes explode {
  from { transform: scale(0.2); opacity: 1; }
  to   { transform: scale(2.5); opacity: 0; }
}
.effect-freeze {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103,232,249,0.8) 0%, transparent 70%);
  animation: explode 0.5s ease-out forwards;
  pointer-events: none;
  z-index: 16;
}

/* ─── Danger flash when demons near end ─────────── */
.battle-arena.danger {
  animation: dangerFlash 1s ease-in-out infinite;
}
@keyframes dangerFlash {
  0%, 100% { box-shadow: inset 0 0 0px transparent; }
  50%       { box-shadow: inset 0 0 40px rgba(239,68,68,0.4); }
}

/* ─── Wave announce banner ───────────────────────── */
.wave-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 48px;
  letter-spacing: 4px;
  color: var(--white);
  text-shadow: 0 0 30px var(--orange), 0 0 60px var(--orange);
  z-index: 40;
  pointer-events: none;
  animation: waveBanner 2s ease-in-out forwards;
  white-space: nowrap;
}
@keyframes waveBanner {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  70%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* ─── Plant shake when being eaten ──────────────── */
@keyframes plantShake {
  0%, 100% { transform: translate(-50%, -50%) translateX(0); }
  25%       { transform: translate(-50%, -50%) translateX(-4px) rotate(-3deg); }
  75%       { transform: translate(-50%, -50%) translateX(4px) rotate(3deg); }
}
.plant-entity.shaking {
  animation: plantShake 0.3s ease-in-out infinite;
  filter: drop-shadow(0 0 6px red) sepia(0.5) saturate(2) hue-rotate(-30deg);
}
/* ─── Shovel mode ────────────────────────────────── */
.grid-cell.shovel-hover { background: rgba(239,68,68,0.2); cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><text y='28' font-size='28'>🪣</text></svg>") 0 32, auto; }

/* ─── Shovel button ──────────────────────────────── */
.shovel-btn {
  flex-shrink: 0;
  width: 64px;
  height: 68px;
  background: linear-gradient(135deg, #3b0000, #1a0000);
  border: 2px solid #ef4444;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  gap: 2px;
  margin-left: auto;
  transition: all 0.15s;
}
.shovel-btn.active {
  border-top-color:    #654118 !important;
  border-bottom-color: #2f1808 !important;
  border-left-color:   #7a4d1d !important;
  border-right-color:  #5a2f10 !important;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0px, transparent 3px,
      rgba(0,0,0,0.05) 3px, rgba(0,0,0,0.05) 4px
    ),
    linear-gradient(160deg, #8a551a 0%, #6f3e14 30%, #5b3210 60%, #4a290d 100%) !important;
  box-shadow:
    0 3px 0 rgba(0,0,0,0.55),
    0 0 6px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.12) !important;
}
.bt-shovel.active {
  border-top-color:    #654118 !important;
  border-bottom-color: #2f1808 !important;
  border-left-color:   #7a4d1d !important;
  border-right-color:  #5a2f10 !important;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0px, transparent 3px,
      rgba(0,0,0,0.05) 3px, rgba(0,0,0,0.05) 4px
    ),
    linear-gradient(160deg, #8a551a 0%, #6f3e14 30%, #5b3210 60%, #4a290d 100%) !important;
  box-shadow:
    0 3px 0 rgba(0,0,0,0.55),
    0 0 6px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.12) !important;
}
.shovel-btn span { font-size: 10px; color: #fca5a5; font-weight: 700; }

/* ─── Mobile responsive ──────────────────────────── */
@media (max-width: 480px) {
  .grid-container { left: 24px; }
  .lawnmowers-layer { width: 24px; }
  .lawnmower { font-size: 14px; }
  .wave-banner { font-size: 28px; }
}
/* Extra black bg removal for video plants */
.grid-cell video.plant-entity {
  mix-blend-mode: screen;
  isolation: isolate;
}
.grid-cell {
  background-clip: padding-box;
}
/* Demon preview styles removed */
.dp-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 3px;
  color: var(--red);
  text-shadow: 0 0 20px rgba(239,68,68,0.6);
}
.dp-subtitle {
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 2px;
}
.dp-demons {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 14px;
  width: 100%;
  min-height: 100px;
}
.dp-demon-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: demonEntry 0.4s cubic-bezier(0.175,0.885,0.32,1.275) both;
}
@keyframes demonEntry {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}
.dp-demon-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(239,68,68,0.6));
}
.dp-demon-icon .dp-demon-name {
  font-size: 10px;
  color: var(--gray);
  text-align: center;
  font-weight: 700;
}
.dp-demon-icon .dp-demon-count {
  font-size: 11px;
  color: var(--orange);
  font-weight: 900;
  background: rgba(255,106,0,0.15);
  border: 1px solid var(--orange);
  border-radius: 8px;
  padding: 1px 7px;
}
.dp-countdown {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--white);
  text-shadow: 0 0 20px rgba(255,255,255,0.5);
  min-width: 60px;
  text-align: center;
}