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

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

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset */
  background-color: var(--bg-color);
  color: var(--text-main-color);
  overflow-x: hidden; /* Prevent horizontal scroll for body */
  min-height: 100vh; /* Ensure body takes full viewport height for proper overlay sizing */
}

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

/* --- Site Header --- */
.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.5); /* Suspended effect */
  background-color: var(--bg-color); /* Fallback, specific sections will override */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--bg-color); /* 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; /* Padding for logo and buttons from container edges */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  display: block; /* Ensure it's not inline-block by default for flex alignment */
  white-space: nowrap; /* Prevent logo text from wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px; /* Limit logo width to prevent overflow */
}

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

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

/* Mobile buttons - hidden by default on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: var(--card-bg); /* Use card-bg for mobile button row */
  width: 100%;
  padding: 0 15px;
  align-items: center;
  justify-content: center; /* Center buttons horizontally if less than 2 */
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); /* Subtle shadow for separation */
}

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

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center; /* Center menu items */
  align-items: center;
  width: 100%;
  height: 100%;
}

.main-nav li a {
  display: block;
  padding: 0 15px;
  line-height: 52px; /* Vertically center text in 52px height */
  color: var(--text-main-color);
  font-weight: bold;
  white-space: nowrap;
  font-size: 14px; /* Adjust font size for fitting 10 items */
}

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

/* --- Buttons --- */
.btn {
  padding: 10px 18px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  background: var(--button-gradient);
  color: var(--text-main-color);
  border: none;
  transition: all 0.3s ease;
  text-decoration: none; /* Remove underline for buttons */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: var(--text-main-color); /* Keep text color same on hover */
}

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

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  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 --- */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 998; /* Below hamburger, above main content */
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
  visibility: visible;
  opacity: 1;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--bg-color);
  padding: 40px 20px 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-main-color);
}

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

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

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

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav a {
  font-size: 14px;
  color: var(--text-main-color);
}

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

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

.footer-slot-anchor-inner {
  min-height: 10px; /* Give it some height for visibility */
  width: 100%;
  display: block;
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  max-width: 1200px;
  margin: 0 auto;
  color: #999; /* Slightly subdued for copyright */
}
.footer-bottom p {
  margin: 0;
}

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

  /* Mobile header top */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }
  .header-container {
    width: 100%;
    max-width: none; /* Remove max-width for mobile container */
    padding: 0 15px; /* Adjust padding for mobile */
    position: relative; /* For absolute positioning of logo */
  }

  /* Mobile logo centering (Method 1: Flexbox) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: calc(100% - 100px); /* Adjust max-width to allow space for hamburger */
    font-size: 20px;
  }
  .logo img {
    max-height: 56px !important; /* Mobile logo max height */
  }

  /* Hamburger menu visible on mobile */
  .hamburger-menu {
    display: block;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

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

  /* Mobile buttons visible on mobile */
  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    height: auto;
    padding: 8px 15px;
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main nav (mobile menu) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed position for slide-out menu */
    top: 0; /* Will be set by JS dynamically */
    left: 0;
    width: 70%; /* Adjust width for mobile menu */
    max-width: 300px;
    height: 100vh; /* Full viewport height, JS will adjust for header */
    background-color: var(--card-bg);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto; /* Enable scrolling for long menus */
  }
  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0);
  }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
  }
  .main-nav li {
    width: 100%;
  }
  .main-nav li a {
    padding: 12px 20px;
    line-height: normal;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Footer mobile layout */
  .footer-top-grid, .footer-mid-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }

  /* 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
