.welcome {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.title-container {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.welcome .logo {
  width: 150px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
  transition: transform 0.3s ease;
}

.welcome .logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.floating-logo {
  position: absolute;
  top: -40px;
  left: 0;
  width: 160px;
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
  transition: transform 0.3s ease;
}

.floating-logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.welcome h1 {
  font-family: "Pacifico", cursive;
  font-size: 3.5rem;
  color: #fff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
  margin: 0;
}

.welcome .subtitle {
  font-family: "Comfortaa", cursive;
  font-size: 1.5rem;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  margin: 0;
}

.navigation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

.nav-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.nav-button-container {
  position: relative;
  perspective: 1000px;
}

.nav-button {
  text-decoration: none;
  color: white;
  padding: 1rem 2rem;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  display: block;
  transform-style: preserve-3d;
  width: 160px; /* Fixed width for all buttons */
  text-align: center;
}

.nav-button:hover {
  transform: translateY(-5px) rotateX(10deg);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.button-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.icon {
  font-size: 1.5rem;
}

.text {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: "Comfortaa", cursive;
}

.floating-elements {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  transform: translate(-50%, -50%);
}

.nav-button-container:hover .floating-elements {
  opacity: 1;
}

.floating-elements span {
  position: absolute;
  font-size: 1.8rem;
  animation: float-around 3s infinite;
}

.floating-elements span:nth-child(1) {
  animation:
    float-around 3s infinite,
    swirl 8s infinite linear;
}
.floating-elements span:nth-child(2) {
  animation:
    float-around 3s infinite,
    swirl 8s infinite linear 2.67s;
}
.floating-elements span:nth-child(3) {
  animation:
    float-around 3s infinite,
    swirl 8s infinite linear 5.33s;
}

@keyframes float-around {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
  100% {
    transform: translateY(0) rotate(360deg);
  }
}

@keyframes swirl {
  0% {
    transform: rotate(0deg) translateX(90px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translateX(90px) rotate(-360deg);
  }
}

footer {
  margin-top: 2rem;
  color: #fff;
  font-size: 1.2rem;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .navigation {
    gap: 1rem;
  }

  .nav-button {
    padding: 0.8rem 1.5rem;
  }
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  justify-items: center;
  align-items: center;
}

/* Remove the previous after pseudo-element */
.button-grid::after {
  display: none;
}

/* Update the last two buttons to be centered */
.main-button:nth-last-child(-n + 2) {
  grid-column: span 1.5;
  width: 200px;
  margin: 0 auto;
}

/* Remove the individual justify-self properties */
.main-button:nth-last-child(2),
.main-button:nth-last-child(1) {
  justify-self: center;
}

.main-button {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 1.5rem;
  color: #fff;
  font-family: "Comfortaa", cursive;
  font-size: 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  height: 100%;
  word-wrap: break-word;
  white-space: normal;
  line-height: 1.4;
  box-sizing: border-box;
  width: 200px; /* Fixed width for all buttons */
  gap: 0.5rem;
}

.main-button i {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

/* Center the container vertically */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

footer {
  text-align: center;
  margin-top: 2rem;
  color: #fff;
  font-family: "Comfortaa", cursive;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
