/* =============================================================================
   SHEAR MADNESS - Enhanced Mobile-First Styles with Textures & Animations
   ============================================================================= */

:root {
  /* Colors */
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-accent: #0f3460;
  --text-primary: #eee;
  --text-secondary: #aaa;
  --accent-green: #4ade80;
  --accent-red: #f87171;
  --accent-yellow: #fbbf24;
  --accent-blue: #60a5fa;
  --accent-purple: #a78bfa;

  /* Tile colors */
  --grass-base: #2d5a27;
  --grass-light: #3d7a37;
  --grass-dark: #1d4a17;
  --cement-base: #6b7280;
  --cement-light: #9ca3af;
  --cement-dark: #4b5563;
  --pool-base: #0ea5e9;
  --pool-light: #38bdf8;
  --pool-dark: #0284c7;
  --dirt-base: #78350f;
  --dirt-light: #a3541a;
  --dirt-dark: #5c2a0a;
  --fence-base: #92400e;
  --fence-light: #b45309;
  --fence-dark: #78350f;
  --door-base: #d97706;

  /* Grid */
  --grid-size: 10;
  --tile-size: calc((100vmin - 200px) / var(--grid-size));
  --tile-size-min: 32px;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;

  /* Animation speeds */
  --move-speed: 0.25s;
  --attack-speed: 0.15s;
}

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

/* Utility classes */
.hidden {
  display: none !important;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100dvh;
}

/* =============================================================================
   HEADER - Meters and Wave Info
   ============================================================================= */

#game-header {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: var(--spacing-sm);
  border-bottom: 2px solid var(--bg-accent);
  flex-shrink: 0;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xs);
}

.game-title {
  font-size: 1.2rem;
  color: var(--accent-green);
  font-weight: bold;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.wave-indicator {
  background: var(--bg-accent);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 4px;
  font-size: 0.9rem;
  border: 1px solid var(--accent-purple);
}

.meters-row {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
}

.meter {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meter-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meter-bar {
  height: 10px;
  background: var(--bg-primary);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.meter-fill {
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 5px;
  position: relative;
}

.meter-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
  border-radius: 5px 5px 0 0;
}

.meter-fill.serenity {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}
.meter-fill.vet-bill {
  background: linear-gradient(90deg, var(--accent-yellow), var(--accent-red));
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}
.meter-fill.garden {
  background: linear-gradient(90deg, var(--accent-green), #22c55e);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.meter-value {
  font-size: 0.8rem;
  text-align: right;
  font-weight: bold;
}

/* Bark meters with animated indicators */
.bark-meters {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
}

.bark-meter {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 0.8rem;
}

.bark-icon {
  width: 24px;
  height: 24px;
  background: var(--bg-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  border: 2px solid var(--fence-base);
  transition: all 0.2s ease;
}

.bark-icon.barking {
  animation: bark-pulse 0.3s ease infinite;
  border-color: var(--accent-yellow);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.7);
}

@keyframes bark-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.bark-bar {
  width: 60px;
  height: 8px;
  background: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.bark-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-yellow), var(--accent-red));
  transition: width 0.2s ease;
}

/* =============================================================================
   MAIN - Game Board (Proximity-Based)
   ============================================================================= */

#game-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm);
  overflow: hidden;
  background: radial-gradient(ellipse at center, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

#game-board {
  /* No grid - proximity based system */
  position: relative;
  width: calc(100vmin - 120px);
  height: calc(100vmin - 120px);
  max-width: 700px;
  max-height: 700px;
  min-width: 320px;
  min-height: 320px;
  /* Use actual backyard image as background */
  background-image: url('../assets/img/Backyard3.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 3px solid var(--accent-green);
  border-radius: 12px;
  box-shadow:
    0 0 30px rgba(74, 222, 128, 0.4),
    inset 0 0 40px rgba(0,0,0,0.3);
  /* Default cursor for movement - boot icon for walking */
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%2344ff44' stroke='%23000' stroke-width='1'%3E%3Cpath d='M15 5l-1.5 1.5M5 15l2-2M2 22l3-3M20.5 4.5l-8 8M13 9l7-7'/%3E%3Cpath d='M7 7l-4 4 9 9 8-8-8-8z'/%3E%3C/svg%3E") 12 12, pointer;
  overflow: hidden;
}

/* =============================================================================
   CONTEXTUAL CURSORS - Change cursor based on hover target
   ============================================================================= */

/* Ground/walkable area - foot/boot cursor */
#game-board {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24'%3E%3Cpath fill='%234ade80' stroke='%23000' stroke-width='0.5' d='M12 2c3.31 0 6 2.69 6 6 0 2.97-2.16 5.44-5 5.92V22h-2v-8.08c-2.84-.48-5-2.95-5-5.92 0-3.31 2.69-6 6-6z'/%3E%3Ccircle fill='%234ade80' cx='8' cy='19' r='2'/%3E%3Ccircle fill='%234ade80' cx='16' cy='19' r='2'/%3E%3C/svg%3E") 14 14, pointer;
}

/* Enemy hover - target reticle cursor (RED) */
#game-board .entity.grasshopper,
#game-board .entity.grasshopper_swarm,
#game-board .entity.grasshopper_jumper,
#game-board .entity.grasshopper_queen,
#game-board .entity.enemy,
#game-board .entity[data-type*="grasshopper"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='none' stroke='%23ff3333' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='8' fill='none' stroke='%23ff3333' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='2' fill='%23ff3333'/%3E%3Cline x1='16' y1='0' x2='16' y2='6' stroke='%23ff3333' stroke-width='2'/%3E%3Cline x1='16' y1='26' x2='16' y2='32' stroke='%23ff3333' stroke-width='2'/%3E%3Cline x1='0' y1='16' x2='6' y2='16' stroke='%23ff3333' stroke-width='2'/%3E%3Cline x1='26' y1='16' x2='32' y2='16' stroke='%23ff3333' stroke-width='2'/%3E%3C/svg%3E") 16 16, crosshair !important;
}

/* Plant/rose hover - hand/care cursor (GREEN) */
#game-board .entity.rose,
#game-board .entity[data-type="rose"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24'%3E%3Cpath fill='%2322c55e' stroke='%23000' stroke-width='0.5' d='M12 2C9.24 2 7 4.24 7 7c0 1.62.77 3.06 2 3.97V22h6v-11.03c1.23-.91 2-2.35 2-3.97 0-2.76-2.24-5-5-5z'/%3E%3Cpath fill='%23166534' d='M12 7c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z'/%3E%3C/svg%3E") 14 14, pointer !important;
}

/* =============================================================================
   ENTITY LAYER (Proximity-Based)
   ============================================================================= */

.entity-layer {
  position: absolute;
  inset: 0;
  /* CRITICAL: Must be auto for child entity clicks to work reliably */
  pointer-events: auto;
  z-index: 10;
}

/* Range indicator circle */
.range-indicator {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, width 0.2s ease, height 0.2s ease;
  transform: translate(-50%, -50%);
  z-index: 5;
}

.range-indicator.visible {
  opacity: 1;
}

.range-indicator.move {
  border: 2px dashed rgba(74, 222, 128, 0.6);
  background: radial-gradient(circle, rgba(74, 222, 128, 0.1) 0%, transparent 70%);
}

.range-indicator.dagger {
  border: 2px solid rgba(248, 113, 113, 0.8);
  background: radial-gradient(circle, rgba(248, 113, 113, 0.15) 0%, transparent 70%);
}

.range-indicator.sheers {
  border: 2px solid rgba(167, 139, 250, 0.8);
  background: radial-gradient(circle, rgba(167, 139, 250, 0.15) 0%, transparent 70%);
}

.range-indicator.bow {
  border: 2px solid rgba(251, 191, 36, 0.6);
  background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
}

/* GRASS - textured with wind sway animation */
.tile.grass {
  background:
    repeating-linear-gradient(
      90deg,
      var(--grass-dark) 0px,
      var(--grass-base) 2px,
      var(--grass-light) 3px,
      var(--grass-base) 4px,
      var(--grass-dark) 6px
    ),
    linear-gradient(180deg, var(--grass-light) 0%, var(--grass-dark) 100%);
  background-blend-mode: overlay;
  position: relative;
  overflow: hidden;
}

/* Wind sway effect on grass */
.tile.grass::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 30%),
    radial-gradient(circle at 70% 60%, rgba(0,0,0,0.1) 0%, transparent 40%),
    repeating-linear-gradient(
      92deg,
      transparent 0px,
      rgba(61, 122, 55, 0.3) 1px,
      transparent 2px
    );
  animation: grass-sway 3.5s ease-in-out infinite;
  pointer-events: none;
}

/* Occasional grass shimmer for wind effect */
.tile.grass::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255,255,255,0.1) 45%,
    rgba(255,255,255,0.15) 50%,
    rgba(255,255,255,0.1) 55%,
    transparent 100%
  );
  animation: grass-shimmer 6s ease-in-out infinite;
  pointer-events: none;
  opacity: 0;
}

@keyframes grass-sway {
  0%, 100% { transform: translateX(0) skewX(0deg); }
  25% { transform: translateX(1px) skewX(0.5deg); }
  50% { transform: translateX(0) skewX(0deg); }
  75% { transform: translateX(-1px) skewX(-0.5deg); }
}

@keyframes grass-shimmer {
  0%, 100% { opacity: 0; transform: translateX(-100%); }
  10% { opacity: 0.3; }
  20% { opacity: 0; transform: translateX(100%); }
}

/* CEMENT - concrete texture */
.tile.cement {
  background:
    repeating-linear-gradient(
      45deg,
      var(--cement-dark) 0px,
      var(--cement-base) 1px,
      var(--cement-light) 2px,
      var(--cement-base) 3px,
      var(--cement-dark) 4px
    ),
    linear-gradient(135deg, var(--cement-light) 0%, var(--cement-dark) 100%);
  background-blend-mode: multiply;
}

.tile.cement::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.2) 0%, transparent 50%);
  pointer-events: none;
}

/* POOL - advanced water effect with realistic shimmer */
.tile.pool {
  background:
    linear-gradient(180deg, var(--pool-light) 0%, var(--pool-base) 50%, var(--pool-dark) 100%);
  animation: water-shimmer 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

/* Water caustics pattern */
.tile.pool::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      120deg,
      transparent 0%,
      rgba(255,255,255,0.15) 8%,
      transparent 16%
    ),
    repeating-linear-gradient(
      240deg,
      transparent 0%,
      rgba(255,255,255,0.1) 12%,
      transparent 24%
    );
  animation: water-caustics 4s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.8;
}

/* Gentle wave motion */
.tile.pool::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.2) 0%, transparent 40%),
    radial-gradient(ellipse at 70% 70%, rgba(255,255,255,0.15) 0%, transparent 35%);
  animation: water-ripple 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes water-shimmer {
  0%, 100% { filter: brightness(1) hue-rotate(0deg); }
  25% { filter: brightness(1.08) hue-rotate(2deg); }
  50% { filter: brightness(1.15) hue-rotate(0deg); }
  75% { filter: brightness(1.08) hue-rotate(-2deg); }
}

@keyframes water-caustics {
  0%, 100% { transform: translateX(0) translateY(0) scale(1); }
  25% { transform: translateX(-5%) translateY(-3%) scale(1.05); }
  50% { transform: translateX(-10%) translateY(-5%) scale(1); }
  75% { transform: translateX(-5%) translateY(-3%) scale(1.05); }
}

@keyframes water-ripple {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.6; }
  50% { transform: scale(1.1) rotate(5deg); opacity: 0.4; }
}

/* DIRT - earthy texture */
.tile.dirt {
  background:
    repeating-radial-gradient(
      circle at 50% 50%,
      var(--dirt-dark) 0px,
      var(--dirt-base) 2px,
      var(--dirt-light) 3px,
      var(--dirt-base) 4px,
      var(--dirt-dark) 5px
    ),
    linear-gradient(180deg, var(--dirt-light) 0%, var(--dirt-dark) 100%);
  background-size: 8px 8px, 100% 100%;
}

/* FENCE - enhanced wooden slat texture with grain */
.tile.fence {
  background:
    repeating-linear-gradient(
      90deg,
      var(--fence-dark) 0px,
      var(--fence-base) 2px,
      var(--fence-light) 4px,
      var(--fence-base) 6px,
      var(--fence-dark) 8px
    ),
    linear-gradient(180deg, var(--fence-light) 0%, var(--fence-dark) 100%);
  background-blend-mode: overlay;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

/* Wood grain detail */
.tile.fence::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      88deg,
      transparent 0px,
      rgba(0,0,0,0.05) 1px,
      transparent 2px,
      transparent 4px
    );
  pointer-events: none;
}

/* HP indicator bar for fence sections (when damaged) */
.tile.fence.damaged::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Fence bark indicator overlay */
.tile.fence.barking-left,
.tile.fence.barking-right {
  animation: fence-shake 0.2s ease infinite;
}

.tile.fence.barking-left::before,
.tile.fence.barking-right::before {
  content: '🔊';
  position: absolute;
  font-size: calc(var(--tile-size) * 0.4);
  animation: bark-bounce 0.3s ease infinite;
  z-index: 10;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.8));
}

.tile.fence.barking-left::before {
  left: 2px;
}

.tile.fence.barking-right::before {
  right: 2px;
}

@keyframes fence-shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-2px) rotate(-0.5deg); }
  50% { transform: translateX(0) rotate(0deg); }
  75% { transform: translateX(2px) rotate(0.5deg); }
}

@keyframes bark-bounce {
  0%, 100% { transform: scale(1) translateY(0); opacity: 1; }
  50% { transform: scale(1.3) translateY(-2px); opacity: 0.7; }
}

/* DOOR - highlighted entrance */
.tile.door {
  background:
    linear-gradient(180deg, var(--door-base) 0%, #b45309 100%);
  box-shadow:
    inset 0 0 10px rgba(255,255,255,0.2),
    inset 0 -3px 6px rgba(0,0,0,0.3);
  border: 2px solid #fbbf24;
}

.tile.door::before {
  content: '🚪';
  font-size: calc(var(--tile-size) * 0.5);
  opacity: 0.7;
}

/* =============================================================================
   ENTITIES - Proximity Based Positioning
   ============================================================================= */

.entity {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px !important;
  height: 48px !important;
  transition:
    left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s ease,
    opacity 0.2s ease;
  z-index: 10;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

/* Entity base styles */
.entity-sprite {
  width: calc(var(--tile-size) * 0.7);
  height: calc(var(--tile-size) * 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--tile-size) * 0.5);
  filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.5));
  transition: transform 0.15s ease;
}

.entity:hover .entity-sprite {
  transform: scale(1.1);
}

/* HP Bar */
.entity-hp {
  position: absolute;
  bottom: -6px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: rgba(0,0,0,0.5);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.entity:hover .entity-hp,
.entity.damaged .entity-hp {
  opacity: 1;
}

.entity-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-green));
  transition: width 0.3s ease;
  border-radius: 2px;
}

/* Character-specific styles */
.entity.jax .entity-sprite {
  filter: drop-shadow(0 0 8px var(--accent-purple));
  animation: hero-glow 2s ease-in-out infinite;
}

