nav {
  background: linear-gradient(
    to bottom,
    var(--background-color) 0%,
    rgba(26, 26, 26, 0.95) 70%,
    rgba(26, 26, 26, 0.85) 100%
  );
  backdrop-filter: blur(10px);
  text-align: center;
  position: fixed;
  width: 100%;
  z-index: 999;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
}

.navbar a {
  text-decoration: none;
  color: white;
  font-size: 14px;
  white-space: nowrap;
}

.navbar {
  display: flex;
  max-width: 90%;
  margin: 0 auto;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.star {
  position: absolute;
  margin-top: -5px;
}

.links {
  display: flex;
  gap: 5px;
}

.links a {
  padding: 12px 20px;
}

.links a:hover {
  color: var(--text-secondary);
  transition: all 0.3s ease-in-out;
}

.links a.active {
  background-color: var(--primary-color);
  border: 1px solid #262626;
  border-radius: 8px;
}

.language-section {
  display: flex;
  align-items: center;
}

/* Language switcher styles are now in the header.html file */

.mobile-navbar {
  display: none;
}

.mobile-menu {
  display: flex;
  position: fixed;
  top: 67px;
  left: 0;
  height: 100vh;
  width: 100%;
  background-color: #141414;
  color: white;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  width: 100%;
}

.mobile-menu a:not(.transform),
.mobile-language-form select {
  color: white;
  font-size: 28px;
  text-decoration: none;
  background: none;
  border: none;
  font-weight: 500;
  text-align: left;
  padding: 10px 0 10px 10px;
  border-top: 1px solid #2f3038;
}

/* Subtle animated gradient for Transform button */
@keyframes subtleGradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.transform {
  position: relative;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  padding: 14px 20px;
  /*background: linear-gradient(*/
  /*  135deg,*/
  /*  var(--button-color),*/
  /*  #a8e063,*/
  /*  var(--button-color),*/
  /*  #76c743,*/
  /*  var(--button-color)*/
  /*);*/
  background-size: 300% 300%;
  animation: subtleGradientShift 10s ease infinite;
  overflow: hidden;
  border: 1px solid rgba(208, 255, 113, 0.3);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(208, 255, 113, 0.15);
}

/* Subtle glow effect */
.transform::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: var(--button-color);
  border-radius: 8px;
  opacity: 0.1;
  filter: blur(8px);
  z-index: -1;
  transition: all 0.3s ease;
}

.transform:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(208, 255, 113, 0.25);
  border-color: rgba(208, 255, 113, 0.5);
}

.transform:hover::after {
  opacity: 0.2;
  filter: blur(12px);
}

#menu-toggle {
  position: absolute;
}

#menu-close {
  position: absolute;
  font-size: 20px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

#menu-toggle,
#menu-close {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

#menu-toggle.hidden,
#menu-close.hidden {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

.desktop-links,
.desktop-lang {
  display: flex;
  gap: 1rem;
}

/* Language switcher that matches navbar link style */
.language-switcher {
  position: relative;
}

.language-switcher select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  color: white;
  padding: 12px 25px 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.language-switcher select:hover {
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.05);
}

.language-switcher select:focus {
  outline: none;
}

/* Custom dropdown arrow that matches the design */
.language-switcher::after {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.language-switcher:hover::after {
  opacity: 1;
}

@media (max-width: 1048px) {
  .navbar {
    display: none;
  }

  .transform {
    margin: 30px 0;
  }
  .mobile-navbar {
    display: flex;
    position: relative;
    justify-content: space-between;
    padding: 1rem;
  }

  .language-switcher {
    width: 200px;
  }
}

/* Search Styles */
.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input {
  max-width: 200px;
  padding: 8px 16px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  transition: all 0.3s ease;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.nav-search input:focus {
  outline: none;
  border-color: rgba(208, 255, 113, 0.5);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 2px rgba(208, 255, 113, 0.1);
}

.nav-search button {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.nav-search button:hover {
  color: var(--button-color);
}

/* Mobile Search Toggle */
.mobile-search-toggle {
  background: none;
  border: none;
  color: white;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.mobile-search-toggle:hover {
  color: var(--button-color);
}

/* Mobile Search Overlay */
.mobile-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-search-container {
  width: 90%;
  max-width: 500px;
  padding: 20px;
}

.mobile-search-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  padding: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.mobile-search-close:hover {
  color: var(--button-color);
}

.mobile-search-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-search-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  transition: all 0.3s ease;
}

.mobile-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.mobile-search-input:focus {
  outline: none;
  border-color: var(--button-color);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(208, 255, 113, 0.1);
}

.mobile-search-submit {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--button-color);
  color: var(--primary-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(208, 255, 113, 0.3);
}

/* ====== Search Autocomplete ====== */
.search-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--background-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.search-autocomplete.active {
  display: block;
}

.search-suggestion {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-suggestion:last-child {
  border-bottom: none;
}

.search-suggestion:hover,
.search-suggestion.active {
  background: rgba(208, 255, 113, 0.1);
}

.suggestion-text {
  color: white;
  font-size: 14px;
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}

.suggestion-category {
  color: var(--text-secondary);
  font-size: 12px;
  display: block;
}

.search-suggestion .search-highlight {
  background: transparent;
  color: var(--button-color);
  padding: 0;
  font-weight: 700;
}

/* Mobile Autocomplete */
.mobile-search-autocomplete {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--background-secondary);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 10001;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.mobile-search-autocomplete.active {
  display: block;
}

.mobile-search-autocomplete .search-suggestion {
  padding: 16px 20px;
}

.mobile-search-autocomplete .suggestion-text {
  font-size: 16px;
}

/* Ensure nav-search has position relative for autocomplete */
.nav-search {
  position: relative;
}

.mobile-search-form {
  position: relative;
}
