:root {
  --primary-color: #FF8C1A;
  --secondary-color: #FFA53A;
  --bg-color: #0D0E12;
  --card-bg: #17191F;
  --text-main: #FFF3E6;
  --border-color: #A84F0C;
  --glow-color: #FFB04D;
  --deep-orange: #D96800;

  /* Header Offset - No marquee: 120px (68+52) + 2px for buffer = 122px */
  --header-offset: 122px;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  padding-top: var(--header-offset);
}

/* Base styles for header and footer */
.site-header {
  position: fixed;
  top: 0;
  left: 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; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  background-color: var(--card-bg); /* Distinct from main-nav */
  width: 100%;
  overflow: hidden;
  padding-left: 40px;
  padding-right: 40px;
}

.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; /* Padding handled by header-top */
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  color: var(--text-main);
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--deep-orange) 100%);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  min-width: 90px; /* Ensure minimum width for buttons */
}

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

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

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

.nav-container {
  box-sizing: border-box;
  width: 100%;
  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(--text-main);
  text-decoration: none;
  padding: 0 15px;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

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

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

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

/* 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;
}

/* Footer styles */
.site-footer {
  background-color: var(--card-bg);
  padding: 40px 0 20px;
  font-size: 14px;
  line-height: 1.6;
}

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

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

.footer-col p {
  color: var(--text-main);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-nav a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s;
}

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

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

.footer-slot-anchor-inner {
  min-height: 1px;
  min-width: 1px;
  visibility: visible;
  opacity: 1;
  height: auto;
  overflow: visible;
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    /* Mobile Header Offset - No marquee: 108px (60+48) + 2px for buffer = 110px */
    --header-offset: 110px;
  }

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

  /* Prevent content images from overflowing */
  .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;
    padding-left: 15px; /* Adjust padding for mobile */
    padding-right: 15px;
    justify-content: center; /* Center header-container content when hamburger is absolute */
    position: relative; /* For hamburger absolute positioning */
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .hamburger-menu {
    display: block;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: calc(100% - 100px); /* Account for hamburger and potential right-side elements */
    height: 100%;
  }

  .logo img {
    max-height: 56px !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;
    background-color: var(--card-bg);
  }

  .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;
    min-width: unset;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile, shown by JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 75%;
    height: calc(100% - var(--header-offset));
    background-color: var(--bg-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow-y: auto;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
    justify-content: flex-start;
  }

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

  /* Hamburger menu animation */
  .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 mobile */
  .site-footer {
    padding: 30px 0 15px;
  }

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

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

  .footer-bottom {
    padding-left: 15px;
    padding-right: 15px;
    margin-top: 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;
  }
}
