/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #0A0A0A; color: #FFF6D6; line-height: 1.6; padding-top: var(--header-offset, 120px); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

:root { --header-offset: 166px; --primary: #F2C14E; --secondary: #FFD36B; --bg-dark: #0A0A0A; --card-bg: #111111; --text-main: #FFF6D6; --border-color: #3A2A12; --glow: #FFD36B; --btn-bg: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); }

/* === Skip Link === */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #0A0A0A; padding: 10px 15px; z-index: 2000; border-radius: 0 0 5px 0; }
.skip-link:focus { left: 0; }

/* === Site Header (Fixed) === */
.site-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background: var(--bg-dark); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); border-bottom: 1px solid var(--border-color); }

/* === Header Top Area === */
.header-top { background: linear-gradient(180deg, #1A1A1A, #111111); padding: 10px 0; min-height: 68px; display: flex; align-items: center; border-bottom: 1px solid var(--border-color); }
.header-container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 30px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }

/* === Logo === */
.logo { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; letter-spacing: 1px; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 10px rgba(242, 193, 78, 0.3); }
.header-top .logo { display: inline-block; }

/* === Header Actions (Buttons) === */
.header-actions { display: flex; align-items: center; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 24px; font-size: 0.9rem; font-weight: 700; border-radius: 8px; border: none; cursor: pointer; background: var(--btn-bg); color: #0A0A0A !important; box-shadow: 0 2px 8px rgba(0,0,0,0.2); transition: transform 0.2s, box-shadow 0.2s; line-height: 1.4; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(242, 193, 78, 0.3); }
.btn:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.btn-login { background: linear-gradient(180deg, #DDA11D 0%, #8A6510 100%); }
.btn-login:hover { box-shadow: 0 4px 12px rgba(221, 161, 29, 0.3); }

/* === Main Nav (Desktop) === */
.main-nav { background: #1A1A1A; display: flex; min-height: 52px; border-bottom: 1px solid var(--border-color); }
.nav-container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 5px; }
.main-nav .nav-link { padding: 14px 12px; font-size: 0.9rem; font-weight: 600; color: var(--text-main); transition: color 0.2s; white-space: nowrap; text-decoration: none; }
.main-nav .nav-link:hover { color: var(--primary); text-shadow: 0 0 8px rgba(242, 193, 78, 0.3); }

/* === Mobile Menu Overlay === */
.mobile-menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); z-index: 999; backdrop-filter: blur(2px); transition: opacity 0.3s ease; opacity: 0; pointer-events: none; }
.mobile-menu-overlay.active { opacity: 1; pointer-events: auto; }

/* === Hamburger Menu (hidden on desktop) === */
.hamburger-menu { display: none; background: none; border: none; cursor: pointer; padding: 10px; z-index: 1002; position: relative; }
.hamburger-menu .bar { display: block; width: 25px; height: 3px; background: var(--text-main); margin: 5px 0; transition: transform 0.3s ease, opacity 0.3s ease; }
.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); }

/* === Footer === */
.site-footer { background: #0A0A0A; border-top: 2px solid var(--border-color); color: var(--text-main); }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 40px 20px 20px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer-column { padding: 10px 0; }
.footer-brand .footer-logo { font-size: 1.5rem; margin-bottom: 10px; color: var(--primary); }
.footer-brand .footer-logo a:hover { color: var(--secondary); }
.footer-desc { font-size: 0.9rem; color: #CCC2B0; line-height: 1.5; margin-top: 10px; }
.footer-title { font-size: 1rem; font-weight: 700; margin-bottom: 15px; color: var(--primary); }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-size: 0.9rem; padding: 5px 0; color: var(--text-main); transition: color 0.2s; border-bottom: 1px solid transparent; }
.footer-nav a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border-color); padding: 20px; text-align: center; font-size: 0.9rem; color: #AAA; }
.footer-bottom p { max-width: 1200px; margin: 0 auto; }

/* === Responsive: Mobile & Tablet <= 768px === */
@media (max-width: 768px) {
  :root { --header-offset: 146px; }
  body { overflow-x: hidden; }
  .page-content { overflow-x: hidden; max-width: 100%; }
  .page-content img { max-width: 100% !important; height: auto !important; display: block; }

  .header-top { order: 1; min-height: auto; padding: 8px 0; }
  .header-container { width: 100%; max-width: none; padding: 0 15px; flex-wrap: wrap; gap: 0; }
  .header-top .logo { order: 2; display: inline-block; font-size: 1.4rem; }

  .header-actions { order: 3; width: 100%; display: flex; justify-content: center; padding: 10px 0; gap: 10px; }
  .header-actions::before { content: ''; width: 40px; }
  .btn { padding: 8px 20px; font-size: 0.8rem; }

  .site-header { display: flex; flex-direction: column; }
  .toggle-wrap { order: 1; }
  .hamburger-menu { display: inline-flex; order: 1; margin-left: auto; }

  .main-nav { display: none; position: fixed; top: 0; left: 0; width: 80%; height: 100vh; background: rgba(10, 10, 10, 0.95); flex-direction: column; align-items: stretch; box-shadow: 4px 0 20px rgba(0,0,0,0.5); transition: transform 0.3s ease; border-bottom: none; border-right: 1px solid var(--border-color); z-index: 1001; transform: translateX(-100%); flex-direction: column; }
  .main-nav.active { display: block; transform: translateX(0); }
  .main-nav .nav-container { max-width: none; width: 100%; height: 100%; flex-direction: column; justify-content: flex-start; align-items: stretch; padding: 30px 0; gap: 0; }
  .main-nav .nav-link { padding: 15px 25px; font-size: 1rem; width: 100%; text-align: left; border-bottom: 1px solid var(--border-color); }
  .main-nav .nav-link:last-child { border-bottom: none; }

  .mobile-menu-overlay { display: block; position: fixed; }
  .mobile-menu-overlay.active { display: block; }

  .footer-container { grid-template-columns: 1fr 1fr; padding: 20px 15px; gap: 15px; }
  .footer-column { padding: 10px 0; }
  .footer-brand { grid-column: span 2; text-align: center; }
  .footer-title { font-size: 0.95rem; margin-bottom: 10px; }
  .footer-nav a { font-size: 0.85rem; }
  .footer-bottom { padding: 15px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .footer-container { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
}

/* === Prevent scroll on mobile menu open === */
body.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;
}
