:root {
  --primary-color: #26A9E0;
  --auxiliary-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) */
}

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

body.no-scroll {
  overflow: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: var(--auxiliary-color); /* Fallback, specific colors for header-top/main-nav */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #000000; /* Custom color for header-top */
  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 20px; /* Padding inside container for logo/buttons */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--auxiliary-color);
  text-decoration: none;
  line-height: 1;
  display: flex; /* For potential image logo alignment */
  align-items: center;
}

.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; /* Fixed height for mobile button bar */
  width: 100%;
  background-color: var(--auxiliary-color); /* White background for mobile buttons bar */
  border-bottom: 1px solid #eee;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  color: var(--auxiliary-color); /* White text for buttons */
  background-color: var(--login-button-color); /* Orange for login/register */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

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

.btn-register {
  background-color: var(--login-button-color); /* Use same color as login */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: var(--auxiliary-color);
  transition: all 0.3s ease;
}

/* Hamburger menu animation */
.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

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

.nav-container {
  box-sizing: border-box;
  width: 100%;
  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; /* Padding inside container for nav items */
}

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

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

.nav-list li a:hover {
  color: #E0E0E0; /* Lighter shade on hover */
}

.mobile-menu-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  cursor: pointer;
}

/* Footer styles */
.site-footer {
  background-color: #333; /* Dark background for footer */
  color: #fff;
  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(--primary-color); /* Use primary color for footer headings */
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 16px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color); /* Primary color for footer logo */
  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;
  color: #ccc;
}

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

.footer-nav li a {
  color: #ccc;
  text-decoration: none;
  line-height: 2;
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
}

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

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

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

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

  .site-header {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }

  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px; /* Smaller padding for mobile */
    position: relative; /* For absolute positioning of logo */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Container itself doesn't need padding, header-top handles it */
    justify-content: space-between;
  }

  .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); /* Leave space for hamburger */
    height: 100%; /* Ensure logo div takes full height for centering */
  }

  .logo img {
    max-height: 56px !important; /* Smaller logo on mobile */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons if less than 2 */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Padding for mobile buttons bar */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    order: -1; /* Place it at the beginning of flex container */
    margin-right: auto; /* Push logo to center */
  }

  .main-nav {
    display: none; /* Hide main nav by default on mobile */
    flex-direction: column; /* Vertical layout for mobile menu */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 280px; /* Mobile menu width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: #333; /* Dark background for mobile menu */
    overflow-y: auto;
    padding: 20px 0;
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* No padding for mobile nav container */
    justify-content: flex-start; /* Align menu items to left */
  }

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

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

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

  .nav-list li a {
    padding: 15px 20px;
    display: block;
    color: var(--auxiliary-color);
  }

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

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

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

  .footer-col {
    text-align: center; /* Center footer content on mobile */
  }
  .footer-col:not(:last-child) {
    border-bottom: 1px solid #444;
    padding-bottom: 20px;
  }
  .footer-col:first-child {
    padding-top: 0;
  }
  .footer-col:last-child {
    padding-bottom: 0;
    border-bottom: none;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