@keyframes hero-glow {
  0%, 100% { filter: drop-shadow(0 0 8px var(--accent-purple)); }
  50% { filter: drop-shadow(0 0 15px var(--accent-purple)); }
}

/* =============================================================================
   QUINLAN - Grey Pitbull (Chaotic, Energetic)
   ============================================================================= */

.entity.quinlan {
  width: 44px !important;
  height: 44px !important;
}

.entity.quinlan .entity-sprite {
  filter: drop-shadow(0 0 6px #6b7280) brightness(0.85) saturate(0.7);
  position: relative;
}

.entity.quinlan .dog-character {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entity.quinlan .dog-body {
  font-size: 32px;
  filter: grayscale(0.6) brightness(0.9);
}

.entity.quinlan .dog-color-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(107, 114, 128, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.entity.quinlan .dog-label {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: bold;
  color: #9ca3af;
  text-shadow: 0 0 4px #000;
  background: rgba(0,0,0,0.6);
  padding: 1px 4px;
  border-radius: 3px;
}

.entity.quinlan.excited {
  animation: quinlan-excited 0.3s ease infinite;
}

.entity.quinlan.running {
  animation: quinlan-run 0.2s linear infinite;
}

.entity.quinlan.barking::after {
  content: '🗯️';
  position: absolute;
  top: -12px;
  right: -8px;
  font-size: 14px;
  animation: bark-pulse 0.3s ease infinite;
}

.entity.quinlan.drowning {
  animation: drowning 0.5s ease infinite;
  filter: drop-shadow(0 0 10px #38bdf8);
}

@keyframes quinlan-excited {
  0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
  50% { transform: translate(-50%, -50%) scale(1.1) rotate(3deg); }
}

@keyframes quinlan-run {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-4px); }
}

@keyframes bark-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

@keyframes drowning {
  0%, 100% { transform: translate(-50%, -50%) translateY(0) rotate(0); }
  25% { transform: translate(-50%, -50%) translateY(-5px) rotate(-10deg); }
  75% { transform: translate(-50%, -50%) translateY(3px) rotate(10deg); }
}

/* =============================================================================
   SEAMUS - Brindle Mastiff (Large, Protective)
   ============================================================================= */

.entity.seamus {
  width: 52px !important;
  height: 52px !important;
}

.entity.seamus .entity-sprite {
  filter: drop-shadow(0 0 6px #92400e);
  position: relative;
}

.entity.seamus .dog-character {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entity.seamus .dog-body {
  font-size: 38px;
  filter: sepia(0.4) saturate(1.2) brightness(0.85);
}

.entity.seamus .dog-color-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(146, 64, 14, 0.15) 0px,
    rgba(146, 64, 14, 0.15) 2px,
    rgba(120, 53, 15, 0.15) 2px,
    rgba(120, 53, 15, 0.15) 4px
  );
  pointer-events: none;
  border-radius: 50%;
}

.entity.seamus .dog-label {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: bold;
  color: #fbbf24;
  text-shadow: 0 0 4px #000;
  background: rgba(0,0,0,0.6);
  padding: 1px 4px;
  border-radius: 3px;
}

.entity.seamus.guarding {
  animation: seamus-guard 2s ease infinite;
}

.entity.seamus.guarding::after {
  content: '🛡️';
  position: absolute;
  top: -8px;
  left: -8px;
  font-size: 12px;
}

.entity.seamus.aggressive {
  animation: seamus-aggressive 0.4s ease infinite;
  filter: drop-shadow(0 0 10px #ef4444);
}

.entity.seamus.helpful::before {
  content: '⭐';
  position: absolute;
  top: -10px;
  right: -6px;
  font-size: 12px;
  animation: helpful-star 1s ease infinite;
}

@keyframes seamus-guard {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes seamus-aggressive {
  0%, 100% { transform: translate(-50%, -50%) rotate(0); }
  25% { transform: translate(-50%, -50%) rotate(-5deg) scale(1.1); }
  75% { transform: translate(-50%, -50%) rotate(5deg) scale(1.1); }
}

@keyframes helpful-star {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* =============================================================================
   SHANNON - White Husband (Helpful but Clumsy)
   ============================================================================= */

.entity.shannon {
  width: 48px !important;
  height: 48px !important;
}

.entity.shannon .entity-sprite {
  filter: drop-shadow(0 0 6px #f472b6);
  position: relative;
}

.entity.shannon .shannon-character {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entity.shannon .shannon-body {
  font-size: 34px;
}

.entity.shannon .shannon-beard {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 8px;
  background: linear-gradient(180deg, #78716c 0%, #57534e 100%);
  border-radius: 0 0 8px 8px;
  opacity: 0.7;
}

.entity.shannon .shannon-item {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

.entity.shannon.helping {
  animation: shannon-water 1s ease infinite;
}

.entity.shannon.helping::after {
  content: '💦';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  animation: water-drip 0.5s ease infinite;
}

.entity.shannon.leaving {
  animation: shannon-leave 2s ease infinite;
  opacity: 0.7;
}

@keyframes shannon-water {
  0%, 100% { transform: translate(-50%, -50%) rotate(0); }
  25% { transform: translate(-50%, -50%) rotate(-5deg); }
  75% { transform: translate(-50%, -50%) rotate(5deg); }
}

@keyframes water-drip {
  0% { transform: translateX(-50%) translateY(0); opacity: 1; }
  100% { transform: translateX(-50%) translateY(10px); opacity: 0; }
}

@keyframes shannon-leave {
  0%, 100% { transform: translate(-50%, -50%) translateX(0); }
  50% { transform: translate(-50%, -50%) translateX(-3px); }
}

/* Enemy styles */
.entity.grasshopper .entity-sprite {
  animation: hop 0.5s ease infinite;
}

@keyframes hop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.entity.snail .entity-sprite {
  animation: slither 1s ease infinite;
}

@keyframes slither {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(2px); }
}

/* Rose styles with enhanced animations and blooming effect */
.entity.rose .entity-sprite {
  animation: rose-sway 3.5s ease-in-out infinite;
  position: relative;
}

/* Gentle breeze sway */
@keyframes rose-sway {
  0%, 100% { transform: rotate(-2deg) scale(1); }
  25% { transform: rotate(-1deg) scale(1.01); }
  50% { transform: rotate(2deg) scale(1); }
  75% { transform: rotate(1deg) scale(0.99); }
}

/* Bloom pulse when healthy (triggered by class) */
.entity.rose.healthy .entity-sprite {
  animation: rose-sway 3.5s ease-in-out infinite, rose-bloom 4s ease-in-out infinite;
}

@keyframes rose-bloom {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

/* Petal falling animation (occasional - triggered by class) */
@keyframes petal-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(30px) rotate(180deg); opacity: 0; }
}

/* Rose color variants with glows */
.entity.rose-red .entity-sprite {
  color: #ef4444;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.6));
}
.entity.rose-pink .entity-sprite {
  color: #f472b6;
  filter: drop-shadow(0 0 6px rgba(244, 114, 182, 0.6));
}
.entity.rose-yellow .entity-sprite {
  color: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
}
.entity.rose-white .entity-sprite {
  color: #f5f5f5;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}
.entity.rose-orange .entity-sprite {
  color: #fb923c;
  filter: drop-shadow(0 0 6px rgba(251, 146, 60, 0.6));
}
.entity.rose-coral .entity-sprite {
  color: #f97316;
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.6));
}

/* Rose health states - roses don't vanish, they get sick */
.entity.rose-state-healthy .entity-sprite {
  filter: brightness(1.1) saturate(1.2);
  animation: rose-sway 3.5s ease-in-out infinite, rose-bloom 4s ease-in-out infinite;
}

.entity.rose-state-wilting .entity-sprite {
  filter: brightness(0.85) saturate(0.7);
  animation: rose-sway 4s ease-in-out infinite;
}

.entity.rose-state-sick .entity-sprite {
  filter: brightness(0.6) saturate(0.4) sepia(0.3);
  animation: rose-droop 3s ease-in-out infinite;
  transform-origin: bottom center;
}

.entity.rose-state-dying .entity-sprite {
  filter: brightness(0.4) saturate(0.2) sepia(0.5);
  animation: rose-dying 2s ease-in-out infinite;
  transform-origin: bottom center;
}

.entity.rose-state-dead .entity-sprite {
  filter: grayscale(1) brightness(0.5);
  animation: none;
  opacity: 0.7;
}

@keyframes rose-droop {
  0%, 100% { transform: rotate(-8deg) scale(0.95); }
  50% { transform: rotate(-5deg) scale(0.93); }
}

@keyframes rose-dying {
  0%, 100% { transform: rotate(-15deg) scale(0.9); opacity: 0.8; }
  50% { transform: rotate(-12deg) scale(0.88); opacity: 0.7; }
}

/* Trash can entity */
.entity.trash_can .entity-sprite {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Dog poop entity */
.entity.dog_poop .entity-sprite {
  font-size: 1rem;
  animation: poop-stink 2s ease-in-out infinite;
}

@keyframes poop-stink {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 8px rgba(139, 69, 19, 0.6)); }
}

/* Lizard entity - ally */
.entity.lizard .entity-sprite {
  font-size: 1.2rem;
  animation: lizard-scurry 0.5s ease-in-out;
}

/* Dog entities */
.entity.dog_quinlan .entity-sprite,
.entity.dog_seamus .entity-sprite {
  font-size: 1.5rem;
  animation: dog-idle 2s ease-in-out infinite;
}

@keyframes dog-idle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05) rotate(2deg); }
}

/* Tree styles with enhanced rustling and branch sway */
.entity.tree .entity-sprite {
  font-size: calc(var(--tile-size) * 0.6);
  animation: tree-rustle 4s ease-in-out infinite;
  position: relative;
  filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.4));
}

/* Leaves rustling with multi-layer movement */
@keyframes tree-rustle {
  0%, 100% { transform: rotate(0deg) scale(1); filter: brightness(1); }
  15% { transform: rotate(-1.5deg) scale(1.01); filter: brightness(1.05); }
  30% { transform: rotate(-1deg) scale(1.02); filter: brightness(1.08); }
  45% { transform: rotate(0.5deg) scale(1.01); filter: brightness(1.05); }
  60% { transform: rotate(1.5deg) scale(0.99); filter: brightness(1); }
  75% { transform: rotate(1deg) scale(0.98); filter: brightness(0.98); }
  90% { transform: rotate(-0.5deg) scale(0.99); filter: brightness(1.02); }
}

/* Fruit drop particle animation (occasional - triggered by class) */
@keyframes fruit-drop {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  50% { transform: translateY(15px) rotate(90deg) scale(0.8); opacity: 0.8; }
  100% { transform: translateY(25px) rotate(180deg) scale(0.6); opacity: 0; }
}

/* =============================================================================
   ATTACK EFFECTS
   ============================================================================= */

.attack-effect {
  position: absolute;
  pointer-events: none;
  z-index: 100;
}

/* Slash effect for melee */
.attack-slash {
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: slash 0.2s ease-out forwards;
  transform-origin: center;
}

@keyframes slash {
  0% { transform: rotate(-45deg) scale(0); opacity: 1; }
  100% { transform: rotate(45deg) scale(1.5); opacity: 0; }
}

/* Projectile for bow */
.attack-projectile {
  width: 8px;
  height: 8px;
  background: var(--accent-yellow);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-yellow);
  animation: projectile 0.3s linear forwards;
}

/* AOE effect for sheers */
.attack-aoe {
  border: 3px solid var(--accent-green);
  border-radius: 50%;
  animation: aoe-expand 0.3s ease-out forwards;
}

@keyframes aoe-expand {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* Damage number popup */
.damage-number {
  position: absolute;
  font-size: 14px;
  font-weight: bold;
  color: var(--accent-red);
  text-shadow: 0 0 4px black;
  animation: damage-float 0.8s ease-out forwards;
  pointer-events: none;
  z-index: 200;
}

@keyframes damage-float {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-30px); opacity: 0; }
}

/* Heal number */
.heal-number {
  color: var(--accent-green);
}

/* =============================================================================
   ACTION MENU (AAA Quality)
   ============================================================================= */

.action-menu {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-menu.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.action-menu-inner {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-radius: 16px;
  border: 1px solid rgba(74, 222, 128, 0.4);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(74, 222, 128, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.action-menu .action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 56px;
  min-height: 48px;
}

.action-menu .action-btn:hover {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.4);
  transform: translateY(-2px);
}

.action-menu .action-btn:active {
  transform: translateY(0) scale(0.95);
}

.action-menu .action-btn.selected {
  background: rgba(74, 222, 128, 0.25);
  border-color: var(--accent-green);
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.3);
}

.action-menu .action-btn.unavailable {
  opacity: 0.35;
  filter: grayscale(0.8);
}

.action-menu .action-btn.unavailable:hover {
  background: transparent;
  border-color: transparent;
  transform: none;
  cursor: not-allowed;
}

