:root {
  --bubbleTiming: cubic-bezier(0.5, 0.15, 0.25, 1.75);
}

.bubble,
.bubble:before,
.bubble:after {
  transition-duration: 0.5s;
}

.bubble,
.bubble:after {
  border-radius: 50%;
}

.bubble {
  display: block;
  background-color: var(--secondary-color);
  -webkit-tap-highlight-color: transparent;
  font-size: 0.8rem;
  animation: float 4s ease-in-out infinite;
  transition:
    transform 0.4s ease,
    left 0.4s ease,
    top 0.4s ease,
    font-size 0.3s ease,
    border-radius 0.4s ease;
  box-shadow:
    0 -0.06em 0.1em var(--primary-color) inset,
    0 -0.15em 0.4em var(--primary-color) inset,
    0 0.05em 0.05em var(--primary-color) inset,
    0.05em 0 0.1em var(--primary-color) inset,
    -0.05em 0 0.1em var(--primary-color) inset,
    0 0.1em 0.4em var(--primary-color) inset,
    0 0 0 8px rgb(239, 239, 239);
  cursor: pointer;
  position: relative;
  width: 40vw;
  height: 40vw;
  transform-style: preserve-3d;
  transition-property: box-shadow, transform, width, height, font-size,
    border-radius;
  -webkit-appearance: none;
  appearance: none;
  z-index: 0;
}

.centered-content {
  display: flex;
  flex-wrap: wrap;
  position: absolute;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
}

.centered-content h1 {
  position: relative;
  text-align: center;
  margin-top: auto;
  margin-bottom: auto;
}

.modal-list {
  list-style-type: circle;
}

.modal-list li {
  margin: 5px 0;
  font-size: 1.5em;
  color: var(--primary-color);
  text-align: left;
}

.modal-list li p {
  color: #000;
}

.modal-list li:hover {
  color: #007bff;
  cursor: pointer;
}

.centered-content h2::before {
  content: '•';
  margin-right: 5px;
  color: var(--primary-color);
}

.bubble:before,
.bubble:after {
  display: block;
  position: absolute;
  transition-timing-function: var(--bubbleTiming);
}

.bubbles-container {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 10vh;
}

.modal-container {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 4;
}

.modal-content {
  display: flex;
  width: 80vw;
  height: 70vh;
  background-color: var(--tertiary-color);
  margin: 0 auto;
  padding: 20px 20px 0;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  flex-direction: column;
  align-items: center;
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 3rem;
  cursor: pointer;
  color: var(--primary-color);
  width: 4rem;
  background-color: var(--secondary-color);
  border-radius: 12.5px;
}

.modal-body {
  overflow-y: auto;
  width: 100%;
}

.modal-body .modal-list {
  margin: 0 10px;
  background-color: var(--secondary-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.modal-body .modal-list li {
  width: 100%;
}

#modalTitle {
  text-align: center;
  margin-top: 0;
}

.scroll-animation .modal-body {
  animation: scrollAnimation 1s;
}

@media screen and (orientation: portrait) and (min-width: 700px) and (max-width: 1200px) {
  .page div h1 {
    font-size: 2.2rem;
  }
}

@media screen and (orientation: landscape) and (max-width: 1200px) {
  .page div h1 {
    font-size: 2rem;
  }

  .bubble {
    width: 35vh;
    height: 35vh;
    font-size: 0.5em;
  }

  .bubbles-container {
    align-content: center;
  }
}

@media screen and (orientation: landscape) and (max-width: 1000px) {
  .page div h1 {
    font-size: 0.9rem;
  }
  .bubble {
    width: 40vh;
    height: 40vh;
    font-size: 0.8em;
  }

  .bubbles-container {
    align-content: center;
  }
}

@media screen and (min-width: 1200px) {
  .bubble {
    width: 30vh;
    height: 30vh;
  }

  .bubbles-container {
    align-content: center;
  }

  .modal-content {
    width: 30vw;
    height: 50vh;
  }

  #modalTitle {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  label {
    animation: none;
  }
  .bubble,
  .bubble:before,
  .bubble:after {
    transition-duration: 0s;
  }
  .bubble:focus,
  .bubble:hover {
    transform: scale(1);
  }
  .bubble:focus:active,
  .bubble:hover:active {
    width: 3em;
    height: 3em;
  }
  .bubble:focus:before,
  .bubble:hover:before {
    filter: drop-shadow(0.6em 0.6em 4px hsla(0, 0%, 0%, 0.2));
  }
  .bubble:focus:after,
  .bubble:hover:after {
    transform: translate3d(0, 0, -1px);
  }
}

@keyframes scrollAnimation {
  from {
    transform: translateY(20px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes float {
  from,
  to {
    transform: translate(0, 3%);
  }
  25% {
    transform: translate(-3%, 0);
  }
  50% {
    transform: translate(0, -3%);
  }
  75% {
    transform: translate(3%, 0);
  }
}
