/* Global styles */
:root {
  --header-offset: 122px; /* Desktop: header-top (68px) + main-nav (52px) */
  --color-primary: #FF8C1A;
  --color-accent: #FFA53A;
  --color-card-bg: #17191F;
  --color-page-bg: #0D0E12;
  --color-text-main: #FFF3E6;
  --color-border: #A84F0C;
  --color-glow: #FFB04D;
  --color-deep-orange: #D96800;
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--color-page-bg);
  color: var(--color-text-main);
  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.3);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-deep-orange); /* Distinct from main-nav */
  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: 24px;
  font-weight: bold;
  color: var(--color-text-main);
  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-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: var(--color-card-bg);
  width: 100%;
}

.btn {
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  color: var(--color-text-main);
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-deep-orange) 100%);
}

.btn:hover {
  opacity: 0.9;
  box-shadow: 0 0 10px var(--color-glow);
}

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

.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;
  padding: 0 20px;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent);
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger-menu .bar {
  width: 25px;
  height: 3px;
  background-color: var(--color-text-main);
  margin: 5px 0;
  transition: 0.4s;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 998;
}

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

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

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

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

.footer-col .footer-description {
  line-height: 1.8;
  color: #ccc;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav li a {
  color: #ccc;
  text-decoration: none;
  margin-bottom: 10px;
  display: block;
  transition: color 0.3s ease;
}

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

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

.footer-legal .footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.footer-legal .footer-nav li {
  margin: 0;
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  color: #aaa;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.footer-slot-anchor,
.footer-slot-anchor-inner {
  /* These elements must be visible for content injection */
  min-height: 1px; /* Ensure they take up some space if empty */
  width: 100%;
}

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

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

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

  .header-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
    position: relative; /* For absolute positioning of logo if needed */
  }

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

  .logo img {
    max-height: 56px !important;
  }

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

  .hamburger-menu {
    display: block;
    position: relative;
    z-index: 1001;
    order: -1; /* Place hamburger menu to the left */
  }

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
  }

  .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 {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: 0; /* Will be adjusted by JS, or just below header */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh; /* Full viewport height */
    background-color: var(--color-card-bg);
    padding-top: calc(var(--header-offset) + 20px); /* Space for header above */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    box-sizing: border-box;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid var(--color-border);
  }

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

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

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

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

  .overlay.active {
    display: block;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

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

  .footer-legal .footer-nav {
    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;
  }
}
