/* Easter Egg Smash v2 — Foyle Taxi Co. — all rules scoped under #ees-wrap */

/* ══ RESET / WRAP ══ */
#ees-wrap, #ees-wrap * { box-sizing: border-box; margin: 0; padding: 0; }
#ees-wrap {
  position: relative;
  width: 100%; max-width: 420px;
  height: 680px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.45);
  font-family: 'Nunito', 'Fredoka One', sans-serif;
}
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@700;800;900&display=swap');

/* ══ SCENE BACKGROUND ══ */
#ees-scene {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    #5BA8E0 0%, #87CEEB 18%,
    #A8E0A0 38%, #6BBD48 55%,
    #52A832 70%, #3E8A22 100%
  );
  pointer-events: none; z-index: 0;
}

/* Clouds */
.ees-cloud {
  position: absolute;
  background: rgba(255,255,255,0.85);
  border-radius: 50px;
}
.ees-cloud::before, .ees-cloud::after {
  content: ''; position: absolute;
  background: rgba(255,255,255,0.85); border-radius: 50%;
}
.ees-cloud-1 { width:90px; height:26px; top:38px; left:30px; animation: ees-cloud-drift 22s linear infinite; }
.ees-cloud-1::before { width:46px; height:46px; top:-26px; left:12px; }
.ees-cloud-1::after  { width:32px; height:32px; top:-18px; right:10px; }
.ees-cloud-2 { width:70px; height:20px; top:55px; left:200px; animation: ees-cloud-drift 30s linear infinite; }
.ees-cloud-2::before { width:36px; height:36px; top:-20px; left:10px; }
.ees-cloud-2::after  { width:26px; height:26px; top:-14px; right:8px; }
.ees-cloud-3 { width:55px; height:18px; top:30px; left:340px; animation: ees-cloud-drift 25s linear infinite; }
.ees-cloud-3::before { width:28px; height:28px; top:-16px; left:8px; }
.ees-cloud-3::after  { width:20px; height:20px; top:-12px; right:6px; }
@keyframes ees-cloud-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-500px); }
}

/* Rolling hills */
.ees-hill-back {
  position: absolute; bottom: 22%; left: -8%; width: 116%; height: 38%;
  background: #7ACD4E; border-radius: 50% 60% 0 0 / 80% 100% 0 0;
  opacity: 0.6; pointer-events: none;
}
.ees-hill-back-2 {
  position: absolute; bottom: 18%; left: 30%; width: 90%; height: 30%;
  background: #8ED458; border-radius: 60% 40% 0 0 / 100% 80% 0 0;
  opacity: 0.5; pointer-events: none;
}

/* ══ SCREENS ══ */
.ees-screen {
  position: absolute; inset: 0;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 10;
}
.ees-screen.ees-on { display: flex; }

/* ══ WELCOME SCREEN ══ */
#ees-s-welcome {
  background: rgba(0,0,0,0.18);
  padding: 24px 20px;
  gap: 14px;
}
.ees-badge {
  background: rgba(255,255,255,0.22);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 14px; font-weight: 800;
  color: #fff; letter-spacing: 0.5px;
}
.ees-title {
  font-family: 'Fredoka One', cursive;
  font-size: 52px; line-height: 1.05;
  color: #fff; text-align: center;
  text-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.ees-title span { color: #FFD700; }
.ees-deco-eggs {
  display: flex; gap: 10px; align-items: flex-end;
}
.ees-de { width: 54px; height: 70px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }
.ees-info-box {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 16px; padding: 14px 18px;
  width: 100%; max-width: 340px;
  color: #fff;
}
.ees-info-box h3 { font-size: 16px; margin-bottom: 8px; }
.ees-info-box ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.ees-info-box li { font-size: 14px; }
.ees-prize-bar {
  background: linear-gradient(135deg, #FFD700, #FF9500);
  border-radius: 50px; padding: 8px 22px;
  font-weight: 900; font-size: 15px;
  color: #7A3500;
  box-shadow: 0 4px 14px rgba(255,150,0,0.45);
}

/* ══ BUTTONS ══ */
.ees-btn {
  background: linear-gradient(135deg, #FF6B35, #FF3D7F);
  color: #fff; border: none; border-radius: 50px;
  font-family: 'Fredoka One', cursive; font-size: 22px;
  padding: 13px 38px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,60,100,0.45);
  transition: transform 0.15s, box-shadow 0.15s;
  width: 100%; max-width: 300px;
}
.ees-btn:hover  { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255,60,100,0.55); }
.ees-btn:active { transform: translateY(1px); }
.ees-btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.6);
  box-shadow: none;
  font-size: 18px;
}

