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

body {
  overflow: hidden;
  background: #87CEEB;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(180deg, #87CEEB 0%, #87CEEB 60%, #90EE90 60%, #228B22 100%);
  overflow: hidden;
}

#sun {
  position: absolute;
  top: 30px;
  right: 60px;
  width: 80px;
  height: 80px;
  background: #FFD700;
  border-radius: 50%;
  box-shadow: 0 0 40px #FFD700, 0 0 80px #FFA500;
}

.cloud {
  position: absolute;
  background: white;
  border-radius: 50px;
  opacity: 0.9;
}
.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}
.cloud-1 {
  width: 100px;
  height: 40px;
  top: 60px;
  left: 10%;
  animation: float-cloud 20s linear infinite;
}
.cloud-1::before {
  width: 50px;
  height: 50px;
  top: -25px;
  left: 15px;
}
.cloud-1::after {
  width: 35px;
  height: 35px;
  top: -15px;
  left: 50px;
}
.cloud-2 {
  width: 80px;
  height: 30px;
  top: 100px;
  left: 50%;
  animation: float-cloud 25s linear infinite;
  animation-delay: -10s;
}
.cloud-2::before {
  width: 40px;
  height: 40px;
  top: -20px;
  left: 10px;
}
.cloud-2::after {
  width: 30px;
  height: 30px;
  top: -12px;
  left: 40px;
}

@keyframes float-cloud {
  from { transform: translateX(-150px); }
  to { transform: translateX(calc(100vw + 150px)); }
}

.flower {
  position: absolute;
  bottom: 0;
  font-size: 24px;
}

#fence {
  position: absolute;
  bottom: 38%;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  z-index: 1;
}
.fence-post {
  width: 20px;
  height: 60px;
  background: #8B4513;
  margin: 0 30px;
  position: relative;
  border-radius: 3px 3px 0 0;
}
.fence-post::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 15px solid #8B4513;
}
.fence-rail {
  position: absolute;
  width: 100%;
  height: 8px;
  background: #A0522D;
  left: 0;
}
.fence-rail-top { top: 10px; }
.fence-rail-bottom { top: 35px; }

#hud {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
}

#basket-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  padding: 10px 18px;
  border-radius: 25px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

#basket-icon {
  font-size: 32px;
}

#egg-count {
  font-size: 22px;
  font-weight: bold;
  color: #6B3A2A;
}

#timer-display {
  background: rgba(255, 255, 255, 0.85);
  padding: 10px 18px;
  border-radius: 25px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  font-size: 18px;
  font-weight: bold;
  color: #6B3A2A;
}

#sound-toggle {
  background: rgba(255, 255, 255, 0.85);
  border: none;
  padding: 10px 14px;
  border-radius: 25px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.1s;
}
#sound-toggle:hover {
  transform: scale(1.1);
}
#sound-toggle.muted {
  opacity: 0.5;
}

#bunny {
  position: absolute;
  width: 50px;
  height: 60px;
  z-index: 50;
  transition: none;
}

.bunny-body {
  position: absolute;
  bottom: 0;
  left: 5px;
  width: 40px;
  height: 40px;
  background: #FFF5EE;
  border-radius: 50%;
  border: 2px solid #DDD;
}

.bunny-head {
  position: absolute;
  bottom: 30px;
  left: 8px;
  width: 34px;
  height: 30px;
  background: #FFF5EE;
  border-radius: 50%;
  border: 2px solid #DDD;
}

.bunny-ear {
  position: absolute;
  width: 14px;
  height: 35px;
  background: #FFF5EE;
  border-radius: 50%;
  border: 2px solid #DDD;
  top: -8px;
}
.bunny-ear::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 25px;
  background: #FFB6C1;
  border-radius: 50%;
  top: 5px;
  left: 3px;
}
.bunny-ear-left {
  left: 6px;
  transform: rotate(-10deg);
}
.bunny-ear-right {
  right: 6px;
  transform: rotate(10deg);
}

.bunny-eye {
  position: absolute;
  width: 10px;
  height: 11px;
  background: #FFF;
  border-radius: 50%;
  top: 10px;
  border: 1.5px solid #555;
  overflow: hidden;
  z-index: 5;
}
.bunny-eye-left { left: 6px; }
.bunny-eye-right { right: 6px; }

.bunny-pupil {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #222;
  border-radius: 50%;
  top: 2px;
  left: 2px;
}
.bunny-pupil::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  top: 1px;
  left: 1px;
}

.bunny-nose {
  position: absolute;
  width: 7px;
  height: 5px;
  background: #FF8CAA;
  border-radius: 50%;
  top: 20px;
  left: 13px;
  z-index: 5;
}

.bunny-mouth {
  position: absolute;
  top: 24px;
  left: 11px;
  width: 12px;
  height: 5px;
  border-bottom: 2px solid #CC8899;
  border-radius: 0 0 50% 50%;
  z-index: 5;
}

.bunny-cheek {
  position: absolute;
  width: 8px;
  height: 5px;
  background: rgba(255, 150, 170, 0.5);
  border-radius: 50%;
  top: 19px;
  z-index: 5;
}
.bunny-cheek-left { left: 0; }
.bunny-cheek-right { right: 0; }

.bunny-whisker {
  position: absolute;
  width: 12px;
  height: 1px;
  background: #CCC;
  top: 21px;
  z-index: 5;
}
.bunny-whisker-l1 { left: -8px; transform: rotate(-5deg); }
.bunny-whisker-l2 { left: -9px; top: 23px; transform: rotate(5deg); }
.bunny-whisker-r1 { right: -8px; transform: rotate(5deg); }
.bunny-whisker-r2 { right: -9px; top: 23px; transform: rotate(-5deg); }

