: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-top-bg: var(--primary-color); /* Darker blue for top bar */
  --main-nav-bg: var(--card-bg); /* White for main nav */
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) */
}

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

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

a:hover {
  text-decoration: underline;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  background: var(--button-gradient);
  color: var(--card-bg); /* White text on button */
  font-weight: bold;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none; /* Remove underline for buttons */
  box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3);
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(47, 107, 255, 0.4);
  text-decoration: none;
}

/* 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: transparent; /* Top bar and main nav have their own backgrounds */
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop height */
  height: 68px;
  display: flex;
  align-items: center;
  background-color: var(--header-top-bg);
  color: var(--card-bg); /* White text for logo/buttons on dark background */
  overflow: hidden;
  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; /* Desktop padding */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--card-bg); /* White for logo text on dark header */
  text-decoration: none;
  white-space: nowrap;
  display: flex; 
  align-items: center;
  height: 100%;
}

.logo img { /* If logo is an image */
  display: block;
  max-height: 60px; /* Desktop max height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Mobile height for buttons */
  background-color: var(--background-color); /* Lighter background for mobile buttons */
  width: 100%;
  padding: 0 15px; /* Mobile padding */
  align-items: center;
  justify-content: center; /* Center buttons if only one, or for flex layout */
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden; /* Prevent overflow */
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.mobile-nav-buttons .btn {
  flex: 1; /* Distribute space */
  min-width: 0;
  max-width: calc(50% - 5px); /* For two buttons with 10px gap */
  padding: 8px 12px;
  font-size: 13px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop height */
  height: 52px;
  display: flex; /* Visible on desktop */
  align-items: center;
  background-color: var(--main-nav-bg);
  width: 100%;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Subtle shadow */
}

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

.nav-link {
  color: var(--text-main);
  padding: 10px 15px;
  font-weight: 600;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(47, 107, 255, 0.1);
  border-radius: 5px;
  text-decoration: none;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1001; /* Above other header elements */
}

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

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

.overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}
.overlay.active {
  display: block;
  opacity: 1;
}

.mobile-right-placeholder {
  display: none; /* Hidden on desktop */
}

/* Footer */
.site-footer {
  background-color: var(--text-main); /* Dark background for footer */
  color: #E0E0E0; /* Light text on dark footer */
  padding: 40px 20px 20px;
  line-height: 1.8;
  box-sizing: border-box;
}

.site-footer a {
  color: var(--secondary-color);
}

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

.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(--card-bg); /* White heading on dark footer */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--card-bg); /* White for footer logo */
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  font-size: 14px;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav li a {
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  max-width: 1200px;
  margin: 0 auto;
  color: #B0B0B0; /* Slightly darker white for copyright */
}

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchors - must be present but not styled to hide content */
.footer-slot-anchor, .footer-slot-anchor-inner {
  min-height: 1px; /* Smallest possible height to ensure visibility */
  display: block; /* Ensure it takes up space */
  box-sizing: border-box;
}

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

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

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

  /* Header mobile */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    justify-content: space-between; /* Space between hamburger, logo, placeholder */
  }

  .hamburger-menu {
    display: flex;
    z-index: 1001;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    height: 100%;
  }

  .logo img { /* If logo is an image */
    max-height: 56px !important;
    max-width: 100%;
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    height: auto;
    padding: 10px 15px;
    justify-content: center;
    align-items: center;
  }

  .mobile-right-placeholder {
    display: block;
    width: 30px;
    height: 24px;
  }

  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: var(--main-nav-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-main);
  }

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

  /* Footer mobile */
  .site-footer {
    padding: 30px 15px 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }

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

  .footer-col h3 {
    margin-bottom: 10px;
  }

  .footer-logo {
    font-size: 22px;
  }

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

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