:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --card-bg: #FFFFFF;
  --background-color: #F4F7FB;
  --text-main: #1F2D3D;
  --text-black: #000000;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;

  /* Header offset - Desktop (no marquee: 68px + 52px = 120px + 2px buffer) */
  --header-offset: 122px;
}

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

a {
  text-decoration: none;
  color: var(--primary-color);
}

a:hover {
  text-decoration: underline;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: var(--card-bg);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color);
  width: 100%;
  color: #FFFFFF;
}

.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 30px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  display: block;
}

.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

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

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

/* Mobile Nav Buttons - Hidden by default for desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default for desktop */
  min-height: 48px;
  background-color: var(--secondary-color);
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  gap: 10px;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background-color: var(--secondary-color);
  width: 100%;
}

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

.nav-link {
  color: #FFFFFF;
  font-weight: 600;
  padding: 5px 0;
  transition: color 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--glow-color);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Hamburger menu - Hidden by default for desktop */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  border-radius: 10px;
  transition: all 0.3s ease;
}

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

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

/* Site Footer */
.site-footer {
  background-color: var(--background-color);
  color: var(--text-main);
  padding: 40px 20px 20px;
  border-top: 1px solid var(--border-color);
}

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

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

.footer-col .footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-black);
  margin-bottom: 15px;
  display: block;
}

.footer-col .footer-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav li {
  margin-bottom: 8px;
}

.footer-nav a {
  color: var(--text-main);
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.footer-bottom-nav {
  max-width: 1200px;
  margin: 0 auto 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.footer-bottom-nav .legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px 25px;
}

.footer-bottom-nav .legal-nav li {
  margin-bottom: 0;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  font-size: 13px;
  color: var(--text-main);
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* Footer slot anchors */
.footer-slot-anchor-inner {
  min-height: 1px;
  margin-top: 10px;
}

/* Anchor visibility constraint */
.footer-slot-anchor-inner, .footer-slot-anchor-inner * {
  /* Ensure injected content is visible */
  display: revert !important; /* Revert to browser default */
  visibility: revert !important;
  opacity: revert !important;
  height: revert !important;
  max-height: revert !important;
  overflow: revert !important;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  :root {
    /* Header offset - Mobile (60px header-top + 48px mobile-nav-buttons = 108px + 2px buffer) */
    --header-offset: 110px;
  }

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

  /* Mobile Overflow Prevention - Must be in media query */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px;
    position: relative;
  }

  .header-container {
    padding: 0;
    justify-content: space-between;
    position: static;
  }

  /* Hamburger menu - Visible on mobile */
  .hamburger-menu {
    display: flex;
    position: relative;
    z-index: 2;
  }

  /* Logo Centering for Mobile (Method 1: Flexbox) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    font-size: 20px;
  }

  .logo img {
    max-height: 56px !important;
  }

  .desktop-nav-buttons {
    display: none !important;
  }

  /* Mobile Nav Buttons - Visible on mobile */
  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--secondary-color);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Nav - Hidden by default on mobile, revealed by JS */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px 0;
  }

  .main-nav.active {
    display: flex; /* Must set display to show */
    transform: translateX(0);
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    gap: 15px;
    height: auto;
    max-width: none;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-col {
    text-align: center;
  }

  .footer-col h3, .footer-col .footer-logo {
    text-align: center;
  }

  .footer-nav {
    text-align: center;
  }

  .footer-bottom-nav .legal-nav {
    flex-direction: column;
    gap: 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;
  }
}
