:root {
  --header-offset: 122px;
  --color-primary: #113B7A;
  --color-secondary: #1D5FD1;
  --color-button: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  --color-card-bg: #10233F;
  --color-text-main: #F3F8FF;
  --color-text-secondary: #AFC4E8;
  --color-border: #244D84;
  --color-glow: #4FA8FF;
  --color-gold: #F2C14E;
  --color-divider: #1B3357;
  --color-deep-navy: #08162B;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--color-text-main);
  background-color: var(--color-deep-navy);
  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 10px rgba(0, 0, 0, 0.2);
  background-color: var(--color-primary);
}

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

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-text-main);
  text-decoration: none;
  display: block;
  line-height: 1;
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default for desktop */
  min-height: 48px;
  background-color: var(--color-card-bg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  color: var(--color-text-main);
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--color-button);
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

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

.hamburger-menu {
  display: none; /* Hidden by default for desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-text-main);
  border-radius: 3px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu .bar:nth-child(3) { bottom: 0; }

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

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

.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;
  gap: 20px;
}

.nav-link {
  color: var(--color-text-main);
  text-decoration: none;
  padding: 8px 15px;
  font-weight: bold;
  transition: color 0.3s ease;
  white-space: nowrap;
  font-size: 15px;
}

.nav-link:hover {
  color: var(--color-gold);
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
}

.site-footer {
  background-color: var(--color-deep-navy);
  color: var(--color-text-secondary);
  padding: 40px 0 20px;
  border-top: 1px solid var(--color-divider);
}

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

.footer-col h3 {
  color: var(--color-text-main);
  font-size: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-divider);
  padding-bottom: 10px;
}

.footer-col p {
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

.footer-nav a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid var(--color-divider);
  font-size: 13px;
  color: var(--color-text-secondary);
}

.footer-slot-anchor-inner, .footer-slot-anchor {
  /* Ensure anchors are not hidden */
  display: block;
  min-height: 1px;
}

@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

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

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

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: space-between;
  }

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

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

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

  .hamburger-menu {
    display: block;
    position: relative;
    z-index: 1001;
  }

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
  }

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

  .main-nav {
    height: auto;
    min-height: 100vh; /* Full viewport height */
    width: 280px; /* Sidebar width */
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--color-card-bg);
    padding-top: 60px; /* Space for fixed header content */
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 1000;
    display: none; /* Hidden by default */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    gap: 10px;
    width: 100%;
    max-width: none;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-divider);
  }

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

  .overlay.active {
    display: block;
  }

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

  .footer-col {
    margin-bottom: 30px;
  }

  .footer-col:last-child {
    margin-bottom: 0;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