.action-menu .action-icon {
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

.action-menu .action-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-menu .action-btn.selected .action-label {
  color: var(--accent-green);
}

.action-menu-tip {
  margin-top: 6px;
  padding: 6px 12px;
  background: rgba(15, 52, 96, 0.8);
  border-radius: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

/* =============================================================================
   ROSE CARE MENU - Triangle Formation (No Background)
   ============================================================================= */

.rose-care-menu {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Container sized to fit triangle layout */
  width: 120px;
  height: 100px;
}

.rose-care-menu.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* No background - icons float freely */
.rose-care-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Care buttons - circular icons with glow */
.care-btn {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: radial-gradient(circle, rgba(30, 60, 40, 0.95) 0%, rgba(15, 40, 25, 0.9) 100%);
  border: 2px solid rgba(74, 222, 128, 0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.4),
    0 0 10px rgba(74, 222, 128, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Triangle formation: Water at top, Fertilize bottom-left, Love bottom-right */
.care-btn[data-action="water"] {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.care-btn[data-action="fertilize"] {
  bottom: 0;
  left: 0;
}

.care-btn[data-action="love"] {
  bottom: 0;
  right: 0;
}

.care-btn:hover {
  background: radial-gradient(circle, rgba(74, 222, 128, 0.3) 0%, rgba(30, 80, 50, 0.95) 100%);
  border-color: rgba(74, 222, 128, 0.9);
  transform: translateX(-50%) scale(1.15);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(74, 222, 128, 0.4);
  z-index: 10;
}

/* Fix hover for non-centered items */
.care-btn[data-action="fertilize"]:hover,
.care-btn[data-action="love"]:hover {
  transform: scale(1.15);
}

.care-btn:active {
  transform: translateX(-50%) scale(0.95);
}

.care-btn[data-action="fertilize"]:active,
.care-btn[data-action="love"]:active {
  transform: scale(0.95);
}

.care-btn.unavailable {
  opacity: 0.35;
  filter: grayscale(0.8);
  cursor: not-allowed;
  border-color: rgba(100, 100, 100, 0.4);
}

.care-btn.unavailable:hover {
  background: radial-gradient(circle, rgba(30, 60, 40, 0.95) 0%, rgba(15, 40, 25, 0.9) 100%);
  border-color: rgba(100, 100, 100, 0.4);
  transform: translateX(-50%) scale(1);
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.4),
    0 0 10px rgba(74, 222, 128, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.care-btn[data-action="fertilize"].unavailable:hover,
.care-btn[data-action="love"].unavailable:hover {
  transform: scale(1);
}

.care-icon {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* Hide labels in triangle mode - icons are self-explanatory */
.care-label {
  display: none;
}

/* Resource count badge */
.care-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent-green);
  color: var(--bg-primary);
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 9px;
  text-align: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Hide the tip text */
.rose-care-tip {
  display: none;
}

/* =============================================================================
   QUINLAN CONTROL MENU - Indiana Jax Whip System
   ============================================================================= */

.quinlan-menu {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quinlan-menu.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.quinlan-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(120, 60, 30, 0.98) 0%, rgba(80, 40, 20, 0.98) 100%);
  border-radius: 16px;
  border: 2px solid rgba(255, 180, 100, 0.6);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 150, 50, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  min-width: 160px;
}

.quinlan-menu-title {
  font-size: 14px;
  font-weight: bold;
  color: #ffd580;
  text-align: center;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 180, 100, 0.3);
  margin-bottom: 2px;
}

.quinlan-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 200, 100, 0.15);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 40px;
}

.quinlan-btn:hover:not(:disabled) {
  background: rgba(255, 180, 100, 0.3);
  border-color: rgba(255, 180, 100, 0.6);
  transform: translateX(3px);
}

.quinlan-btn:active:not(:disabled) {
  transform: translateX(0) scale(0.95);
}

.quinlan-btn:disabled,
.quinlan-btn.disabled {
  opacity: 0.4;
  filter: grayscale(0.6);
  cursor: not-allowed;
}

.quinlan-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.quinlan-label {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.quinlan-menu-tip {
  margin-top: 6px;
  padding: 6px 12px;
  background: rgba(60, 30, 15, 0.8);
  border-radius: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

/* =============================================================================
   INDIANA JAX WHIP ANIMATION
   ============================================================================= */

.whip-animation {
  position: absolute;
  height: 4px;
  pointer-events: none;
  z-index: 500;
  transition: width 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
}

.whip-animation.extending {
  transition: width 0.2s ease-out;
}

.whip-animation.retracting {
  transition: width 0.15s ease-in;
}

.whip-rope {
  flex: 1;
  height: 100%;
  background: linear-gradient(
    90deg,
    #8B4513 0%,
    #A0522D 20%,
    #8B4513 40%,
    #654321 60%,
    #8B4513 80%,
    #A0522D 100%
  );
  background-size: 20px 100%;
  animation: whip-wiggle 0.1s ease-in-out infinite;
  border-radius: 2px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.whip-tip {
  font-size: 16px;
  margin-left: -2px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
  animation: whip-swing 0.15s ease-out;
}

@keyframes whip-wiggle {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.2); }
}

@keyframes whip-swing {
  0% { transform: rotate(-30deg); }
  50% { transform: rotate(30deg); }
  100% { transform: rotate(0deg); }
}

/* Whip crack effect */
.whip-animation::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(255, 200, 100, 0.8) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: whip-flash 0.2s ease-out;
}

.whip-animation.extending::after {
  opacity: 1;
}

@keyframes whip-flash {
  0% { transform: translateY(-50%) scale(0); opacity: 1; }
  100% { transform: translateY(-50%) scale(2); opacity: 0; }
}

/* Leashed Quinlan indicator */
.entity.dog_quinlan.leashed::after {
  content: '🪢';
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 14px;
  animation: leash-sway 1s ease-in-out infinite;
}

.entity.dog_quinlan.leashed {
  filter: brightness(1.1);
}

.leash-indicator {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 12px;
  animation: leash-sway 1s ease-in-out infinite;
}

@keyframes leash-sway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

/* Leash line from Quinlan to holder */
.leash-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, #8B4513, #A0522D);
  transform-origin: left center;
  pointer-events: none;
  z-index: 50;
  opacity: 0.7;
}

/* =============================================================================
   ENTITY SPECIAL STATES
   ============================================================================= */

/* Fertilized rose glow */
.entity.rose.fertilized .entity-sprite {
  filter: brightness(1.3) saturate(1.4) !important;
  animation: fertilize-glow 1.5s ease-in-out infinite !important;
}

@keyframes fertilize-glow {
  0%, 100% { filter: brightness(1.3) saturate(1.4) drop-shadow(0 0 8px rgba(74, 222, 128, 0.5)); }
  50% { filter: brightness(1.5) saturate(1.5) drop-shadow(0 0 15px rgba(74, 222, 128, 0.8)); }
}

/* Loved rose hearts */
.entity.rose.loved .entity-sprite {
  animation: love-pulse 1s ease-in-out infinite !important;
}

@keyframes love-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(244, 114, 182, 0.5)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 15px rgba(244, 114, 182, 0.8)); }
}

/* Dog styling */
.entity.dog .entity-sprite {
  font-size: 1.6rem;
}

.entity.dog .dog-name {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 700;
  color: white;
  background: rgba(0,0,0,0.6);
  padding: 1px 4px;
  border-radius: 4px;
}

.entity.dog.quinlan .entity-sprite {
  color: #8B4513;
}

.entity.dog.seamus .entity-sprite {
  color: #D2691E;
}

.entity.dog.excited .entity-sprite {
  animation: dog-excited 0.3s ease-in-out infinite !important;
}

@keyframes dog-excited {
  0%, 100% { transform: rotate(-5deg) scale(1.1); }
  50% { transform: rotate(5deg) scale(1.1); }
}

/* Dog barking - shake with sound waves */
.entity.dog.barking .entity-sprite {
  animation: dog-bark 0.15s ease-in-out infinite !important;
}

.entity.dog.barking::after {
  content: '🗯️';
  position: absolute;
  top: -15px;
  right: -10px;
  font-size: 14px;
  animation: bark-bubble 0.3s ease-in-out infinite;
}

@keyframes dog-bark {
  0%, 100% { transform: scale(1.1) translateX(-2px); }
  50% { transform: scale(1.15) translateX(2px); }
}

@keyframes bark-bubble {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

/* Dog aggressive - red glow, angry */
.entity.dog.aggressive .entity-sprite {
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.8)) !important;
  animation: dog-aggressive 0.2s ease-in-out infinite !important;
}

@keyframes dog-aggressive {
  0%, 100% { transform: scale(1.15) rotate(-3deg); }
  50% { transform: scale(1.2) rotate(3deg); }
}

/* Dog in pool - bobbing */
.entity.dog.drowning .entity-sprite {
  animation: dog-drowning 0.5s ease-in-out infinite !important;
  filter: brightness(0.8) saturate(0.7);
}

@keyframes dog-drowning {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(5px) rotate(5deg); }
}

/* Dog guarding - alert stance */
.entity.dog.guarding .entity-sprite {
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.6));
}

/* Visual indicator for Seamus helpfulness */
.entity.dog.seamus.helpful::before {
  content: '⭐';
  position: absolute;
  top: -10px;
  left: -5px;
  font-size: 10px;
  animation: helper-star 1s ease-in-out infinite;
}

@keyframes helper-star {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Lizard ally styling */
.entity.lizard .entity-sprite {
  font-size: 1.2rem;
  color: #22c55e;
  filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.4));
}

.entity.lizard.fleeing .entity-sprite {
  animation: lizard-flee 0.2s ease-in-out infinite !important;
}

@keyframes lizard-flee {
  0%, 100% { transform: translateX(-2px); }
  50% { transform: translateX(2px); }
}

/* Poop styling */
.entity.poop .entity-sprite {
  font-size: 1rem;
  filter: drop-shadow(0 0 4px rgba(139, 69, 19, 0.5));
}

/* Trash can styling */
.entity.trash-can .entity-sprite {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Jax poop indicator */
.poop-indicator {
  position: absolute;
  top: -15px;
  right: -10px;
  font-size: 0.7rem;
  background: rgba(139, 69, 19, 0.8);
  color: white;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 600;
}

/* =============================================================================
   SHANNON (HUSBAND NPC)
   ============================================================================= */

.entity.shannon .entity-sprite {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
}

.entity.shannon .shannon-name {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: bold;
  color: #fbbf24;
  background: rgba(0, 0, 0, 0.6);
  padding: 1px 4px;
  border-radius: 4px;
}

/* Shannon wandering animation */
.entity.shannon .entity-sprite {
  animation: shannon-idle 3s ease-in-out infinite;
}

@keyframes shannon-idle {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-2px) rotate(-2deg); }
  50% { transform: translateY(0); }
  75% { transform: translateY(-2px) rotate(2deg); }
}

/* Shannon helping - glowing green */
.entity.shannon.helping .entity-sprite {
  filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.8));
  animation: shannon-help 0.5s ease-in-out infinite !important;
}

@keyframes shannon-help {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Shannon leaving - walking animation */
.entity.shannon.leaving .entity-sprite {
  animation: shannon-walk 0.4s ease-in-out infinite !important;
}

@keyframes shannon-walk {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(2px) rotate(-5deg); }
  75% { transform: translateX(-2px) rotate(5deg); }
}

/* Shannon interaction hint */
.entity.shannon:hover::after {
  content: '👋 Click to send inside';
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
}

/* =============================================================================
   FLAVOR TEXT
   ============================================================================= */

.flavor-text {
  margin-top: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-accent) 100%);
  border-radius: 8px;
  font-style: italic;
  text-align: center;
  min-height: 40px;
  max-width: 100%;
  font-size: 0.85rem;
  border: 1px solid var(--bg-accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* =============================================================================
   FOOTER - Minimal Action Bar (Context Menus Handle Actions)
   ============================================================================= */

#game-footer {
  background: linear-gradient(0deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: var(--spacing-sm) var(--spacing-md);
  border-top: 2px solid var(--bg-accent);
  flex-shrink: 0;
}

/* =============================================================================
   WEAPON BAR - Primary Combat Controls
   ============================================================================= */

.weapon-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-radius: 12px;
  margin-bottom: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.weapon-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  min-width: 72px;
  min-height: 64px;
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.8) 0%, rgba(30, 41, 59, 0.9) 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  overflow: hidden;
}

.weapon-btn:hover {
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.9) 0%, rgba(51, 65, 85, 0.95) 100%);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.weapon-btn:active {
  transform: translateY(0) scale(0.98);
}

.weapon-btn.selected {
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.3) 0%, rgba(34, 197, 94, 0.25) 100%);
  border-color: var(--accent-green);
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.weapon-btn.selected .weapon-label {
  color: var(--accent-green);
}

.weapon-btn.selected .weapon-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.6));
}

/* Weapon button content */
.weapon-icon {
  font-size: 24px;
  line-height: 1;
  transition: all 0.15s ease;
}

.weapon-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  transition: color 0.15s ease;
}

.weapon-key {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 5px;
  border-radius: 4px;
}

/* Weapon cooldown overlay */
.weapon-btn .cooldown-overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.5) 0%, rgba(185, 28, 28, 0.7) 100%);
  pointer-events: none;
  transition: height 0.1s linear;
  z-index: 1;
}

.weapon-btn .cooldown-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.weapon-btn.on-cooldown .cooldown-text {
  opacity: 1;
}

.weapon-btn.on-cooldown {
  cursor: not-allowed;
}

.weapon-btn.on-cooldown .weapon-icon,
.weapon-btn.on-cooldown .weapon-label {
  opacity: 0.4;
}

/* Out of range indicator */
.weapon-btn.out-of-range {
  opacity: 0.5;
}

.weapon-btn.out-of-range::after {
  content: '⚠';
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 12px;
  color: #fbbf24;
}

/* Weapon-specific colors when selected */
.weapon-btn[data-weapon="bow"].selected {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.25) 100%);
  border-color: #3b82f6;
}

.weapon-btn[data-weapon="bow"].selected .weapon-label {
  color: #60a5fa;
}

.weapon-btn[data-weapon="sheers"].selected {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 38, 0.25) 100%);
  border-color: #ef4444;
}

.weapon-btn[data-weapon="sheers"].selected .weapon-label {
  color: #f87171;
}

.weapon-btn[data-weapon="dagger"].selected {
  background: linear-gradient(180deg, rgba(168, 162, 158, 0.3) 0%, rgba(120, 113, 108, 0.25) 100%);
  border-color: #a8a29e;
}

.weapon-btn[data-weapon="dagger"].selected .weapon-label {
  color: #d6d3d1;
}

/* Selected weapon pulse animation */
@keyframes weapon-pulse {
  0%, 100% {
    box-shadow: 0 0 16px rgba(74, 222, 128, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 24px rgba(74, 222, 128, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

.weapon-btn.selected.ready {
  animation: weapon-pulse 2s ease-in-out infinite;
}

/* Mobile weapon bar adjustments */
@media (max-width: 480px) {
  .weapon-bar {
    gap: 6px;
    padding: 6px 10px;
  }

  .weapon-btn {
    min-width: 60px;
    min-height: 54px;
    padding: 8px 12px;
  }

  .weapon-icon {
    font-size: 20px;
  }

  .weapon-label {
    font-size: 9px;
  }

  .weapon-key {
    font-size: 8px;
    padding: 1px 4px;
  }
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 400px;
  margin: 0 auto;
}

/* Resources display */
.resources-display {
  display: flex;
  gap: 12px;
  align-items: center;
}

.resource {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
}

.resource-icon {
  font-size: 1.2rem;
}

.resource-count {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

#water-resource .resource-count { color: #60a5fa; }
#fertilizer-resource .resource-count { color: #4ade80; }
#poop-resource .resource-count { color: #f59e0b; }

#poop-resource.has-poop {
  background: rgba(139, 69, 19, 0.3);
  border-color: rgba(245, 158, 11, 0.5);
  animation: poop-bounce 0.5s ease-out;
}

@keyframes poop-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.actions-remaining {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.action-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.action-count {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-green);
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
  min-width: 30px;
  text-align: center;
}

.end-turn-btn {
  background: linear-gradient(180deg, var(--accent-green) 0%, #22c55e 100%);
  border: none;
  color: var(--bg-primary);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
}

.end-turn-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(74, 222, 128, 0.5);
}

.end-turn-btn:active {
  transform: translateY(0) scale(0.98);
}

/* =============================================================================
   PAUSE/PLAY BUTTON STYLES
   ============================================================================= */

.end-turn-btn.play-mode {
  background: linear-gradient(180deg, var(--accent-green) 0%, #22c55e 100%);
  box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
  animation: pulse-play 2s ease-in-out infinite;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 28px;
}

.end-turn-btn.pause-mode {
  background: linear-gradient(180deg, var(--accent-yellow) 0%, #f59e0b 100%);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.end-turn-btn.pause-mode:hover {
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
}

@keyframes pulse-play {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 24px rgba(74, 222, 128, 0.8);
    transform: scale(1.05);
  }
}

/* =============================================================================
   COOLDOWN OVERLAY STYLES
   ============================================================================= */

.action-menu .action-btn {
  position: relative;
  overflow: hidden;
}

.action-menu .action-btn .cooldown-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition: height 0.1s linear;
  z-index: 1;
}

.action-menu .action-btn .cooldown-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: bold;
  color: var(--accent-yellow);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  z-index: 2;
  pointer-events: none;
}

.action-menu .action-btn.on-cooldown {
  opacity: 0.7;
  cursor: not-allowed;
}

.action-menu .action-btn.on-cooldown:hover {
  background: transparent;
  border-color: transparent;
  transform: none;
}

.action-menu .action-btn.on-cooldown .action-icon,
.action-menu .action-btn.on-cooldown .action-label {
  opacity: 0.5;
}

/* DEPRECATED: Old footer action buttons - hide only footer ones */
#game-footer .action-buttons { display: none !important; }

/* =============================================================================
   EVENT LOG
   ============================================================================= */

.event-log {
  position: fixed;
  bottom: 80px;
  right: var(--spacing-sm);
  width: 250px;
  max-height: 200px;
  background: var(--bg-secondary);
  border: 1px solid var(--bg-accent);
  border-radius: 8px;
  z-index: 100;
  transition: max-height 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.event-log.collapsed {
  max-height: 30px;
  overflow: hidden;
}

.log-header {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--bg-accent);
  cursor: pointer;
  font-size: 0.8rem;
  border-radius: 8px 8px 0 0;
}

.log-content {
  padding: var(--spacing-xs);
  max-height: 160px;
  overflow-y: auto;
  font-size: 0.75rem;
}

.log-entry {
  padding: 2px 0;
  border-bottom: 1px solid var(--bg-accent);
}

.log-entry:last-child {
  border-bottom: none;
}

/* =============================================================================
   OVERLAYS
   ============================================================================= */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(15, 52, 96, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--spacing-md);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay.hidden {
  display: none;
}

.overlay-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 32px 24px;
  border-radius: 16px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 3px solid var(--accent-green);
  box-shadow:
    0 0 40px rgba(74, 222, 128, 0.4),
    0 20px 60px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Ready Overlay - Shows "Get Ready!" countdown */
#ready-overlay .overlay-content {
  max-width: 350px;
  padding: 48px 32px;
}

.ready-message {
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent-green);
  text-shadow: 0 0 30px rgba(74, 222, 128, 0.8);
  margin: 0 0 24px 0;
  animation: scaleIn 0.5s ease-out;
}

.ready-instructions {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin: 0;
}

@keyframes scaleIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Splash Hero Section */
.splash-hero {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(74, 222, 128, 0.3);
}

.splash-title {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-green) 0%, #22c55e 50%, var(--accent-yellow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  text-shadow: 0 0 30px rgba(74, 222, 128, 0.5);
  letter-spacing: -1px;
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

.splash-subtitle {
  font-size: 0.95rem;
  color: var(--accent-blue);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Character Card */
.character-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
  padding: 16px;
  border-radius: 12px;
  border: 2px solid rgba(74, 222, 128, 0.3);
  margin-bottom: 20px;
  text-align: left;
}

.character-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-green) 0%, #22c55e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--bg-primary);
  box-shadow: 0 4px 12px rgba(74, 222, 128, 0.5);
  flex-shrink: 0;
}

