/* ============================================
   THE CLICK FACTORY - Master Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Prevent text selection on interactive game elements */
.generator-card, .upgrade-card, .prestige-node, .permanent-card,
.helper-card, .pet-choice, .pet-status-card, .achievement,
.powerup-card, .tab, .btn, .btn-setting, .upgrade-cat-tab,
.stat-card, .creature-area, .creature, .creature-container,
.minigame-button, .buff-item, .toast, .action-btn, button {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg-deep: #0a0a0f;
  --bg-dark: #101018;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c2a;
  --bg-panel: #12121a;
  --border: #2a2a3a;
  --border-glow: #4a3a6a;
  --text: #e0dfe8;
  --text-dim: #8888a0;
  --text-bright: #ffffff;
  --accent-purple: #b366ff;
  --accent-pink: #ff66b2;
  --accent-gold: #ffd700;
  --accent-cyan: #66ffee;
  --accent-blue: #6699ff;
  --accent-green: #66ff99;
  --accent-red: #ff6666;
  --accent-orange: #ffaa44;
  --glow-purple: 0 0 20px rgba(179, 102, 255, 0.3);
  --glow-gold: 0 0 20px rgba(255, 215, 0, 0.3);
  --glow-pink: 0 0 20px rgba(255, 102, 178, 0.3);
  --glow-cyan: 0 0 20px rgba(102, 255, 238, 0.3);
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Fredoka', 'DM Sans', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* --- Top Nav --- */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-links {
  display: flex;
  gap: 12px;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--accent-purple);
}

.nav-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-controls {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 1rem;
  color: var(--text);
  transition: all var(--transition);
}

.nav-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
}

.nav-btn.muted {
  opacity: 0.5;
}

/* --- Stats Bar --- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 12px 16px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.stat-sparks .stat-value {
  color: var(--accent-gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.stat-cps .stat-value {
  color: var(--accent-cyan);
}

.stat-click-power .stat-value {
  color: var(--accent-pink);
}

.stat-combo .stat-value {
  color: var(--accent-purple);
  transition: all 0.15s ease;
}

.stat-combo .stat-value.combo-hot {
  color: var(--accent-gold);
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
  transform: scale(1.2);
}

.stat-combo .stat-value.combo-fire {
  color: var(--accent-pink);
  text-shadow: 0 0 20px rgba(255, 102, 178, 0.8);
  transform: scale(1.4);
}

.stat-combo .stat-value.combo-rainbow {
  animation: rainbowText 0.5s linear infinite;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
  transform: scale(1.6);
}

@keyframes rainbowText {
  0% { color: #ff6666; }
  16% { color: #ffaa44; }
  33% { color: #ffd700; }
  50% { color: #66ff99; }
  66% { color: #66ffee; }
  83% { color: #b366ff; }
  100% { color: #ff6666; }
}

/* --- Game Container --- */
.game-container {
  display: flex;
  height: calc(100vh - 110px);
  min-height: 400px;
}

/* --- Creature Area (Left) --- */
.creature-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  min-width: 300px;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, var(--bg-deep) 70%);
}

.creature-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(179, 102, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* --- Power Meter --- */
.power-meter {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 200px;
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid var(--border);
  overflow: hidden;
  z-index: 5;
}

.power-meter-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(to top, var(--accent-purple), var(--accent-cyan));
  border-radius: 0 0 5px 5px;
  transition: height 0.3s ease;
}

.power-meter-fill.full {
  animation: powerPulse 1s ease-in-out infinite;
}

@keyframes powerPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(102, 255, 238, 0.4); }
  50% { box-shadow: 0 0 25px rgba(102, 255, 238, 0.8); }
}

.power-meter-label {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* --- Combo Ring --- */
.combo-ring {
  position: absolute;
  width: 260px;
  height: 260px;
  pointer-events: none;
  z-index: 2;
}

.combo-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.combo-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 3;
}

