:root {
  --width: min(300px, 60vw);
  --height: calc(var(--width) * 1.3);
}

body {
  background-color: rgb(168, 165, 165);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.container {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
}

.ball {
  width: var(--width);
  height: var(--height);
  background: url('../images/guiness.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
  cursor: pointer;
}

.bouncing {
  animation: toRight linear 5s infinite alternate, bounce linear 8s infinite alternate;
}

.instructions {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-size: clamp(16px, 4vw, 24px);
  color: white;
  text-shadow: 1px 1px 3px black;
  max-width: 80vw;
  line-height: 1.2;
  margin-bottom: 5px;
}

.pint-count {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-size: clamp(14px, 3.5vw, 20px);
  color: white;
  text-shadow: 1px 1px 3px black;
  font-weight: bold;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
  :root {
    --width: min(200px, 55vw);
  }
  
  .container {
    top: 5px;
    left: 5px;
  }
  
  .instructions {
    font-size: clamp(14px, 5vw, 20px);
  }
  
  .pint-count {
    font-size: clamp(12px, 4vw, 18px);
  }
}

/* Very small screens */
@media (max-width: 480px) {
  :root {
    --width: min(150px, 50vw);
  }
}

@keyframes bounce {
  0% {
    top: 0;
  }
  48% {
  }
  50% {
    top: calc(100vh - var(--height));
  }
  52% {
  }
  100% {
    top: 0;
  }
}

@keyframes toRight {
  0% {
    left: 0;
  }
  100% {
    left: calc(100vw - var(--width));
  }
}