.character-description {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.5;
}

.character-description p {
  margin-bottom: 8px;
}

.character-description p:last-child {
  margin-bottom: 0;
  color: var(--text-secondary);
}

.character-description strong {
  color: var(--accent-green);
  font-size: 0.9rem;
}

/* Quick Stats */
.quick-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-item {
  flex: 1;
  background: var(--bg-primary);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.2);
  transition: all 0.2s ease;
}

.stat-item:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent-green);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Start Form */
.start-form {
  margin-bottom: 16px;
}

/* Primary Start Button */
.start-btn-primary {
  width: 100%;
  padding: 18px 32px;
  background: linear-gradient(135deg, var(--accent-green) 0%, #22c55e 100%);
  color: var(--bg-primary);
  border: none;
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow:
    0 8px 24px rgba(74, 222, 128, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(74, 222, 128, 0.3);
}

.start-btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.start-btn-primary:hover::before {
  left: 100%;
}

.start-btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 12px 32px rgba(74, 222, 128, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.start-btn-primary:active {
  transform: translateY(-1px) scale(0.98);
}

.start-btn-primary .btn-icon {
  font-size: 1.1rem;
}

.start-btn-primary .btn-text {
  letter-spacing: 1px;
}

/* Tutorial Button */
.start-btn-tutorial {
  width: 100%;
  padding: 14px 28px;
  margin-top: 12px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: var(--bg-primary);
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow:
    0 6px 20px rgba(245, 158, 11, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.start-btn-tutorial:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    0 10px 28px rgba(245, 158, 11, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.start-btn-tutorial:active {
  transform: translateY(-1px) scale(0.98);
}

.start-btn-tutorial .btn-icon {
  font-size: 1rem;
}

.start-btn-tutorial .btn-text {
  letter-spacing: 0.5px;
}

/* Skip Tutorial Section - Small, deliberate action */
.skip-tutorial-section {
  text-align: center;
  margin: 8px 0 16px;
}

.skip-tutorial-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  font-weight: 400;
  cursor: pointer;
  padding: 6px 12px;
  transition: all 0.2s ease;
  text-decoration: none;
  letter-spacing: 0.5px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
}

.skip-tutorial-btn:hover {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
}

.skip-tutorial-btn:active {
  color: rgba(255, 255, 255, 0.5);
}

/* Standard Start Button (used in game over screen) */
.start-btn {
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent-green) 0%, #22c55e 100%);
  color: var(--bg-primary);
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(74, 222, 128, 0.4);
  transition: all 0.2s ease;
}

.start-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(74, 222, 128, 0.5);
}

.start-btn:active {
  transform: translateY(-1px);
}

/* Secondary Actions */
.secondary-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.secondary-btn {
  flex: 1;
  padding: 10px 16px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--bg-accent);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  border-color: var(--accent-blue);
  background: rgba(96, 165, 250, 0.1);
  transform: translateY(-2px);
}

.secondary-btn .btn-icon {
  font-size: 1rem;
}

/* Section Title */
.section-title {
  font-size: 1.1rem;
  color: var(--accent-green);
  margin-bottom: 12px;
  text-align: left;
  font-weight: 700;
}

/* Tutorial Section */
.tutorial-section {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 2px solid rgba(59, 130, 246, 0.4);
  text-align: left;
  animation: expandIn 0.3s ease-out;
}

@keyframes expandIn {
  from {
    max-height: 0;
    opacity: 0;
    padding: 0 16px;
  }
  to {
    max-height: 500px;
    opacity: 1;
    padding: 16px;
  }
}

.final-stats {
  margin: var(--spacing-md) 0;
  text-align: left;
  background: var(--bg-primary);
  padding: var(--spacing-sm);
  border-radius: 8px;
}

.final-stats .stat {
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid var(--bg-accent);
  display: flex;
  justify-content: space-between;
}

.final-stats .stat span {
  color: var(--accent-green);
  font-weight: bold;
}

.final-stats .stat small {
  color: var(--accent-yellow);
  font-size: 0.8rem;
  margin-left: 4px;
}

/* Currency earned highlight */
.final-stats .currency-earned {
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.1), transparent);
  border-left: 3px solid var(--accent-green);
  padding-left: 8px;
  margin-top: 8px;
}

.final-stats .currency-earned .highlight {
  color: var(--accent-green);
  font-size: 1.2em;
}

.final-stats .badge {
  background: var(--accent-yellow);
  color: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7em;
  font-weight: bold;
  margin-left: 8px;
  animation: badgePulse 1s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Progress stats on start screen */
.progress-stats {
  background: var(--bg-primary);
  border-radius: 8px;
  padding: 12px;
  margin: 16px 0;
  border: 1px solid var(--bg-accent);
}

.progress-stats .stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.progress-stats .stat-row:last-child {
  border-bottom: none;
}

.progress-stats .stat-row span:last-child {
  color: var(--accent-green);
  font-weight: bold;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.tutorial-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.2s ease;
}

.tutorial-item:hover {
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.tutorial-icon {
  font-size: 1.3rem;
  line-height: 1;
  margin-bottom: 2px;
}

.tutorial-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.tutorial-tips {
  margin-top: 8px;
  padding: 10px;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 6px;
  border-left: 3px solid var(--accent-blue);
}

.tutorial-tips p {
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.tutorial-tips p:last-child {
  margin-bottom: 0;
}

.tutorial-tips strong {
  color: var(--accent-yellow);
}

/* Upgrade Shop */
.upgrade-shop {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 2px solid rgba(167, 139, 250, 0.4);
  max-height: 320px;
  overflow-y: auto;
  animation: expandIn 0.3s ease-out;
}

.upgrade-stats {
  background: var(--bg-secondary);
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.upgrade-stats strong {
  color: var(--accent-green);
  font-size: 1.1rem;
}

.upgrade-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
  border: 1px solid var(--bg-accent);
  transition: all 0.2s ease;
}

.upgrade-item:hover:not(.owned):not(.unaffordable) {
  border-color: var(--accent-green);
  background: rgba(74, 222, 128, 0.1);
}

.upgrade-item.owned {
  opacity: 0.7;
  background: rgba(74, 222, 128, 0.1);
  border-color: var(--accent-green);
}

.upgrade-item.unaffordable {
  opacity: 0.5;
}

.upgrade-info {
  flex: 1;
}

.upgrade-name {
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.upgrade-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.upgrade-action {
  margin-left: 12px;
}

.buy-btn {
  background: linear-gradient(180deg, var(--accent-green) 0%, #22c55e 100%);
  color: var(--bg-primary);
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.buy-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.buy-btn:disabled {
  background: var(--bg-accent);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.owned-badge {
  color: var(--accent-green);
  font-weight: bold;
}

/* Victory celebration styles */
#game-over-screen.victory .overlay-content {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.5),
              0 0 80px rgba(74, 222, 128, 0.3);
  animation: victoryGlow 2s ease-in-out infinite;
}

@keyframes victoryGlow {
  0%, 100% {
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.5),
                0 0 80px rgba(74, 222, 128, 0.3);
  }
  50% {
    box-shadow: 0 0 60px rgba(251, 191, 36, 0.7),
                0 0 100px rgba(74, 222, 128, 0.5);
  }
}

#game-over-screen.victory .overlay-content h1 {
  animation: victoryPulse 1s ease-in-out infinite;
}

@keyframes victoryPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* =============================================================================
   RESPONSIVE - Landscape / Desktop
   ============================================================================= */

@media (min-width: 768px) and (orientation: landscape) {
  #app {
    flex-direction: row;
    flex-wrap: wrap;
  }

  #game-header {
    width: 100%;
    order: 1;
  }

  #game-main {
    flex: 2;
    order: 2;
  }

  #game-footer {
    width: 200px;
    order: 3;
    border-top: none;
    border-left: 2px solid var(--bg-accent);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
  }

  .event-log {
    position: static;
    width: 100%;
    order: 4;
  }

  :root {
    --tile-size: calc((100vh - 150px) / var(--grid-size));
  }
}

/* Large screens - Override landscape sidebar layout, keep vertical */
@media (min-width: 1024px) {
  :root {
    --tile-size: 50px;
  }

  /* Force vertical layout on desktop */
  #app {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
  }

  #game-header {
    width: 100% !important;
    flex-shrink: 0;
    padding: 8px 16px;
  }

  #game-main {
    flex: 1 !important;
    order: 2 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    min-height: 0;
  }

  #game-footer {
    width: 100% !important;
    order: 3 !important;
    border-top: 2px solid var(--bg-accent);
    border-left: none !important;
    flex-shrink: 0;
    padding: 8px 16px;
  }

  #game-board {
    width: min(65vh, 650px);
    height: min(65vh, 650px);
    max-width: 650px;
    max-height: 650px;
  }

  .game-title {
    font-size: 1.5rem;
  }

  .meter-label {
    font-size: 0.8rem;
  }

  .meter-bar {
    height: 12px;
  }

  .weapon-bar {
    max-width: 500px;
    margin: 0 auto 8px auto;
  }

  .footer-bar {
    max-width: 500px;
    margin: 0 auto;
  }

  .entity {
    width: 52px !important;
    height: 52px !important;
  }

  .entity-sprite {
    font-size: 32px;
  }
}

/* Mobile - Full screen game board */
@media (max-width: 768px) {
  body {
    overflow: hidden;
  }

  #app {
    height: 100vh;
    height: 100dvh;
  }

  #game-header {
    padding: 4px 8px;
    border-bottom: 1px solid var(--bg-accent);
  }

  .game-title {
    font-size: 1rem;
  }

  .wave-indicator {
    font-size: 0.8rem;
  }

  .meters-row {
    gap: 4px;
  }

  .meter {
    padding: 2px 4px;
  }

  .meter-label {
    font-size: 0.6rem;
  }

  .meter-bar {
    height: 6px;
  }

  .meter-value {
    font-size: 0.65rem;
  }

  #game-main {
    padding: 0;
    flex: 1;
    min-height: 0;
  }

  #game-board {
    width: 100vw;
    height: calc(100vw);
    max-width: none;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .flavor-text {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px;
    font-size: 0.8rem;
    z-index: 100;
  }

  #game-footer {
    padding: 4px 8px;
    border-top: 1px solid var(--bg-accent);
  }

  /* Mobile weapon bar */
  .weapon-bar {
    gap: 4px;
    padding: 4px 8px;
    margin-bottom: 4px;
  }

  .weapon-btn {
    min-width: 56px;
    min-height: 48px;
    padding: 6px 10px;
  }

  .weapon-icon {
    font-size: 18px;
  }

  .weapon-label {
    font-size: 8px;
    margin-top: 2px;
  }

  .weapon-key {
    font-size: 7px;
    padding: 1px 3px;
    top: 2px;
    right: 3px;
  }

  .footer-bar {
    gap: 8px;
  }

  .action-label {
    font-size: 0.7rem;
  }

  .action-count {
    font-size: 1rem;
    min-width: 24px;
    height: 24px;
  }

  .end-turn-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  /* Always show HP bars on mobile - no hover available */
  .entity .entity-hp {
    opacity: 1 !important;
  }

  /* Action menu mobile adjustments */
  .action-menu {
    bottom: 70px;
    max-width: 95vw;
  }

  .action-menu-inner {
    gap: 4px;
    padding: 8px;
  }

  .action-btn {
    padding: 8px 10px;
    font-size: 0.7rem;
    min-width: 50px;
    min-height: 48px;
  }

  .action-icon {
    font-size: 1.2rem;
  }

  /* Event log mobile */
  #event-log {
    max-height: 100px;
    font-size: 0.7rem;
  }

  /* Splash screen mobile adjustments */
  .splash-title {
    font-size: 2rem;
  }

  .character-card {
    flex-direction: column;
    text-align: center;
  }

  .character-avatar {
    width: 56px;
    height: 56px;
    font-size: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .start-btn-primary {
    font-size: 1.1rem;
    padding: 16px 24px;
  }

  .tutorial-grid {
    grid-template-columns: 1fr;
  }
}

/* Small mobile */
@media (max-width: 380px) {
  :root {
    --tile-size: calc((100vw - 20px) / var(--grid-size));
  }

  #game-header {
    padding: 2px 4px;
  }

  .game-title {
    font-size: 0.9rem;
  }

  .action-btn {
    padding: 6px 8px;
    font-size: 0.65rem;
    min-width: 48px;
    min-height: 48px;
  }

  .meter-label {
    font-size: 0.55rem;
  }

  .end-turn-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* =============================================================================
   UTILITY ANIMATIONS
   ============================================================================= */

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pulse { animation: pulse 0.5s ease; }
.shake { animation: shake 0.3s ease; }
.float { animation: float 2s ease-in-out infinite; }

