/* ==========================================
   Premium Navigation Styles
   ========================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(168, 85, 247, 0.1);
  transition: all var(--transition-normal);
}

.nav.scrolled {
  background: rgba(5, 5, 8, 0.95);
  border-bottom-color: rgba(168, 85, 247, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(168, 85, 247, 0.1);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* Premium Logo */
.nav-brand {
  display: flex;
  align-items: center;
}

.nav-logo {
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-outfit);
  font-weight: 800;
  font-size: var(--text-xl);
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-logo:hover {
  transform: scale(1.02);
}

.logo-text {
  background: linear-gradient(135deg, var(--electric-purple) 0%, var(--neon-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.logo-text::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--electric-purple), var(--neon-cyan));
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.nav-logo:hover .logo-text::after {
  transform: scaleX(1);
}

.logo-accent {
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

/* Premium Nav Links */
.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: var(--text-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--electric-purple), var(--neon-cyan));
  transition: all var(--transition-normal);
  transform: translateX(-50%);
  border-radius: var(--radius-full);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(168, 85, 247, 0.1);
}

.nav-link:hover::before {
  width: 60%;
}

.nav-link.active {
  color: var(--electric-purple);
  background: rgba(168, 85, 247, 0.1);
}

.nav-link.active::before {
  width: 60%;
}

/* CTA Link with Glow */
.nav-link-cta {
  background: linear-gradient(135deg, var(--electric-purple) 0%, var(--electric-purple-light) 100%);
  color: var(--white) !important;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.nav-link-cta::before {
  display: none;
}

.nav-link-cta:hover {
  background: linear-gradient(135deg, var(--electric-purple-light) 0%, var(--neon-cyan) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Navigation Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Premium Theme Toggle */
.theme-toggle {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: var(--radius-full);
  padding: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  backdrop-filter: blur(10px);
}

.theme-toggle:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--electric-purple);
  transform: rotate(15deg);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.theme-icon {
  font-size: var(--text-lg);
  transition: all var(--transition-normal);
}

.theme-icon-light {
  display: none;
}

[data-theme="light"] .theme-icon-light {
  display: block;
}

[data-theme="light"] .theme-icon-dark {
  display: none;
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: none;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.nav-toggle:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--electric-purple);
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--electric-purple), var(--neon-cyan));
  margin: 5px 0;
  transition: all var(--transition-normal);
  border-radius: 2px;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(5, 5, 8, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    flex-direction: column;
    padding: var(--space-xl);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: var(--space-sm);
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: center;
    padding: var(--space-md);
    font-size: var(--text-base);
  }

  .nav-link::before {
    bottom: 0;
    width: 0;
    height: 2px;
  }

  .nav-actions {
    width: 100%;
    justify-content: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(168, 85, 247, 0.1);
  }

  .nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
  }

  .nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}

/* ==========================================
   Premium Back to Top Button
   ========================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, var(--electric-purple), var(--neon-cyan));
  border: none;
  border-radius: var(--radius-full);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  z-index: var(--z-fixed);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.6);
}

.back-to-top-icon {
  color: var(--white);
  font-size: var(--text-lg);
  font-weight: bold;
}