:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-btn-bg: #C30808;
  --login-btn-bg: #C30808;
  --btn-text-color: #FFFF00;
  --header-top-bg: #005a2d; /* Darker green */
  --main-nav-bg: #017439;   /* Primary green */
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) + 2px buffer */
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333333;
  padding-top: var(--header-offset);
  background-color: var(--secondary-color); /* Default background */
}

a {
  text-decoration: none;
  color: inherit;
}

/* --- 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(--header-top-bg); /* Fallback */
}

.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%;
  padding: 0 20px; /* Base padding for container */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--btn-text-color); /* Yellow for logo text */
  text-transform: uppercase;
  display: block; /* Ensure it's block-level for flex alignment */
}

.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 18px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none; /* Remove underline for buttons */
  color: var(--btn-text-color); /* Default button text color */
}

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

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

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: #004a25; /* Slightly darker than main nav, lighter than top bar */
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 0 15px; /* Mobile padding */
  gap: 10px;
  overflow: hidden; /* Prevent content overflow */
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--main-nav-bg);
  width: 100%;
  padding: 0 20px; /* Base padding for container */
}

.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;
  width: 100%;
}

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

.main-nav ul li a {
  display: block;
  padding: 10px 0;
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 15px;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.main-nav ul li a:hover {
  color: #aaffaa; /* Lighter green on hover */
}

/* Hamburger Menu for Mobile */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  transition: all 0.3s ease-in-out;
}

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

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

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

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

/* --- Site Footer --- */
.site-footer {
  background-color: #333333; /* Dark grey for footer */
  color: #cccccc;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
}

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

.footer-cols-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-col h3 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.footer-col .footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--btn-text-color); /* Yellow for footer logo text */
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

.footer-col .footer-description {
  margin-bottom: 20px;
  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 li a {
  color: #cccccc;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaaaaa;
}

.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure anchor takes up space even if empty */
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .main-nav ul {
    gap: 15px;
  }
}

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

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

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

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Smaller mobile padding */
    justify-content: space-between; /* To push hamburger and logo apart */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    height: 100%;
    position: relative; /* For absolute logo centering */
    padding: 0; /* No padding on container itself, handled by header-top */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    margin-right: auto; /* Push logo to center if it's not absolutely positioned */
  }

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

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Mobile padding for buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
    background-color: #004a25; /* Match mobile-nav-buttons background */
  }

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

  .main-nav {
    min-height: 48px !important;
    height: auto; /* Auto height for menu items */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Menu takes 80% width */
    max-width: 300px;
    background-color: var(--main-nav-bg);
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-in-out;
    display: none; /* Hidden by default, will be set to block/flex by JS */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1001; /* Above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
    height: calc(100vh - var(--header-offset)); /* Fill remaining viewport height */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 15px; /* Mobile padding */
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0; /* No gap for vertical list */
  }

  .main-nav ul li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav ul li:last-child {
    border-bottom: none;
  }

  .main-nav ul li a {
    padding: 12px 0;
    font-size: 16px;
  }

  .mobile-menu-overlay.active {
    display: block;
  }

  .footer-cols-wrapper {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

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

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

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

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
