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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  padding-top: var(--header-offset);
  overflow-x: 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); /* Suspended effect */
}

/* Header Top */
.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop height */
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--bg-color); /* Dark background */
  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;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold-color); /* Logo color */
  text-decoration: none;
  white-space: nowrap;
  display: block; /* Ensure it's treated as a block for centering later */
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  text-decoration: none;
  color: var(--text-main);
  background: var(--button-gradient); /* Gradient button */
  font-weight: bold;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

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

/* Hamburger menu for mobile */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: var(--gold-color);
  transition: all 0.3s ease;
}

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

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

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

.mobile-right-placeholder {
  display: none; /* Hidden on desktop */
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop height */
  height: 52px;
  display: flex; /* Desktop default */
  align-items: center;
  overflow: hidden;
  background-color: var(--deep-red-color); /* Different background from header-top */
  width: 100%;
}

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

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

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

/* Mobile Nav Buttons (hidden on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
}

/* Mobile Menu Overlay (hidden on desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

/* Footer Styles */
.site-footer {
  background-color: var(--card-bg); /* Dark background for footer */
  color: var(--text-main);
  padding: 40px 20px 20px;
}

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

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

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

.footer-col .footer-description {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 241, 232, 0.8);
  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 {
  color: rgba(255, 241, 232, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchors - ensure visibility */
.footer-slot-anchor-inner, .footer-slot-anchor {
  min-height: 1px;
  width: 100%;
  display: block; /* Ensure block level for layout */
}

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden;
  }

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

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: flex;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    max-width: calc(100% - var(--hamburger-width) * 2); /* Max width to prevent overflow if text is long */
  }

  .desktop-nav-buttons {
    display: none !important;
  }

  .mobile-right-placeholder {
    display: block;
    width: var(--hamburger-width);
    height: 100%;
    visibility: hidden;
  }

  /* Mobile Nav Buttons */
  .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: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--deep-red-color);
  }

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

  /* Main Navigation Mobile */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: var(--card-bg);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    min-height: auto;
    height: auto;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    gap: 15px;
    width: 100%;
    max-width: none;
    height: auto;
  }

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

  /* Mobile Menu Overlay */
  .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: 999;
    transition: opacity 0.3s ease;
    opacity: 0;
  }

  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

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

  .footer-col .footer-logo,
  .footer-col h3 {
    text-align: center;
  }

  .footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
