:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --text-color-dark: #333333;
  --text-color-light: #FFFFFF;
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) + 2px buffer */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  background-color: var(--secondary-color);
  color: var(--text-color-dark);
  overflow-x: hidden; /* Prevent horizontal scroll from content */
}

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

a:hover {
  text-decoration: underline;
}

/* --- Header Styles --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: transparent; /* Actual backgrounds are on header-top and main-nav */
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent horizontal scroll from header itself */
}

/* Header Top Area */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  background-color: var(--primary-color); /* Main color for header top */
  width: 100%;
  overflow: hidden;
}

.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(--text-color-light);
  display: flex;
  align-items: center;
  height: 100%; /* Ensure logo is vertically centered in header-top */
}

.logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

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

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

/* Mobile Nav Buttons (hidden on desktop by default) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Fixed height for mobile nav buttons */
  background-color: var(--secondary-color); /* White background for mobile buttons */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Hamburger Menu */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above header-top */
  padding: 5px; /* Make it easier to click */
  box-sizing: content-box;
}

.hamburger-menu span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: var(--text-color-light);
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.hamburger-menu span:nth-child(1) {
  top: 0px;
}

.hamburger-menu span:nth-child(2) {
  top: 10px;
}

.hamburger-menu span:nth-child(3) {
  top: 20px;
}

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

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

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

/* Main Navigation Area */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex; /* Display flex for desktop (horizontal) */
  align-items: center;
  background-color: var(--text-color-dark); /* Dark background for main nav */
  width: 100%;
  overflow: hidden;
  position: static; /* Default static position for desktop */
}

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

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
}

.main-nav ul li a {
  color: var(--text-color-light);
  font-size: 16px;
  font-weight: bold;
  padding: 10px 0;
  display: block;
  white-space: nowrap;
}

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

/* Overlay for mobile menu */
.overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999; /* Below mobile menu, above content */
}

.overlay.active {
  display: block;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: none;
  color: var(--text-color-light);
  background-color: var(--login-color); /* Login color for buttons */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  background-color: #D16C00; /* Slightly darker orange on hover */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.btn-register {
  background-color: var(--login-color);
}

.btn-login {
  background-color: #EA7C07; /* Explicitly use login color */
}

/* --- Footer Styles --- */
.site-footer {
  background-color: var(--text-color-dark); /* Dark background for footer */
  color: #CCCCCC;
  padding: 40px 20px 20px;
  font-size: 14px;
  box-sizing: border-box;
}

.site-footer a {
  color: #BBBBBB;
}

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

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

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-col h3 {
  color: var(--text-color-light);
  font-size: 18px;
  margin: 0 0 10px;
  white-space: nowrap;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-color-light);
  margin-bottom: 10px;
  display: block;
}

.footer-logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

.footer-description {
  line-height: 1.6;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav li a {
  display: block;
  white-space: nowrap;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
  color: #AAAAAA;
}

/* Dynamic Slot Anchor Inner */
.footer-slot-anchor-inner {
  /* This container is for dynamic content injection, keep it visible */
}

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

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

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

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, logo center, empty space right */
    position: relative; /* For logo absolute positioning */
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo text */
    align-items: center !important;
    font-size: 24px;
    position: absolute; /* For image logo centering */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger */
  }

  .logo img {
    max-height: 56px !important; /* Max height for mobile logo */
    max-width: 100%;
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    margin-left: 0; /* Align to left edge of padding */
  }

  /* Mobile Nav Buttons (visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%; /* Ensure full width */
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Keep buttons in one line */
    background-color: var(--secondary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

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

  /* Main Navigation (Mobile Menu) */
  .main-nav {
    min-height: 48px !important;
    height: auto; /* Auto height for expanded menu */
    display: none; /* Hidden by default */
    position: fixed; /* Fixed position for mobile menu */
    top: var(--header-offset); /* Below header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for mobile menu */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--text-color-dark); /* Dark background for mobile menu */
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    flex-direction: column; /* Vertical for mobile */
    overflow-y: auto; /* Scroll if content overflows */
    z-index: 1001; /* Above overlay */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  }

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

  .main-nav .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 15px;
    justify-content: flex-start; /* Align menu items to left */
  }

  .main-nav ul {
    flex-direction: column; /* Stack menu items vertically */
    width: 100%;
    gap: 0; /* Remove gap for vertical list */
  }

  .main-nav ul li a {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    white-space: normal; /* Allow text wrap in menu items */
  }
  
  .main-nav ul li:last-child a {
    border-bottom: none;
  }

  /* Footer Styles */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    margin-bottom: 20px;
  }

  .footer-col h3 {
    font-size: 16px;
  }

  .footer-nav li a {
    white-space: normal; /* Allow text wrap in footer links */
  }

  /* Mobile content overflow protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
