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

/* General Styles */
body { margin: 0; font-family: Arial, sans-serif; line-height: 1.6; color: #333; }

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  box-sizing: border-box;
}

.header-top {
  background-color: #017439; /* Primary color */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.header-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  box-sizing: border-box;
}

.logo {
  color: #FFFF00; /* Register/Login font color */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  display: block;
}

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

.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-block;
  box-sizing: border-box;
  text-align: center;
}

.btn-register {
  background-color: #C30808; /* Custom Register color */
  color: #FFFF00; /* Custom Register/Login font color */
}

.btn-login {
  background-color: #C30808; /* Custom Login color */
  color: #FFFF00; /* Custom Register/Login font color */
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  box-sizing: border-box;
  min-height: 48px;
  background-color: #017439; /* Same as header-top for continuity */
  padding: 0 15px;
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
}

.main-nav {
  background-color: #2e8b57; /* A lighter green variant of primary */
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default */
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

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

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  padding: 0 15px;
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(255,255,255,0.1);
}

.overlay {
  display: none; /* Hidden by default */
}

/* Site Footer */
.site-footer {
  background-color: #017439; /* Primary color */
  color: #FFFFFF;
  padding: 40px 0 20px;
  font-size: 15px;
  box-sizing: border-box;
}

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

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

.footer-col h3 {
  color: #FFFF00; /* Yellow for headings */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo {
  color: #FFFF00;
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  line-height: 1.6;
  color: #FFFFFF;
  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: #FFFFFF;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: #FFFF00;
}

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

.footer-bottom p {
  margin: 0;
}

.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure slot is visible for injection */
  width: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  :root { --header-offset: 110px; }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding-left: 15px; /* Adjust padding for hamburger menu */
    padding-right: 15px;
  }

  .header-container {
    padding: 0;
    position: relative;
    justify-content: flex-start;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    white-space: normal;
    text-align: center;
    margin: 0;
    padding: 0;
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #017439;
  }

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

  .hamburger-menu {
    display: flex;
    position: relative;
    z-index: 1002;
    width: 30px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    padding: 5px;
    box-sizing: content-box;
    margin-right: auto; /* Push logo to center */
  }

  .hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
    transition: all 0.3s ease;
  }

  .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(-11px) rotate(-45deg);
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: rgba(0,0,0,0.9); /* Dark overlay for menu */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 20px;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    box-sizing: border-box;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 18px;
    justify-content: flex-start;
  }

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

  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
  }

  .overlay.active {
    display: block;
  }

  body.no-scroll {
    overflow: hidden;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  /* 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 (min-width: 769px) and (max-width: 1024px) {
  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
