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

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

a {
  text-decoration: none;
  color: inherit;
}

.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);
  background-color: var(--secondary-color); /* Overall header background */
}

/* Header Top Section (Desktop) */
.header-top {
  box-sizing: border-box;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  background-color: #1a8cc2; /* Darker blue for contrast with main-nav */
  color: var(--secondary-color);
  overflow: hidden;
}

.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 25px; /* Padding for logo and buttons */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  display: block; /* Ensure logo is visible */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px; /* Limit logo width */
}

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

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

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline for buttons */
}

.btn-register {
  background-color: var(--login-button-color); /* Orange for register */
  color: var(--secondary-color);
}

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

.btn-login {
  background-color: var(--primary-color); /* Primary blue for login */
  color: var(--secondary-color);
}

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

/* Main Navigation Section (Desktop) */
.main-nav {
  box-sizing: border-box;
  height: 52px; /* Fixed height for desktop */
  display: flex; /* Visible on desktop */
  align-items: center;
  background-color: var(--primary-color); /* Primary blue for main nav */
  color: var(--secondary-color);
  overflow: hidden;
}

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

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

.nav-menu li a {
  padding: 8px 0;
  color: var(--secondary-color);
  font-weight: bold;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-menu li a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Above header-top */
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

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

/* 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 active menu, above main content */
}

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

/* Mobile Nav Buttons (Hidden on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop, shown on mobile */
  min-height: 48px; /* Fixed height for mobile */
  background-color: var(--secondary-color); /* Background for mobile buttons */
  box-shadow: 0 2px 3px rgba(0,0,0,0.05);
  padding: 0 15px; /* Padding for mobile buttons container */
  overflow: hidden; /* Prevent content overflow */
}

/* Footer Styles */
.site-footer {
  background-color: #333333; /* Dark background for footer */
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

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

.footer-description {
  margin-top: 0;
  line-height: 1.6;
  word-wrap: break-word; /* Ensure description wraps */
  overflow-wrap: break-word;
}

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

.footer-col h3::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
  margin-top: 5px;
}

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

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

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

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

.footer-slot-anchor-inner {
  /* Empty for dynamic injection */
}

.footer-bottom {
  border-top: 1px solid #444444;
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #aaaaaa;
  max-width: 1200px; /* Match grid width */
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

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

  body {
    padding-top: var(--header-offset);
  }
  
  .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 Mobile */
  .header-top {
    height: 60px !important; /* Fixed height for mobile */
    background-color: #1a8cc2; /* Keep same background as desktop for consistency */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    max-width: none; /* Full width for mobile container */
    position: relative; /* For absolute logo centering */
    justify-content: flex-start; /* Align hamburger to start */
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important; /* Center logo horizontally */
    align-items: center !important;
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    font-size: 20px; /* Smaller font for mobile logo */
  }

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

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

  /* Mobile Nav Buttons (Shown on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons if only one */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Padding for buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background-color: var(--secondary-color); /* White background for buttons */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place it at the beginning */
    margin-right: auto; /* Push logo to center */
    color: var(--secondary-color); /* Hamburger icon color */
  }
  .hamburger-menu span {
    background-color: var(--secondary-color); /* Hamburger lines color */
  }

  /* Main Navigation Mobile (Hidden by default, shown when active) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Position below header */
    left: 0;
    width: 80%; /* Menu width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--secondary-color); /* White background for mobile menu */
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    flex-direction: column; /* Vertical layout for menu items */
    align-items: flex-start; /* Align menu items to left */
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    z-index: 1001; /* Above overlay and header */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* Full width for mobile container */
    padding: 0; /* Remove horizontal padding */
  }

  .nav-menu {
    flex-direction: column; /* Vertical menu items */
    width: 100%;
    gap: 0; /* Remove gap */
  }

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

  .nav-menu li a {
    padding: 12px 20px; /* Larger clickable area */
    display: block;
    color: var(--text-color); /* Dark text for white background */
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-menu li a:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
  }

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 20px;
    padding: 0 15px;
  }

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

  .footer-col h3::after {
    margin-left: auto;
    margin-right: auto;
  }

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

  .footer-bottom {
    padding-left: 15px;
    padding-right: 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;
}
