/* 🎨 ANIMATED HEADER STYLES */
:root {
  --header-height: 60px;
  --header-bg: rgba(26, 26, 46, 0.85);
  --header-border: rgba(78, 199, 243, 0.3);
  --header-shadow: 0 8px 32px rgba(78, 199, 243, 0.15);
  --accent-glow: rgba(78, 199, 243, 0.8);
}

/* 🔝 MODERN NAVIGATION BAR */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  z-index: 998;
  border-bottom: 2px solid var(--header-border);
  box-shadow: var(--header-shadow);
  transition: box-shadow 0.3s ease;
}

/* Left-aligned nav links container */
.nav-bar .nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

/* Right-aligned support button */
.nav-bar .support-button {
  position: absolute;
  right: 2rem;
  background: linear-gradient(135deg, #4ec7f3 0%, #3a95c9 100%);
  color: #000 !important;
  box-shadow: 0 4px 12px rgba(78, 199, 243, 0.4), 0 0 20px rgba(78, 199, 243, 0.2);
}

.nav-bar .support-button:hover {
  background: linear-gradient(135deg, #5dd3ff 0%, #4aa5d9 100%);
  box-shadow: 0 6px 16px rgba(78, 199, 243, 0.5), 0 0 30px rgba(78, 199, 243, 0.3);
}

/* Modern accent line - top gradient border */
.nav-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%,
    var(--accent-glow) 20%,
    #4ec7f3 50%,
    var(--accent-glow) 80%,
    transparent 100%
  );
  opacity: 0.9;
  animation: shimmer 3s ease-in-out infinite;
}

/* Bottom glow effect */
.nav-bar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(78, 199, 243, 0.4) 50%,
    transparent 100%
  );
  box-shadow: 0 0 20px rgba(78, 199, 243, 0.3);
}

@keyframes shimmer {
  0%, 100% {
    opacity: 0.9;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.3);
  }
}

/* Enhanced hover state */
.nav-bar:hover {
  box-shadow: 0 12px 48px rgba(78, 199, 243, 0.25);
  border-bottom-color: rgba(78, 199, 243, 0.5);
}

/* Navigation Links */
.nav-bar a {
  text-decoration: none;
  font-weight: 600;
  color: #e0e0e0;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 10px 20px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  font-size: 0.85rem;
  background: linear-gradient(135deg, transparent 0%, rgba(78, 199, 243, 0.05) 100%);
  border: 1px solid transparent;
}

/* Animated gradient border on hover */
.nav-bar a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(78, 199, 243, 0.5), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Link hover effect - modern glow */
.nav-bar a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(78, 199, 243, 0.2),
    transparent
  );
  transition: left 0.5s ease;
  z-index: -1;
}

.nav-bar a:hover::before {
  left: 100%;
}

.nav-bar a:hover::after {
  opacity: 1;
}

.nav-bar a:hover {
  color: #4ec7f3;
  background: linear-gradient(135deg, rgba(78, 199, 243, 0.1) 0%, rgba(78, 199, 243, 0.2) 100%);
  text-decoration: none;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(78, 199, 243, 0.3),
              inset 0 0 20px rgba(78, 199, 243, 0.1);
}

/* Active/current page indicator */
.nav-bar a.active {
  color: #4ec7f3;
  background: rgba(78, 199, 243, 0.2);
  box-shadow: inset 0 0 15px rgba(78, 199, 243, 0.2);
}

/* Current page link - hide on mobile to save space */
.nav-bar a.current-page {
  color: #4ec7f3;
  background: rgba(78, 199, 243, 0.2);
  box-shadow: inset 0 0 15px rgba(78, 199, 243, 0.2);
}

/* Icon styling */
.nav-bar a i {
  margin-right: 6px;
  transition: transform 0.3s ease;
}

.nav-bar a:hover i {
  transform: scale(1.15);
}

/* 📱 RESPONSIVE DESIGN */

/* Tablet and smaller */
@media (max-width: 768px) {
  .nav-bar {
    padding: 0.5rem 1rem;
    gap: 1.2rem;
  }

  .nav-bar .nav-links {
    gap: 1.2rem;
  }

  .nav-bar a {
    font-size: 0.75rem;
    padding: 6px 10px;
    letter-spacing: 0.3px;
  }

  .nav-bar .support-button {
    right: 1rem;
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

/* Mobile portrait - aggressive optimization */
@media (max-width: 480px) {
  /* Hide current page link to save space */
  .nav-bar a.current-page {
    display: none;
  }

  .nav-bar {
    padding: 0.4rem 0.5rem;
    gap: 0.3rem;
    justify-content: space-between;
  }

  .nav-bar .nav-links {
    gap: 0.3rem;
    flex-wrap: nowrap;
  }

  .nav-bar a {
    font-size: 0.65rem;
    padding: 5px 6px;
    letter-spacing: 0;
    border-radius: 6px;
    white-space: nowrap;
  }

  /* Hide icons on very small screens to save space */
  .nav-bar a i {
    display: none;
  }

  .nav-bar .support-button {
    position: relative;
    right: auto;
    padding: 5px 6px;
    font-size: 0.65rem;
  }
}

/* Extra small devices (iPhone SE, etc.) */
@media (max-width: 375px) {
  .nav-bar {
    padding: 0.3rem 0.3rem;
    gap: 0.2rem;
  }

  .nav-bar .nav-links {
    gap: 0.2rem;
  }

  .nav-bar a {
    font-size: 0.6rem;
    padding: 4px 5px;
  }

  .nav-bar .support-button {
    padding: 4px 5px;
    font-size: 0.6rem;
  }
}

/* Smooth scrolling for better UX */
html {
  scroll-behavior: smooth;
}

/* Add padding to body to prevent content jump when header is fixed */
body.has-animated-header {
  padding-top: 0;
}

/* Content should not be hidden behind fixed header */
.main-content {
  position: relative;
  z-index: 1;
}