.combo-ring-fill {
  fill: none;
  stroke: var(--accent-purple);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 565.48;
  stroke-dashoffset: 565.48;
  transition: stroke-dashoffset 0.15s ease, stroke 0.3s ease;
  filter: drop-shadow(0 0 4px rgba(179, 102, 255, 0.4));
}

/* --- Creature --- */
.creature-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
  position: relative;
}

.creature {
  width: 140px;
  height: 140px;
  position: relative;
  transition: transform 0.1s ease;
}

.creature.clicked {
  transform: scale(0.85);
}

.creature.bounce {
  animation: creatureBounce 0.3s ease;
}

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

.creature-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-top: 12px;
  color: var(--accent-purple);
  text-shadow: 0 0 10px rgba(179, 102, 255, 0.3);
}

.creature-stage {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Creature SVG Parts */
.creature-body {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--accent-purple), #6a2aad);
  box-shadow: 0 0 30px rgba(179, 102, 255, 0.4), inset 0 -10px 20px rgba(0,0,0,0.3);
}

.creature-eye {
  position: absolute;
  background: white;
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.creature-pupil {
  position: absolute;
  background: #1a1a2e;
  border-radius: 50%;
}

.creature-pupil::after {
  content: '';
  position: absolute;
  width: 35%;
  height: 35%;
  background: white;
  border-radius: 50%;
  top: 15%;
  right: 15%;
}

.creature-mouth {
  position: absolute;
  border-radius: 0 0 50% 50%;
  background: #2a1a3e;
}

.creature-aura {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(179, 102, 255, 0.15), transparent 70%);
  animation: auraFloat 3s ease-in-out infinite;
}

@keyframes auraFloat {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* Creature idle animations */
.creature-idle {
  animation: idleFloat 3s ease-in-out infinite;
}

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

.creature-blink .creature-eye {
  animation: blink 4s ease-in-out infinite;
}

@keyframes blink {
  0%, 45%, 55%, 100% { transform: scaleY(1); }
  48%, 52% { transform: scaleY(0.1); }
}

/* Creature sleeping */
.creature-sleep .creature-body {
  opacity: 0.7;
}

.zzz {
  position: absolute;
  top: -20px;
  right: -10px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--accent-purple);
  opacity: 0;
  animation: zzzFloat 2s ease-in-out infinite;
}

.zzz:nth-child(2) { animation-delay: 0.7s; right: 0; font-size: 0.9rem; }
.zzz:nth-child(3) { animation-delay: 1.4s; right: 10px; font-size: 0.7rem; }

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

