/*.ball-grid-container {

  width: 100%;
  aspect-ratio: 1;
  position: relative;animation-direction: reverse;

}


.ball-grid-container .ball {
  position: absolute;
   width: 23%;
   height: 23%;
   border-radius: 50%;
   background-color: #ff6f61;
   display: flex;
   justify-content: center;
   align-items: center;
   text-align: center;
   color: white;
   font-size: 2em;
   cursor: pointer;
   z-index: 1;
}
*/
#ball-grid {
      z-index: 0;
  position: relative;
  margin-left: 1rem;
  width: 100%; /* 100% szerokości rodzica */
  height: calc(100vh - 148px); /* Całkowita wysokość widoku */
  background-color: transparent;
  overflow: hidden; /* Ukrywa elementy, które wychodzą poza kontener */
}

.ball {
  display: block;
  text-align: center;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  border-radius: 50%;
  text-decoration: none;
  display:none;
}
.ball {

  background: radial-gradient(circle at 100px 100px, #5cabff, #000);

}
.ball .shadow {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0) 50%);
  -webkit-transform: rotateX(90deg) translateZ(-150px);
  transform: rotateX(90deg) translateZ(-150px);
  z-index: -1;
}


canvas, #ball-grid img {
  position: absolute;
  bottom: 0;
  left: 0;
  pointer-events: all;
  z-index: 1000;
}
#ball-grid img{
  width: 100%;
  height: auto;
  max-height: max-content;

}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes drop {
  0% {
    opacity: 0;
    transform: translateY(-200vh);
  }
  60% {
    opacity: 1;
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.5, 0.05, 0.1, 1); /* Swobodny spadek */
  }
  75% {
    transform: translateY(-5%);opacity: 1;
  }
  85% {
    transform: translateY(0);opacity: 1;
    animation-timing-function: cubic-bezier(0.5, 0.05, 0.1, 1);
  }
  92% {
    transform: scale(1, 1) translateY(-3%);opacity: 1;
  }
  96% {
    transform: scale(1.01, 1) translateY(0);opacity: 1;
  }
  98% {
    transform: scale(0.98, 1.02) translateY(0);opacity: 1;
  }
  100% {
    transform: scale(1, 1) translateY(0);opacity: 1;
  }
}



/* Animacja spadających kulek z grawitacją */
/*.ball.drop {
  animation: drop 2s ease forwards;
}*/

/* Zatrzymaj ruch po animacji */
.ball.no-move {
  animation: none;
  opacity: 1;
}
/*
.ball-grid-container a,.ball-grid-container a:visited,.ball-grid-container a:active, .ball-grid-container a:focus, .ball-grid-container a:hover {
  color: white;
  text-decoration: none;
  font-size: 2rem; transform: scale(1.0);    transition: all 0.5s ease-in-out;
}
.ball-grid-container a:hover{
  transform: scale(1.05);z-index: 10;position: relative;
}*/
.ball-grid-container .ball:nth-child(1) {
  background: var(--color-1);
  animation-delay: 3.2s; /* Brak opóźnienia */
  animation-duration: 2.5s; /* Czas trwania animacji rotacji */
}

.ball-grid-container .ball:nth-child(2) {
  background: var(--color-3);
  animation-delay: 2.8s; /* Opóźnienie 0.1 sekundy */
  animation-duration: 2s; /* Czas trwania animacji rotacji */
}

.ball-grid-container .ball:nth-child(3) {
  background: var(--color-2);
  animation-delay: 2.4s; /* Opóźnienie 0.2 sekundy */
  animation-duration: 2.8s; /* Czas trwania animacji rotacji */
}

.ball-grid-container .ball:nth-child(4) {
  background: var(--color-4);
  animation-delay: 2.0s; /* Opóźnienie 0.3 sekundy */
  animation-duration: 2.2s; /* Czas trwania animacji rotacji */
}

.ball-grid-container .ball:nth-child(5) {
  background: var(--color-5);
  animation-delay: 1.6s; /* Opóźnienie 0.4 sekundy */
  animation-duration: 1.9s; /* Czas trwania animacji rotacji */
}

.ball-grid-container .ball:nth-child(6) {
  background: var(--color-6);
  animation-delay: 1.2s; /* Opóźnienie 0.5 sekundy */
  animation-duration: 2.5s; /* Czas trwania animacji rotacji */
}

.ball-grid-container .ball:nth-child(7) {
  background: var(--color-1);
  animation-delay: 0.8s; /* Opóźnienie 0.6 sekundy */
  animation-duration: 1.6s; /* Czas trwania animacji rotacji */
}

.ball-grid-container .ball:nth-child(8) {
  background: var(--color-4);
  animation-delay: 0.4s; /* Opóźnienie 0.7 sekundy */
  animation-duration: 1.4s; /* Czas trwania animacji rotacji */
}

.ball-grid-container .ball:nth-child(9) {
  background: var(--color-2);
  animation-delay: 0.0s; /* Opóźnienie 0.8 sekundy */
  animation-duration: 1.6s; /* Czas trwania animacji rotacji */
}

/* Efekt żelatyny dla piłek */
/*.ball-grid-container .ball.gelatine {
  animation: gelatine 0.5s infinite;
}*/
