:root {
  --header-offset: 122px;
  --color-primary: #C61F1F;
  --color-secondary: #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;
}

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

.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.2);
  box-sizing: border-box;
}

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

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-text-main);
  text-decoration: none;
  display: block;
  max-height: 60px;
  line-height: 60px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default, shown in mobile media query */
  min-height: 48px;
  background-color: var(--color-primary); /* Same as main-nav for consistency */
  width: 100%;
  padding: 0 15px;
}

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

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

.nav-link {
  color: var(--color-text-main);
  text-decoration: none;
  padding: 10px 15px;
  font-size: 16px;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.btn {
  background: var(--color-button-gradient);
  color: var(--color-background);
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
}

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

.hamburger-menu {
  display: none; /* Hidden by default, shown in mobile */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1001;
}

.hamburger-menu::before, .hamburger-menu::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--color-text-main);
  transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger-menu::before {
  top: 0;
}

.hamburger-menu::after {
  top: 10px;
}

.hamburger-menu.active::before {
  transform: rotate(45deg);
  top: 5px;
}

.hamburger-menu.active::after {
  transform: rotate(-45deg);
  top: 5px;
}

.hamburger-menu.active span {
  opacity: 0;
}

.hamburger-menu span {
  position: absolute;
  left: 0;
  top: 5px;
  width: 100%;
  height: 3px;
  background-color: var(--color-text-main);
  transition: opacity 0.3s ease;
}

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

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

.site-footer {
  background-color: var(--color-background);
  color: var(--color-text-main);
  padding: 40px 20px 20px;
  font-size: 14px;
  box-sizing: border-box;
}

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

.footer-col {
  margin-bottom: 20px;
}

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

.footer-description {
  line-height: 1.8;
  color: var(--color-text-main);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

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

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

.footer-bottom p {
  margin: 0;
}

.footer-slot-anchor-inner {
  min-height: 10px; /* Ensure anchor is visible for inspection */
}

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

  .body {
    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 {
    min-height: 60px;
    height: 60px;
  }

  .header-container {
    padding: 0 15px;
    position: relative;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    line-height: 56px;
    max-height: 56px;
  }

  .logo img {
    max-height: 56px !important;
    max-width: 100%;
    height: auto;
    display: block !important;
  }

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

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

  .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-nav {
    min-height: 48px;
    height: auto;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset));
    background-color: var(--color-primary);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: none; /* Default hidden */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 20px;
    box-sizing: border-box;
    overflow-y: auto;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .hamburger-menu {
    display: block;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .footer-col:first-child {
    order: -1; /* Move logo/description to top */
  }

  .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }

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

  .footer-nav li {
    display: inline-block;
    margin: 0 8px 8px 0;
  }

  .footer-nav li:last-child {
    margin-right: 0;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
