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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  padding-top: var(--header-offset);
  font-family: Arial, sans-serif;
}

/* ===== Header Styles ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--secondary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  min-height: auto;
}

.header-top {
  background: linear-gradient(135deg, #017439 0%, #014d26 100%);
  width: 100%;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 30px;
}

.logo {
  font-size: 28px;
  font-weight: 900;
  color: #FFFFFF;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-style: italic;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

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

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

.btn-download {
  background-color: var(--btn-download-bg);
  color: var(--btn-download-text);
  border: 2px solid #FFFFFF;
}

.btn-login:hover,
.btn-register:hover {
  opacity: 0.9;
  box-shadow: 0 4px 8px rgba(195, 8, 8, 0.3);
}

.btn-download:hover {
  opacity: 0.9;
  box-shadow: 0 4px 8px rgba(1, 116, 57, 0.3);
  background-color: #015c2e;
}

/* ===== Main Navigation ===== */
.main-nav {
  background-color: #FFFFFF;
  width: 100%;
  display: flex;
  border-bottom: 1px solid #e0e0e0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  flex-wrap: wrap;
}

.nav-link {
  color: #333333;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 10px 15px;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:first-child {
  color: var(--primary-color);
  font-weight: 700;
}

/* ===== Mobile Navigation Buttons ===== */
.mobile-nav-buttons {
  display: none;
  background: #FFFFFF;
  border-bottom: 1px solid #e0e0e0;
}

.mobile-buttons-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 8px 15px;
  gap: 8px;
}

.mobile-nav-buttons .btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  max-width: 140px;
}

/* ===== Hamburger Menu ===== */
.hamburger-menu {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #333;
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
  background-color: #FF0000;
}

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

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
  background-color: #FF0000;
}

/* ===== Mobile Menu Overlay ===== */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

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

/* ===== Footer Styles ===== */
.site-footer {
  background: linear-gradient(135deg, #014d26 0%, #017439 50%, #014d26 100%);
  color: #FFFFFF;
  padding: 40px 15px 20px;
  margin-top: 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-logo {
  font-size: 24px;
  font-weight: 900;
  color: #FFFFFF;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-style: italic;
}

.footer-description {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
}

.footer-heading {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #FFFFFF;
  text-transform: uppercase;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.footer-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 13px;
  opacity: 0.8;
}

/* ===== Mobile Styles ===== */
@media (max-width: 768px) {
  :root {
    --header-offset: 146px;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 10px 15px;
  }

  .logo {
    font-size: 24px;
    display: block;
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: #FFFFFF;
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    padding-top: 60px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    align-items: flex-start;
  }

  .main-nav.active {
    display: block;
    transform: translateX(0);
  }

  .nav-link {
    padding: 15px 20px;
    width: 100%;
    color: #333333;
    font-size: 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
  }

  .nav-link:hover {
    background-color: #f0fff5;
  }

  .nav-link:first-child {
    color: var(--primary-color);
    font-weight: 700;
  }

  .mobile-nav-buttons {
    display: flex;
    min-height: 48px;
  }

  .hamburger-menu {
    display: block;
  }

  .mobile-menu-overlay {
    display: none;
  }

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

  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  .footer-nav a {
    padding: 4px 0;
  }

  .footer-info {
    align-items: center;
  }

  .footer-logo {
    display: inline-block;
  }

  .footer-bottom {
    font-size: 12px;
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }

  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  body {
    overflow-x: hidden;
  }
}

/* ===== Mobile Adjusted Header Offset ===== */
@media (max-width: 768px) {
  body {
    padding-top: var(--header-offset);
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
