/* Floating Navigation Styles */
.floating-nav {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(var(--bg-secondary), 0.9);
  backdrop-filter: blur(15px);
  border-radius: 30px;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.floating-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.floating-nav li {
  margin: 0;
}

.floating-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  text-decoration: none;
  color: var(--text-secondary);
  background: transparent;
  transition: all 0.3s ease;
  position: relative;
  font-size: 1.2rem;
}

.floating-nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--button-bg), var(--span-bg));
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
  z-index: -1;
}

.floating-nav a:hover::before {
  opacity: 0.2;
  transform: scale(1);
}

.floating-nav a:hover {
  color: var(--span-bg);
  transform: scale(1.1);
}

/* Active State */
.floating-nav a.active {
  color: white;
  transform: scale(1.1);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.floating-nav a.active::before {
  opacity: 1;
  transform: scale(1);
  background: linear-gradient(135deg, var(--span-bg), var(--active-bg));
}

/* Tooltip for navigation items */
.floating-nav a::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(var(--bg-secondary), 0.95);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.floating-nav a:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: 55px;
}

/* Light theme adjustments */
[data-theme="light"] .floating-nav {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .floating-nav a.active {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .floating-nav {
    bottom: 1.5rem;
    padding: 0.6rem 1rem;
    border-radius: 25px;
  }

  .floating-nav ul {
    gap: 0.8rem;
  }

  .floating-nav a {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .floating-nav a::after {
    bottom: 50px;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .floating-nav a:hover::after {
    bottom: 45px;
  }
}

@media (max-width: 480px) {
  .floating-nav {
    bottom: 1rem;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
  }

  .floating-nav ul {
    gap: 0.6rem;
  }

  .floating-nav a {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
}


/* Enhanced active state for better visibility */
.floating-nav a.active {
  color: white;
  transform: scale(1.15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  position: relative;
}

.floating-nav a.active::before {
  opacity: 1;
  transform: scale(1);
  background: linear-gradient(135deg, var(--span-bg), var(--active-bg));
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Add a subtle indicator ring for active state */
.floating-nav a.active::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.4);
  z-index: -1;
  animation: activeRing 2s ease-in-out infinite;
}

@keyframes activeRing {

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

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Improve hover states */
.floating-nav a:hover {
  color: var(--span-bg);
  transform: scale(1.1);
}

.floating-nav a:not(.active):hover::before {
  opacity: 0.3;
  transform: scale(1);
}
