:root {
  --header-offset: 122px;
}

body {
  padding-top: var(--header-offset);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background-color: #0A0A0A;
  color: #FFF6D6;
  line-height: 1.5;
}

/* Shared styles for buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #111111;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 15px #FFD36B;
  transform: translateY(-2px);
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #111111; /* Card BG for header, as Black Gold is main theme */
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  min-height: 60px;
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 2.2em;
  font-weight: bold;
  color: #F2C14E;
  text-decoration: none;
  flex-shrink: 0;
  padding: 5px 0;
  display: block; /* Ensure visibility */
}

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

.nav-link {
  color: #FFF6D6;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  padding: 8px 0;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #F2C14E;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

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

.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-icon {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFF6D6;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-icon:nth-child(1) {
  transform-origin: top left;
}
.hamburger-icon:nth-child(3) {
  transform-origin: bottom left;
}

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

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

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

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

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

body.no-scroll {
  overflow: hidden;
}

/* Footer styles */
.site-footer {
  background-color: #0A0A0A;
  color: #FFF6D6;
  padding: 40px 20px 20px;
  border-top: 1px solid #3A2A12;
}

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

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  font-size: 2em;
  font-weight: bold;
  color: #F2C14E;
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  font-size: 0.95em;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-bottom: 15px;
}

.footer-title {
  font-size: 1.3em;
  color: #FFD36B;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav .nav-link {
  color: #FFF6D6;
  text-decoration: none;
  font-size: 1em;
  transition: color 0.3s ease;
}

.footer-nav .nav-link:hover {
  color: #F2C14E;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #3A2A12;
  font-size: 0.9em;
  color: #FFF6D6;
}

.footer-slot-anchor-inner {
  min-height: 10px; /* Ensure anchor is visible for injection */
  width: 100%; /* Occupy full width */
}

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

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

  .site-header {
    min-height: 50px;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
    padding: 10px 15px;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: flex; /* Use flex for hamburger icon */
    order: 1;
    margin-right: 10px;
  }

  .logo {
    order: 2;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 1.8em;
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    order: 3;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 10px; /* Space between logo and buttons */
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 70%;
    max-width: 300px; /* Limit width of mobile menu */
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    background-color: #111111;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    align-items: flex-start;
    gap: 15px;
  }

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

  .main-nav .nav-link {
    font-size: 1.2em;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #3A2A12;
  }

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

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

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

  .footer-logo {
    margin-bottom: 10px;
  }

  .footer-title {
    margin-top: 20px;
    margin-bottom: 15px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
