:root {
  --header-offset: 122px; /* Desktop: header-top (68px) + main-nav (52px) */
  --primary-color: #26A9E0;
  --accent-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --background-color: #FFFFFF;
  --text-color-dark: #000000;
  --header-top-bg: #003366; /* Darker blue for header top */
  --main-nav-bg: var(--primary-color); /* Main color for main nav */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Fixed header offset */
  line-height: 1.6;
  color: #333;
  background-color: var(--background-color);
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

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 5px rgba(0, 0, 0, 0.2);
  background-color: var(--accent-color); /* Overall header background, individual sections will override */
  box-sizing: border-box;
}

/* Header Top Section */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--header-top-bg);
  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; /* Padding for logo and buttons */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-color);
  text-decoration: none;
  display: flex; /* For potential image logo alignment */
  align-items: center;
  height: 100%;
}

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

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Mobile Navigation Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop by default */
  min-height: 48px; /* Mobile min height */
  background-color: var(--main-nav-bg); /* Use main nav background for consistency */
  width: 100%;
  padding: 0 15px; /* Mobile padding */
}

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

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

.nav-link {
  color: var(--accent-color);
  padding: 10px 15px;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

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

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  width: 30px;
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

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

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

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

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

/* Overlay (hidden by default) */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none; /* Remove underline */
  box-sizing: border-box;
}

.btn-register {
  background-color: var(--login-button-color); /* #EA7C07 */
  color: var(--accent-color);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.btn-register:hover {
  background-color: #d16b06; /* Slightly darker */
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
}

.btn-login {
  background-color: var(--primary-color); /* #26A9E0 */
  color: var(--accent-color);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.btn-login:hover {
  background-color: #1f8ec4; /* Slightly darker */
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
}

/* Footer Styles */
.site-footer {
  background-color: var(--header-top-bg); /* Darker blue for footer */
  color: var(--accent-color);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
  box-sizing: border-box;
  width: 100%;
}

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

.footer-col {
  box-sizing: border-box;
}

.footer-col h3 {
  color: var(--accent-color);
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 5px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
}

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

.footer-description {
  margin: 0 0 15px;
  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 {
  margin-bottom: 8px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent breaking on desktop */
}

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

/* Dynamic Slot Anchors */
.footer-slot-anchor-inner {
  min-height: 10px; /* Ensure visibility for injection */
  margin-top: 10px;
}

/* Footer Bottom */
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p {
  margin: 0;
}

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Ensure no horizontal scroll on body */
  }

  /* Mobile Overflow Protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  
  /* Header adjustments */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Adjust padding for mobile */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Remove internal padding, handled by header-top */
    justify-content: space-between; /* Space out hamburger and logo */
    position: relative; /* For absolute logo centering */
  }

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

  .logo img {
    max-height: 56px !important; /* Mobile max height */
    max-width: 100%;
    height: auto;
  }

  /* Hamburger Menu visible on mobile */
  .hamburger-menu {
    display: flex;
    order: -1; /* Place at the beginning */
    margin-right: auto; /* Push logo to center */
    z-index: 1002; /* Above logo and buttons */
  }

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

  /* Mobile buttons visible on mobile */
  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%; /* Ensure it doesn't overflow */
    box-sizing: border-box;
    padding: 0 15px; /* Add padding to prevent buttons touching edges */
    overflow: hidden; /* Prevent horizontal scroll */
    gap: 10px; /* Space between buttons */
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
  }

  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space evenly */
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Ensure long words break */
    overflow-wrap: break-word;
  }

  /* Main Nav (Mobile) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Position below header */
    left: 0;
    width: 80%; /* Menu width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--main-nav-bg);
    flex-direction: column; /* Vertical menu */
    align-items: flex-start;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay */
    overflow-y: auto; /* Allow scrolling for long menus */
    box-sizing: border-box;
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    flex-direction: column; /* Vertical links */
    align-items: flex-start;
    padding: 0;
    height: auto; /* Allow height to adjust to content */
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    white-space: normal;
  }

  .nav-link:last-child {
    border-bottom: none;
  }
  
  /* Footer adjustments */
  .site-footer {
    padding: 30px 15px 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    margin-bottom: 20px;
  }

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

  .footer-col:last-child {
    margin-bottom: 0;
  }

  .footer-bottom {
    margin-top: 20px;
    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;
  }
}