/* Creature arms */
.creature-arm {
  position: absolute;
  background: radial-gradient(circle at 50% 30%, var(--accent-purple), #6a2aad);
  border-radius: 50% 50% 40% 40%;
  box-shadow: 0 0 10px rgba(179, 102, 255, 0.3);
}

.creature-arm-left {
  transform-origin: top right;
  animation: armWaveLeft 3s ease-in-out infinite;
}

.creature-arm-right {
  transform-origin: top left;
  animation: armWaveRight 3s ease-in-out infinite;
}

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

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

/* Creature legs */
.creature-leg {
  position: absolute;
  background: radial-gradient(circle at 50% 30%, var(--accent-purple), #6a2aad);
  border-radius: 40% 40% 50% 50%;
  box-shadow: 0 0 10px rgba(179, 102, 255, 0.3);
}

/* Creature wings */
.creature-wing {
  position: absolute;
  border-radius: 60% 40% 40% 60%;
  background: linear-gradient(135deg, rgba(179, 102, 255, 0.6), rgba(102, 255, 238, 0.3));
  box-shadow: 0 0 15px rgba(179, 102, 255, 0.3);
}

.creature-wing-left {
  transform-origin: right center;
  animation: wingFlapLeft 1.5s ease-in-out infinite;
}

.creature-wing-right {
  transform-origin: left center;
  animation: wingFlapRight 1.5s ease-in-out infinite;
}

@keyframes wingFlapLeft {
  0%, 100% { transform: rotate(-10deg) scaleX(1); }
  50% { transform: rotate(10deg) scaleX(0.8); }
}

@keyframes wingFlapRight {
  0%, 100% { transform: rotate(10deg) scaleX(1); }
  50% { transform: rotate(-10deg) scaleX(0.8); }
}

/* Creature crown */
.creature-crown {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 16px solid var(--accent-gold);
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

/* Creature trail particles */
.creature-trail {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-purple);
  opacity: 0;
  animation: trailFade 1.5s ease-out infinite;
}

@keyframes trailFade {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(0) translateY(20px); }
}

/* Creature orbiting particles (Stage 9) */
.creature-orbit {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: orbit 3s linear infinite;
}

@keyframes orbit {
  0% { transform: rotate(0deg) translateX(70px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(70px) rotate(-360deg); }
}

/* Evolution animation */
.creature-evolving {
  animation: evolve 1s ease-in-out;
}

@keyframes evolve {
  0% { transform: scale(1); filter: brightness(1); }
  30% { transform: scale(1.5); filter: brightness(3) saturate(2); }
  60% { transform: scale(0.8); filter: brightness(2); }
  100% { transform: scale(1); filter: brightness(1); }
}

.creature-dance {
  animation: creatureDance 0.4s ease-in-out infinite alternate;
}

@keyframes creatureDance {
  0% { transform: rotate(-5deg) translateY(-3px); }
  100% { transform: rotate(5deg) translateY(3px); }
}

/* Click hint */
.click-hint {
  position: absolute;
  bottom: 40px;
  font-size: 0.85rem;
  color: var(--text-dim);
  animation: hintPulse 2s ease-in-out infinite;
  z-index: 5;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.click-hint.hidden {
  display: none;
}

/* --- Side Panel --- */
.side-panel {
  width: 380px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--bg-panel);
}

/* Tabs */
.tab-bar {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: var(--bg-dark);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.tab:hover {
  color: var(--text);
  background: var(--bg-card);
}

.tab.active {
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
}

.tab.has-new::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent-pink);
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: super;
}

/* Tab Content */
.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

.panel-header {
  margin-bottom: 12px;
}

.panel-header h2 {
  font-size: 1.1rem;
  color: var(--text-bright);
}

.panel-subtitle {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* --- Generator Cards --- */
.generator-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.generator-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-1px);
}

.generator-card.affordable {
  border-color: var(--accent-green);
  box-shadow: 0 0 10px rgba(102, 255, 153, 0.1);
}

.generator-card.affordable:hover {
  box-shadow: 0 0 20px rgba(102, 255, 153, 0.2);
}

.generator-card.locked {
  opacity: 0.4;
  pointer-events: none;
}

.generator-card.milestone-soon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 1px solid var(--accent-gold);
  animation: milestonePulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes milestonePulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

.gen-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.gen-info {
  flex: 1;
  min-width: 0;
}

.gen-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-bright);
}

.gen-desc {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.gen-production {
  font-size: 0.7rem;
  color: var(--accent-cyan);
}

.gen-milestone {
  font-size: 0.65rem;
  color: var(--accent-gold);
  margin-top: 2px;
}

.gen-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.gen-count {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
}

.gen-cost {
  font-size: 0.75rem;
  font-weight: 600;
}

.gen-cost.can-afford {
  color: var(--accent-green);
}

.gen-cost.cant-afford {
  color: var(--accent-red);
}

/* Purchase flash */
.generator-card.purchasing {
  animation: purchaseFlash 0.3s ease;
}

@keyframes purchaseFlash {
  0% { background: var(--bg-card); }
  50% { background: rgba(102, 255, 153, 0.15); }
  100% { background: var(--bg-card); }
}

/* --- Upgrade Cards --- */
.upgrade-categories {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.upgrade-cat {
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-dim);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.upgrade-cat:hover {
  color: var(--text);
  border-color: var(--border-glow);
}

.upgrade-cat.active {
  background: var(--accent-purple);
  color: white;
  border-color: var(--accent-purple);
}

.upgrade-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  transition: all var(--transition);
  cursor: pointer;
}

.upgrade-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}

