/* === Egg Clicker — Easter Pastel Theme === */

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

body {
  font-family: 'Space Mono', monospace;
}

/* ─── Left clicker column: canvas fills entire area ─── */
#clicker-column {
  background: #4a7a3a;
}

/* Smooth transition between columns */
#clicker-column::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, rgba(74, 50, 37, 0.4) 0%, rgba(74, 50, 37, 0.6) 100%);
  z-index: 30;
  pointer-events: none;
}

/* ─── World column: warm wood/earth ─── */
#world-column {
  background: #5c4433;
}

#world-strips {
  background:
    /* Subtle wood grain texture */
    repeating-linear-gradient(
      2deg,
      transparent,
      transparent 18px,
      rgba(0, 0, 0, 0.02) 18px,
      rgba(0, 0, 0, 0.02) 19px
    ),
    /* Warm radials for depth */
    radial-gradient(ellipse at 50% 0%, rgba(140, 100, 60, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(60, 40, 25, 0.2) 0%, transparent 50%),
    /* Base warm brown */
    linear-gradient(180deg, #6b5040 0%, #5c4433 30%, #4a3828 100%);
}

/* ─── Empty world state ─── */
#world-empty {
  position: relative;
}

/* Decorative Easter egg shape (CSS only) */
#world-empty::before {
  content: '';
  display: block;
  width: 40px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(135deg, #e0b848 0%, #c49518 50%, #a07838 100%);
  opacity: 0.25;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Decorative dots around empty state */
#world-empty::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(232, 154, 173, 0.08) 3px, transparent 3px),
    radial-gradient(circle at 85% 15%, rgba(124, 196, 160, 0.08) 4px, transparent 4px),
    radial-gradient(circle at 10% 80%, rgba(184, 144, 200, 0.06) 3px, transparent 3px),
    radial-gradient(circle at 90% 75%, rgba(224, 184, 72, 0.08) 5px, transparent 5px),
    radial-gradient(circle at 25% 50%, rgba(144, 188, 216, 0.06) 2px, transparent 2px),
    radial-gradient(circle at 75% 45%, rgba(224, 176, 144, 0.06) 3px, transparent 3px),
    /* Small egg shapes scattered */
    radial-gradient(ellipse at 20% 35%, rgba(232, 154, 173, 0.06) 6px, transparent 6px),
    radial-gradient(ellipse at 70% 65%, rgba(124, 196, 160, 0.06) 5px, transparent 5px),
    radial-gradient(ellipse at 40% 80%, rgba(224, 184, 72, 0.05) 7px, transparent 7px);
}

/* ─── World strips: textured, alive ─── */
.world-strip {
  position: relative;
  overflow: hidden;
  min-height: 80px;
  transition: background-color 0.8s ease, filter 0.3s ease;
  border-bottom: 3px solid rgba(74, 50, 37, 0.3);
}

.world-strip:hover {
  filter: brightness(1.06) saturate(1.1);
}

/* Subtle texture overlay on every strip */
.world-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.4) 1px, transparent 1px),
    radial-gradient(circle at 60% 30%, rgba(255,255,255,0.3) 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.2) 1px, transparent 1px);
  background-size: 40px 40px, 60px 60px, 30px 30px;
  pointer-events: none;
}

/* Ground texture (grass strips) */
.world-strip[data-type="grass"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 4px,
    rgba(0,0,0,0.06) 4px,
    rgba(0,0,0,0.06) 5px
  );
  pointer-events: none;
}

/* Dirt/stone strips */
.world-strip[data-type="earth"]::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(0,0,0,0.1) 10px,
    rgba(0,0,0,0.1) 11px
  );
  pointer-events: none;
}