.bunny-tail {
  position: absolute;
  bottom: 10px;
  right: 0;
  width: 14px;
  height: 14px;
  background: #FFF5EE;
  border-radius: 50%;
  border: 2px solid #DDD;
}

.bunny-basket {
  position: absolute;
  bottom: -2px;
  left: -12px;
  font-size: 20px;
}

#bunny.hopping {
  animation: hop 0.2s ease;
}
@keyframes hop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

#bunny.face-left.hopping {
  animation: hop-left 0.2s ease;
}
@keyframes hop-left {
  0%, 100% { transform: scaleX(-1) translateY(0); }
  50% { transform: scaleX(-1) translateY(-10px); }
}

#bunny.face-left {
  transform: scaleX(-1);
}

.egg {
  position: absolute;
  width: 28px;
  height: 36px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  z-index: 30;
  animation: egg-bob 2s ease-in-out infinite;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.egg::after {
  content: '';
  position: absolute;
  top: 30%;
  left: 10%;
  width: 80%;
  height: 4px;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
}

.egg-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.egg-stripe {
  position: absolute;
  width: 100%;
  height: 5px;
  left: 0;
}

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

.egg.collected {
  animation: collect-egg 0.4s ease forwards;
}
@keyframes collect-egg {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5) translateY(-30px); opacity: 0.7; }
  100% { transform: scale(0) translateY(-50px); opacity: 0; }
}

.sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #FFD700;
  border-radius: 50%;
  pointer-events: none;
  z-index: 60;
  animation: sparkle 0.6s ease forwards;
}
@keyframes sparkle {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

.screen-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
}

.screen-box {
  background: linear-gradient(135deg, #FFF8DC, #FFFACD);
  border-radius: 20px;
  padding: 40px 60px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  border: 4px solid #DEB887;
  max-width: 500px;
}

.screen-box h1 {
  font-size: 42px;
  color: #6B3A2A;
  margin-bottom: 10px;
}

.screen-box h2 {
  font-size: 28px;
  color: #8B6914;
  margin-bottom: 15px;
}

.screen-box p {
  font-size: 18px;
  color: #555;
  margin-bottom: 8px;
  line-height: 1.5;
}

.screen-box .subtitle {
  font-size: 22px;
  color: #8B6914;
  margin-bottom: 20px;
}

.screen-box .controls {
  font-size: 15px;
  color: #777;
  margin-top: 15px;
  line-height: 1.8;
}

.screen-box .big-emoji {
  font-size: 64px;
  margin: 10px 0;
}

.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 40px;
  font-size: 22px;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, #FF69B4, #FF1493);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 105, 180, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 105, 180, 0.6);
}
.btn:active {
  transform: translateY(0);
}

.win-eggs {
  font-size: 40px;
  margin: 15px 0;
  letter-spacing: 5px;
}

.hidden {
  display: none !important;
}

#mobile-controls {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 20px;
  transform: none;
  z-index: 100;
}

#mobile-controls.touch-device {
  display: block;
}

.mobile-btn {
  width: 70px;
  height: 70px;
  background: rgba(255,255,255,0.7);
  border: 2px solid rgba(0,0,0,0.2);
  border-radius: 15px;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: absolute;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mobile-btn:active {
  background: rgba(255,255,255,0.9);
}
.mb-up { bottom: 170px; left: 45px; transform: none; }
.mb-down { bottom: 30px; left: 45px; transform: none; }
.mb-left { bottom: 100px; left: 0; }
.mb-right { bottom: 100px; left: 90px; }

@media (max-width: 768px) {
  #mobile-controls { display: block; }
}

.grass {
  position: absolute;
  bottom: 0;
  font-size: 20px;
  z-index: 2;
}

#penguin {
  position: absolute;
  width: 40px;
  height: 52px;
  z-index: 45;
}

.penguin-body {
  position: absolute;
  bottom: 0;
  left: 4px;
  width: 32px;
  height: 42px;
  background: #1a1a2e;
  border-radius: 50% 50% 45% 45%;
}

.penguin-belly {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 28px;
  background: #f5f5f5;
  border-radius: 50%;
}

.penguin-head {
  position: absolute;
  top: 0;
  left: 6px;
  width: 28px;
  height: 24px;
  background: #1a1a2e;
  border-radius: 50%;
}

.penguin-eye {
  position: absolute;
  width: 7px;
  height: 8px;
  background: white;
  border-radius: 50%;
  top: 7px;
}
.penguin-eye-left { left: 5px; }
.penguin-eye-right { right: 5px; }

.penguin-pupil {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #111;
  border-radius: 50%;
  top: 2px;
  left: 2px;
}

.penguin-beak {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #FF8C00;
}

.penguin-wing {
  position: absolute;
  top: 22px;
  width: 8px;
  height: 20px;
  background: #1a1a2e;
  border-radius: 0 0 50% 50%;
}
.penguin-wing-left { left: 0; transform: rotate(10deg); }
.penguin-wing-right { right: 0; transform: rotate(-10deg); }

.penguin-foot {
  position: absolute;
  bottom: 0;
  width: 12px;
  height: 5px;
  background: #FF8C00;
  border-radius: 0 0 50% 50%;
}
.penguin-foot-left { left: 6px; }
.penguin-foot-right { right: 6px; }

#penguin.chasing {
  animation: penguin-waddle 0.3s ease-in-out infinite;
}
@keyframes penguin-waddle {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-3px); }
}

#gameover-screen .screen-box h1 {
  color: #C53030;
}
#gameover-screen .big-emoji {
  font-size: 64px;
  margin: 10px 0;
}