.upgrade-card.affordable {
  border-color: var(--accent-green);
}

.upgrade-card.bought {
  opacity: 0.5;
  pointer-events: none;
  border-color: var(--accent-purple);
}

.upgrade-card.locked {
  opacity: 0.3;
}

.upgrade-card.locked .upg-icon {
  filter: brightness(0.3);
}

.upg-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: var(--bg-dark);
}

.upg-info {
  flex: 1;
  min-width: 0;
}

.upg-name {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-bright);
}

.upg-desc {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.upg-cost {
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.upg-cost.can-afford { color: var(--accent-green); }
.upg-cost.cant-afford { color: var(--accent-red); }

/* --- Prestige --- */
.prestige-info {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  font-size: 0.85rem;
}

.prestige-info strong {
  color: var(--accent-gold);
}

.prestige-content {
  flex: 1;
  overflow-y: auto;
}

.prestige-preview {
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  text-align: center;
}

.prestige-preview strong {
  color: var(--accent-gold);
  font-size: 1.2rem;
}

.prestige-formula {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 8px;
  font-style: italic;
}

.btn-prestige {
  margin-top: 12px;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
  color: #1a1a2e;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.btn-prestige:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

.btn-prestige:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Prestige Tree */
.prestige-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prestige-branch {
  margin-bottom: 16px;
}

.prestige-branch-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.prestige-branch-title.efficiency { color: var(--accent-cyan); }
.prestige-branch-title.power { color: var(--accent-pink); }
.prestige-branch-title.fortune { color: var(--accent-gold); }

.prestige-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.prestige-node {
  padding: 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.prestige-node:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}

.prestige-node.purchased {
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.15);
}

.prestige-node.purchasable {
  border-color: var(--accent-green);
}

.prestige-node.locked {
  opacity: 0.4;
  pointer-events: none;
}

.prestige-node-icon {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.prestige-node-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-bright);
}

.prestige-node-cost {
  font-size: 0.6rem;
  color: var(--accent-gold);
  margin-top: 2px;
}

.prestige-node-desc {
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* --- Achievements --- */
.achievement-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

.achievement-card {
  padding: 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-align: center;
  transition: all var(--transition);
}

.achievement-card.unlocked {
  border-color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.05);
}

.achievement-card.locked {
  opacity: 0.35;
}

.achievement-card.secret {
  opacity: 0.2;
}

.ach-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.ach-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-bright);
}

.ach-desc {
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* --- Stats Panel --- */
.stats-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.stat-row-label {
  color: var(--text-dim);
}

.stat-row-value {
  font-weight: 600;
  color: var(--text-bright);
}

.stat-section-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--accent-purple);
  margin: 12px 0 6px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.stat-section-title:first-child {
  margin-top: 0;
}

/* --- Settings --- */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.setting-row.danger {
  border: 1px solid rgba(255, 102, 102, 0.3);
}

.setting-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

.btn-setting {
  padding: 6px 14px;
  background: var(--bg-dark);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.btn-setting:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
}

.btn-danger {
  padding: 6px 14px;
  background: rgba(255, 102, 102, 0.15);
  color: var(--accent-red);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 102, 102, 0.3);
  transition: all var(--transition);
}

.btn-danger:hover {
  background: rgba(255, 102, 102, 0.3);
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-dark);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: all var(--transition);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: white;
}

/* Volume Slider */
.volume-slider {
  width: 100px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-dark);
  border-radius: 3px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-purple);
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-purple);
  cursor: pointer;
  border: none;
}

/* --- Buffs Bar --- */
.buffs-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  min-height: 0;
  transition: all var(--transition);
  flex-wrap: wrap;
}

.buffs-bar:empty {
  padding: 0;
}

.buff-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--accent-gold);
  font-size: 0.75rem;
  animation: buffAppear 0.3s ease;
}