/* Attack indicator */
.tile.attacking::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 100, 100, 0.4);
  animation: attack-flash 0.2s ease;
  pointer-events: none;
}

@keyframes attack-flash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Leash effect */
.leash-line {
  position: absolute;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
  transform-origin: left center;
  z-index: 50;
  pointer-events: none;
  box-shadow: 0 0 8px var(--accent-purple);
}

/* =============================================================================
   ENVIRONMENTAL EFFECTS - Weather & Ambience
   ============================================================================= */

/* Time of day lighting overlay */
.time-of-day-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
  transition: background 2s ease;
}

/* Morning (default) - bright, crisp light */
.time-of-day-overlay.morning {
  background: radial-gradient(
    ellipse at 30% 20%,
    rgba(255, 248, 220, 0.2) 0%,
    rgba(135, 206, 250, 0.1) 50%,
    transparent 100%
  );
}

/* Afternoon - warm golden light */
.time-of-day-overlay.afternoon {
  background: radial-gradient(
    ellipse at 70% 30%,
    rgba(255, 223, 186, 0.3) 0%,
    rgba(255, 200, 124, 0.15) 50%,
    transparent 100%
  );
}

/* Evening - orange/pink sunset glow */
.time-of-day-overlay.evening {
  background: radial-gradient(
    ellipse at 80% 40%,
    rgba(255, 165, 100, 0.35) 0%,
    rgba(255, 105, 180, 0.2) 40%,
    rgba(75, 0, 130, 0.1) 100%
  );
}

/* Cloud shadow passing effect */
@keyframes cloud-shadow {
  0% { transform: translateX(-120%) translateY(-20%); opacity: 0; }
  5% { opacity: 0.15; }
  45% { opacity: 0.15; }
  50% { transform: translateX(120%) translateY(20%); opacity: 0; }
  100% { transform: translateX(120%) translateY(20%); opacity: 0; }
}

.cloud-shadow {
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.08) 30%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 2;
  animation: cloud-shadow 25s ease-in-out infinite;
}

/* Heat shimmer effect for hot day */
@keyframes heat-shimmer {
  0%, 100% { transform: translateY(0) scaleY(1); opacity: 0.3; }
  25% { transform: translateY(-2px) scaleY(1.02); opacity: 0.5; }
  50% { transform: translateY(0) scaleY(0.98); opacity: 0.3; }
  75% { transform: translateY(2px) scaleY(1.01); opacity: 0.4; }
}

.heat-shimmer {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    rgba(255, 255, 255, 0.03) 2px,
    transparent 4px,
    rgba(255, 255, 255, 0.02) 6px,
    transparent 8px
  );
  pointer-events: none;
  z-index: 3;
  animation: heat-shimmer 2s ease-in-out infinite;
  opacity: 0;
}

.heat-shimmer.active {
  opacity: 1;
}

/* =============================================================================
   AMBIENT PARTICLES - Floating elements
   ============================================================================= */

/* Particle container */
.particle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}

/* Floating dust/pollen motes */
@keyframes particle-float {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translate(var(--drift-x, 20px), var(--drift-y, -100px)) rotate(360deg);
    opacity: 0;
  }
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: particle-float var(--duration, 8s) linear infinite;
  animation-delay: var(--delay, 0s);
}

.particle.pollen {
  background: rgba(251, 191, 36, 0.5);
  width: 3px;
  height: 3px;
  box-shadow: 0 0 2px rgba(251, 191, 36, 0.8);
}

/* Dragonfly near pool */
@keyframes dragonfly-flight {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(30px, -15px) rotate(15deg);
  }
  50% {
    transform: translate(50px, -5px) rotate(-10deg);
  }
  75% {
    transform: translate(20px, -20px) rotate(20deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

.dragonfly {
  position: absolute;
  font-size: 16px;
  animation: dragonfly-flight 4s ease-in-out infinite;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
  opacity: 0.8;
}

/* Butterfly near flowers */
@keyframes butterfly-flutter {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  15% {
    transform: translate(8px, -12px) rotate(10deg) scale(1.05);
  }
  30% {
    transform: translate(15px, -8px) rotate(-5deg) scale(0.95);
  }
  45% {
    transform: translate(20px, -15px) rotate(15deg) scale(1.1);
  }
  60% {
    transform: translate(12px, -10px) rotate(-8deg) scale(0.9);
  }
  75% {
    transform: translate(5px, -18px) rotate(12deg) scale(1.05);
  }
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

.butterfly {
  position: absolute;
  font-size: 14px;
  animation: butterfly-flutter 3.5s ease-in-out infinite;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
  opacity: 0.9;
}

/* Bee near roses */
@keyframes bee-buzz {
  0%, 100% {
    transform: translate(0, 0);
  }
  10% {
    transform: translate(3px, -2px);
  }
  20% {
    transform: translate(-2px, -4px);
  }
  30% {
    transform: translate(4px, -1px);
  }
  40% {
    transform: translate(-3px, -5px);
  }
  50% {
    transform: translate(2px, -3px);
  }
  60% {
    transform: translate(-4px, -2px);
  }
  70% {
    transform: translate(3px, -4px);
  }
  80% {
    transform: translate(-1px, -1px);
  }
  90% {
    transform: translate(2px, -3px);
  }
}

.bee {
  position: absolute;
  font-size: 12px;
  animation: bee-buzz 0.8s ease-in-out infinite;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* Sparkle effect for water in sunlight */
@keyframes water-sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.water-sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: water-sparkle 1.5s ease-in-out infinite;
  animation-delay: var(--sparkle-delay, 0s);
}

/* Wind gust visual effect */
@keyframes wind-gust {
  0% {
    transform: translateX(-100%) scaleX(0.5);
    opacity: 0;
  }
  20% {
    opacity: 0.3;
  }
  80% {
    opacity: 0.3;
  }
  100% {
    transform: translateX(100%) scaleX(1.5);
    opacity: 0;
  }
}

.wind-gust {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 40%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.1) 60%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 5;
  animation: wind-gust 3s ease-in-out;
  opacity: 0;
}

.wind-gust.active {
  animation: wind-gust 3s ease-in-out;
}

/* Leaf particle falling from trees */
@keyframes leaf-fall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 1;
  }
  25% {
    transform: translateY(10px) rotate(90deg) translateX(5px);
  }
  50% {
    transform: translateY(20px) rotate(180deg) translateX(-3px);
  }
  75% {
    transform: translateY(30px) rotate(270deg) translateX(7px);
  }
  100% {
    transform: translateY(40px) rotate(360deg) translateX(0);
    opacity: 0;
  }
}

.falling-leaf {
  position: absolute;
  font-size: 10px;
  animation: leaf-fall 3s ease-in-out forwards;
  pointer-events: none;
  opacity: 0.8;
}

/* =============================================================================
   WEATHER-TRIGGERED EFFECTS (add these classes to #game-board)
   ============================================================================= */

/* Sunny day enhancement */
#game-board.sunny .tile.grass,
#game-board.sunny .tile.dirt {
  filter: brightness(1.05) saturate(1.1);
}

#game-board.sunny .tile.pool {
  filter: brightness(1.15) saturate(1.2);
}

/* Overcast day */
#game-board.overcast .tile {
  filter: brightness(0.9) saturate(0.85);
}

/* Hot day - activate heat shimmer */
#game-board.hot .heat-shimmer {
  opacity: 1;
}

/* Windy day - enhance sway animations */
#game-board.windy .entity.rose .entity-sprite {
  animation: rose-sway 2s ease-in-out infinite;
}

#game-board.windy .entity.tree .entity-sprite {
  animation: tree-rustle 2.5s ease-in-out infinite;
}

#game-board.windy .tile.grass::before {
  animation: grass-sway 2s ease-in-out infinite;
}

/* =============================================================================
   VISUAL EFFECTS - Feedback Popups
   ============================================================================= */

/* Feedback popup (errors, notifications) */
.feedback-popup {
  position: absolute;
  font-size: 12px;
  font-weight: bold;
  color: #ff6b6b;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  animation: feedback-pop 1s ease-out forwards;
  pointer-events: none;
  z-index: 200;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

@keyframes feedback-pop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  30% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -100%) scale(1); opacity: 0; }
}

/* Score popup */
.score-popup {
  position: absolute;
  font-size: 16px;
  font-weight: bold;
  color: var(--accent-green);
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.8), 0 2px 4px rgba(0,0,0,0.8);
  animation: score-pop 1s ease-out forwards;
  pointer-events: none;
  z-index: 200;
  transform: translate(-50%, -50%);
}

@keyframes score-pop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  20% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
  40% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -150%) scale(1); opacity: 0; }
}

/* NPC Speech Bubble */
.npc-speech-bubble {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid var(--npc-color, #888);
  border-radius: 12px;
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.4),
    0 0 10px rgba(var(--npc-color, 136), 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translate(-50%, 0);
  pointer-events: none;
  z-index: 250;
  animation: npc-bubble-in 0.3s ease-out, npc-bubble-out 0.5s ease-in 3.5s forwards;
  white-space: nowrap;
  max-width: 250px;
}

.npc-speech-bubble .npc-emoji {
  font-size: 18px;
  flex-shrink: 0;
}

.npc-speech-bubble .npc-name {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.npc-speech-bubble .npc-text {
  font-size: 12px;
  color: white;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes npc-bubble-in {
  0% { transform: translate(-50%, 10px) scale(0.8); opacity: 0; }
  100% { transform: translate(-50%, 0) scale(1); opacity: 1; }
}

@keyframes npc-bubble-out {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -10px); opacity: 0; }
}

/* Gardener entity styling */
.entity.gardener {
  pointer-events: none; /* NPCs are not clickable */
}

.entity.gardener .entity-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.entity.gardener .entity-sprite {
  font-size: 1.8rem;
}

.entity.gardener .gardener-name {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 700;
  color: white;
  background: rgba(34, 197, 94, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.entity.gardener.roberto .entity-sprite::after {
  content: '🧑‍🌾';
}

.entity.gardener.miguel .entity-sprite::after {
  content: '👷';
}

/* Pool Guy entity styling */
.entity.pool-guy {
  pointer-events: none;
}

.entity.pool-guy .entity-sprite {
  font-size: 1.8rem;
}

.entity.pool-guy .pool-guy-name {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 700;
  color: white;
  background: rgba(6, 182, 212, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Click indicator - instant visual feedback on board clicks */
.click-indicator {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 3px solid var(--accent-yellow);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 150;
  animation: click-pulse 0.4s ease-out forwards;
}

@keyframes click-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 1;
    border-width: 4px;
  }
  50% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
    border-width: 1px;
  }
}

/* Target indicator - shows when clicking on enemies */
.target-indicator {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 3px solid var(--accent-red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 155;
  animation: target-lock 0.6s ease-out forwards;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
}

@keyframes target-lock {
  0% {
    transform: translate(-50%, -50%) scale(1.5) rotate(0deg);
    opacity: 0;
    border-width: 2px;
  }
  30% {
    transform: translate(-50%, -50%) scale(0.8) rotate(90deg);
    opacity: 1;
    border-width: 4px;
  }
  60% {
    transform: translate(-50%, -50%) scale(1) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2) rotate(270deg);
    opacity: 0;
    border-width: 1px;
  }
}

/* Attack icon indicator - shows weapon type above target */
.attack-icon-indicator {
  position: absolute;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: attack-icon-appear 0.3s ease-out forwards;
}

.attack-icon-emoji {
  font-size: 36px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px currentColor;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
  animation: attack-icon-bounce 0.3s ease-out;
}

.attack-icon-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  margin-top: -4px;
}

@keyframes attack-icon-appear {
  0% {
    transform: translateX(-50%) translateY(20px) scale(0.5);
    opacity: 0;
  }
  50% {
    transform: translateX(-50%) translateY(-5px) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes attack-icon-bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
}

.attack-icon-indicator.attack-icon-fade {
  animation: attack-icon-fade-out 0.5s ease-out forwards;
}

@keyframes attack-icon-fade-out {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-30px) scale(0.8);
    opacity: 0;
  }
}

/* =============================================================================
   PARTICLE EFFECTS
   ============================================================================= */

/* Kill particles - burst on enemy death */
.kill-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 195;
  transform: translate(-50%, -50%);
  animation: particle-burst 0.6s ease-out forwards;
}

@keyframes particle-burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(
      calc(-50% + var(--end-x, 30px)),
      calc(-50% + var(--end-y, 30px))
    ) scale(0.3);
  }
}

/* Hit spark - flash on damage */
.hit-spark {
  position: absolute;
  font-size: 28px;
  pointer-events: none;
  z-index: 198;
  transform: translate(-50%, -50%);
  animation: spark-flash 0.3s ease-out forwards;
}

@keyframes spark-flash {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

/* Damage number - floats up */
.damage-number {
  position: absolute;
  font-size: 16px;
  font-weight: 900;
  color: #ef4444;
  text-shadow:
    0 0 5px rgba(239, 68, 68, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 199;
  transform: translate(-50%, -50%);
  animation: damage-float 0.8s ease-out forwards;
}

@keyframes damage-float {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -150%) scale(0.8);
  }
}

/* Heal effect - sparkle on heal */
.heal-effect {
  position: absolute;
  font-size: 24px;
  pointer-events: none;
  z-index: 197;
  transform: translate(-50%, -50%);
  animation: heal-sparkle 0.8s ease-out forwards;
}

@keyframes heal-sparkle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(0deg);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2) rotate(180deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -80%) scale(0.5) rotate(360deg);
  }
}

/* Dodge effect */
.dodge-effect {
  position: absolute;
  font-size: 14px;
  font-weight: bold;
  color: #60a5fa;
  text-shadow: 0 0 8px rgba(96, 165, 250, 0.8);
  animation: dodge-flash 0.8s ease-out forwards;
  pointer-events: none;
  z-index: 200;
  transform: translate(-50%, -50%);
}

@keyframes dodge-flash {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  30% { transform: translate(-50%, -70%) scale(1.3); }
  100% { transform: translate(-50%, -100%) scale(0.8); opacity: 0; }
}

/* AOE effect circle */
.aoe-effect {
  position: absolute;
  border: 3px solid var(--accent-purple);
  border-radius: 50%;
  pointer-events: none;
  z-index: 150;
  transform: translate(-50%, -50%);
  animation: aoe-expand 0.5s ease-out forwards;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.3) 0%, transparent 70%);
}

@keyframes aoe-expand {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}

/* Arrow projectile */
.arrow-projectile {
  position: absolute;
  font-size: 20px;
  color: var(--accent-yellow);
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
  pointer-events: none;
  z-index: 180;
  transition: left 0.25s linear, top 0.25s linear;
}

/* Leap effect for jumper grasshoppers */
.leap-effect {
  position: absolute;
  font-size: 24px;
  pointer-events: none;
  z-index: 175;
  transition: left 0.35s ease-out, top 0.35s ease-out, opacity 0.35s ease-out;
  filter: blur(1px);
}

/* Spawn warning indicator - strategic depth */
.spawn-warning {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 200;
  animation: spawn-warning-pulse linear forwards;
}

