html, body { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: 'Arial', sans-serif; line-height: 1.6; color: #FFF6D6; background-color: #0A0A0A; padding-top: var(--header-offset); overflow-x: hidden; }
:root { --header-offset: 122px; }

/* 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.5); background-color: transparent; /* Handled by child elements */ }
.header-top { box-sizing: border-box; min-height: 68px; height: 68px; display: flex; align-items: center; overflow: hidden; background-color: #0A0A0A; 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 30px; }
.logo { font-size: 28px; font-weight: bold; color: #F2C14E; text-decoration: none; display: flex; align-items: center; 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; }
.btn { text-decoration: none; padding: 10px 20px; border-radius: 8px; font-weight: bold; text-align: center; white-space: nowrap; cursor: pointer; transition: all 0.3s ease; color: #111111; /* Ensure contrast */ }
.btn-register { background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); }
.btn-download { background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); }
.btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(255, 211, 107, 0.4); }

.main-nav { box-sizing: border-box; min-height: 52px; height: 52px; display: flex; align-items: center; overflow: hidden; background-color: #111111; 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: #FFF6D6; text-decoration: none; padding: 10px 15px; font-weight: 500; transition: color 0.3s ease, background-color 0.3s ease; white-space: nowrap; }
.nav-link:hover { color: #F2C14E; background-color: rgba(255, 211, 107, 0.1); border-radius: 4px; }

.hamburger-menu { display: none; /* Hidden on desktop */ width: 30px; height: 24px; position: relative; cursor: pointer; flex-direction: column; justify-content: space-between; margin-right: 20px; padding: 0; background: none; border: none; z-index: 1001; }
.hamburger-menu .bar { display: block; width: 100%; height: 3px; background-color: #F2C14E; border-radius: 2px; transition: all 0.3s ease; }
.mobile-nav-buttons { box-sizing: border-box; display: none; min-height: 48px; /* Hidden on desktop */ }

/* Footer styles */
.site-footer { background-color: #0A0A0A; padding: 40px 0 20px; color: #FFF6D6; font-size: 15px; }
.footer-top-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto; padding: 0 30px; }
.footer-col h3 { color: #F2C14E; font-size: 18px; margin-bottom: 15px; }
.footer-logo { font-size: 24px; font-weight: bold; color: #F2C14E; text-decoration: none; display: block; margin-bottom: 15px; }
.footer-description { margin-bottom: 20px; color: #FFF6D6; overflow-wrap: break-word; }
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { color: #FFF6D6; text-decoration: none; transition: color 0.3s ease; }
.footer-nav a:hover { color: #F2C14E; }
.footer-bottom { border-top: 1px solid #3A2A12; margin-top: 40px; padding-top: 20px; text-align: center; color: #FFF6D6; }
.copyright-text { margin: 0; }

/* Placeholder slots */
.footer-slot-anchor, .footer-slot-anchor-inner { min-height: 1px; /* Ensure visibility for system injection */ }

/* 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; padding: 0 15px; }
  .header-container { padding: 0; justify-content: space-between; position: relative; width: 100%; max-width: none; }
  .hamburger-menu { display: flex; }
  .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: #0A0A0A; /* Match header-top background */ }
  .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; }

  .logo { flex: 1 !important; display: flex !important; justify-content: center !important; align-items: center !important; position: absolute; left: 50%; transform: translateX(-50%); width: auto; max-width: calc(100% - 100px); /* Account for hamburger menu */ }
  .logo img { max-height: 56px !important; }

  .main-nav { display: none; flex-direction: column; position: fixed; top: var(--header-offset); left: 0; width: 280px; height: calc(100% - var(--header-offset)); background-color: #111111; transform: translateX(-100%); transition: transform 0.3s ease; overflow-y: auto; box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5); z-index: 999; }
  .main-nav.active { display: flex; transform: translateX(0); }
  .nav-container { flex-direction: column; padding: 20px 0; align-items: flex-start; height: auto; width: 100%; max-width: none; }
  .nav-link { width: 100%; padding: 12px 20px; border-bottom: 1px solid #3A2A12; }
  .nav-link:last-child { border-bottom: none; }

  .hamburger-menu.active .bar:nth-child(1) { transform: translateY(10px) rotate(45deg); }
  .hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
  .hamburger-menu.active .bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

  .overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); z-index: 998; }
  .overlay.active { display: block; }

  .footer-top-grid { grid-template-columns: 1fr; padding: 0 15px; }
  .footer-col { margin-bottom: 30px; }
  .footer-col:last-of-type { margin-bottom: 0; }
  .footer-logo { text-align: center; }
  .footer-description { text-align: 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;
  }
}
