/* Global layout fixes */
* {
  max-width: 100%;
  box-sizing: border-box;
}
html,
body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* ===== Liquid Glass Nav Effect ===== */
nav {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  background: rgba(255, 255, 255, 0.25) !important; /* base translucency */
  backdrop-filter: blur(12px) saturate(180%) contrast(120%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(180%) contrast(120%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  overflow: hidden; /* make sure pseudo stays clipped */
}
/* gradient sheen overlay */
nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.15) 100%
  );
  pointer-events: none;
  mix-blend-mode: overlay;
}
/* slight inner shadow to enhance glass depth */
nav::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

/* Mobile menu panel */
#mobileMenu {
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.25); /* base translucency */
  backdrop-filter: blur(12px) saturate(180%) contrast(120%);
  -webkit-backdrop-filter: blur(12px) saturate(180%) contrast(120%);
  border-top: 1px solid rgba(229, 231, 235, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  z-index: 50;
}
#mobileMenu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: #374151;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}
#mobileMenu a:nth-child(2) {
  color: #8b5cf6;
  font-weight: 600;
}
#mobileMenu a:hover {
  color: #8b5cf6;
}
/* Hide mobile menu by default */
#mobileMenu.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  #mobile-menu-btn {
    display: block;
  }
  nav .container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  /* Ensure nav logo stays small */
  nav img {
    text-align: left;
    width: auto !important;
    height: 2rem !important;
  }
}
/* 隐藏横向滚动条 */
.no-scrollbar {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.no-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

@media (max-width: 768px) and (orientation: portrait) {
  footer {
    position: relative;
  }

  footer .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  footer .grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0rem !important;
    text-align: center !important;
    margin-left: 1rem;
  }

  /* 隐藏Agnes AI Logo部分 */
  footer .grid > div:first-child {
    display: none !important;
  }

  footer h3 {
    margin-bottom: 0.75rem !important;
    font-size: 0.875rem !important;
  }

  footer .text-2xl {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }

  footer .space-y-3 > * {
    margin-bottom: 0.5rem !important;
  }

  footer a {
    font-size: 0.875rem !important;
  }
  footer > .absolute {
    display: none !important;
  }

  .portait-justify {
    flex-direction: column !important;
    gap: 2rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
