:root {
  --linear-ease: linear(
    0,
    0.068,
    0.19 2.7%,
    0.804 8.1%,
    1.037,
    1.199 13.2%,
    1.245,
    1.27 15.8%,
    1.274,
    1.272 17.4%,
    1.249 19.1%,
    0.996 28%,
    0.949,
    0.928 33.3%,
    0.926,
    0.933 36.8%,
    1.001 45.6%,
    1.013,
    1.019 50.8%,
    1.018 54.4%,
    1 63.1%,
    0.995 68%,
    1.001 85%,
    1
  );
}

.gooey-nav-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: visible;
}

@media (max-width: 768px) {
  .gooey-nav-container {
    overflow: hidden;
  }
}

.gooey-nav-container nav {
  display: flex;
  position: relative;
  transform: translate3d(0, 0, 0.01px);
  width: 100%;
  max-width: 100%;
  justify-content: center;
  overflow: visible;
}

.gooey-nav-container nav ul {
  display: flex;
  gap: 1em;
  list-style: none;
  padding: 0 1em;
  margin: 0;
  position: relative;
  z-index: 4;
  color: white;
  text-shadow: 0 1px 1px hsl(205deg 30% 10% / 0.2);
  align-items: center;
  flex-wrap: nowrap;
  width: max-content;
}

.gooey-nav-container nav ul li {
  border-radius: 100vw;
  position: relative;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 0 0.5px 1.5px transparent;
  color: white;
}

.gooey-nav-container nav ul li a {
  display: inline-block;
  padding: 0.5em 1.2em;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  font-size: 15px;
}

.gooey-nav-container nav ul li:focus-within:has(:focus-visible) {
  box-shadow: 0 0 0.5px 1.5px white;
}

.gooey-nav-container nav ul li::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 100vw;
  background: rgba(255, 255, 255, 0.95);
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease;
  z-index: -1;
}

.gooey-nav-container nav ul li.active {
  color: black;
  text-shadow: none;
}

.gooey-nav-container nav ul li.active::after {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gooey-nav-container .effect {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  opacity: 1;
  pointer-events: none;
  display: grid;
  place-items: center;
  z-index: 2;
}

.gooey-nav-container .effect.text {
  color: white;
  transition: color 0.3s ease;
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
  padding: 0.5em 1.2em;
  z-index: 3;
}

.gooey-nav-container .effect.text.active {
  color: black;
}

.gooey-nav-container .effect.filter {
  filter: blur(1px) contrast(150) brightness(1.2);
  mix-blend-mode: normal;
  opacity: 1;
  z-index: 2;
  overflow: visible;
}

.gooey-nav-container .effect.filter::before {
  content: '';
  position: absolute;
  inset: -20px;
  z-index: -2;
  background: transparent;
}

.gooey-nav-container .effect.filter::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: rgba(255, 255, 255, 1);
  transform: scale(0.9);
  opacity: 0;
  z-index: -1;
  border-radius: 100vw;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.2);
}

.gooey-nav-container .effect.active::after {
  animation: pill 0.3s ease both;
}

@keyframes pill {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.particle,
.point {
  display: block;
  opacity: 0;
  width: 20px;
  height: 20px;
  border-radius: 100%;
  transform-origin: center;
}

.particle {
  --time: 5s;
  position: absolute;
  top: calc(50% - 8px);
  left: calc(50% - 8px);
  animation: particle calc(var(--time)) ease 1 -350ms;
}

.point {
  background: var(--color);
  opacity: 1;
  animation: point calc(var(--time)) ease 1 -350ms;
}

@keyframes particle {
  0% {
    transform: rotate(0deg) translate(calc(var(--start-x)), calc(var(--start-y)));
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }

  70% {
    transform: rotate(calc(var(--rotate) * 0.5)) translate(calc(var(--end-x) * 1.2), calc(var(--end-y) * 1.2));
    opacity: 1;
    animation-timing-function: ease;
  }

  85% {
    transform: rotate(calc(var(--rotate) * 0.66)) translate(calc(var(--end-x)), calc(var(--end-y)));
    opacity: 1;
  }

  100% {
    transform: rotate(calc(var(--rotate) * 1.2)) translate(calc(var(--end-x) * 0.5), calc(var(--end-y) * 0.5));
    opacity: 1;
  }
}

@keyframes point {
  0% {
    transform: scale(0);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }

  25% {
    transform: scale(calc(var(--scale) * 0.25));
  }

  38% {
    opacity: 1;
  }

  65% {
    transform: scale(var(--scale));
    opacity: 1;
    animation-timing-function: ease;
  }

  85% {
    transform: scale(var(--scale));
    opacity: 1;
  }

  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .gooey-nav-container {
    width: 100%;
    overflow: hidden;
    max-width: 100%;
    position: relative;
  }
  
  .gooey-nav-container .effect.filter {
    overflow: hidden;
    clip-path: inset(0);
  }
  
  .gooey-nav-container nav {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    position: relative;
    display: block !important;
    scroll-behavior: smooth;
  }
  
  .gooey-nav-container .effect.filter {
    overflow: hidden;
    clip-path: inset(0);
  }
  
  .gooey-nav-container .effect {
    overflow: hidden;
  }
  
  .gooey-nav-container nav::-webkit-scrollbar {
    height: 4px;
    display: block;
  }
  
  .gooey-nav-container nav::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .gooey-nav-container nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }
  
  .gooey-nav-container nav ul {
    gap: 0.5em;
    padding: 0 1em;
    margin: 0;
    overflow: visible;
    width: max-content !important;
    min-width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
  }
  
  .gooey-nav-container nav ul li {
    flex-shrink: 0 !important;
    white-space: nowrap;
  }
  
  .gooey-nav-container nav ul li a {
    white-space: nowrap;
    display: inline-block;
  }
  
  .gooey-nav-container nav ul li {
    flex-shrink: 0;
  }
  
  .gooey-nav-container nav ul li a {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
  }
  
  /* Simplificar efeito gooey no mobile - reduzir opacidade do overlay */
  .gooey-nav-container .effect.filter {
    filter: blur(4px) contrast(120);
    opacity: 0.6;
  }
  
  .gooey-nav-container .effect.filter::before {
    display: none;
  }
  
  .gooey-nav-container .effect.text {
    font-size: 13px;
    padding: 10px 16px;
  }
  
  /* Reduzir partículas no mobile para melhor performance */
  .gooey-nav-container .particle {
    display: none;
  }
  
  /* Garantir que o texto não seja coberto */
  .gooey-nav-container nav ul li {
    z-index: 5;
  }
  
  .gooey-nav-container nav ul li a {
    position: relative;
    z-index: 6;
  }
}

