:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-btn-color: #EA7C07;
  --background-color: #FFFFFF;
  --dark-text-color: #000000;
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px, +2 for buffer */
}

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

a {
  text-decoration: none;
  color: var(--primary-color);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline */
}

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

.btn-login:hover {
  background-color: #d16b06; /* Manually darkened */
}

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

.btn-register:hover {
  background-color: #2087b3; /* Manually darkened */
}

/* Site Header */
.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(--background-color); /* Overall header background, parts will override */
  box-sizing: border-box;
}

.header-top {
  background-color: var(--primary-color); /* Main header top color */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.header-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px; /* Adjusted padding */
  box-sizing: border-box;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%; /* Ensure logo text aligns vertically */
}

.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; /* For mobile, but hidden on desktop */
  background-color: #f0f0f0; /* Light background for mobile buttons */
  padding: 8px 15px; /* Added padding for mobile buttons */
}

.main-nav {
  background-color: var(--dark-text-color); /* Dark background for main nav */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.nav-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.nav-link {
  color: var(--secondary-color);
  padding: 10px 15px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

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

/* Hamburger Menu */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 22px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above header */
  flex-direction: column;
  justify-content: space-between;
  margin-right: 15px; /* Space between hamburger and logo on mobile */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

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

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

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

/* Mobile Nav Overlay */
.mobile-nav-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; /* Below hamburger, above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

.mobile-nav-overlay.active {
  display: block;
  opacity: 1;
}

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden;
  }
  
  .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.15);
  }

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

  .header-container {
    padding: 0 15px;
    justify-content: space-between; 
    position: relative;
    max-width: none; 
  }

  .hamburger-menu {
    display: flex; 
    margin-right: 0; 
    position: relative; 
    z-index: 1001; 
  }

  .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 and potential right element */
    height: 100%;
  }

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

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

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

  .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;
    height: auto; 
  }

  .main-nav {
    display: none; 
    position: fixed;
    top: var(--header-offset); 
    left: 0;
    width: 280px; 
    height: calc(100% - var(--header-offset)); 
    background-color: var(--dark-text-color);
    flex-direction: column;
    padding-top: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); 
    transition: transform 0.3s ease;
    box-sizing: border-box;
    overflow-y: auto; 
    z-index: 1000; 
  }

  .main-nav.active {
    display: flex; 
    transform: translateX(0); 
  }

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

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

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

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

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

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

.footer-col p {
  line-height: 1.8;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-nav a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
}

/* Footer slot anchors - ensure visibility */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure element exists and takes up minimal space */
}

@media (max-width: 768px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 0 15px;
    max-width: none;
  }

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

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

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

  .footer-nav {
    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;
  }
}