.spawn-warning .warning-icon {
  display: block;
  font-size: 32px;
  animation: warning-pulse 0.3s ease-in-out infinite alternate;
  text-shadow:
    0 0 10px rgba(239, 68, 68, 0.8),
    0 0 20px rgba(239, 68, 68, 0.5);
}

@keyframes spawn-warning-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5);
  }
}

@keyframes warning-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

/* Attack telegraph line - shows where enemy will attack */
.attack-telegraph {
  position: absolute;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(239, 68, 68, 0.3) 10%,
    rgba(239, 68, 68, 0.8) 50%,
    rgba(239, 68, 68, 0.3) 90%,
    transparent 100%
  );
  transform-origin: left center;
  pointer-events: none;
  z-index: 170;
  animation: telegraph-pulse linear forwards;
}

.attack-telegraph::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, rgba(239, 68, 68, 1) 30%, transparent 70%);
  border-radius: 50%;
  animation: target-pulse 0.2s ease-in-out infinite alternate;
}

@keyframes telegraph-pulse {
  0% {
    opacity: 0.3;
    filter: blur(2px);
  }
  50% {
    opacity: 1;
    filter: blur(0);
  }
  80% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 0;
    filter: blur(3px);
  }
}

@keyframes target-pulse {
  from {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
  }
  to {
    transform: translateY(-50%) scale(1.3);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
  }
}

/* Enemy in telegraphing state - visual indicator */
.entity.enemy.telegraphing {
  animation: enemy-windup 0.2s ease-in-out infinite alternate !important;
}

@keyframes enemy-windup {
  from {
    transform: translate(-50%, -50%) scale(1) rotate(-5deg);
  }
  to {
    transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
  }
}

/* Combo popup */
.combo-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: 900;
  color: var(--accent-yellow);
  text-shadow:
    0 0 20px rgba(251, 191, 36, 1),
    0 0 40px rgba(251, 191, 36, 0.8),
    0 4px 8px rgba(0,0,0,0.5);
  z-index: 2000;
  pointer-events: none;
  animation: combo-pulse 0.5s ease infinite;
  display: none;
}

@keyframes combo-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* Entity sizing for proximity system */
.entity {
  width: 48px;
  height: 48px;
}

.entity-sprite {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.6));
  transition: transform 0.15s ease;
}

.entity:hover .entity-sprite {
  transform: scale(1.15);
}

/* ALL enemies are ALWAYS clickable - critical for combat */
/* LARGE HITBOXES for easy targeting */
.entity.grasshopper,
.entity.grasshopper_swarm,
.entity.grasshopper_jumper {
  width: 64px !important;  /* Larger hitbox */
  height: 64px !important;
  pointer-events: auto !important;
  z-index: 15; /* Above other entities for click priority */
}

.entity.grasshopper_queen {
  width: 72px !important;  /* Even larger for queen */
  height: 72px !important;
  pointer-events: auto !important;
  z-index: 15;
}

/* Enemy targeting hover - PROMINENT red glow indicates targetable */
.entity.grasshopper:hover,
.entity.grasshopper_swarm:hover,
.entity.grasshopper_jumper:hover,
.entity.grasshopper_queen:hover {
  z-index: 20 !important; /* Pop to front on hover */
}

.entity.grasshopper:hover .entity-sprite,
.entity.grasshopper_swarm:hover .entity-sprite,
.entity.grasshopper_jumper:hover .entity-sprite,
.entity.grasshopper_queen:hover .entity-sprite {
  filter: drop-shadow(0 0 10px #ff0000) drop-shadow(0 0 20px #ff3333) drop-shadow(0 0 30px #ff6666) !important;
  transform: scale(1.25);
  transition: transform 0.1s ease, filter 0.1s ease;
}

/* Attack hit feedback - enemy flashes white when hit */
.entity.grasshopper.hit,
.entity.grasshopper_swarm.hit,
.entity.grasshopper_jumper.hit,
.entity.grasshopper_queen.hit {
  animation: enemy-hit 0.2s ease-out;
}

@keyframes enemy-hit {
  0% { filter: brightness(3) drop-shadow(0 0 20px white); transform: scale(1.3); }
  50% { filter: brightness(2) drop-shadow(0 0 15px #ff6666); transform: scale(1.1); }
  100% { filter: brightness(1); transform: scale(1); }
}

/* Enemy death animation */
.entity.grasshopper.dying,
.entity.grasshopper_swarm.dying,
.entity.grasshopper_jumper.dying,
.entity.grasshopper_queen.dying {
  animation: enemy-death 0.4s ease-out forwards;
  pointer-events: none !important;
}

@keyframes enemy-death {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.2) rotate(180deg); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(0) rotate(360deg); opacity: 0; }
}

/* =============================================================================
   JAX - Hero Character Styling (Black woman with long dreadlocks)
   ============================================================================= */

.entity.jax {
  width: 56px !important;
  height: 56px !important;
  z-index: 100;
}

.entity.jax .entity-sprite {
  filter: drop-shadow(0 0 12px var(--accent-purple));
  animation: hero-pulse 2s ease-in-out infinite;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.jax-character {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main body - Black woman */
.jax-body {
  font-size: 42px;
  z-index: 2;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

/* Long flowing dreadlocks using CSS */
.jax-dreads {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 20px;
  z-index: 3;
}

.jax-dreads::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 100%;
  height: 24px;
  background:
    linear-gradient(180deg, #2d1810 0%, #1a0f0a 100%),
    repeating-linear-gradient(
      90deg,
      #2d1810 0px,
      #2d1810 3px,
      #1a0f0a 3px,
      #1a0f0a 6px
    );
  border-radius: 0 0 4px 4px;
  clip-path: polygon(
    0% 0%,
    8% 100%,
    18% 80%,
    28% 100%,
    38% 85%,
    48% 100%,
    58% 80%,
    68% 100%,
    78% 85%,
    88% 100%,
    100% 0%
  );
  animation: dreads-flow 3s ease-in-out infinite;
}

@keyframes dreads-flow {
  0%, 100% {
    transform: skewX(0deg);
    clip-path: polygon(
      0% 0%, 8% 100%, 18% 80%, 28% 100%, 38% 85%, 48% 100%, 58% 80%, 68% 100%, 78% 85%, 88% 100%, 100% 0%
    );
  }
  50% {
    transform: skewX(3deg);
    clip-path: polygon(
      0% 0%, 10% 95%, 20% 85%, 30% 100%, 40% 80%, 50% 100%, 60% 85%, 70% 100%, 80% 80%, 90% 95%, 100% 0%
    );
  }
}

/* Weapon - Sheers of Justice */
.jax-weapon {
  position: absolute;
  font-size: 24px;
  bottom: -4px;
  right: -12px;
  transform: rotate(-30deg);
  filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.9));
  animation: weapon-ready 1.5s ease-in-out infinite;
  z-index: 4;
}

@keyframes weapon-ready {
  0%, 100% { transform: rotate(-30deg) scale(1); }
  50% { transform: rotate(-20deg) scale(1.15); }
}

/* Jax hair bow - blue ribbon on head (Jax hates pink!) */
.jax-bandana {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  z-index: 5;
  /* Hue-rotate pink emoji to blue - Jax's preferred color */
  filter: hue-rotate(180deg) saturate(1.3) drop-shadow(0 2px 2px rgba(0,0,0,0.5));
}

/* Jax gloves - gardening gloves */
.jax-gloves {
  position: absolute;
  bottom: 4px;
  left: -8px;
  font-size: 12px;
  z-index: 3;
  opacity: 0.9;
}

/* Jax name tag */
.jax-name-tag {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: bold;
  color: #a78bfa;
  background: rgba(0,0,0,0.8);
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid #a78bfa;
  letter-spacing: 1px;
  text-shadow: 0 0 4px #a78bfa;
}

/* Shannon character styling */
.shannon-cap {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(-10deg);
  font-size: 18px;
  z-index: 5;
}

.shannon-beard-css {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 10px;
  background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
  border-radius: 0 0 10px 10px;
  z-index: 3;
}

.shannon-item {
  position: absolute;
  right: -10px;
  bottom: 8px;
  font-size: 14px;
  z-index: 4;
}

.shannon-name-tag {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: bold;
  color: #fbbf24;
  background: rgba(0,0,0,0.8);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #fbbf24;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

@keyframes hero-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 12px var(--accent-purple))
            drop-shadow(0 0 4px rgba(74, 222, 128, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 20px var(--accent-purple))
            drop-shadow(0 0 8px rgba(74, 222, 128, 0.8));
  }
}

/* Poop indicator when carrying poop */
.poop-indicator {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  background: rgba(0,0,0,0.7);
  padding: 2px 6px;
  border-radius: 8px;
  white-space: nowrap;
}

/* Jax moving state - enhanced walk animation with weight shift and bounce */
.entity.jax.moving .jax-body {
  animation: jax-walk-enhanced 0.5s ease-in-out infinite;
}

.entity.jax.moving .jax-dreads::before {
  animation: dreads-run 0.5s ease-in-out infinite;
}

.entity.jax.moving .jax-gloves {
  animation: gloves-swing 0.5s ease-in-out infinite;
  animation-delay: 0.15s;
}

.entity.jax.moving .jax-weapon {
  animation: weapon-bounce 0.5s ease-in-out infinite;
  animation-delay: 0.1s;
}

@keyframes jax-walk-enhanced {
  0% { transform: translateY(0) rotate(-2deg) scaleY(1); }
  25% { transform: translateY(-4px) rotate(-1deg) scaleY(1.02); }
  50% { transform: translateY(-1px) rotate(2deg) scaleY(1); }
  75% { transform: translateY(-4px) rotate(1deg) scaleY(1.02); }
  100% { transform: translateY(0) rotate(-2deg) scaleY(1); }
}

@keyframes dreads-run {
  0%, 100% { transform: skewX(-6deg); }
  50% { transform: skewX(6deg); }
}

@keyframes gloves-swing {
  0%, 100% { transform: translateY(1px) rotate(5deg); }
  50% { transform: translateY(-2px) rotate(-5deg); }
}

@keyframes weapon-bounce {
  0%, 100% { transform: translateY(2px) rotate(6deg); }
  50% { transform: translateY(-3px) rotate(-3deg); }
}

/* Idle breathing animation when not moving */
.entity.jax:not(.moving) .jax-body {
  animation: idle-breathe 3s ease-in-out infinite;
}

.entity.jax:not(.moving) .jax-dreads::before {
  animation: idle-dreads-sway 4s ease-in-out infinite;
}

@keyframes idle-breathe {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-1px) scaleY(1.01); }
}

@keyframes idle-dreads-sway {
  0%, 100% { transform: skewX(-1deg); }
  50% { transform: skewX(1deg); }
}

/* Squash/stretch on stop for follow-through */
.entity.jax.just-stopped .jax-body {
  animation: squash-land 0.3s ease-out;
}

@keyframes squash-land {
  0% { transform: scaleY(0.95) scaleX(1.05); }
  50% { transform: scaleY(1.03) scaleX(0.97); }
  100% { transform: scaleY(1) scaleX(1); }
}

/* Direction-based movement lean */
.entity.jax.moving-left {
  transform: translate(-50%, -50%) scaleX(-1);
}

.entity.jax.moving-right .jax-body {
  transform: skewX(-3deg);
}

/* Selection indicator for Jax */
.entity.jax::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 8px;
  background: radial-gradient(ellipse, rgba(167, 139, 250, 0.6) 0%, transparent 70%);
  border-radius: 50%;
  animation: shadow-pulse 2s ease-in-out infinite;
}

@keyframes shadow-pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

/* =============================================================================
   GRASSHOPPER VARIANTS - Enemy Styling
   ============================================================================= */

/* Queen Grasshopper */
.entity.grasshopper_queen {
  width: 52px !important;
  height: 52px !important;
}

.entity.grasshopper_queen .entity-sprite {
  position: relative;
}

.queen-crown {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  filter: drop-shadow(0 0 8px gold);
  animation: crown-glow 2s ease-in-out infinite;
}

.queen-body {
  font-size: 32px;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

@keyframes crown-glow {
  0%, 100% { filter: drop-shadow(0 0 8px gold); transform: translateX(-50%) scale(1); }
  50% { filter: drop-shadow(0 0 15px gold); transform: translateX(-50%) scale(1.1); }
}

/* Jumper Grasshopper */
.entity.grasshopper_jumper .entity-sprite {
  position: relative;
}

.jumper-flash {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  filter: drop-shadow(0 0 6px #60a5fa);
  animation: flash-pulse 0.5s ease-in-out infinite;
}

.jumper-body {
  font-size: 24px;
}

@keyframes flash-pulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.5; transform: translateX(-50%) scale(0.8); }
}

/* =============================================================================
   GARDEN RAGE - Ultimate Ability UI
   ============================================================================= */

.rage-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
}

.rage-meter {
  width: 60px;
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.rage-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #fbbf24, #ef4444);
  border-radius: 3px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.rage-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.3) 0%, rgba(185, 28, 28, 0.4) 100%);
  border: 2px solid rgba(239, 68, 68, 0.4);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: not-allowed;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.rage-button:disabled {
  cursor: not-allowed;
}

.rage-button.ready {
  opacity: 1;
  cursor: pointer;
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
  animation: rage-pulse 1s ease-in-out infinite;
}

.rage-button.ready:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.8);
}

@keyframes rage-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    border-color: #ef4444;
  }
  50% {
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.9);
    border-color: #fbbf24;
  }
}

.rage-icon {
  font-size: 20px;
  filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.6));
}

.rage-button.ready .rage-icon {
  animation: rage-icon-shake 0.5s ease-in-out infinite;
}

@keyframes rage-icon-shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.rage-label {
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(239, 68, 68, 0.8);
}

.rage-button.ready .rage-label {
  color: #ef4444;
}

/* Rage explosion effect */
.rage-explosion {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.8) 0%, rgba(251, 191, 36, 0.4) 40%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  animation: rage-explode 1s ease-out forwards;
  pointer-events: none;
  z-index: 100;
}

@keyframes rage-explode {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

/* =============================================================================
   SPRINT - Movement Ability
   ============================================================================= */

.range-indicator.sprint {
  border: 3px dashed rgba(96, 165, 250, 0.8);
  background: radial-gradient(circle, rgba(96, 165, 250, 0.15) 0%, transparent 70%);
  animation: sprint-pulse 0.5s ease-in-out infinite;
}

@keyframes sprint-pulse {
  0%, 100% { border-color: rgba(96, 165, 250, 0.8); }
  50% { border-color: rgba(96, 165, 250, 0.4); }
}

/* Grasshopper variants */
.entity.grasshopper .entity-sprite,
.entity.grasshopper_swarm .entity-sprite {
  animation: hop-idle 0.6s ease infinite;
}

.entity.grasshopper_jumper .entity-sprite {
  animation: hop-fast 0.4s ease infinite;
}

.entity.grasshopper_queen .entity-sprite {
  font-size: 36px;
  animation: queen-hover 1.5s ease-in-out infinite;
}

@keyframes hop-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes hop-fast {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.05); }
}

@keyframes queen-hover {
  0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 8px gold); }
  50% { transform: translateY(-3px) scale(1.02); filter: drop-shadow(0 0 15px gold); }
}

/* Rose styling */
.entity.rose .entity-sprite {
  animation: rose-sway 3s ease-in-out infinite;
}

