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

body {
  background-image: url("images/photo_2025-08-07_14-18-53.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  user-select: none;
}

h1 {
  text-align: center;
}

.mainContainer {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 100vh;
  width: 100%;
  margin-left: 10rem;
  position: relative;
  color: white;
}

#cookie-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1rem auto;
  gap: 0rem;
}

#cookie {
  height: 15rem;
  width: 15rem;
  transition: transform 0.1s ease;
}

#cookie:hover {
  height: 16rem;
  width: 16rem;
  cursor: pointer;
}

#spaceShip {
  height: 25rem;
  width: auto;
  position: relative;
}

.light-beam {
  position: absolute;
  top: 200px;
  left: 50%;
  transform: translateX(-50%);
  width: 15rem;
  height: 500px;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 200, 0.856) 0%,
    rgba(255, 255, 200, 0) 80%
  );
  z-index: 1;
  pointer-events: none;
}

.ship-animation {
  position: relative;
  display: inline-block;
  animation: hoverShip 3s ease-in-out infinite alternate;
}

@keyframes hoverShip {
  0% {
    transform: translateX(-10px);
  }
  50% {
    transform: translateX(10px);
  }
  100% {
    transform: translateX(-10px);
  }
}

.upgrades {
  display: flex;
  flex-direction: column;
  position: absolute;
  gap: 0.5rem;
  transform: translate(-350%, 100%);
}

.upgrade {
  border: 2px solid white;
  padding: 1rem;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 1rem;
  align-items: center;
  min-width: 250px;
}

.upgrade:hover {
  cursor: pointer;
}

.left-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mid-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.right-section {
  margin-left: auto;
}

#cursor {
  filter: brightness(0) invert(1);
}

.upgrades-image {
  width: 50px;
}

.coin-img {
  width: 20px;
}

.mid-section h4 {
  margin: 0;
  font-size: 20px;
  padding-bottom: 10px;
}

.mid-section p {
  margin: 0;
}

.cost-info {
  display: flex;
  align-items: center;
  gap: 5px;
}

.next-lvl-info {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  right: -113px;
  background-color: rgb(90, 89, 90);
  height: 50px;
  width: 100px;
  display: none;
}

.upgrade:hover .next-lvl-info {
  display: block;
}

.upgrades > div {
  width: 200px; /* fixed width */
  height: 70px; /* fixed height */
  border: 1px solid white; /* border */
  padding: 10px;
  margin-bottom: 10px;
  box-sizing: border-box; /* ensures padding/border stays inside fixed size */
  position: relative; /* for tooltip absolute positioning */
  background-color: rgba(0, 0, 0, 0.4);
  transition: background-color 0.3s ease;
}

.upgrades > div:hover {
  background-color: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

/* Tooltip style */
.next-lvl-info {
  position: absolute;
  top: 50%;
  left: 105%; /* place right outside the box */
  transform: translateY(-50%);
  background-color: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-size: 12px;
  z-index: 10;
}

/* Show tooltip on hover without layout shift */
.upgrades > div:hover .next-lvl-info {
  opacity: 1;
  pointer-events: auto;
}
