/* Mobile navigation styles */

/* Back Button */
.back-btn {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  color: #90caf9;
  font-size: 1.5rem;
  transition:
    color 0.2s,
    transform 0.2s;
  margin-right: 0.5rem;
}

.back-btn:hover {
  color: #ffd54f;
  transform: translateX(-3px);
}

.back-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

@media (max-width: 900px) {
  .back-btn {
    display: flex;
  }
}

.hamburger {
  display: none;
  background: none;
  border: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hamburger .bar,
.hamburger .bar::before,
.hamburger .bar::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #90caf9;
  border-radius: 2px;
  position: relative;
}

.hamburger .bar::before,
.hamburger .bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger .bar::before {
  top: -7px;
}

.hamburger .bar::after {
  top: 7px;
}

.hamburger.open .bar {
  background: transparent;
}

.hamburger.open .bar::before {
  transform: rotate(45deg) translate(4px, 4px);
}

.hamburger.open .bar::after {
  transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0;
  height: auto;
  min-height: calc(100vh - 70px);
  background: #0c0e0f;
  z-index: 9999;
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
  overflow-y: auto;
}

.mobile-menu.show {
  display: flex !important;
  height: auto !important;
  min-height: calc(100vh - 70px) !important;
}

.mobile-menu .nav-link {
  font-size: 1.25rem;
  padding: 0.9rem 1rem;
  width: 100%;
  text-align: center;
  display: block;
  color: #90caf9;
  text-decoration: none;
  border-radius: 8px;
  transition:
    background 0.2s,
    color 0.2s;
}

.mobile-menu .nav-link:hover {
  background: rgba(255, 213, 79, 0.15);
  color: #ffd54f;
}

.mobile-menu .nav-link.active {
  background: rgba(255, 213, 79, 0.08);
}

/* Consistent login button styling inside mobile menu */
.mobile-menu .login-btn-top {
  background: #90caf9;
  color: #181a1b;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 24px #0006;
  transition:
    background 0.2s,
    transform 0.2s;
}

.mobile-menu .login-btn-top:hover {
  background: #64b5f6;
  transform: translateY(-2px) scale(1.04);
}

/* Responsive behavior */
@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none !important;
  }

  /* Ensure topbar items don't overflow */
  .topbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 768px) {
  .mobile-menu {
    top: 60px;
  }
}
