/* Navigation Styles */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

[data-theme="light"] .navbar {
  background: var(--card-bg);
}

.navbar.scrolled {
  background: var(--card-bg);
  box-shadow: 0 2px 20px var(--shadow);
}

[data-theme="light"] .navbar.scrolled {
  background: var(--card-bg);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo .logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: var(--accent-primary);
}

.nav-link.active {
  color: var(--accent-primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.nav-toggle.active .bar:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Theme Toggle */
.theme-toggle {
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  outline: none;
  user-select: none;
  z-index: 10;
  pointer-events: auto;
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--shadow);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  font-size: 1.2rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.theme-toggle:hover .theme-icon {
  color: var(--accent-primary);
  transform: scale(1.1);
}

/* Default state - hide both icons initially */
.theme-icon.fa-moon,
.theme-icon.fa-sun {
  display: none;
}

/* Dark mode state - show moon icon, hide sun icon */
[data-theme="dark"] .theme-icon.fa-moon {
  display: inline-block;
}

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

/* Light mode state - show sun icon, hide moon icon */
[data-theme="light"] .theme-icon.fa-moon {
  display: none;
}

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

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Color Scheme Selector */
.color-scheme-selector {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.color-scheme-btn {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.color-scheme-btn:hover {
  transform: scale(1.1);
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px var(--shadow);
}

.color-scheme-btn.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--shadow);
  transform: scale(1.15);
}

.color-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  transition: all 0.3s ease;
}

.color-scheme-btn:hover .color-preview {
  transform: scale(1.1);
}

/* Mobile Color Scheme Selector */
.mobile-color-scheme-selector {
  display: none;
  position: relative;
  z-index: 10;
}

.mobile-color-scheme-container {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: var(--card-bg);
  border-radius: 25px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border: 1px solid var(--border-color);
  border-top: none;
  box-shadow: 0 4px 20px var(--shadow);
  width: fit-content;
  margin: 0 auto;
  position: relative;
  backdrop-filter: blur(10px);
}

/* Mobile Theme Toggle */
.mobile-theme-toggle {
  display: none;
}

/* Mobile Logo */
.mobile-logo {
  display: none;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
}

.mobile-color-scheme-btn {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mobile-color-scheme-btn .color-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  transition: all 0.3s ease;
}

.mobile-color-scheme-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px var(--shadow);
}

.mobile-color-scheme-btn.active {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px var(--accent-primary), 0 4px 12px var(--shadow);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  /* Add notch-safe padding for mobile devices */
  .navbar {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .nav-container {
    height: calc(70px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  /* Hide desktop logo on mobile */
  .desktop-logo {
    display: none;
  }

  /* Show mobile theme toggle */
  .mobile-theme-toggle {
    display: flex;
    order: 1;
  }

  /* Show mobile logo */
  .mobile-logo {
    display: flex;
    order: 2;
    justify-content: center;
    flex: 1;
    margin-top: 50px;
  }

  .mobile-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(
      135deg,
      var(--accent-primary) 0%,
      var(--accent-secondary) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
  }

  .mobile-logo .logo-text:hover {
    transform: scale(1.05);
  }

  /* Show mobile nav toggle */
  .mobile-nav-toggle {
    display: flex;
    order: 3;
  }

  /* Show mobile color scheme selector below navigation */
  .mobile-color-scheme-selector {
    display: block;
    position: absolute;
    top: calc(100% + 0px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
  }

  /* Hide desktop nav toggle */
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: fixed;
    top: calc(70px + env(safe-area-inset-top, 0px));
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px - env(safe-area-inset-top, 0px));
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0.5rem 0 1rem 0;
    transition: left 0.3s ease;
    overflow-y: auto;
    max-height: calc(100vh - 70px - env(safe-area-inset-top, 0px));
  }

  [data-theme="light"] .nav-menu {
    background: var(--card-bg);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-link {
    font-size: 1.1rem;
    margin: 0.25rem 0;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 90%;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-link:hover {
    background: var(--shadow);
  }

  .nav-actions {
    display: none; /* Hide desktop color scheme selector on mobile */
  }

  .color-scheme-selector {
    gap: 0.3rem;
  }

  .color-scheme-btn {
    width: 20px;
    height: 20px;
  }

  .theme-toggle {
    width: 35px;
    height: 35px;
  }

  .theme-icon {
    font-size: 1rem;
  }

  /* Mobile color scheme container positioning */
  .mobile-color-scheme-container {
    margin: 0;
    position: relative;
  }

  /* Remove extending line effect for centered positioning */
}