/* ══ GAME SCREEN ══ */
#ees-s-game {
  display: block; /* always rendered, hidden by .ees-on */
  position: absolute; inset: 0; z-index: 5;
  overflow: hidden;
}
#ees-s-game:not(.ees-on) { display: none; }

/* HUD */
#ees-hud {
  position: absolute; top: 0; left: 0; right: 0; height: 56px; z-index: 20;
  background: rgba(0,0,0,0.28); backdrop-filter: blur(6px);
  display: flex; align-items: center; padding: 0 14px; gap: 10px;
}
#ees-score {
  font-family: 'Fredoka One', cursive; font-size: 26px; color: #FFD700;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4); flex: 1;
}
#ees-lives-val { font-size: 20px; letter-spacing: 2px; }
#ees-level-lbl {
  font-family: 'Fredoka One', cursive; font-size: 16px;
  color: #fff; opacity: 0.85;
}

/* Timer bar */
#ees-timer-bar {
  position: absolute; top: 56px; left: 0; right: 0; height: 6px; z-index: 20;
  background: rgba(0,0,0,0.2);
}
#ees-timer-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, #FF6B35, #FFD700);
  transition: width 1s linear;
  border-radius: 0 3px 3px 0;
}

/* Egg grid */
#ees-grid {
  position: absolute; top: 62px; left: 0; right: 0; bottom: 118px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  padding: 10px 6px 0; z-index: 5;
}
.ees-slot {
  position: relative; display: flex;
  align-items: flex-end; justify-content: center;
  overflow: hidden;
}

/* Burrow holes */
.ees-hole {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 82px; height: 30px;
  background: radial-gradient(ellipse 70% 80% at 50% 65%,
    #0a0503 0%, #1c0e06 35%, #321808 65%, #3e2210 85%, #2a1808 100%);
  border-radius: 50%;
  box-shadow:
    inset 0 5px 16px rgba(0,0,0,0.95),
    inset 0 2px 8px rgba(0,0,0,0.8),
    0 4px 10px rgba(0,0,0,0.4);
}
.ees-hole::before {
  content: ''; position: absolute;
  top: -5px; left: -6px; right: -6px; height: 14px;
  background: radial-gradient(ellipse, #6b4020 0%, #4a2c10 50%, transparent 75%);
  border-radius: 50%; filter: blur(2px);
}
.ees-hole::after {
  content: ''; position: absolute;
  top: 3px; left: 15%; right: 15%; height: 5px;
  background: radial-gradient(ellipse, rgba(100,55,20,0.4) 0%, transparent 80%);
  border-radius: 50%;
}

/* ══ EGGS ══ */
.ees-egg-wrap {
  position: absolute; bottom: 16px;
  width: 72px; height: 94px;
  cursor: pointer;
  animation: ees-egg-pop 0.28s cubic-bezier(0.34,1.56,0.64,1) forwards;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.35));
  transform-origin: bottom center;
  z-index: 10;
}
.ees-egg-wrap:hover   { filter: drop-shadow(0 8px 14px rgba(0,0,0,0.45)) brightness(1.08); }
.ees-egg-wrap:active  { transform: scale(0.92); }
.ees-egg-wrap.ees-cracking { animation: ees-egg-crack 0.25s ease-in-out; }
.ees-egg-wrap.ees-smashing { animation: ees-egg-smash 0.4s ease-out forwards; }

@keyframes ees-egg-pop {
  from { transform: translateY(80px) scaleY(0.3); opacity: 0; }
  to   { transform: translateY(0)    scaleY(1);   opacity: 1; }
}
@keyframes ees-egg-crack {
  0%   { transform: rotate(-8deg); } 25%  { transform: rotate(8deg); }
  50%  { transform: rotate(-5deg); } 75%  { transform: rotate(5deg); }
  100% { transform: rotate(0); }
}
@keyframes ees-egg-smash {
  0%   { transform: scale(1.1); opacity: 1; }
  40%  { transform: scale(1.4) rotate(10deg); opacity: 0.8; }
  100% { transform: scale(0) rotate(25deg); opacity: 0; }
}

/* ══ BOTTOM BAR ══ */
#ees-bottom-bar {
  position: absolute; bottom: 70px; left: 0; right: 0; height: 48px; z-index: 7;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
#ees-bunny  { font-size: 36px; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3)); }
#ees-lbl    { font-family: 'Fredoka One', cursive; font-size: 16px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }

/* ══ GRASS ══ */
#ees-grass-layer {
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  pointer-events: none; z-index: 4;
}
#ees-grass-svg { position: absolute; bottom: 60px; left: 0; width: 100%; height: 60px; }
#ees-grass-ground {
  position: absolute; bottom: 0; left: 0; right: 0; height: 70px;
  background: linear-gradient(180deg, #52B828 0%, #3E9018 40%, #2E7010 100%);
}

