:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px, +2px buffer */
  --primary-color: #26A9E0;
  --auxiliary-color: #FFFFFF;
  --login-btn-color: #EA7C07;
  --dark-blue-bg: #1A8CC2; /* Darker shade for header-top and footer-top */
  --light-bg: #F5F5F5; /* Light gray for mobile buttons area */
  --black-text: #000000;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

/* Site Header - Fixed position */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: var(--auxiliary-color); /* Fallback/base color */
}

/* Header Top Area */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--dark-blue-bg); /* Darker blue */
  color: var(--auxiliary-color);
  width: 100%;
}

.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: 0 40px; /* Desktop padding */
}

/* Logo */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--auxiliary-color);
  text-decoration: none;
  display: block;
  line-height: 1;
}
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile Navigation Buttons - Hidden by default on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px;
  background-color: var(--light-bg); /* Light gray for contrast */
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 0 15px; /* Default mobile padding */
}

/* Main Navigation Bar */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: visible, horizontal */
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Primary blue */
  width: 100%;
}

.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;
}

.nav-link {
  color: var(--auxiliary-color);
  text-decoration: none;
  padding: 15px 20px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

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

/* Hamburger Menu - Hidden by default on desktop */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Above header */
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--auxiliary-color); /* White lines */
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  color: var(--auxiliary-color); /* White text on buttons */
}

.btn-login {
  background-color: var(--login-btn-color); /* Orange */
  color: var(--auxiliary-color);
}
.btn-login:hover {
  background-color: #D46F06; /* Slightly darker orange */
  transform: translateY(-1px);
}

.btn-register {
  background-color: var(--primary-color); /* Primary blue */
  color: var(--auxiliary-color);
}
.btn-register:hover {
  background-color: #2096CC; /* Slightly darker blue */
  transform: translateY(-1px);
}

/* Overlay for mobile menu */
.overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999; /* Below menu, above main content */
}

/* Footer Styles */
.site-footer {
  background-color: var(--dark-blue-bg); /* Darker blue */
  color: var(--auxiliary-color);
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-col h3 {
  color: var(--auxiliary-color);
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--auxiliary-color);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  line-height: 1.6;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav a {
  color: var(--auxiliary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color); /* Primary blue on hover */
}

.footer-slot-anchor-inner {
  min-height: 10px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
  background-color: var(--black-text); /* Black for copyright */
  padding-bottom: 10px;
}
.footer-bottom p {
    margin: 0;
    color: var(--auxiliary-color);
}

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

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

  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px;
    justify-content: space-between;
  }

  .header-container {
    padding: 0;
    max-width: none;
    width: 100%;
    position: relative;
  }

  /* Hamburger menu visible on mobile */
  .hamburger-menu {
    display: block;
    position: relative;
    z-index: 1002;
    padding: 10px 0;
    margin-right: auto;
    color: var(--auxiliary-color);
  }

  .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); }

  /* Logo Centering (Method 1: Flexbox) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100% - 100px);
  }
  .logo img {
    max-height: 56px !important;
    max-width: 100%;
  }

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

  /* Mobile buttons visible on mobile */
  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    height: auto; /* Allow height to adjust if text wraps */
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--light-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

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

  /* Main Navigation Bar - Hidden by default on mobile */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    align-items: flex-start;
    padding: 10px 0;
  }

  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0);
  }

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

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }
  .nav-link:last-child {
      border-bottom: none;
  }

  /* Overlay visible when menu is active */
  .overlay.active {
    display: block;
  }

  /* Footer Mobile */
  .site-footer {
    padding-left: 15px;
    padding-right: 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    margin-bottom: 20px;
  }
  .footer-col {
      margin-bottom: 20px;
  }
  .footer-col:last-child {
      margin-bottom: 0;
  }

  .footer-bottom {
    padding-left: 15px;
    padding-right: 15px;
  }

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

/* Body no-scroll class for mobile menu */
body.no-scroll {
  overflow: hidden;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
