:root {
  --header-offset: 122px;
  --primary: #2F6BFF;
  --primary-light: #6FA3FF;
  --text-main: #1F2D3D;
  --bg-main: #F4F7FB;
  --card-bg: #FFFFFF;
  --border-color: #D6E2FF;
  --glow: #A5C4FF;
  --btn-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
}

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

/* Header Top */
.header-top {
  background-color: #1a3a8f;
  width: 100%;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  min-height: 68px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  padding: 5px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.logo:hover {
  color: var(--glow);
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  color: #ffffff;
  text-align: center;
}

.btn-register {
  background: var(--btn-gradient);
  color: #ffffff;
}

.btn-register:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.4);
}

.btn-login {
  background: var(--primary-light);
  color: #ffffff;
}

.btn-login:hover {
  background: #5a93ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(111, 163, 255, 0.4);
}

.btn-download {
  background: linear-gradient(135deg, #ff8c00 0%, #ff6600 100%);
  color: #ffffff;
}

.btn-download:hover {
  background: linear-gradient(135deg, #ff9900 0%, #ff7700 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.4);
}

/* Main Nav */
.main-nav {
  background-color: var(--card-bg);
  width: 100%;
  display: flex;
  border-bottom: 2px solid var(--border-color);
}

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

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(47, 107, 255, 0.3);
}

/* Hamburger Menu - Desktop hidden */
.hamburger-menu {
  display: none;
}

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

/* Mobile Nav Buttons - Desktop hidden */
.mobile-nav-buttons {
  display: none;
}

/* ===== Footer Styles ===== */
.site-footer {
  background-color: #1a3a8f;
  color: #ffffff;
  padding: 40px 0 0;
  margin-top: 40px;
}

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

.footer-logo {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.9;
}

.footer-heading {
  color: var(--glow);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 8px;
}

.footer-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s, padding-left 0.3s;
  display: inline-block;
}

.footer-nav a:hover {
  color: var(--glow);
  padding-left: 5px;
}

.footer-bottom {
  background-color: #122a6b;
  text-align: center;
  padding: 15px 20px;
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
  opacity: 0.9;
}

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

  /* Container full width on mobile */
  .header-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
    min-height: 60px;
  }

  .nav-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Logo centered on mobile */
  .logo {
    flex: 1;
    text-align: center;
    font-size: 1.4rem;
  }

  /* Desktop buttons hidden on mobile */
  .desktop-nav-buttons {
    display: none;
  }

  /* Main Nav hidden on mobile, shown via hamburger */
  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: var(--card-bg);
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    border-right: 2px solid var(--border-color);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    padding-top: 60px;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
  }

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

  /* Hamburger Menu visible on mobile */
  .hamburger-menu {
    display: block;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1003;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin: 0;
    width: 40px;
    height: 40px;
  }

  .hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 5px auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 2px;
  }

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

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

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

  /* 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: 1001;
  }

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

  /* Mobile Nav Buttons visible on mobile */
  .mobile-nav-buttons {
    display: flex;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: #1a3a8f;
    padding: 8px 10px;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    min-height: 48px;
    align-items: center;
  }

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

  /* Footer mobile */
  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px 25px;
  }

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

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

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

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

  .footer-bottom {
    padding: 12px 15px;
  }

  /* Mobile content 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;
  }
}

/* ===== Desktop only adjustments ===== */
@media (min-width: 769px) {
  .hamburger-menu {
    display: none;
  }

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

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