:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px */
  --primary-color: #C61F1F;
  --accent-color: #E53030;
  --button-gradient: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
  --card-bg: #2A1212;
  --background-color: #140C0C;
  --text-main-color: #FFF1E8;
  --border-color: #6A1E1E;
  --gold-color: #F3C54D;
  --deep-red-color: #7E0D0D;
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-main-color);
  background-color: var(--background-color);
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

/* --- Site Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  background-color: var(--background-color); /* Fallback or overall header background */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--deep-red-color); /* Distinct background for top bar */
  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; /* Inner padding for desktop */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-main-color);
  text-decoration: none;
  text-transform: uppercase;
  flex-shrink: 0; /* Prevent logo from shrinking */
  white-space: nowrap;
}

.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;
  flex-shrink: 0; /* Prevent buttons from shrinking */
}

/* Mobile buttons are hidden by default on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Placeholder height, effectively 0 when display:none */
  background-color: var(--card-bg); /* Distinct background for mobile buttons */
  width: 100%;
  padding: 0 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  color: var(--text-main-color);
  font-weight: bold;
  background: var(--button-gradient);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: none;
  font-size: 15px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
  padding: 0;
  margin-right: 15px; /* Spacing from logo */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-main-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);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Display on desktop */
  align-items: center;
  overflow: hidden;
  background-color: var(--background-color); /* Distinct 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; /* Horizontal on desktop */
  justify-content: center; /* Center menu items on desktop */
  align-items: center;
  width: 100%;
  padding: 0 20px;
}

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

.nav-menu li a {
  color: var(--text-main-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-menu li a:hover {
  color: var(--gold-color);
}

.overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
}

/* --- Site Footer --- */
.site-footer {
  background-color: var(--background-color);
  color: var(--text-main-color);
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-col {
  padding: 10px 0;
}

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

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

.footer-description {
  line-height: 1.6;
  margin-bottom: 15px;
  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(--text-main-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure anchor is present even if empty */
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-main-color);
}

.footer-bottom p {
  margin: 0;
}

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

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

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0; /* Handled by header-top padding */
    justify-content: flex-start; /* Align hamburger left */
    position: relative; /* For logo absolute positioning if needed */
  }

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

  .logo {
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important;
    justify-content: center !important; /* Center logo horizontally */
    align-items: center !important;
    font-size: 24px;
    order: 1; /* Place logo after hamburger */
    text-align: center; /* For text logo */
    max-width: calc(100% - 60px); /* Account for hamburger width */
  }

  /* If logo was an image, this would be used */
  .logo img {
    max-height: 56px !important;
    max-width: 100%;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    min-height: 48px;
    height: 48px; /* Ensure fixed height */
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Reduced padding for mobile */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    order: 2; /* Place after logo */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max menu width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg); /* Menu background */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    flex-direction: column; /* Vertical on mobile */
    justify-content: flex-start;
    align-items: flex-start;
    overflow-y: auto; /* Scrollable menu if content is long */
    padding: 20px 0; /* Padding inside menu */
    z-index: 1000;
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 0; /* Remove gap for vertical list */
  }

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

  .nav-menu li a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }

  .nav-menu li:last-child a {
    border-bottom: none;
  }

  .overlay.active {
    display: block; /* Show overlay when menu is active */
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    text-align: center;
  }

  .footer-col {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
  }

  .footer-col:last-of-type {
    border-bottom: none;
  }
  
  .footer-col h3 {
    margin-bottom: 10px;
  }

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

  .footer-nav li a {
    padding: 5px 0;
  }

  .footer-logo {
    margin-bottom: 10px;
  }

  /* 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;
}
