:root {
  --primary: #11A84E;
  --primary-dark: #0A7A37;
  --primary-light: #22C768;
  --btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --bg-card: #11271B;
  --bg-main: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow: #57E38D;
  --gold: #F2C14E;
  --divider: #1E3A2A;
  --deep-green: #0A4B2C;
  --header-offset: 122px;
  --header-top-bg: #0A4B2C;
  --header-nav-bg: #11271B;
  --header-nav-hover: #11A84E;
}

body {
  margin: 0;
  padding: 0;
  padding-top: var(--header-offset);
  background-color: var(--bg-main);
  font-family: 'Arial', 'Helvetica Neue', sans-serif;
  color: var(--text-main);
}

/* ===== Site Header - Fixed Floating ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--header-top-bg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  border-bottom: 2px solid var(--primary);
}

/* ===== Header Top Bar ===== */
.header-top {
  background-color: var(--header-top-bg);
  width: 100%;
}

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

/* ===== Logo ===== */
.logo {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.logo:hover {
  color: #ffdf80;
  text-shadow: 0 0 20px rgba(242, 193, 78, 0.8);
}

/* ===== Desktop Nav Buttons ===== */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.desktop-nav-buttons a {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-register {
  background: var(--btn-gradient);
  color: var(--text-main);
  border: 1px solid var(--primary-light);
  box-shadow: 0 0 10px rgba(43, 209, 111, 0.4);
}

.btn-register:hover {
  background: linear-gradient(180deg, #2ad16f 0%, #17b255 100%);
  box-shadow: 0 0 20px rgba(43, 209, 111, 0.6);
  transform: scale(1.02);
}

.btn-login {
  background: linear-gradient(180deg, #1a7a40 0%, #0d4a24 100%);
  color: var(--text-main);
  border: 1px solid var(--primary);
}

.btn-login:hover {
  background: linear-gradient(180deg, #1f8a48 0%, #105c2b 100%);
  box-shadow: 0 0 10px rgba(17, 168, 78, 0.5);
}

.btn-download {
  background: linear-gradient(180deg, #17a04f 0%, #0d7035 100%);
  color: #ffffff;
  border: 1px solid var(--gold);
}

.btn-download:hover {
  background: linear-gradient(180deg, #1bc45c 0%, #0f8c3d 100%);
  box-shadow: 0 0 12px rgba(242, 193, 78, 0.6);
}

/* ===== Main Navigation (Desktop) ===== */
.main-nav {
  background-color: var(--header-nav-bg);
  width: 100%;
  display: flex;
  flex-direction: row;
  min-height: 52px;
  border-top: 1px solid var(--divider);
}

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

.nav-list {
  display: flex;
  flex-direction: row;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-list li {
  list-style: none;
}

.nav-list li a {
  display: block;
  padding: 8px 16px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.3s ease, background-color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.nav-list li a:hover,
.nav-list li a:focus {
  color: #fff;
  background-color: var(--header-nav-hover);
  text-shadow: 0 0 8px rgba(242, 193, 78, 0.5);
  box-shadow: 0 0 12px rgba(87, 227, 141, 0.3);
}

.nav-list li a.active {
  color: var(--gold);
  background-color: var(--deep-green);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(242, 193, 78, 0.5);
}

/* ===== Mobile Nav Buttons (Below Logo) ===== */
.mobile-nav-buttons {
  display: none;
  height: 48px;
}

/* ===== Hamburger Menu Button (hidden on desktop) ===== */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
}

.hamburger-bar {
  display: inline-block;
  width: 24px;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 3px;
  transition: all 0.3s ease;
}

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

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

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

/* ===== Mobile Menu Overlay ===== */
.mobile-menu-overlay {
  display: none;
}

/* ===== Footer ===== */
.site-footer {
  background-color: var(--deep-green);
  margin-top: 60px;
  border-top: 3px solid var(--primary);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding: 40px 40px 20px;
  width: 100%;
  box-sizing: border-box;
}

.footer-brand .footer-logo {
  color: var(--gold);
  font-size: 28px;
  font-weight: 800;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.4);
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.footer-contact span {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 8px;
}

.footer-column h4 {
  color: var(--gold);
  font-size: 16px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--divider);
}

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

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 10px;
  transition: color 0.3s ease, padding-left 0.3s;
}

.footer-nav a:hover {
  color: var(--text-main);
  padding-left: 8px;
  text-shadow: 0 0 8px rgba(87, 227, 141, 0.5);
}

.footer-bottom {
  text-align: center;
  padding: 15px 20px;
  border-top: 1px solid var(--divider);
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

/* ===== 1024px Tablets ===== */
@media (max-width: 1024px) {
  .nav-list li a {
    padding: 8px 12px;
    font-size: 13px;
  }
}

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

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

  /* Header top container — mobile layout */
  .header-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
  }

  /* Logo visible in mobile */
  .logo {
    display: block;
    font-size: 24px;
    text-align: center;
    flex: 1;
    order: 0;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
    margin-left: 0;
  }

  /* Hamburger button visible on left */
  .hamburger-menu {
    display: inline-flex;
    order: -1;
    flex-shrink: 0;
    padding: 6px;
  }

  .hamburger-bar {
    width: 20px;
    height: 2px;
  }

  /* Desktop buttons area hidden */
  .desktop-nav-buttons {
    display: none;
    margin-left: 0;
  }

  /* Main nav drawer (hidden by default, slides in) */
  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--header-nav-bg);
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.8);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    border-right: 2px solid var(--primary);
    border-top: none;
    min-height: 0;
  }

  /* Active class displays the drawer */
  .main-nav.active {
    display: flex;
    transform: translateX(0);
  }

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

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 0 15px;
  }

  .nav-list li {
    width: 100%;
    border-bottom: 1px solid var(--divider);
  }

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

  .nav-list li a {
    display: flex;
    width: 100%;
    padding: 14px 12px;
    font-size: 15px;
    align-items: center;
    box-sizing: border-box;
  }

  .nav-list li a:hover,
  .nav-list li a.active {
    background-color: var(--deep-green);
  }

  /* Mobile nav buttons visible — always visible on mobile */
  .mobile-nav-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    background-color: var(--deep-green);
    border-top: 1px solid var(--divider);
  }

  .mobile-buttons-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 400px;
    padding: 6px 10px;
  }

  .mobile-nav-buttons a {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }

  .mobile-nav-buttons .btn-register {
    background: var(--btn-gradient);
    color: #fff;
    border: none;
  }

  .mobile-nav-buttons .btn-login {
    background: linear-gradient(180deg, #1a7a40 0%, #0d4a24 100%);
    color: #fff;
    border: 1px solid var(--primary);
  }

  .mobile-nav-buttons .btn-download {
    background: linear-gradient(180deg, #0a7a37 0%, #065627 100%);
    color: #fff;
    border: 1px solid var(--gold);
  }

  /* Menu overlay */
  .mobile-menu-overlay.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
  }

  /* Prevent body scroll when menu is open */
  body.no-scroll {
    overflow: hidden;
  }

  /* Content protection rule */
  .page-content img, 
  .entry-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }

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

  /* Footer */
  .footer-container {
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 20px 15px;
  }

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

  .footer-contact {
    margin-top: 8px;
  }
}

/* ===== Small screens 480px ===== */
@media (max-width: 480px) {
  .logo {
    font-size: 22px;
  }

  .mobile-buttons-container {
    gap: 6px;
    padding: 6px 8px;
  }

  .mobile-nav-buttons a {
    padding: 7px 6px;
    font-size: 12px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