@keyframes buffAppear {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.buff-icon {
  font-size: 1rem;
}

.buff-timer {
  color: var(--accent-gold);
  font-weight: 600;
  font-family: var(--font-heading);
}

.buff-progress {
  width: 40px;
  height: 4px;
  background: var(--bg-dark);
  border-radius: 2px;
  overflow: hidden;
}

.buff-progress-fill {
  height: 100%;
  background: var(--accent-gold);
  transition: width 0.5s linear;
}

/* --- Golden Event --- */
.golden-spark {
  position: fixed;
  width: 50px;
  height: 50px;
  z-index: 200;
  cursor: pointer;
  animation: goldenFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
  transition: transform 0.1s ease;
}

.golden-spark:hover {
  transform: scale(1.2);
}

.golden-spark:active {
  transform: scale(0.9);
}

.golden-spark-inner {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 35% 35%, #fff8dc, #ffd700, #ffaa00);
  border-radius: 50%;
  position: relative;
  animation: goldenPulse 1s ease-in-out infinite;
}

.golden-spark-inner::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.4), transparent);
  animation: goldenRing 2s ease-in-out infinite;
}

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

@keyframes goldenPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
  50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.9), 0 0 60px rgba(255, 215, 0, 0.3); }
}

@keyframes goldenRing {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 0.2; }
}

.golden-timer {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--accent-gold);
  font-weight: 700;
  white-space: nowrap;
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 300;
  pointer-events: none;
}

.toast {
  padding: 8px 20px;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  pointer-events: auto;
}

