:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --text-color-dark: #000000;
  --header-top-bg: #1e88e5; /* Darker shade of primary for header-top */
  --main-nav-bg: #26A9E0; /* Primary color for main-nav */
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) */
}

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

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  background-color: var(--header-top-bg);
  color: var(--secondary-color);
  overflow: hidden;
  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 30px; /* Adjusted padding */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  white-space: nowrap;
  display: block;
}

.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;
  background-color: #f0f0f0; /* Light background for mobile buttons */
  padding: 10px 15px;
  width: 100%;
}

.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;
  color: var(--secondary-color);
}

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

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

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

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

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

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 5px 0;
  transition: 0.4s;
}

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

.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop default: 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 a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-list a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-list a:hover::after, .nav-list a.active::after {
  width: 100%;
}

.nav-list a:hover, .nav-list a.active {
  color: var(--secondary-color);
}

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

/* Footer Styles */
.site-footer {
  background-color: #333;
  color: #f4f4f4;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
}

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

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

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

.footer-description {
  margin-top: 10px;
  color: #ccc;
  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: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #444;
  color: #aaa;
}

.footer-bottom p {
  margin: 0;
}

.footer-slot-anchor-outer,
.footer-slot-anchor-inner {
  /* These are placeholders for content injection, should not be hidden */
  min-height: 1px; /* Ensure they take up some space if empty */
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* 60px (header-top) + 48px (mobile-nav-buttons) + 48px (main-nav) for overlay, but main-nav is fixed */
  }

  body {
    overflow-x: hidden;
  }

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

  .site-header {
    box-sizing: border-box;
    padding: 0;
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 15px;
    position: relative; /* For absolute logo centering */
  }

  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Adjust to prevent overlap with hamburger */
    font-size: 24px;
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 10px 15px;
    background-color: #f0f0f0;
    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); /* Half width minus gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .hamburger-menu {
    display: block;
    position: relative;
    z-index: 1001;
    color: var(--secondary-color);
  }

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

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

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

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical for mobile */
    position: fixed;
    top: 0; /* Align with top of viewport */
    left: 0;
    width: 280px;
    height: 100%;
    background-color: var(--main-nav-bg);
    padding-top: 150px; /* Space for fixed header content */
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  }

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

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

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

  .nav-list li {
    width: 100%;
  }

  .nav-list a {
    display: block;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
    font-size: 16px;
  }

  .nav-list a::after {
    display: none;
  }

  .nav-list a:hover, .nav-list a.active {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--secondary-color);
  }

  .overlay.active {
    display: block;
  }

  body.no-scroll {
    overflow: hidden;
  }

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

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

  .footer-col h3 {
    margin-bottom: 10px;
  }

  .footer-nav {
    margin-top: 10px;
  }

  .footer-nav li {
    display: inline-block;
    margin: 0 8px 8px 0;
  }

  .footer-nav li:last-child {
    margin-right: 0;
  }

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