:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --card-bg: #111111;
  --body-bg: #0A0A0A;
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);

  --header-offset: 122px; /* Desktop: header-top (68px) + main-nav (52px) */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Critical: body padding for fixed header */
  background-color: var(--body-bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

body.no-scroll {
  overflow: hidden;
}

/* Base styles for anchors */
a {
  text-decoration: none;
  color: var(--text-main);
}

a:hover {
  color: var(--secondary-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--button-gradient);
  color: #111111; /* Text color for buttons, contrasting with gold */
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none; /* Remove underline for button links */
}

.btn:hover {
  opacity: 0.9;
  color: #111111; /* Keep text dark on hover */
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  background-color: var(--card-bg); /* Fallback, but specific sections have colors */
}

/* Header Top Section (Desktop) */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--card-bg); /* Darker background for header-top */
  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; /* Apply padding to the container content */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex; /* For img logo centering on mobile if it were an img */
  align-items: center;
  justify-content: flex-start; /* Default desktop alignment */
  height: 100%; /* Ensure logo takes full height of header-top for vertical centering */
}

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

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

/* Mobile Nav Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: var(--body-bg); /* Dark background for mobile buttons */
  width: 100%;
  padding: 0 15px; /* Adjust padding for mobile */
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden;
}

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

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

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px; /* Space between menu items */
}

.nav-list a {
  color: #111111; /* Darker text for primary-color background */
  font-weight: bold;
  font-size: 15px;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-list a:hover {
  color: var(--text-main); /* Lighter text on hover */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

.hamburger-menu.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

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

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

/* Site Footer */
.site-footer {
  background-color: var(--body-bg); /* Dark background for footer */
  color: var(--text-main);
  padding: 40px 20px 20px;
  font-size: 14px;
  border-top: 1px solid var(--border-color);
}

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

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-description {
  margin: 0;
  line-height: 1.8;
  color: #CCC;
  word-wrap: break-word; /* Ensure long text wraps */
  overflow-wrap: break-word;
}

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

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  color: var(--text-main);
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: #AAA;
}

.footer-bottom p {
  margin: 0;
}

/* Dynamic Slot Anchor Styles (must be visible) */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for potential injected content */
  width: 100%;
}

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Ensure body also prevents horizontal scroll */
  }

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

  /* Header Top Mobile */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Re-add padding to header-top for mobile */
  }

  .header-container {
    width: 100%;
    max-width: none; /* Critical: Remove max-width for mobile container */
    padding: 0; /* Remove padding from header-container on mobile as header-top now has it */
    justify-content: space-between; /* To push hamburger left and logo center */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: 1; /* Place hamburger first */
  }

  .logo {
    flex: 1 !important; /* Allow logo to take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    order: 2; /* Place logo second */
    padding: 0 10px; /* Add some padding to prevent logo from touching hamburger/buttons */
    min-width: 0; /* Allow shrinking */
  }

  .logo img {
    max-height: 56px !important; /* Mobile max height */
    max-width: 100%; /* Ensure image scales down */
    width: auto;
    height: auto;
  }

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

  /* Mobile Nav Buttons (Visible on Mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%; /* Critical: Ensure it takes full width */
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background-color: var(--card-bg); /* Use card-bg for mobile button strip */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  }

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

  /* Main Navigation Mobile (Hidden by default, fixed position when active) */
  .main-nav {
    min-height: 48px !important;
    height: auto; /* Auto height for content */
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    background-color: var(--body-bg); /* Dark background for mobile menu */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    overflow-y: auto; /* Enable scrolling for long menus */
    flex-direction: column; /* Vertical layout */
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Below overlay */
    padding: 20px 0; /* Padding inside the mobile menu */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* Critical: Remove max-width for mobile container */
    padding: 0 15px; /* Add padding for menu items */
    height: auto;
  }

  .nav-list {
    flex-direction: column; /* Vertical menu items */
    gap: 15px;
    align-items: flex-start;
  }

  .nav-list a {
    color: var(--text-main); /* White text on dark menu background */
    font-size: 16px;
    width: 100%;
    padding: 8px 0;
  }

  /* Footer Mobile */
  .site-footer {
    padding: 30px 15px 15px;
  }

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

  .footer-col {
    gap: 10px;
  }

  .footer-bottom {
    margin-top: 25px;
    padding-top: 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;
}
