:root {
  --primary: #2F6BFF;
  --primary-600: #1e56db;
  --primary-light: #6FA3FF;
  --primary-50: #e8f0ff;
  --accent: #A5C4FF;
  --bg: #F4F7FB;
  --card-bg: #FFFFFF;
  --text-main: #1F2D3D;
  --text-dark: #000000;
  --border: #D6E2FF;
  --header-offset: 122px;
  --btn-primary: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --btn-primary-hover: linear-gradient(180deg, #2F6BFF 0%, #1e56db 100%);
  --shadow-sm: 0 2px 8px rgba(31, 45, 61, 0.08);
  --shadow-md: 0 4px 16px rgba(31, 45, 61, 0.12);
  --shadow-lg: 0 8px 30px rgba(31, 45, 61, 0.18);
}

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

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

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--card-bg);
  box-shadow: 0 4px 20px rgba(31, 45, 61, 0.12);
  border-bottom: 2px solid var(--border);
}

/* Top bar */
.header-top {
  background: var(--primary);
  width: 100%;
  transition: background-color 0.3s ease;
}

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

.logo {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
  flex-shrink: 0;
  display: inline-block;
}

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

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--btn-primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3);
}

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

.btn-secondary {
  background: var(--primary-light);
  color: #ffffff;
  border-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(111, 163, 255, 0.3);
}

.btn-secondary:hover {
  background: var(--primary);
  box-shadow: 0 6px 16px rgba(111, 163, 255, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: #ffffff;
  color: var(--primary);
  border-color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
  transform: translateY(-2px);
}

/* ========== MAIN NAV DESKTOP ========== */
.main-nav {
  background: var(--card-bg);
  width: 100%;
  display: flex;
  flex-direction: row;
  position: static;
  border-bottom: 1px solid var(--border);
}

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

.nav-menu {
  display: flex;
  flex-direction: row;
  list-style: none;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-menu li {
  position: relative;
}

.nav-link {
  display: inline-block;
  padding: 10px 14px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

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

.nav-link.active {
  color: var(--primary);
  background: var(--primary-50);
}

/* Hide mobile elements on desktop */
.mobile-menu-header {
  display: none;
}

.hamburger-menu {
  display: none;
}

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

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

/* ========== FOOTER ========== */
.site-footer {
  background: var(--text-main);
  color: #ffffff;
  padding: 48px 0 0;
  margin-top: 48px;
  border-top: 4px solid var(--primary);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 1px;
}

.footer-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.footer-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-buttons .btn-primary {
  border-color: var(--primary-light);
}

.footer-buttons .btn-outline {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

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

.footer-nav-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  position: relative;
  padding-bottom: 8px;
}

.footer-nav-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--primary-light);
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav ul li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-nav ul li a:hover {
  color: var(--primary-light);
  transform: translateX(4px);
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px 24px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 768px) {
  :root {
    --header-offset: 148px;
  }

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

  /* Hidden desktop elements */
  .desktop-nav-buttons {
    display: none !important;
  }

  /* Top bar mobile */
  .header-top {
    background: var(--primary);
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 8px 16px;
  }

  .logo {
    font-size: 24px;
    margin: 0 auto;
  }

  /* Main nav mobile - OFF CANVAS DRAWER */
  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: var(--card-bg);
    z-index: 1002;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(31, 45, 61, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    flex-direction: column;
    border-right: 1px solid var(--border);
    border-bottom: none;
  }

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

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

  /* Mobile menu header with logo + close */
  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--primary);
  }

  .mobile-logo {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 1px;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 5px;
    border-radius: 8px;
    transition: background 0.3s ease;
    z-index: 1003;
    margin-left: auto;
  }

  .hamburger-menu .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

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

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

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

  /* Drawer nav menu */
  .nav-menu {
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    padding: 16px 0;
    gap: 0;
    flex: 1;
  }

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

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

  .nav-link {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    color: var(--text-main);
    border-radius: 0;
    border-left: 3px solid transparent;
  }

  .nav-link:hover {
    background: var(--primary-50);
    color: var(--primary);
    border-left-color: var(--primary);
  }

  .nav-link.active {
    background: var(--primary-50);
    color: var(--primary);
    border-left-color: var(--primary);
  }

  /* Mobile action buttons */
  .mobile-nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    width: 100%;
    background: var(--bg);
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    z-index: 1001;
  }

  .mobile-nav-buttons .btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
  }

  /* Overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* ========== MOBILE FOOTER ========== */
  .footer-container {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 0 16px 24px;
  }

  .footer-brand {
    align-items: center;
    text-align: center;
  }

  .footer-buttons {
    justify-content: center;
  }

  .footer-nav {
    align-items: flex-start;
  }

  .footer-nav ul {
    align-items: flex-start;
  }

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

  /* Page content area protection */
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

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

  body {
    overflow-x: hidden;
  }

  /* Adjust main nav top offset */
  .main-nav.active {
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 6px 12px;
  }

  .logo {
    font-size: 22px;
  }

  .btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .main-nav {
    width: 90%;
  }
}

@media (min-width: 769px) {
  .main-nav {
    display: flex !important;
  }

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