/* Body and page layout */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(to bottom right, #6dd5fa, #ffffff);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-x: hidden;
  min-height: 100vh;
}

header h1 {
  margin-top: 20px;
  font-size: 24px;
  color: #222;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

#scoreboard {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 16px;
  color: #222;
}

/* Game container */
#game-container {
  position: relative;
  width: 360px;
  height: 480px;
  max-width: 95vw;
  max-height: 70vh;
  margin-bottom: 20px;
  background: linear-gradient(to bottom, #e0f7fa, #ffffff);
  border-radius: 12px;
  border: 2px solid #222;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Basket */
#basket {
  position: absolute;
  bottom: 8px;
  left: 150px;
  width: 60px;
  height: 35px;
  background: linear-gradient(to bottom, #ffb74d, #ff9800);
  border-radius: 10px;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.2), 0 3px 8px rgba(0,0,0,0.3);
  border: 2px solid #b36b00;
  transition: left 0.05s linear;
  cursor: pointer;
}

/* Falling objects */
.object {
  position: absolute;
  width: 30px;
  height: 30px;
  font-size: 20px;
  line-height: 28px;
  text-align: center;
  user-select: none;
  pointer-events: none;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.25);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

/* Overlay */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

#overlay.hidden {
  display: none;
}

#overlay-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
}

#overlay-content h2 {
  margin-top: 0;
  font-size: 22px;
}

#restart {
  background: #4caf50;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 10px;
  font-size: 14px;
}

#restart:hover {
  background: #45a049;
}

/* Footer */
footer {
  background: linear-gradient(135deg, #ffb74d, #ff9800);
  padding: 10px 20px;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}

footer .author {
  font-style: italic;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 400px) {
  #game-container { width: 300px; height: 400px; }
  #basket { width: 50px; height: 30px; bottom: 6px; }
  .object { width: 25px; height: 25px; font-size: 16px; line-height: 24px; }
  header h1 { font-size: 20px; }
  #scoreboard { font-size: 12px; gap: 10px; }
  #overlay-content h2 { font-size: 18px; }
  #restart { padding: 6px 12px; font-size: 12px; }
  footer { font-size: 12px; padding: 8px 16px; }
}
