:root {
  --header-offset: 122px;
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --text-dark: #333333;
  --text-light: #FFFFFF;
  --header-top-bg: #1E88B7;
  --main-nav-bg: #26A9E0;
  --footer-bg: #333333;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent horizontal scroll for body */
}

/* --- Header Styles --- */
.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);
  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(--header-top-bg);
  width: 100%;
  padding: 0 20px; /* Default padding for desktop */
}

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

.logo {
  color: var(--secondary-color);
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.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;
  flex-shrink: 0;
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: var(--header-top-bg); /* Match header-top background */
  padding: 0 20px; /* Default padding for desktop, though hidden */
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--main-nav-bg);
  width: 100%;
  position: static; /* Desktop: normal flow */
}

.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;
  width: 100%;
}

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

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

.nav-list li a:hover,
.nav-list li a.active {
  color: #E0E0E0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  color: var(--secondary-color);
  font-size: 15px;
}

.btn-login {
  background-color: var(--login-color);
}

.btn-login:hover {
  background-color: #C26606;
  transform: translateY(-1px);
}

.btn-register {
  background-color: var(--primary-color);
}

.btn-register:hover {
  background-color: #1A86B7;
  transform: translateY(-1px);
}

/* Hamburger Menu */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
  margin-right: 15px; /* Space between hamburger and logo */
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  position: relative;
  transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { top: 8px; }

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.hamburger-menu.active .hamburger-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

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

/* --- Footer Styles --- */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--text-light);
  padding: 40px 20px 20px;
  font-size: 14px;
  box-sizing: border-box;
}

.site-footer h3 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 20px;
}

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

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

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

.footer-description {
  margin: 0;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

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

.footer-bottom p {
  margin: 0;
}

/* Slot anchors - must be visible */
.footer-slot-anchor-inner {
  display: block; /* Ensure visibility for injection */
  min-height: 1px; /* Ensure it takes up space */
}

/* --- Media Queries (Mobile First Override) --- */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

  body {
    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: 0 15px; /* Smaller padding for mobile */
  }

  .header-container {
    max-width: none; /* No max-width on mobile */
    padding: 0;
    justify-content: space-between; /* Keep space-between for hamburger-logo-space */
    position: relative; /* For logo absolute centering */
  }

  .logo {
    font-size: 24px;
    flex: 1 !important; /* Allow flex to center */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    height: 100%; /* Take full height of container */
    padding: 0;
  }

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

  .hamburger-menu {
    display: block;
    order: -1; /* Place hamburger first */
    margin-right: 0; /* Adjust margin */
    z-index: 1002; /* Higher than logo if needed */
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px; padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--header-top-bg);
  }

  .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 {
    min-height: 48px !important;
    height: auto; /* Allow height to adjust for content */
    position: fixed; /* Fixed position for mobile menu */
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    height: calc(100vh - var(--header-offset)); /* Full height minus header */
    flex-direction: column; /* Vertical layout */
    justify-content: flex-start;
    align-items: flex-start;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    padding-top: 20px;
    box-sizing: border-box;
    overflow-y: auto; /* Enable scrolling for long menus */
    display: none; /* Hidden by default */
  }

  .main-nav.active {
    transform: translateX(0); /* Visible when active */
    display: flex; /* Display as flex when active */
  }

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

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

  .nav-list li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .nav-list li a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
  }

  .overlay.active {
    display: block;
  }

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

  .footer-col h3 {
    margin-top: 30px;
  }

  .footer-col:first-child h3 {
    margin-top: 0;
  }

  .footer-logo {
    text-align: center;
    margin-bottom: 10px;
  }

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

  .footer-nav li {
    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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
