:root {
  --header-offset: 122px;
  --color-main: #FF8C1A;
  --color-auxiliary: #FFA53A;
  --color-button-gradient: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  --color-card-bg: #17191F;
  --color-background: #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-background);
  color: var(--color-text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- General Shared Styles --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

a {
  color: var(--color-text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-auxiliary);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-main);
}

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

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

.btn-primary {
  background: var(--color-button-gradient);
  border-color: var(--color-border);
}

.btn-secondary {
  background: var(--color-deep-orange);
  border-color: var(--color-border);
}

/* --- Header Styles --- */
.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);
  background-color: var(--color-background); /* Base background for the entire header */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-card-bg); /* Distinct background for top bar */
  width: 100%;
  position: relative; /* For hamburger positioning */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-main);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  padding: 5px 0;
}

.logo:hover {
  color: var(--color-auxiliary);
}

.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-background); /* Separate background for mobile buttons */
  width: 100%;
  padding: 0 20px;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

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

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

.nav-list a {
  color: var(--color-text-main);
  font-weight: 600;
  padding: 5px 0;
  display: block;
  position: relative;
}

.nav-list a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-main);
  transition: width 0.3s ease;
}

.nav-list a:hover::after, .nav-list a.active::after {
  width: 100%;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-text-main);
  position: relative;
  transition: background-color 0.3s ease;
}

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

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

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

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

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

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

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

.footer-logo {
  font-size: 26px;
  font-weight: bold;
  color: var(--color-main);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  margin-top: 10px;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

.footer-slot-anchor-inner {
  /* Ensures visibility for injected content */
  min-height: 1px;
  min-width: 1px;
  display: block;
}

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

.footer-bottom a {
  /* No links allowed in footer-bottom, this is a safeguard */
  pointer-events: none;
  text-decoration: none;
  color: inherit;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .nav-list {
    gap: 15px;
  }
  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-col:nth-child(3) {
    grid-column: 1 / 2;
  }
  .footer-col:nth-child(4) {
    grid-column: 2 / 3;
  }
}

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

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

  .header-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
    justify-content: center; /* Center logo by default */
  }

  .logo {
    flex: 1 !important; /* Allow logo to take space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }

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

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

  .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;
    background-color: var(--color-background);
    border-bottom: 1px solid var(--color-border);
  }

  .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 !important;
    height: 100vh; /* Full viewport height for mobile menu */
    width: 280px; /* Sidebar width */
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-out;
    background-color: var(--color-card-bg);
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4);
    display: block; /* Important for animation */
    overflow-y: auto;
    z-index: 9999;
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
  }

  .nav-list {
    flex-direction: column;
    gap: 15px;
  }

  .nav-list a {
    font-size: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-list a::after {
    display: none;
  }

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

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

  .footer-col:nth-child(3),
  .footer-col:nth-child(4) {
    grid-column: auto;
  }

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

@media (max-width: 480px) {
  .logo {
    font-size: 22px;
  }
  .btn {
    padding: 8px 15px;
    font-size: 14px;
  }
  .footer-col h3 {
    font-size: 16px;
  }
}

.no-scroll {
  overflow: 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;
}
