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

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

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

/* Header top row */
.header-top {
  width: 100%;
  background: var(--header-top-bg);
  color: #fff;
}

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

.logo {
  display: inline-block;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: linear-gradient(180deg, #A5C4FF 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.logo:hover {
  opacity: 0.9;
}

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

.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;
  white-space: nowrap;
  border: none;
}

.btn-register {
  background: linear-gradient(180deg, #FF6B35 0%, #FF4500 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 69, 0, 0.4);
}

.btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 69, 0, 0.5);
}

.btn-login {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(47, 107, 255, 0.4);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.5);
}

.btn-download {
  background: linear-gradient(180deg, #28A745 0%, #1E7E34 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.5);
}

/* Main navigation */
.main-nav {
  background: var(--header-nav-bg);
  width: 100%;
  display: flex;
  border-top: 1px solid var(--border);
}

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

.nav-link {
  color: #1F2D3D;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

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

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

/* Mobile elements hidden on desktop */
.hamburger-menu,
.mobile-menu-overlay,
.mobile-nav-buttons {
  display: none;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 40px 0 0;
  margin-top: 60px;
  border-top: 4px solid var(--primary);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 0 30px 40px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 16px;
  font-weight: 700;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.footer-logo {
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
  color: #A5C4FF;
}

.footer-certificate {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.footer-certificate span {
  background: rgba(47, 107, 255, 0.2);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

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

.footer-nav a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 2px 0;
}

.footer-nav a:hover {
  color: #ffffff;
  padding-left: 6px;
}

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

.footer-bottom p {
  margin: 0;
  color: #A5C4FF;
}

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

  .site-header {
    padding-bottom: 0;
  }

  .header-top {
    background: var(--header-top-bg);
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 8px 50px 8px 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    gap: 10px;
  }

  .logo {
    font-size: 1.2rem;
    text-align: center;
    flex: 0 1 auto;
  }

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

  /* Main nav hidden by default on mobile */
  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    z-index: 1002;
    padding-top: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease, display 0s;
    overflow-y: auto;
    border-radius: 0 12px 12px 0;
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 10px 0;
    gap: 0;
    overflow-y: auto;
  }

  .nav-link {
    padding: 14px 24px;
    font-size: 1rem;
    border-bottom: 1px solid #E8F0FF;
    border-radius: 0;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
  }

  .nav-link:hover,
  .nav-link.active {
    background: rgba(47, 107, 255, 0.08);
    color: var(--primary);
    border-left: 4px solid var(--primary);
  }

  /* Mobile buttons always visible */
  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    background: #F4F7FB;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 999;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .mobile-nav-buttons .btn {
    padding: 8px 14px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  /* Hamburger menu */
  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: fixed;
    top: 8px;
    left: 12px;
    z-index: 1003;
    padding: 8px;
  }

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

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

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

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

  /* Overlay */
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    transition: opacity 0.3s ease;
    opacity: 0;
  }

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

  body.no-scroll {
    overflow: hidden;
  }

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

  .footer-bottom {
    padding: 12px 16px;
    font-size: 0.8rem;
  }

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

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

  body {
    overflow-x: hidden;
  }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
  .header-container {
    padding: 8px 45px 8px 45px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

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