.toast.success {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.toast.gold {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.toast.error {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

@keyframes toastIn {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes toastOut {
  0% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* --- Achievement Banner --- */
.achievement-banner {
  position: fixed;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 170, 68, 0.1));
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius);
  z-index: 400;
  transition: top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 30px rgba(255, 215, 0, 0.2);
}

.achievement-banner.show {
  top: 60px;
}

.achievement-banner-icon {
  font-size: 2rem;
  animation: achieveIconSpin 0.5s ease;
}

@keyframes achieveIconSpin {
  0% { transform: scale(0) rotate(-180deg); }
  100% { transform: scale(1) rotate(0); }
}

.achievement-banner-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.achievement-banner-desc {
  font-size: 0.75rem;
  color: var(--text);
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: modalSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlide {
  0% { transform: scale(0.8) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.modal h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-bright);
}

.modal p {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 8px;
}

.modal-small {
  font-size: 0.75rem !important;
  color: var(--text-dim) !important;
}

.modal-time {
  color: var(--text-dim) !important;
}

.modal-earned strong {
  color: var(--accent-gold);
  font-size: 1.3rem;
}

.btn-collect {
  margin-top: 16px;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.btn-collect:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-purple);
}

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.modal-danger {
  border-color: rgba(255, 102, 102, 0.3);
}

.modal textarea {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px;
  font-family: monospace;
  font-size: 0.8rem;
  resize: vertical;
}

/* --- Screen Flash --- */
.screen-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 600;
  animation: screenFlash 0.2s ease;
}

@keyframes screenFlash {
  0% { background: rgba(255, 215, 0, 0.3); }
  100% { background: transparent; }
}

.screen-flash.crit {
  animation-name: screenFlashCrit;
}

@keyframes screenFlashCrit {
  0% { background: rgba(255, 102, 178, 0.3); }
  100% { background: transparent; }
}

.screen-flash.evolution {
  animation-name: screenFlashEvolution;
  animation-duration: 0.5s;
}

@keyframes screenFlashEvolution {
  0% { background: rgba(179, 102, 255, 0.5); }
  50% { background: rgba(255, 215, 0, 0.3); }
  100% { background: transparent; }
}

/* --- Generator Icon Colors --- */
.gen-icon-0 { background: linear-gradient(135deg, #e0b0ff, #9b59b6); }
.gen-icon-1 { background: linear-gradient(135deg, #88ccff, #3498db); }
.gen-icon-2 { background: linear-gradient(135deg, #ffaa66, #e67e22); }
.gen-icon-3 { background: linear-gradient(135deg, #ffffaa, #f1c40f); }
.gen-icon-4 { background: linear-gradient(135deg, #66ffee, #1abc9c); }
.gen-icon-5 { background: linear-gradient(135deg, #ff88aa, #e74c3c); }
.gen-icon-6 { background: linear-gradient(135deg, #aaffaa, #27ae60); }
.gen-icon-7 { background: linear-gradient(135deg, #cc99ff, #8e44ad); }
.gen-icon-8 { background: linear-gradient(135deg, #99ddff, #2980b9); }
.gen-icon-9 { background: linear-gradient(135deg, #ffd700, #ff6600); }

/* --- Synergy Panel --- */
.synergy-panel {
  margin-top: 8px;
}

.synergy-card {
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.synergy-card.active {
  border-color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.05);
}

.synergy-card.inactive {
  opacity: 0.4;
}

.synergy-icon {
  font-size: 1.1rem;
}

.synergy-info {
  flex: 1;
}

.synergy-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-bright);
}

.synergy-desc {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.synergy-status {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-gold);
}

/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
  .top-nav {
    padding: 6px 10px;
  }

  .nav-links {
    display: none;
  }

  .stats-bar {
    gap: 12px;
    padding: 8px 12px;
  }

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

  .game-container {
    flex-direction: column;
    height: auto;
  }

  .creature-area {
    min-height: 360px;
    max-height: 50vh;
  }

  .side-panel {
    width: 100%;
    min-width: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    min-height: 50vh;
  }

  .tab-bar {
    justify-content: flex-start;
  }

  .tab {
    padding: 8px 10px;
    font-size: 0.7rem;
  }

  .power-meter {
    left: 8px;
    height: 140px;
  }

  .combo-ring {
    width: 200px;
    height: 200px;
  }

  .creature {
    width: 120px;
    height: 120px;
  }

  .prestige-nodes {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .achievement-list {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
}

@media (max-width: 400px) {
  .stats-bar {
    gap: 8px;
  }

  .stat-item {
    min-width: 60px;
  }

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

  .tab {
    padding: 6px 8px;
    font-size: 0.65rem;
  }
}

/* --- Helper Cards --- */
.helper-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: all var(--transition);
  cursor: pointer;
}

.helper-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}

.helper-card.affordable {
  border-color: var(--accent-green);
  box-shadow: 0 0 10px rgba(102, 255, 153, 0.1);
}

.helper-card.owned {
  border-color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.05);
  cursor: default;
}

.helper-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.helper-info {
  flex: 1;
  min-width: 0;
}

.helper-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-bright);
}

.helper-desc {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.helper-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-gold);
}

.helper-cost {
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.helper-cost.can-afford { color: var(--accent-green); }
.helper-cost.cant-afford { color: var(--accent-red); }

/* --- Pet Panel --- */
.pet-locked-msg {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.pet-choose-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-bright);
  margin-bottom: 12px;
}

.pet-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
}

.pet-choice:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: var(--glow-purple);
}

.pet-choice-emoji {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.pet-choice-info {
  flex: 1;
}

.pet-choice-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-bright);
}

.pet-choice-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.pet-status-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--accent-gold);
  margin-bottom: 16px;
}

.pet-status-emoji {
  font-size: 3rem;
}

.pet-status-info {
  flex: 1;
}

.pet-status-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
}

.pet-status-level {
  font-size: 0.8rem;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.pet-status-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-dark);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.pet-status-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.pet-status-happiness {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.pet-status-hint {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 4px;
  font-style: italic;
}

.pet-ability {
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  margin-bottom: 4px;
  border: 1px solid var(--border);
}

.pet-ability.unlocked {
  color: var(--accent-green);
  border-color: rgba(102, 255, 153, 0.3);
}

.pet-ability.locked {
  color: var(--text-dim);
  opacity: 0.5;
}

.pet-switch-btn {
  margin-top: 16px;
  width: 100%;
}

/* --- Combo Spectacle Tiers (Enhanced) --- */
.creature-area.combo-tier-1 {
  box-shadow: inset 0 0 20px rgba(255, 170, 68, 0.08);
}

.creature-area.combo-tier-2 {
  box-shadow: inset 0 0 30px rgba(255, 170, 68, 0.12);
  animation: comboPulse2 1s ease-in-out infinite;
}

.creature-area.combo-tier-3 {
  box-shadow: inset 0 0 50px rgba(255, 170, 68, 0.2);
  animation: comboPulse3 0.8s ease-in-out infinite;
}

.creature-area.combo-tier-4 {
  box-shadow: inset 0 0 60px rgba(255, 100, 30, 0.2);
  animation: comboPulse3 0.6s ease-in-out infinite;
}

.creature-area.combo-tier-5 {
  box-shadow: inset 0 0 70px rgba(255, 100, 30, 0.25);
  animation: comboPulse5 0.5s ease-in-out infinite;
  border: 2px solid rgba(255, 215, 0, 0.3);
}

.creature-area.combo-tier-6 {
  box-shadow: inset 0 0 80px rgba(179, 102, 255, 0.25);
  animation: comboPulse5 0.4s ease-in-out infinite;
  border: 2px solid rgba(255, 215, 0, 0.5);
}

.creature-area.combo-tier-7 {
  box-shadow: inset 0 0 100px rgba(179, 102, 255, 0.3), 0 0 40px rgba(255, 102, 178, 0.3);
  animation: comboPulse7 0.35s ease-in-out infinite;
  border: 3px solid rgba(255, 102, 178, 0.5);
}

.creature-area.combo-tier-8 {
  box-shadow: inset 0 0 100px rgba(179, 102, 255, 0.3), 0 0 60px rgba(255, 102, 178, 0.4);
  animation: comboPulse7 0.3s ease-in-out infinite;
  border: 3px solid rgba(255, 215, 0, 0.6);
}

.creature-area.combo-tier-9 {
  box-shadow: inset 0 0 120px rgba(0, 255, 100, 0.2), 0 0 80px rgba(255, 215, 0, 0.5);
  animation: godMode 0.25s ease-in-out infinite;
  border: 4px solid rgba(255, 215, 0, 0.8);
}

@keyframes comboPulse2 {
  0%, 100% { background-color: rgba(255, 170, 68, 0); }
  50% { background-color: rgba(255, 170, 68, 0.02); }
}

@keyframes comboPulse3 {
  0%, 100% { background-color: rgba(255, 100, 30, 0); }
  50% { background-color: rgba(255, 100, 30, 0.03); }
}

@keyframes comboPulse5 {
  0%, 100% { background-color: rgba(255, 215, 0, 0); }
  50% { background-color: rgba(255, 215, 0, 0.03); }
}

@keyframes comboPulse7 {
  0%, 100% { background-color: rgba(255, 102, 178, 0); }
  50% { background-color: rgba(255, 102, 178, 0.04); }
}

@keyframes godMode {
  0% { background-color: rgba(255, 215, 0, 0.02); border-color: rgba(255, 0, 0, 0.6); }
  33% { background-color: rgba(0, 255, 100, 0.02); border-color: rgba(0, 255, 0, 0.6); }
  66% { background-color: rgba(102, 100, 255, 0.02); border-color: rgba(100, 100, 255, 0.6); }
  100% { background-color: rgba(255, 215, 0, 0.02); border-color: rgba(255, 0, 0, 0.6); }
}

/* --- Rapid Fire Indicator --- */
@keyframes rapidPulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.7; transform: translateX(-50%) scale(1.1); }
}

/* Screen shake animation */
@keyframes screenShake {
  0%, 100% { transform: translate(0); }
  25% { transform: translate(-3px, 2px); }
  50% { transform: translate(2px, -3px); }
  75% { transform: translate(-2px, -1px); }
}

.creature-area.shaking {
  animation: screenShake 0.15s linear;
}

/* --- Loot Rarity Glow --- */
@keyframes legendaryPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
}

/* --- Utility --- */
.hidden { display: none !important; }
.no-select { user-select: none; -webkit-user-select: none; }
