:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --card-bg-color: #FFFFFF;
  --background-color: #F4F7FB;
  --text-main-color: #1F2D3D;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
  --btn-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) */
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main-color);
  background-color: var(--background-color);
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.header-top {
  background-color: var(--primary-color); /* Distinct from main-nav */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.header-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for logo and buttons */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--card-bg-color); /* White text for contrast */
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.btn {
  background: var(--btn-gradient);
  color: #fff;
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  opacity: 0.9;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: var(--background-color); /* Background for mobile buttons */
  padding: 8px 20px;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mobile-nav-buttons .btn {
  flex: 1;
  max-width: calc(50% - 5px); /* Two buttons with 10px gap */
  padding: 8px 12px;
  font-size: 13px;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  border-radius: 20px;
}

.main-nav {
  background-color: var(--secondary-color); /* Distinct from header-top */
  min-height: 52px;
  height: 52px;
  display: flex; /* Displayed by default on desktop */
  align-items: center;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  color: var(--card-bg-color); /* White text for contrast */
  text-decoration: none;
  padding: 10px 15px;
  white-space: nowrap;
  transition: background-color 0.3s ease;
  font-weight: bold;
  font-size: 15px;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  width: 30px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--card-bg-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.overlay.visible {
  display: block;
  opacity: 1;
}

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color);
  color: var(--card-bg-color);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
  box-sizing: border-box;
}

.footer-slot-anchor-inner {
  /* Ensure visibility for injected content */
  display: block;
  width: 100%;
  min-height: 1px; /* Small height to ensure it's rendered */
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 30px auto;
}

.footer-col h3 {
  color: var(--card-bg-color);
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--card-bg-color);
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  color: rgba(255, 255, 255, 0.8);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.footer-nav li a:hover {
  color: var(--card-bg-color);
}

.footer-mid-slots {
  max-width: 1200px;
  margin: 0 auto 30px auto;
}

.footer-mid-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom a {
  /* No links allowed in footer-bottom */
  display: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* 60px (header-top) + 48px (mobile-nav-buttons) */
  }

  body {
    padding-top: var(--header-offset);
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Remove max-width for mobile */
    padding: 0 15px;
    justify-content: space-between;
    position: relative; /* For logo absolute positioning if needed */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: -1; /* Place at the beginning */
    margin-right: auto; /* Push logo to center */
    height: 100%;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    max-width: calc(100% - 100px); /* Leave space for hamburger and potential right element */
  }

  .desktop-nav-buttons {
    display: none !important; /* Hide desktop buttons on mobile */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    min-height: 48px;
    padding: 8px 15px;
    flex-wrap: nowrap;
    overflow-x: hidden;
  }

  .main-nav {
    min-height: 48px !important;
    height: 100vh; /* Full viewport height for mobile menu */
    position: fixed; /* Fixed position for mobile menu */
    top: var(--header-offset); /* Below header-top and mobile-nav-buttons */
    left: 0;
    width: 80%; /* Menu takes 80% width */
    max-width: 300px; /* Max width for menu */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    background-color: var(--primary-color); /* Menu background */
    flex-direction: column; /* Vertical menu */
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    overflow-y: auto;
    display: none; /* Crucial: hidden by default */
    z-index: 999;
  }

  .main-nav.active {
    transform: translateX(0); /* Show menu */
    display: flex; /* Show menu when active */
  }

  .nav-container {
    flex-direction: column;
    width: 100%;
    max-width: none; /* Remove max-width for mobile */
    padding: 0;
    align-items: flex-start;
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }

  .overlay.visible {
    top: 0;
    height: 100vh;
    display: block;
    opacity: 1;
    z-index: 997;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .footer-mid-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .footer-bottom {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 22px;
  }
  .btn {
    padding: 8px 15px;
    font-size: 13px;
  }
  .mobile-nav-buttons .btn {
    font-size: 12px;
    padding: 6px 10px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
