:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --card-bg: #FFFFFF;
  --background-color: #F4F7FB;
  --text-main-color: #1F2D3D;
  --text-custom-color-1776249996415: #000000;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) + 2px buffer */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--background-color);
  color: var(--text-main-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: var(--card-bg); /* Use card-bg for overall header, distinct sections for colors */
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Deep blue for top section */
  width: 100%;
  color: #fff;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 0;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}

.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  height: auto; /* Allow content to dictate height, but min-height for consistent spacing */
  background-color: var(--background-color); /* Neutral background for mobile buttons */
  width: 100%;
  padding: 10px 20px;
  justify-content: center; /* Center buttons horizontally */
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.btn {
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-register {
  background: var(--button-gradient);
  box-shadow: 0 4px 8px rgba(47, 107, 255, 0.3);
}

.btn-login {
  background-color: var(--secondary-color); /* Use secondary for login button */
  box-shadow: 0 4px 8px rgba(111, 163, 255, 0.3);
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--secondary-color); /* Lighter blue for main navigation */
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 3px rgba(0,0,0,0.08);
}

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

.nav-link {
  color: #fff;
  text-decoration: none;
  padding: 10px 0;
  font-weight: bold;
  white-space: nowrap;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  border-bottom: 2px solid #fff;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  cursor: pointer;
  position: relative;
  z-index: 1001;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

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

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

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

.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 998;
}

/* Footer styles */
.site-footer {
  background-color: var(--text-main-color); /* Dark background for footer */
  color: #fff;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
  box-sizing: border-box;
}

.site-footer h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
}

.site-footer h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: var(--secondary-color);
  margin-top: 8px;
}

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

.footer-col {
  box-sizing: border-box;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
  line-height: 1;
}

.footer-description {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.footer-nav li a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom p {
  margin: 0;
}

.footer-slot-anchor-inner {
  /* Ensures anchor is visible for content injection */
  min-height: 1px;
  min-width: 1px;
  margin-top: 10px; /* Small spacing for potential injected content */
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* 60px (header-top) + 48px (main-nav) + 2px buffer */
  }

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

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

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: space-between;
    position: relative; /* For absolute positioning of logo if needed */
  }

  .hamburger-menu {
    display: flex;
    width: 28px;
    height: 22px;
    order: -1; /* Place hamburger menu to the far left */
    margin-right: auto; /* Push logo to center if possible */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger and potential right-side items */
  }

  .logo img {
    max-height: 56px !important;
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    height: auto; /* Allow content to dictate height */
    padding-left: 15px;
    padding-right: 15px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 50% width minus half the gap */
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    min-height: 48px !important;
    height: 100vh; /* Full viewport height for mobile menu */
    width: 280px; /* Fixed width for the slide-out menu */
    position: fixed;
    top: var(--header-offset); /* Start below the header */
    left: 0;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-out;
    background-color: var(--text-main-color); /* Dark background for mobile menu */
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    z-index: 999;
    display: none; /* Ensure it's hidden when not active */
  }

  .main-nav.active {
    transform: translateX(0); /* Slide in */
    display: flex; /* Make it visible when active */
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%;
    height: auto;
    max-width: none;
    gap: 0; /* Remove gap for vertical links */
  }

  .nav-link {
    padding: 12px 0;
    width: 100%;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-col h3 {
    text-align: center;
  }

  .footer-col h3::after {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-nav {
    text-align: center;
  }
  
  .footer-description {
    text-align: center;
  }
  .footer-logo {
    text-align: center;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