.world-strip .strip-label {
  position: absolute;
  bottom: 5px;
  right: 10px;
  font-family: 'Fredoka', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.world-strip .strip-count {
  position: absolute;
  top: 5px;
  right: 10px;
  font-family: 'Fredoka', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.world-strip .strip-entities {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100%;
  padding: 6px 10px;
  overflow: hidden;
}

.strip-entity {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
  animation: entityBob 2.5s ease-in-out infinite;
}

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

.strip-entity:nth-child(2n) { animation-delay: 0.4s; }
.strip-entity:nth-child(3n) { animation-delay: 0.9s; }
.strip-entity:nth-child(5n) { animation-delay: 1.3s; }
.strip-entity:nth-child(7n) { animation-delay: 0.6s; font-size: 18px; }

/* Empty strip hint */
.world-strip .strip-empty-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Fredoka', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  white-space: nowrap;
}

/* ─── Shop tabs ─── */
.shop-tab {
  color: rgba(245, 234, 212, 0.4);
  border-bottom-color: transparent;
}

.shop-tab.active {
  color: #e0b848;
  border-bottom-color: #e0b848;
}

.shop-tab:not(.active):hover {
  color: rgba(245, 234, 212, 0.7);
}

/* ─── Upgrade Cards (Easter style, on dark bg) ─── */
.card-upgrade {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.card-upgrade:hover:not(.locked):not(.purchased) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: #e0b848;
}

.card-upgrade.affordable {
  border-color: #e0b848;
  box-shadow: 0 2px 8px rgba(224, 184, 72, 0.3);
  background: rgba(224, 184, 72, 0.08);
}

.card-upgrade.locked {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.06);
}

.card-upgrade.purchased {
  opacity: 0.5;
  border-color: #7cc4a0;
  background: rgba(124, 196, 160, 0.08);
}

/* ─── Producer Rows ─── */
.card-producer {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.12s ease;
}

.card-producer:hover:not(.locked) {
  background: rgba(255, 255, 255, 0.05);
}

.card-producer.affordable {
  background: rgba(124, 196, 160, 0.06);
}

.card-producer.affordable:hover {
  background: rgba(124, 196, 160, 0.12);
}

.card-producer.locked {
  opacity: 0.35;
  cursor: default;
}

/* ─── Click feedback ─── */
@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-50px) scale(1.4); }
}

.float-text {
  animation: floatUp 0.7s ease-out forwards;
  position: absolute;
  pointer-events: none;
  font-weight: bold;
  color: #c49518;
  font-family: 'Fredoka', sans-serif;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

/* ─── Phase flash ─── */
@keyframes phaseFlash {
  0% { opacity: 0.6; }
  100% { opacity: 0; }
}

.phase-flash {
  animation: phaseFlash 0.8s ease-out forwards;
  position: fixed;
  inset: 0;
  background: #e0b848;
  z-index: 1000;
  pointer-events: none;
}

/* ─── Mission ─── */
.mission-success {
  animation: missionPop 0.5s ease;
  background: rgba(143, 212, 176, 0.2) !important;
}

.mission-fail {
  animation: missionShake 0.3s ease 3;
  background: rgba(244, 160, 181, 0.2) !important;
}

@keyframes missionPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

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

/* ─── Narrator ─── */
#narrator-box.visible {
  opacity: 1;
}

/* ─── Effect badge (golden egg) ─── */
@keyframes eggGlow {
  0%, 100% { box-shadow: 0 0 6px rgba(196, 149, 24, 0.3); }
  50% { box-shadow: 0 0 16px rgba(196, 149, 24, 0.6); }
}

.effect-badge {
  animation: eggGlow 1.5s ease-in-out infinite;
  font-size: 10px;
  padding: 4px 10px;
  background: rgba(74, 50, 37, 0.92);
  border: 1px solid #e0b848;
  border-radius: 4px;
  color: #e0b848;
  white-space: nowrap;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
}

/* ─── Shop column: inner shadow for depth ─── */
#shop-column {
  box-shadow: inset 3px 0 8px rgba(0, 0, 0, 0.15);
}

/* ─── Logo pulse ─── */
#logo {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ─── Mobile nav ─── */
.mobile-tab.active {
  background: #e0b848;
  color: #4a3225;
  border-radius: 8px;
}
.mobile-tab:not(.active) {
  color: rgba(245, 234, 212, 0.5);
}

/* ─── Scrollbar ─── */
#world-strips::-webkit-scrollbar,
#shop-producers::-webkit-scrollbar,
#shop-upgrades::-webkit-scrollbar {
  width: 6px;
}

#world-strips::-webkit-scrollbar-thumb,
#shop-producers::-webkit-scrollbar-thumb,
#shop-upgrades::-webkit-scrollbar-thumb {
  background: rgba(74, 50, 37, 0.18);
  border-radius: 3px;
}