/* ══ SVG FLOWERS ══ */
.ees-flower {
  position: absolute; z-index: 6; pointer-events: none;
  animation: ees-flower-sway 3.2s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes ees-flower-sway {
  0%,100% { transform: rotate(-6deg); }
  50%     { transform: rotate(6deg); }
}

/* ══ BUTTERFLIES ══ */
.ees-butterfly {
  position: absolute; z-index: 3; pointer-events: none;
  animation: ees-btfly 9s ease-in-out infinite;
}
@keyframes ees-btfly {
  0%,100% { transform: translate(0,0); }
  25%     { transform: translate(28px,-18px); }
  50%     { transform: translate(55px,0); }
  75%     { transform: translate(28px,18px); }
}

/* ══ SCORE POPS ══ */
.ees-pop {
  position: absolute; pointer-events: none;
  font-family: 'Fredoka One', cursive; font-size: 28px;
  color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  z-index: 30; white-space: nowrap;
  animation: ees-pop-fly 0.9s ease-out forwards;
}
@keyframes ees-pop-fly {
  0%   { transform: translateY(0) scale(0.6); opacity: 1; }
  60%  { transform: translateY(-60px) scale(1.1); opacity: 1; }
  100% { transform: translateY(-100px) scale(0.8); opacity: 0; }
}

/* Particles */
.ees-particle {
  position: absolute; pointer-events: none; z-index: 30;
  width: 10px; height: 10px; border-radius: 50%;
  animation: ees-particle-fly 0.7s ease-out forwards;
}
@keyframes ees-particle-fly {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: var(--tx) scale(0); opacity: 0; }
}

/* ══ SIGN UP SCREEN ══ */
#ees-s-signup {
  background: rgba(0,0,0,0.55); backdrop-filter: blur(6px);
  padding: 24px 20px; gap: 14px;
}
.ees-su-head { text-align: center; color: #fff; }
.ees-su-head h2 { font-family: 'Fredoka One', cursive; font-size: 28px; margin: 8px 0 6px; }
.ees-su-head h2 span { color: #FFD700; }
.ees-su-head p  { font-size: 15px; opacity: 0.85; }
.ees-form-wrap  { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; }
.ees-field      { display: flex; flex-direction: column; gap: 4px; }
.ees-field label { font-size: 13px; font-weight: 800; color: rgba(255,255,255,0.8); }
.ees-field input {
  border: 2px solid rgba(255,255,255,0.3) !important;
  border-radius: 10px !important; padding: 10px 14px !important;
  font-size: 15px !important; font-family: 'Nunito', sans-serif !important;
  background: rgba(255,255,255,0.95) !important;
  color: #222 !important; outline: none !important;
  width: 100% !important;
}
.ees-field input:focus { border-color: #FFD700 !important; }

/* ══ LEADERBOARD SCREEN ══ */
#ees-s-lb {
  background: rgba(0,0,0,0.55); backdrop-filter: blur(6px);
  padding: 24px 20px; gap: 14px;
}
.ees-lb-head { text-align: center; color: #fff; }
.ees-lb-head h2 { font-family: 'Fredoka One', cursive; font-size: 30px; margin: 8px 0 4px; }
.ees-lb-head p  { font-size: 14px; opacity: 0.8; }
.ees-lb-list {
  width: 100%; max-width: 340px;
  display: flex; flex-direction: column; gap: 6px;
  max-height: 320px; overflow-y: auto;
}
.ees-lb-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.12); border-radius: 10px;
  padding: 8px 14px;
}
.ees-lb-rank { font-family: 'Fredoka One', cursive; font-size: 20px; width: 28px; text-align: center; color: #ccc; }
.ees-lb-rank.gold   { color: #FFD700; }
.ees-lb-rank.silver { color: #C0C0C0; }
.ees-lb-rank.bronze { color: #CD7F32; }
.ees-lb-name  { flex: 1; font-weight: 800; font-size: 15px; color: #fff; }
.ees-lb-score { font-family: 'Fredoka One', cursive; font-size: 20px; color: #FFD700; }

/* ══ LEVEL TRANSITION BANNER ══ */
#ees-level-banner {
  position: absolute; inset: 0; z-index: 40;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  font-family: 'Fredoka One', cursive; font-size: 42px;
  color: #FFD700; text-shadow: 0 4px 12px rgba(0,0,0,0.5);
  text-align: center;
  animation: ees-banner-fade 0.4s ease;
}
#ees-level-banner.ees-on { display: flex; }
@keyframes ees-banner-fade {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* ══ RESPONSIVE ══ */
@media (max-width: 440px) {
  #ees-wrap { border-radius: 0; height: 100svh; max-width: 100%; }
}