/* Entity HP bar for proximity system */
.entity .entity-hp {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 4px;
  background: rgba(0,0,0,0.6);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.entity:hover .entity-hp,
.entity.damaged .entity-hp {
  opacity: 1;
}

.entity .entity-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-green));
  transition: width 0.3s ease;
  border-radius: 2px;
}

/* =============================================================================
   SPEECH BUBBLES & CUTSCENE SYSTEM
   ============================================================================= */

/* Speech bubble container */
.speech-bubble-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

/* Individual speech bubble */
.speech-bubble {
  position: absolute;
  max-width: 280px;
  padding: 12px 16px;
  background: #ffffff;
  border: 3px solid #1a1a1a;
  border-radius: 16px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translate(-50%, -100%) translateY(-20px);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #1a1a2e;
}

.speech-bubble.visible {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(-10px);
}

/* Speech bubble tail/pointer - black outline with white fill */
.speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 14px solid #1a1a1a;
  z-index: -1;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 11px solid #ffffff;
}

/* Character name badge */
.speech-bubble-name {
  display: inline-block;
  font-weight: bold;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: rgba(0, 0, 0, 0.1);
  border: 2px solid;
  border-color: inherit;
}

/* Speech bubble text with typing animation */
.speech-bubble-text {
  display: block;
  font-family: 'Segoe UI', system-ui, sans-serif;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.speech-bubble-text.typing {
  overflow: hidden;
  border-right: 2px solid;
  border-color: inherit;
  animation: typing 0.05s steps(1) forwards, blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: currentColor; }
}

/* Character-specific bubble colors - WHITE backgrounds with colored borders */
.speech-bubble.jax {
  border-color: #4ade80;
  background: #ffffff;
}

.speech-bubble.jax::after {
  border-top-color: #4ade80;
}

.speech-bubble.jax .speech-bubble-name {
  color: #1d4a17;
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.2);
}

.speech-bubble.shannon {
  border-color: #60a5fa;
  background: #ffffff;
}

.speech-bubble.shannon::after {
  border-top-color: #60a5fa;
}

.speech-bubble.shannon .speech-bubble-name {
  color: #1e3a8a;
  border-color: #60a5fa;
  background: rgba(96, 165, 250, 0.2);
}

.speech-bubble.quinlan {
  border-color: #a78bfa;
  background: #ffffff;
}

.speech-bubble.quinlan::after {
  border-top-color: #a78bfa;
}

.speech-bubble.quinlan .speech-bubble-name {
  color: #4c1d95;
  border-color: #a78bfa;
  background: rgba(167, 139, 250, 0.2);
}

.speech-bubble.seamus {
  border-color: #fbbf24;
  background: #ffffff;
}

.speech-bubble.seamus::after {
  border-top-color: #fbbf24;
}

.speech-bubble.seamus .speech-bubble-name {
  color: #78350f;
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.2);
}

.speech-bubble.yappy-dogs {
  border-color: #f87171;
  background: #ffffff;
}

.speech-bubble.yappy-dogs::after {
  border-top-color: #f87171;
}

.speech-bubble.yappy-dogs .speech-bubble-name {
  color: #7f1d1d;
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.2);
}

/* =============================================================================
   COMIC BOOK SPEECH BUBBLE - Arrow locked above Jax's head
   Bubble expands dynamically based on screen space
   ============================================================================= */

/* Base centered speech bubble - comic book style */
.speech-bubble.centered {
  --arrow-x: 50%; /* Set by JS - position of arrow (Jax's head) */
  max-width: 400px;
  padding: 16px 24px;
  font-size: 1.1rem;
  text-align: center;
  /* Comic book style: pure white with thick black border */
  background: #ffffff !important;
  border: 3px solid #1a1a1a !important;
  border-radius: 16px;
  box-shadow:
    4px 4px 0 #1a1a1a, /* Hard shadow for comic effect */
    0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.2s ease;
  font-family: 'Comic Sans MS', 'Segoe UI', cursive, sans-serif;
  /* Transform handled by expand classes */
  transform: translate(0, 0);
}

.speech-bubble.centered.visible {
  opacity: 1;
}

.speech-bubble.centered .speech-bubble-name {
  display: none; /* Hide name badge for cleaner comic look */
}

.speech-bubble.centered .speech-bubble-text {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #1a1a1a;
  font-weight: 500;
}

/* Arrow (tail) - ALWAYS points straight down at Jax's head */
/* The arrow is positioned at the bubble's left edge (which is set to Jax's X) */
.speech-bubble.centered::after {
  display: block !important;
  content: '';
  position: absolute;
  bottom: -18px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 20px solid #1a1a1a;
}

/* Inner white part of arrow */
.speech-bubble.centered::before {
  content: '';
  position: absolute;
  bottom: -12px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 15px solid #ffffff;
  z-index: 1;
}

/* =============================================================================
   EXPAND-CENTER: Bubble centered on arrow (enough space on both sides)
   ============================================================================= */
.speech-bubble.centered.expand-center {
  transform: translateX(-50%) translateY(-100%);
}

.speech-bubble.centered.expand-center::after {
  left: 50%;
  transform: translateX(-50%);
}

.speech-bubble.centered.expand-center::before {
  left: 50%;
  transform: translateX(-50%);
}

/* =============================================================================
   EXPAND-RIGHT: Bubble expands to the right of arrow (Jax on left side)
   ============================================================================= */
.speech-bubble.centered.expand-right {
  transform: translateX(-20px) translateY(-100%);
  border-radius: 16px 16px 16px 4px; /* Point toward arrow on left */
}

.speech-bubble.centered.expand-right::after {
  left: 8px;
}

.speech-bubble.centered.expand-right::before {
  left: 11px;
}

/* =============================================================================
   EXPAND-LEFT: Bubble expands to the left of arrow (Jax on right side)
   ============================================================================= */
.speech-bubble.centered.expand-left {
  transform: translateX(calc(-100% + 20px)) translateY(-100%);
  border-radius: 16px 16px 4px 16px; /* Point toward arrow on right */
}

.speech-bubble.centered.expand-left::after {
  left: auto;
  right: 8px;
}

.speech-bubble.centered.expand-left::before {
  left: auto;
  right: 11px;
}

/* =============================================================================
   RADIAL WEAPON SELECTOR
   ============================================================================= */

.radial-weapon-menu {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 100;
  pointer-events: none;
}

.radial-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.95) 0%, rgba(50, 50, 80, 0.95) 100%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: radialPop 0.2s ease-out;
}

@keyframes radialPop {
  0% { transform: scale(0) translate(0, 0); opacity: 0; }
  100% { opacity: 1; }
}

.radial-btn:hover {
  transform: scale(1.2) !important;
  border-color: #4ade80;
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

.radial-btn:active {
  transform: scale(0.95) !important;
}

.radial-btn.on-cooldown {
  opacity: 0.5;
  border-color: #666;
}

.radial-btn.on-cooldown:hover {
  border-color: #888;
  box-shadow: none;
}

.radial-icon {
  font-size: 24px;
  line-height: 1;
}

.cooldown-time {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 10px;
  background: #ef4444;
  color: white;
  padding: 1px 4px;
  border-radius: 8px;
  font-weight: bold;
}

/* Specific weapon colors */
.radial-bow {
  border-color: #60a5fa;
}
.radial-bow:hover {
  border-color: #93c5fd;
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.5);
}

.radial-sheers {
  border-color: #4ade80;
}
.radial-sheers:hover {
  border-color: #86efac;
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

.radial-dagger {
  border-color: #f87171;
}
.radial-dagger:hover {
  border-color: #fca5a5;
  box-shadow: 0 0 20px rgba(248, 113, 113, 0.5);
}

/* Cutscene overlay */
.cutscene-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 999;
  pointer-events: none;
  transition: background 0.5s ease;
}

.cutscene-overlay.active {
  background: rgba(0, 0, 0, 0.7);
  pointer-events: auto;
}

/* Cutscene controls */
.cutscene-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cutscene-controls.visible {
  opacity: 1;
}

.cutscene-skip-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.cutscene-skip-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

/* Character emote animations */
.entity.emote-shake {
  animation: emote-shake 0.5s ease;
}

@keyframes emote-shake {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  25% { transform: translate(-50%, -50%) rotate(-5deg); }
  50% { transform: translate(-50%, -50%) rotate(5deg); }
  75% { transform: translate(-50%, -50%) rotate(-3deg); }
}

.entity.emote-jump {
  animation: emote-jump 0.6s ease;
}

@keyframes emote-jump {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  30% { transform: translate(-50%, -50%) translateY(-20px); }
  60% { transform: translate(-50%, -50%) translateY(-10px); }
}

.entity.emote-spin {
  animation: emote-spin 0.8s ease;
}

@keyframes emote-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.entity.emote-bounce {
  animation: emote-bounce 0.5s ease infinite;
}

@keyframes emote-bounce {
  0%, 100% { transform: translate(-50%, -50%) translateY(0) scale(1); }
  50% { transform: translate(-50%, -50%) translateY(-10px) scale(1.05); }
}

.entity.emote-nod {
  animation: emote-nod 0.6s ease;
}

@keyframes emote-nod {
  0%, 100% { transform: translate(-50%, -50%) rotateX(0deg); }
  25% { transform: translate(-50%, -50%) rotateX(10deg); }
  50% { transform: translate(-50%, -50%) rotateX(0deg); }
  75% { transform: translate(-50%, -50%) rotateX(10deg); }
}

/* Cutscene fade transition */
.cutscene-fade {
  position: fixed;
  inset: 0;
  background: black;
  opacity: 0;
  pointer-events: none;
  z-index: 998;
  transition: opacity 0.5s ease;
}

.cutscene-fade.active {
  opacity: 1;
  pointer-events: auto;
}

/* =============================================================================
   QUEST PANEL - Task Tracking System
   ============================================================================= */

.quest-panel {
  position: fixed;
  top: 100px;
  right: 10px;
  width: 320px;
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 120px);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border: 2px solid var(--accent-green);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 900;
  transition: transform 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.quest-panel.collapsed {
  transform: translateX(calc(100% + 20px));
  opacity: 0;
  pointer-events: none;
}

.quest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-accent);
  border-bottom: 2px solid var(--accent-green);
}

.quest-title {
  font-size: 1.1rem;
  color: var(--accent-green);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

.quest-toggle {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  transition: transform 0.2s ease;
}

.quest-toggle:hover {
  transform: scale(1.2);
}

.quest-panel.collapsed .toggle-icon {
  transform: rotate(180deg);
}

.quest-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.quest-tabs {
  display: flex;
  gap: 4px;
  padding: var(--spacing-sm);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--bg-accent);
}

.quest-tab {
  flex: 1;
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--bg-accent);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quest-tab:hover {
  background: var(--bg-accent);
  border-color: var(--accent-green);
}

.quest-tab.active {
  background: var(--accent-green);
  color: var(--bg-primary);
  border-color: var(--accent-green);
}

.quest-list {
  padding: var(--spacing-sm);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.quest-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--bg-accent);
  border-radius: 8px;
  padding: var(--spacing-sm);
  transition: all 0.2s ease;
}

.quest-item:hover {
  border-color: var(--accent-green);
  box-shadow: 0 4px 12px rgba(74, 222, 128, 0.2);
  transform: translateY(-2px);
}

.quest-item.complete {
  border-color: var(--accent-green);
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.15) 0%, rgba(74, 222, 128, 0.05) 100%);
}

.quest-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-xs);
}

.quest-item-title {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--accent-green);
  margin: 0 0 4px 0;
}

.quest-item.complete .quest-item-title {
  color: var(--accent-yellow);
}

.quest-item-status {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: bold;
  white-space: nowrap;
}

.quest-item-status.active {
  background: var(--accent-blue);
  color: white;
}

.quest-item-status.complete {
  background: var(--accent-green);
  color: white;
}

.quest-item-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.4;
}

.quest-objectives {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
}

.quest-objective {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.objective-checkbox {
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent-green);
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
}

.objective-checkbox.complete {
  background: var(--accent-green);
}

.objective-checkbox.complete::after {
  content: '✓';
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
}

.objective-text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.objective-progress {
  font-size: 0.75rem;
  color: var(--accent-yellow);
  font-weight: bold;
  white-space: nowrap;
}

.quest-rewards {
  display: flex;
  gap: var(--spacing-sm);
  padding-top: var(--spacing-xs);
  border-top: 1px solid var(--bg-accent);
}

.quest-reward {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--accent-yellow);
  font-weight: bold;
}

.quest-reward-icon {
  font-size: 0.9rem;
}

.quest-claim-btn {
  width: 100%;
  padding: var(--spacing-xs);
  background: var(--accent-green);
  color: var(--bg-primary);
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: var(--spacing-xs);
  transition: all 0.2s ease;
}

.quest-claim-btn:hover {
  background: var(--accent-yellow);
  transform: scale(1.05);
}

.quest-claim-btn:active {
  transform: scale(0.95);
}

.quest-completed-section {
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm);
  border-top: 2px solid var(--bg-accent);
}

