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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -ms-touch-action: none;
  font-family: 'Segoe UI', sans-serif;
  background: url('background.jpg') no-repeat center center;
  background-size: cover;
}

body:fullscreen,
body:-webkit-full-screen,
body:-moz-full-screen {
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

.game-area {
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* Top info styling */
.top-info {
  position: absolute;
  top: 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.title {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
  margin-bottom: 6px;
}

.info {
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 25px;
  color: white;
  font-size: 1.1rem;
  border-radius: 12px;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.basket {
  position: absolute;
  bottom: 60px; /* fixed from bottom */
  width: 160px;
  height: 110px;
  background: url('basket.png') no-repeat center/contain;
  z-index: 5;
}

/* Items styling */
.item {
  width: 40px;
  height: 40px;
  position: absolute;
  top: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 4;
}

.item.egg {
  background-image: url('eggs.png');
}

.item.bomb {
  background-image: url('bomb.png');
}

/* Loading Screen */
.loading-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 200;
}

.loading-content {
  text-align: center;
  color: white;
}

.loading-content h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

.loading-bar {
  width: 300px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.loading-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #43cea2, #185a9d);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.loading-content p {
  font-size: 1.2rem;
  margin-top: 15px;
  color: #43cea2;
}

/* Popups styling */
.start-popup, .result-popup {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 30px;
  border-radius: 20px;
  z-index: 100;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.start-popup {
  top: 50%;
  transform: translate(-50%, -50%);
  display: none; /* Hidden by default - game auto-starts */
}

.result-popup {
  display: none;
  top: 40%;
}

/* Start button */
#startBtn {
  background: linear-gradient(45deg, #43cea2, #185a9d);
  border: none;
  padding: 12px 24px;
  color: white;
  font-size: 1rem;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

#startBtn:hover {
  background: linear-gradient(45deg, #26c6da, #0288d1);
}

/* Slider styling */
#basketSlider {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, #43cea2, #185a9d);
  outline: none;
  z-index: 20;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Track */
#basketSlider::-webkit-slider-runnable-track {
  height: 12px;
  background: linear-gradient(to right, #00c6ff, #0072ff);
  border-radius: 6px;
}

#basketSlider::-moz-range-track {
  height: 12px;
  background: linear-gradient(to right, #00c6ff, #0072ff);
  border-radius: 6px;
}

/* Thumb */
#basketSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #0072ff;
  margin-top: -6px;
  box-shadow: 0 0 8px rgba(0, 114, 255, 0.6);
  cursor: pointer;
  transition: transform 0.2s ease;
}

#basketSlider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #0072ff;
  box-shadow: 0 0 8px rgba(0, 114, 255, 0.6);
  cursor: pointer;
  transition: transform 0.2s ease;
}

#basketSlider::-webkit-slider-thumb:hover,
#basketSlider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

/* Mobile-specific adjustments for slider length */
@media (max-width: 600px) {
  #basketSlider {
    width: 80%; /* Increased width for better control on mobile */
  }
}