:root { --header-offset: 122px; --primary-color: #017439; --secondary-color: #FFFFFF; --register-btn-color: #C30808; --login-btn-color: #C30808; --btn-text-color: #FFFF00; --background-color: #FFFFFF; }

html { scroll-behavior: smooth; }
body { margin: 0; padding-top: var(--header-offset); font-family: Arial, sans-serif; line-height: 1.6; color: #333; background-color: var(--background-color); overflow-x: hidden; }
body.no-scroll { overflow: hidden; }

.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.1);
  background-color: var(--secondary-color);
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  height: 68px;
  min-height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color);
  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: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  display: block;
  height: 100%;
  display: flex;
  align-items: center;
}
.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 on desktop */
  min-height: 48px;
  background-color: #f0f0f0; /* Slightly different background for distinction */
  width: 100%;
  align-items: center;
  justify-content: center; /* Center buttons horizontally */
  padding: 0 20px;
}

.btn {
  padding: 10px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-register {
  background-color: var(--register-btn-color);
  color: var(--btn-text-color);
}
.btn-register:hover { background-color: #a00606; transform: translateY(-1px); }

.btn-login {
  background-color: var(--login-btn-color);
  color: var(--btn-text-color);
}
.btn-login:hover { background-color: #a00606; transform: translateY(-1px); }

.main-nav {
  box-sizing: border-box;
  height: 52px;
  min-height: 52px;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #005a2e; /* Darker shade of primary for contrast */
  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;
}

.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  padding: 10px 15px;
  font-size: 16px;
  white-space: nowrap;
  transition: background-color 0.3s ease;
  height: 100%;
  display: flex;
  align-items: center;
}
.nav-link:hover, .nav-link.active { background-color: rgba(255, 255, 255, 0.1); }

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

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

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

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}
.overlay.active { display: block; opacity: 1; }

/* Footer Styles */
.site-footer {
  background-color: #222;
  color: #ccc;
  padding: 40px 20px 20px;
  font-size: 14px;
  box-sizing: border-box;
}

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

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

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

.footer-description {
  line-height: 1.8;
  margin-top: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li {
  margin-bottom: 8px;
}
.footer-nav a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-nav a:hover { color: var(--primary-color); }

.footer-slot-anchor, .footer-slot-anchor-inner { /* Ensure these are visible for injection */
  min-height: 1px;
  visibility: visible;
  opacity: 1;
  overflow: visible;
}

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

/* Mobile Styles */
@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;
    min-height: 60px !important;
    padding-left: 15px; /* Adjust padding for hamburger */
    padding-right: 15px; /* Adjust padding for balance */
    justify-content: space-between; /* Ensure hamburger is left, logo centered */
  }
  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: space-between; /* Re-adjust for mobile */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 2; /* Center logo */
    margin-left: -40px; /* Offset for hamburger */
  }
  .logo img {
    max-height: 56px !important;
    max-width: calc(100% - 20px); /* Ensure it doesn't overlap hamburger */
  }

  .hamburger-menu {
    display: flex;
    order: 1; /* Place hamburger first */
  }
  .desktop-nav-buttons { display: none !important; }

  .mobile-nav-buttons {
    display: flex !important; /* Show on mobile */
    min-height: 48px;
    background-color: #f5f5f5; /* Light background for buttons */
    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); /* Account for gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Starts below header */
    left: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    background-color: var(--primary-color); /* Menu background */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    overflow-y: auto;
    box-sizing: border-box;
    height: calc(100vh - var(--header-offset));
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0);
  }
  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
    height: auto; /* Allow content to dictate height */
  }
  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 17px;
  }
  .nav-link:last-child { border-bottom: none; }

  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-child { margin-bottom: 0; }

  .footer-logo {
    text-align: center;
    margin-bottom: 20px;
  }
  .footer-description {
    text-align: center;
  }
  .footer-heading {
    text-align: center;
  }
  .footer-nav {
    text-align: center;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
