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

html {
  scroll-behavior: smooth;
}

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

/* Site Header - Fixed position */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  background-color: transparent; /* Background set by header-top and main-nav */
}

/* Header Top Section */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-deep-red); /* Using Deep Red for contrast */
  width: 100%;
  padding: 0 20px;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
}

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

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Mobile Navigation Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Placeholder height, actual height depends on content */
  background-color: var(--color-deep-red); /* Same as header-top for consistency */
  width: 100%;
  padding: 0 20px; /* Desktop-like padding, adjusted for mobile later */
}

/* Main Navigation Section */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-primary); /* Using Primary Red for contrast */
  width: 100%;
  padding: 0 20px;
}

.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;
  gap: 25px; /* Spacing between nav links */
}

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

.nav-link:hover {
  color: var(--color-gold);
}

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

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

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

/* Hamburger Menu Active State */
.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* Overlay for mobile menu */
.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; /* Below menu, above body */
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.overlay.active {
  display: block;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  color: #FFFFFF; /* White text for buttons */
  background: var(--color-button-gradient);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  min-width: 80px;
  text-align: center;
  line-height: 1.2;
}

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

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

.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure anchor is visible and can receive content */
  width: 100%;
}

.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-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-gold);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  margin-top: 0;
  line-height: 1.8;
  color: rgba(255, 241, 232, 0.8);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-nav a {
  color: rgba(255, 241, 232, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

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

.footer-bottom p {
  margin: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

  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 8px rgba(0, 0, 0, 0.2);
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Smaller padding for mobile */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Handled by header-top padding */
    position: relative; /* For logo centering */
  }
  
  .hamburger-menu {
    display: block;
    order: 1;
    margin-left: -5px; /* Adjust for visual alignment */
  }

  /* Mobile Logo Centering (Method 1) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 2;
    margin-left: -30px; /* Counteract hamburger width for visual center */
  }
  
  .logo img {
    max-height: 56px !important; /* Mobile logo height */
    max-width: 100%;
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Adjusted padding for mobile buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background-color: var(--color-deep-red); /* Consistent background */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Ensure two buttons fit 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 */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below fixed header */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset));
    background-color: var(--color-card-bg); /* Darker background for menu */
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Scrollable if content overflows */
    z-index: 1000; /* Same as header, overlay is 999 */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    width: 100%;
    max-width: none; /* No max-width on mobile */
    gap: 15px; /* Spacing between menu items */
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr;
    margin-bottom: 20px;
  }
  
  .footer-mid-grid {
    grid-template-columns: 1fr;
    margin-bottom: 20px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
