:root {
  --nav-bg: rgb(44, 88, 126);
  --glass-bg: rgba(1, 3, 23, 0.3);
  --glass-border: rgba(255, 255, 255, 0.15);
  --text-main: #ffffff;
  --transition-speed: 0.3s;
}

html, body {
  background-color: var(--nav-bg);
}

nav {
  background: var(--nav-bg);
  transition: all var(--transition-speed) ease;
  width: 100%;
}

nav.scrolled {
  position: sticky;
  top: 0;
  left: 0;
  height: 83px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  box-sizing: border-box;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  z-index: 999;
}

nav img {
  width: 195px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.nav-links {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: 745px;
  height: 60px;
  border-radius: 40px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom-color: rgba(255, 255, 255, 0.05);
  border-right-color: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.15);
}

.nav-links ul {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a, 
.text-btn {
  color: var(--text-main);
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 100%;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: all 0.2s ease;
}

#navlink5 {
  color: var(--text-main) !important;
  text-decoration: none !important;
}

.nav-links a:hover, 
.text-btn:hover {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.nav-links a:focus-visible,
.text-btn:focus-visible,
.navhero-btn:focus-visible,
.navbar-menu-toggle:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
  border-radius: 4px;
}

.navbar-menu-close,
.navbar-menu-toggle {
  display: none;
}

.join-now-btn {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mobile-join-now {
  display: none !important;
}

.navhero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  width: 155px;
  border-radius: 32px;
  padding: 12px 32px;
  box-sizing: border-box;
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom-color: rgba(255, 255, 255, 0.05);
  border-right-color: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all var(--transition-speed) cubic-bezier(0.25, 0.8, 0.25, 1);
}

.navhero-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4), 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* Responsive Styles */
@media only screen and (max-width: 1200px) {
  nav.scrolled { padding: 0 28px; }
  .nav-links { width: min(680px, calc(100vw - 280px)); }
}

@media only screen and (max-width: 1100px) {
  nav.scrolled {
    height: 82px;
    padding: 0 20px;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    transform: translateX(100%);
    width: 90vw !important;
    max-width: 420px !important;
    min-width: 0;
    height: 100vh;
    padding: 88px 28px 32px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 0;
    background: rgba(1, 3, 23, 0.42);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border: none;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    z-index: 1001;
  }
  
  .nav-links.is-open {
    right: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .nav-links.is-open .navbar-menu-close {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1005;
  }
  
  .nav-links ul {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  
  .nav-links a, .text-btn {
    display: block;
    width: 100%;
    padding: 14px 4px;
    font-size: 17px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-links #navlink5 {
    display: block;
    width: 100%;
    padding: 14px 4px;
    color: #ffffff !important;
    font-size: 17px !important;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  
  .navbar-menu-close {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    z-index: 2000;
  }

  body.navbar-menu-open .navbar-menu-close {
    display: inline-flex !important;
    visibility: visible;
    opacity: 1;
  }

  .navbar-menu-close span {
    display: block;
    line-height: 1;
  }
  
  .navbar-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--text-main);
    font-size: 30px;
    cursor: pointer;
    background: transparent;
    border: none;
  }

  body.navbar-menu-open .navbar-menu-toggle {
    visibility: hidden;
    pointer-events: none;
  }

  .nav-links .mobile-join-now {
    display: block !important;
    align-self: stretch;
    width: auto !important;
    max-width: 100%;
    min-width: 0;
    margin: 32px 0 0;
    box-sizing: border-box;
    overflow: hidden;
  }
  .nav-links .mobile-join-now .navhero-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    height: 60px;
    box-sizing: border-box;
    color: #ffffff !important;
    background: rgba(7, 29, 57, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 32px !important;
    margin: 0;
    padding: 0;
  }
  .desktop-join-now { display: none !important; }
  body.navbar-menu-open { overflow: hidden; }
}

@media only screen and (max-width: 560px) {
  nav.scrolled {
    height: 70px;
    padding: 0 16px;
  }
  nav img {
    width: 138px;
    height: 36px;
  }
  .navbar-menu-toggle { font-size: 26px; }
}