.completed-header {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 var(--spacing-sm) 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.completed-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.empty-quest-message {
  text-align: center;
  padding: var(--spacing-lg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
}

/* Quest Notification Toast */
.quest-notification {
  position: fixed;
  top: 100px;
  right: 350px;
  background: linear-gradient(135deg, var(--accent-green) 0%, #2d8a4f 100%);
  color: white;
  padding: var(--spacing-md);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(74, 222, 128, 0.4);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  z-index: 950;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.quest-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.notification-message {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .quest-panel {
    width: 280px;
    top: 80px;
    right: 5px;
  }

  .quest-notification {
    right: 10px;
    max-width: calc(100vw - 20px);
  }

  .quest-notification.show {
    transform: translateY(0);
  }

  .quest-notification {
    transform: translateY(-120px);
  }
}

@media (max-width: 480px) {
  .quest-panel {
    width: calc(100vw - 10px);
    right: 5px;
    left: 5px;
  }

  .quest-tabs {
    flex-wrap: wrap;
  }

  .quest-tab {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
}


/* =============================================================================
   NIGHT MODE & ALLY SYSTEM STYLES
   ============================================================================= */

/* Night Mode Overlay - Radial gradient spotlight around Jax */
.night-mode-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at var(--jax-x, 50%) var(--jax-y, 85%),
    rgba(0, 10, 30, 0.2) 0%,
    rgba(0, 10, 30, 0.4) 15%,
    rgba(0, 10, 30, 0.6) 25%,
    rgba(0, 10, 30, 0.8) 40%,
    rgba(0, 10, 30, 0.95) 60%,
    rgba(0, 5, 20, 1) 100%
  );
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.5s ease;
}

.night-mode-overlay.hidden {
  opacity: 0;
}

/* Night mode entity visibility adjustments */
.game-board.night-mode .entity {
  filter: brightness(0.7);
}

/* Roses glow softly at night */
.game-board.night-mode .entity.rose {
  filter: brightness(0.9) drop-shadow(0 0 8px rgba(255, 100, 150, 0.6));
  animation: rose-pulse-night 3s ease-in-out infinite;
}

@keyframes rose-pulse-night {
  0%, 100% { filter: brightness(0.9) drop-shadow(0 0 8px rgba(255, 100, 150, 0.6)); }
  50% { filter: brightness(1.0) drop-shadow(0 0 12px rgba(255, 100, 150, 0.8)); }
}

/* Enemy eyes glow red in darkness */
.game-board.night-mode .entity.enemy::before {
  content: '👀';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  filter: drop-shadow(0 0 6px red);
  animation: eye-glow 2s ease-in-out infinite;
}

@keyframes eye-glow {
  0%, 100% { filter: drop-shadow(0 0 6px red); opacity: 0.8; }
  50% { filter: drop-shadow(0 0 10px red); opacity: 1; }
}

/* Jax has extra visibility at night */
.game-board.night-mode .entity.jax {
  filter: brightness(1.1) drop-shadow(0 0 10px rgba(255, 255, 200, 0.5));
}

/* Firefly particles */
.firefly-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffeb3b;
  box-shadow: 0 0 10px #ffeb3b, 0 0 20px #ffeb3b;
  animation: firefly-float 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 90;
}

@keyframes firefly-float {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translate(var(--float-x, 30px), var(--float-y, -20px)); opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(var(--float-x-end, 60px), var(--float-y-end, -40px)); opacity: 0; }
}

/* Night mode toggle button */
.night-mode-toggle {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
  border: 2px solid #4f46e5;
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.night-mode-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.night-mode-toggle.day-mode {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #fbbf24;
}

/* Ally friendship indicators */
.ally-friendship-indicator {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  z-index: 10;
  pointer-events: none;
}

.ally-friendship-bar {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 4px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 2px;
  overflow: hidden;
  z-index: 9;
}

.ally-friendship-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444 0%, #fbbf24 50%, #4ade80 100%);
  transition: width 0.3s ease;
}

/* Bark meter (yappy dogs) */
.bark-meter-container {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: rgba(26, 26, 46, 0.95);
  border: 2px solid var(--bg-accent);
  border-radius: 8px;
  padding: var(--spacing-xs) var(--spacing-sm);
  z-index: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.bark-meter {
  width: 120px;
  height: 16px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.bark-meter-fill {
  height: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.bark-meter-fill.low { background: #4ade80; }
.bark-meter-fill.medium { background: #fbbf24; }
.bark-meter-fill.high { background: #f97316; animation: bark-pulse 0.5s ease-in-out infinite; }
.bark-meter-fill.critical { background: #ef4444; animation: bark-pulse-critical 0.3s ease-in-out infinite; }

@keyframes bark-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes bark-pulse-critical {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.1); }
}

/* Spider web traps */
.spider-web {
  position: absolute;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(circle, transparent 20%, rgba(255,255,255,0.1) 20%, rgba(255,255,255,0.1) 25%, transparent 25%);
  filter: drop-shadow(0 0 4px rgba(200, 200, 200, 0.4));
}

.spider-web.has-trapped { animation: web-vibrate 0.2s ease-in-out infinite; }

@keyframes web-vibrate {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  25% { transform: translate(-50%, -50%) rotate(2deg); }
  75% { transform: translate(-50%, -50%) rotate(-2deg); }
}

/* Lizard friendship levels */
.entity.lizard.bonded {
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(74, 222, 128, 0.6));
  animation: lizard-bonded-glow 3s ease-in-out infinite;
}

@keyframes lizard-bonded-glow {
  0%, 100% { filter: brightness(1.2) drop-shadow(0 0 8px rgba(74, 222, 128, 0.6)); }
  50% { filter: brightness(1.3) drop-shadow(0 0 12px rgba(74, 222, 128, 0.8)); }
}

/* Raven allies */
.entity.raven.allied {
  filter: drop-shadow(0 0 6px rgba(100, 100, 255, 0.5));
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .night-mode-toggle {
    bottom: 70px;
    right: 12px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
  .bark-meter-container {
    top: 60px;
  }
  .bark-meter {
    width: 100px;
    height: 14px;
  }
}

/* =============================================================================
   TUTORIAL SYSTEM
   ============================================================================= */

/* Tutorial hint popup */
.tutorial-hint {
  position: fixed;
  z-index: 10000;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: var(--bg-primary);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow:
    0 8px 24px rgba(245, 158, 11, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateX(-50%) translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  max-width: 280px;
  text-align: center;
}

.tutorial-hint.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tutorial-hint .hint-arrow {
  font-size: 1.5rem;
  animation: hint-bounce 0.6s ease-in-out infinite;
  margin-bottom: 4px;
}

.tutorial-hint .hint-text {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

@keyframes hint-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Tutorial entity highlight */
.entity.tutorial-highlight {
  animation: tutorial-glow 1s ease-in-out infinite;
}

@keyframes tutorial-glow {
  0%, 100% {
    box-shadow:
      0 0 10px rgba(245, 158, 11, 0.5),
      0 0 20px rgba(245, 158, 11, 0.3),
      0 0 30px rgba(245, 158, 11, 0.2);
    filter: brightness(1.2);
  }
  50% {
    box-shadow:
      0 0 20px rgba(245, 158, 11, 0.7),
      0 0 40px rgba(245, 158, 11, 0.5),
      0 0 60px rgba(245, 158, 11, 0.3);
    filter: brightness(1.4);
  }
}

/* Tutorial animations for characters */
.entity.anim-happy {
  animation: entity-happy 0.5s ease-in-out;
}

.entity.anim-look {
  animation: entity-look 1s ease-in-out;
}

.entity.anim-shock {
  animation: entity-shock 0.4s ease-in-out;
}

.entity.anim-nod {
  animation: entity-nod 0.4s ease-in-out 2;
}

.entity.anim-shake {
  animation: entity-shake 0.4s ease-in-out;
}

.entity.anim-jump {
  animation: entity-jump 0.5s ease-in-out;
}

@keyframes entity-happy {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@keyframes entity-look {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

@keyframes entity-shock {
  0% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes entity-nod {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

@keyframes entity-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes entity-jump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Skip tutorial button during cutscenes */
.tutorial-skip-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-primary);
  border: 1px solid var(--bg-accent);
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.2s ease;
}

.tutorial-skip-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
}

/* =============================================================================
   POWER-UP ENTITIES
   ============================================================================= */

.power-up-entity {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 180;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: power-up-float 1.5s ease-in-out infinite;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.power-up-glow {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  filter: blur(10px);
  animation: power-up-pulse 1s ease-in-out infinite;
}

.power-up-emoji {
  font-size: 32px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  z-index: 1;
}

.power-up-label {
  font-size: 10px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  margin-top: 2px;
  white-space: nowrap;
}

@keyframes power-up-float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-8px); }
}

@keyframes power-up-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 0.8; }
}

/* =============================================================================
   PROJECTILE ENTITIES
   ============================================================================= */

.projectile-entity {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 175;
  transition: left 0.05s linear, top 0.05s linear;
}

.spit-projectile .projectile-spit {
  font-size: 18px;
  filter: hue-rotate(80deg) saturate(2);
  animation: spit-spin 0.3s linear infinite;
}

@keyframes spit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =============================================================================
   NEW ENEMY VARIANTS
   ============================================================================= */

/* Tank Grasshopper - Armored, slow, big */
.entity.grasshopper-tank {
  z-index: 92;
}

.entity.grasshopper-tank .entity-sprite {
  position: relative;
}

.entity.grasshopper-tank .tank-shield {
  position: absolute;
  font-size: 14px;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 4px #94a3b8);
}

.entity.grasshopper-tank .tank-body {
  font-size: 28px;
  filter: grayscale(50%) brightness(0.8);
}

/* Spitter Grasshopper - Purple ranged attacker */
.entity.grasshopper-spitter .entity-sprite {
  position: relative;
}

.entity.grasshopper-spitter .spitter-acid {
  position: absolute;
  font-size: 12px;
  top: -6px;
  right: -4px;
  filter: hue-rotate(80deg) saturate(2);
  animation: acid-drip 0.8s ease-in-out infinite;
}

.entity.grasshopper-spitter .spitter-body {
  font-size: 20px;
  filter: hue-rotate(270deg) saturate(1.5);
}

@keyframes acid-drip {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(3px); opacity: 0.7; }
}

/* Assassin Grasshopper - Dark, stealthy */
.entity.grasshopper-assassin {
  transition: opacity 0.3s ease;
}

.entity.grasshopper-assassin .entity-sprite {
  position: relative;
}

.entity.grasshopper-assassin .assassin-dagger {
  position: absolute;
  font-size: 10px;
  top: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  filter: drop-shadow(0 0 3px #ef4444);
}

.entity.grasshopper-assassin .assassin-body {
  font-size: 20px;
  filter: brightness(0.2) contrast(1.2);
}

/* Bomber Grasshopper - Orange, explosive */
.entity.grasshopper-bomber .entity-sprite {
  position: relative;
}

.entity.grasshopper-bomber .bomber-fuse {
  position: absolute;
  font-size: 12px;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  animation: fuse-glow 0.5s ease-in-out infinite alternate;
}

.entity.grasshopper-bomber .bomber-body {
  font-size: 20px;
  filter: hue-rotate(30deg) saturate(1.5);
}

@keyframes fuse-glow {
  from { filter: drop-shadow(0 0 3px #f97316); transform: translateX(-50%) scale(1); }
  to { filter: drop-shadow(0 0 8px #fbbf24); transform: translateX(-50%) scale(1.1); }
}

/* Frozen enemy state */
.entity.frozen .entity-sprite {
  filter: hue-rotate(180deg) brightness(1.3) saturate(0.5);
  animation: frozen-shake 0.3s ease-in-out infinite;
}

@keyframes frozen-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  75% { transform: translateX(1px); }
}

/* Bomber Explosion Effect */
.bomber-explosion {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 300;
  animation: explosion-grow 0.5s ease-out forwards;
}

.bomber-explosion-inner {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #ff6b00 0%, #ff4500 40%, transparent 70%);
  border-radius: 50%;
  opacity: 0.8;
}

@keyframes explosion-grow {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0;
  }
}

/* =============================================================================
   ACTIVE POWER-UP HUD
   ============================================================================= */

.active-powerups-container {
  position: fixed;
  top: 120px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}

.active-powerup-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 20px;
  border: 2px solid var(--power-up-color, #fff);
  animation: powerup-badge-pulse 2s ease-in-out infinite;
}

.active-powerup-emoji {
  font-size: 20px;
}

.active-powerup-name {
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.active-powerup-timer {
  font-size: 11px;
  color: #ccc;
  min-width: 30px;
  text-align: right;
}

@keyframes powerup-badge-pulse {
  0%, 100% { box-shadow: 0 0 10px var(--power-up-color, #fff); }
  50% { box-shadow: 0 0 20px var(--power-up-color, #fff); }
}

/* =============================================================================
   ARCHERY TARGET - Cutscene Element
   ============================================================================= */

.archery-target {
  position: absolute;
  font-size: 48px;
  transform: translate(-50%, -50%);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.2s ease;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.archery-target.visible {
  opacity: 1;
}

.archery-target.hit {
  transform: translate(-50%, -50%) scale(1.2);
  filter: drop-shadow(0 0 15px #ffd700);
}

/* Arrow projectile for cutscene */
.arrow-projectile {
  position: absolute;
  font-size: 24px;
  color: #8b4513;
  z-index: 150;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  transform-origin: center center;
}

/* =============================================================================
   ROSE SPECIES LABELS - Cutscene Element
   ============================================================================= */

.rose-species-label {
  position: absolute;
  bottom: -45px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(34, 80, 34, 0.95), rgba(20, 50, 20, 0.95));
  border: 2px solid #90ee90;
  border-radius: 8px;
  padding: 6px 12px;
  white-space: nowrap;
  z-index: 200;
  animation: label-appear 0.5s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.rose-species-label .species-name {
  display: block;
  font-size: 12px;
  font-style: italic;
  color: #98fb98;
  font-weight: 600;
}

.rose-species-label .common-name {
  display: block;
  font-size: 10px;
  color: #d4edda;
  margin-top: 2px;
}

.rose-species-label.fade-out {
  animation: label-disappear 0.5s ease-out forwards;
}

@keyframes label-appear {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes label-disappear {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

/* Entity showing species gets a subtle highlight */
.entity.showing-species {
  filter: drop-shadow(0 0 8px #90ee90);
}

/* =============================================================================
   PLANT LABELS - Labels BELOW plants and trees (so they're visible at top edge)
   ============================================================================= */

.plant-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(34, 80, 34, 0.92), rgba(20, 50, 20, 0.92));
  border: 1px solid rgba(144, 238, 144, 0.6);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  color: #98fb98;
  white-space: nowrap;
  z-index: 50;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Make entity position relative for label positioning */
.entity .sprite {
  position: relative;
}

/* Style plant emojis */
.plant-emoji {
  font-size: 32px;
  display: block;
}

.target-emoji {
  font-size: 40px;
}

/* Archery target entity styling */
.archery-target-entity {
  z-index: 80;
}

.archery-target-entity .plant-label {
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.92), rgba(101, 67, 33, 0.92));
  border-color: rgba(255, 215, 0, 0.6);
  color: #ffd700;
}

/* ==========================================================================
   FLOATING WEAPON PICKUP SYSTEM
   ========================================================================== */

/* Floating weapon that bobs up and down */
.floating-weapon {
  position: absolute;
  font-size: 2.5rem;
  z-index: 200;
  opacity: 0;
  transform: translateX(-50%) translateY(-50%);
  transition: opacity 0.5s ease;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8))
          drop-shadow(0 0 20px rgba(255, 215, 0, 0.4));
  animation: weaponBob 2s ease-in-out infinite;
  pointer-events: none;
}

.floating-weapon.visible {
  opacity: 1;
}

.floating-weapon.picked-up {
  animation: weaponPickup 0.3s ease-out forwards;
}

@keyframes weaponBob {
  0%, 100% {
    transform: translateX(-50%) translateY(-50%);
  }
  50% {
    transform: translateX(-50%) translateY(calc(-50% - 10px));
  }
}

@keyframes weaponPickup {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(-80%) scale(1.3);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-100%) scale(0);
  }
}

/* Weapon pickup flash notification */
.weapon-pickup-flash {
  position: absolute;
  font-size: 1.2rem;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8),
               0 0 20px rgba(255, 215, 0, 0.5);
  z-index: 250;
  animation: pickupFlash 1.5s ease-out forwards;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes pickupFlash {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translateY(-10px) scale(1.1);
  }
  80% {
    opacity: 1;
    transform: translateY(-30px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
}

/* Equipped weapons display panel */
.equipped-weapons-display {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, rgba(40, 40, 40, 0.95), rgba(20, 20, 20, 0.95));
  border: 2px solid #ffd700;
  border-radius: 12px;
  padding: 12px 16px;
  z-index: 300;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5),
              0 0 30px rgba(255, 215, 0, 0.2);
}

.equipped-weapons-display.visible {
  opacity: 1;
  transform: translateY(0);
}

.equipped-title {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.equipped-items {
  display: flex;
  gap: 12px;
}

.equipped-weapon {
  font-size: 1.8rem;
  padding: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: transform 0.2s ease;
  animation: equipGlow 2s ease-in-out infinite;
}

.equipped-weapon:hover {
  transform: scale(1.1);
}

@keyframes equipGlow {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
  }
}

/* Garden table for shears pickup */
.garden-table {
  position: absolute;
  font-size: 1.8rem;
  z-index: 50;
}
