:root {
  --primary-color: #26A9E0; /* Light Blue */
  --secondary-color: #FFFFFF; /* White */
  --dark-blue-header: #1A8EC7; /* Darker Blue for header top */
  --footer-bg: #26A9E0; /* Footer background */
  --footer-bottom-bg: #1A8EC7; /* Footer bottom background */
  --btn-login-bg: #EA7C07; /* Orange for login button */
  --text-color-dark: #333333;
  --text-color-light: #FFFFFF;
  --header-offset: 122px; /* Desktop: header-top (68px) + main-nav (52px) + buffer */
}

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

/* Base styles for buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-sizing: border-box;
  border: none;
  text-align: center;
}

.btn-register {
  background-color: var(--primary-color);
  color: var(--text-color-light);
  box-shadow: 0 4px 10px rgba(38, 169, 224, 0.3);
}

.btn-register:hover {
  background-color: #1a8ec7; /* Slightly darker primary */
  box-shadow: 0 6px 15px rgba(38, 169, 224, 0.4);
}

.btn-login {
  background-color: var(--btn-login-bg);
  color: var(--text-color-light);
  box-shadow: 0 4px 10px rgba(234, 124, 7, 0.3);
}

.btn-login:hover {
  background-color: #c06506; /* Slightly darker orange */
  box-shadow: 0 6px 15px rgba(234, 124, 7, 0.4);
}

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

.header-top {
  background-color: var(--dark-blue-header);
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  position: relative; /* For hamburger positioning on mobile */
}

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

.logo {
  color: var(--secondary-color);
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is visible */
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Default min-height for mobile */
  background-color: var(--primary-color); /* A distinct background */
  padding: 8px 20px; /* Adjust padding for mobile */
}

.main-nav {
  background-color: var(--primary-color);
  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-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;
  transition: color 0.3s ease;
}

.nav-list li a:hover {
  color: #c0e6f7; /* Lighter shade of primary */
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above header */
  flex-direction: column;
  justify-content: space-between;
}

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

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

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

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

/* Overlay for mobile menu */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 998; /* Below menu, above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

.overlay.active {
  display: block;
  opacity: 1;
}

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

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

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

.footer-logo {
  color: var(--secondary-color);
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  font-size: 14px;
  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(--secondary-color);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-nav li a:hover {
  color: #c0e6f7;
}

.footer-bottom {
  background-color: var(--footer-bottom-bg);
  color: var(--secondary-color);
  text-align: center;
  padding: 15px 20px;
  font-size: 13px;
  margin-top: 20px;
  max-width: 100vw; /* Ensure it doesn't cause overflow */
  box-sizing: border-box;
}

/* Dynamic Slot Anchors */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for system */
}


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

  body {
    overflow-x: hidden; /* Mobile specific 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-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

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

  .header-container {
    padding: 0 15px;
    position: relative;
    justify-content: flex-start; /* Adjust for hamburger */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    position: static; /* Reset position for flexbox */
    left: auto;
    top: auto;
    transform: none;
    margin-right: auto; /* Push logo to center */
  }

  .logo {
    flex: 1 !important; /* Allow logo to take space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    margin-left: -30px; /* Counteract hamburger width to truly center */
    max-width: calc(100% - 80px); /* Adjust max-width to not overlap hamburger */
  }
  
  /* Add an empty div in header-container to balance flex space-between if logo is not centered */
  .header-container::after {
    content: '';
    display: block;
    width: 30px; /* Match hamburger width for centering effect */
  }

  .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;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Reduced padding for mobile */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #2093C7; /* Slightly different shade for buttons bar */
  }

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

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    width: 280px; /* Width of the slide-out menu */
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    flex-direction: column;
    padding: 20px 0;
    box-sizing: border-box;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-out;
    z-index: 9999; /* Above overlay */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Remove padding from container, apply to list items if needed */
    justify-content: flex-start; /* Align menu items to start */
  }

  .nav-list {
    flex-direction: column;
    gap: 0; /* Remove gap for vertical list */
    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 {
    display: block;
    padding: 15px 20px;
    font-size: 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

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

  .footer-col:not(:last-child) {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .footer-description {
    padding: 0 15px;
  }
  
  .footer-bottom {
    padding: 15px 15px;
  }
}

/* No-scroll class for body when menu is open */
body.no-scroll {
  overflow: hidden;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
