@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

/* 🌈 Root Variables */
:root {
  --h-primary-color: rgb(97, 39, 154);
  --h-neon-blue: rgb(135, 52, 219);
  --h-secondary-color: rgb(44, 62, 80);
  --h-btn-primary-color: rgb(57, 66, 69);
  --h-bg-color: rgb(35, 35, 35);
  --h-dark-bg: rgb(15 17 22 / 95%);
  --h-light-text: rgb(236, 240, 241);
  --h-dark-text: rgb(44, 62, 80);
  --h-shadow-color: rgba(0, 0, 0, 0.1);
  --h-transition-speed: 0.3s;
}

/* 🧹 Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 🧭 Header Layout */
.h-header {
  background-color: var(--h-dark-bg);
  color: var(--h-light-text);
  padding: 0.75rem 0;
  box-shadow: 0 2px 10px var(--h-shadow-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

/* 🏞️ Container */
.h-continent {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 📌 Navbar */
.h-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* 🔖 Logo */
.h-logo-container {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.h-logo {
  width: 50px;
  height: 50px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 5px var(--h-neon-blue));
}

.h-logo:hover {
  transform: rotate(-15deg) scale(1.1);
}

/* 🔽 Dropdown */
.h-dropdown {
  position: relative;
}

.h-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--h-dark-bg);
  min-width: 250px;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  overflow: hidden;
  transform: translateY(10px);
  opacity: 0;
  transition: all var(--h-transition-speed) ease;
}

.h-dropdown.is-open .h-dropdown-menu {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.h-dropdown-item {
  list-style: none;
}

.h-dropdown-link {
  color: var(--h-light-text);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: all var(--h-transition-speed);
  font-size: 0.9rem;
  border-left: 3px solid transparent;
}

.h-dropdown-link:hover,
.h-dropdown-link:focus {
  background-color: rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--h-primary-color);
  padding-left: 20px;
}

/* 🍔 Hamburger */
.h-nav-toggler {
  display: none;
  background: transparent;
  border: none;
  color: var(--h-light-text);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all var(--h-transition-speed);
  z-index: 1001;
}

.h-nav-toggler:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 📚 Nav Links */
.h-navbar-nav {
  display: flex;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.h-nav-item {
  margin: 0 0.25rem;
  position: relative;
}

.h-nav-link {
  color: var(--h-light-text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  transition: all var(--h-transition-speed);
  display: block;
  position: relative;
  white-space: nowrap;
}

.h-nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--h-primary-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.h-nav-link:hover,
.h-nav-link:focus {
  color: var(--h-primary-color);
  background-color: rgba(255, 255, 255, 0.05);
}

.h-nav-link:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

/* 🔽 Icon Toggle */
.h-dropdown-toggle::after {
  content: '▾';
  margin-left: 5px;
  font-size: 0.8rem;
  transition: transform var(--h-transition-speed);
}

.h-dropdown.is-open .h-dropdown-toggle::after {
  transform: rotate(180deg);
}

/* ℹ️ Dropdown Info */
.h-dropdown-menu-info {
  right: 0;
  left: auto;
  min-width: 200px;
}

/* 🔐 Auth Button */
.h-auth-btn {
  background-color: var(--h-btn-primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--h-transition-speed) ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.h-auth-btn:hover {
  background-color: var(--h-primary-color);
  transform: translateY(-1px);
  box-shadow: 0 0 12px var(--h-neon-blue), 0 4px 12px rgba(135, 52, 219, 0.25);
}

.h-auth-btn {
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.h-navbar:hover .h-auth-btn {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}


#authLottie {
  width: 20px;
  height: 20px;
}

/* 📱 Mobile */
@media (max-width: 768px) {
  .h-continent {
    padding: 0 0.75rem;
  }

  .h-navbar {
    flex-wrap: wrap;
    min-height: 60px;
  }

  .h-logo {
    width: 45px;
    height: 45px;
  }

  .h-nav-toggler {
    display: block;
    order: 2;
  }

  .h-auth-btn {
    order: 1;
    margin-left: auto;
    margin-right: 0.5rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }

  #authLottie {
    width: 18px;
    height: 18px;
  }

  .h-navbar-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 3;
    background-color: var(--h-secondary-color);
    border-radius: 0 0 12px 12px;
    margin-top: 0.75rem;
    padding: 0.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
  }

  .h-navbar-nav.is-active {
    display: flex;
    animation: slideDown 0.3s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .h-nav-item {
    width: 100%;
  }

  .h-nav-link {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    border-radius: 0;
  }

  .h-nav-link::before {
    display: none;
  }

  .h-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
  }

  .h-dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 0;
    margin-top: 0;
    opacity: 1;
  }

  .h-dropdown-menu-info {
    right: auto;
    left: 0;
  }

  .h-dropdown-item {
    border-left: 4px solid transparent;
  }

  .h-dropdown-link {
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
    border-left: none;
  }

  .h-dropdown-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    padding-left: 2.5rem;
  }

  .h-logo-container .h-dropdown-menu {
    position: fixed;
    top: 60px;
    left: 0.75rem;
    right: auto;
    width: calc(100% - 1.5rem);
    max-width: 300px;
    background-color: var(--h-dark-bg);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  }
}

/* 💻 Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
  .h-nav-link {
    font-size: 1rem;
    padding: 0.5rem 0.8rem;
  }

  .h-nav-item {
    margin: 0 0.2rem;
  }
}

/* 🖥️ Large Screens */
@media (min-width: 1025px) {
  .h-navbar-nav {
    margin-left: auto;
    margin-right: 2rem;
  }

  .h-dropdown:hover .h-dropdown-menu {
    display: block;
    transform: translateY(0);
    opacity: 1;
  }
}