/* View also
muhammadolim.github.io/Find-The-Ball
with game sounds! */

.avoid-clicks {
  pointer-events: none;
}

html,
body {
  background: url("../../bg.webp");
  height: 100%;
}

#overlay {
  position: fixed;
  cursor: pointer;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: auto;
}

#overlay[style*="display: none"],
#overlay.hidden {
  pointer-events: none !important;
  display: none !important;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 150px;
  padding-bottom: 200px;
  box-sizing: border-box;
}

.texts {
  color: white;
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
  position: fixed;
  top: 5%;
  left: 0;
  right: 0;
  z-index: 5;
  text-align: center;
  pointer-events: none;
}

.cups {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 20px;
  margin-top: -40px !important;
  margin-bottom: 20px !important;
  flex-wrap: wrap;
  position: relative;
  z-index: 25;
}

.cups .cup {
  z-index: 30;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  pointer-events: auto;
}

.cups .cup.avoid-clicks {
  pointer-events: none;
  cursor: default;
}

.cups .cup img {
  width: 110% !important;
  height: auto;
  object-fit: contain;
}

.cups .cup .main path {
  transition: 0.5s;
  position: absolute;
  transform: translateY(100px);
}

#ball {
  transition: 0.5s linear;
  position: absolute;
  left: 15%;
  bottom: 0;
  z-index: -1;
  transform: translateY(-100px);
}

.answer {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translateY(-70px);
}

.answer .x {
  stroke: red;
  fill: transparent;
  stroke-linecap: round;
  stroke-width: 5;
  display: none;
}

.answer .o {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cups {
    gap: 10px !important;
  }

  .cups .cup img {
    width: 100% !important;
  }

  .buttons {
    font-size: 20px;
  }

  .buttons p#game-over {
    font-size: 35px;
    margin-bottom: 20px;
  }

  .buttons span {
    padding: 8px 20px;
  }
}

@media (max-width: 576px) {
  .cups {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
  }

  .cups > div {
    flex: 1 1 calc(50% - 10px);
    max-width: 150px;
  }

  .texts {
    font-size: 0.9em;
  }

  .buttons p#game-over {
    font-size: 28px;
  }

  .buttons {
    font-size: 18px;
  }
}
