:root {
  --primary-color: #26A9E0;
  --accent-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --text-color: #333333;
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px + 2px buffer */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  color: var(--text-color);
  background-color: var(--accent-color);
  overflow-x: hidden; /* Prevent horizontal scroll on body */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: var(--accent-color); /* Default background for site-header, individual sections will override */
}

.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 header top */
  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 20px; /* Padding for content within the container */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color);
  text-decoration: none;
  display: flex; /* Using flex for potential image logo or text alignment */
  align-items: center;
  white-space: nowrap; /* Prevent text logo from wrapping */
}

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

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px; /* Minimum height for mobile buttons */
  background-color: var(--accent-color); /* White background for mobile buttons */
  width: 100%;
  padding: 0 15px; /* Padding for the mobile button bar */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); /* Light shadow for separation */
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
}

.btn-login {
  background-color: var(--login-button-color); /* Orange */
  color: var(--accent-color); /* White text */
}

.btn-login:hover {
  background-color: #D46F06; /* Darker orange on hover */
  transform: translateY(-2px);
}

.btn-register {
  background-color: var(--accent-color); /* White */
  color: var(--primary-color); /* Primary blue text */
  border: 2px solid var(--primary-color);
}

.btn-register:hover {
  background-color: var(--primary-color);
  color: var(--accent-color); /* White text on blue background */
  transform: translateY(-2px);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative; /* For z-index to work against other flex items */
}

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

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

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Visible on desktop */
  align-items: center;
  overflow: hidden;
  background-color: #007bb6; /* A slightly darker blue for main nav */
  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;
  width: 100%;
  padding: 0 20px; /* Padding for content within the container */
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
}

.nav-menu li a {
  color: var(--accent-color); /* White text */
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: #cceeff; /* Lighter shade of blue on hover */
}

.overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.overlay.active {
  display: block;
  opacity: 1;
}

/* Footer Styles */
.site-footer {
  background-color: #1a1a1a; /* Dark background for footer */
  color: #cccccc;
  padding: 40px 20px 10px; /* Adjusted padding for footer-bottom */
  font-size: 14px;
}

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

.footer-col h3 {
  color: var(--accent-color); /* White text */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--accent-color); /* White text */
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.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 li a {
  color: #cccccc; /* Light gray text */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure anchor div takes up space */
}

.footer-bottom {
  border-top: 1px solid #333333;
  padding-top: 15px;
}

.footer-bottom-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.copyright {
  margin: 0;
  color: #aaaaaa; /* Gray text */
  font-size: 13px;
}

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

  .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Stronger shadow for mobile */
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Adjust padding for mobile */
    justify-content: space-between; /* Space out hamburger, logo, and empty space */
  }

  .header-container {
    padding: 0;
    position: relative;
    justify-content: flex-start;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1;
    margin-right: 0;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: calc(100% - 100px); /* Limit logo width to prevent overlap with hamburger */
  }

  .logo img {
    max-height: 56px !important; /* Adjust logo size for mobile */
  }

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

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

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #007bb6; /* Same background as desktop nav */
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    align-items: flex-start;
    justify-content: flex-start;
    min-height: unset; /* Override fixed height */
    height: unset; /* Override fixed height */
  }

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

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

  .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-menu li {
    width: 100%;
    margin-bottom: 10px;
  }

  .nav-menu li a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout for footer on mobile */
  }

  .footer-col {
    margin-bottom: 20px;
    text-align: center;
  }

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

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

  .footer-nav li {
    display: inline-block; /* For horizontal list on mobile footer */
    margin: 0 8px 8px;
  }

  .footer-bottom-container {
    flex-direction: column;
    gap: 10px;
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: 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;
}
