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

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

* {
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #0A0A0A;
  width: 100%;
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: inline-block;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(242, 193, 78, 0.4);
  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 {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.btn-login {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-login:hover {
  background: rgba(242, 193, 78, 0.12);
  box-shadow: 0 0 16px rgba(255, 211, 107, 0.4);
}

.btn-register {
  background: var(--btn-gradient);
  color: #0A0A0A;
  border: 1px solid var(--glow);
  box-shadow: 0 0 14px rgba(255, 211, 107, 0.35);
}

.btn-register:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 22px rgba(255, 211, 107, 0.6);
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none;
  min-height: 48px;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--card-bg);
  width: 100%;
  border-bottom: 1px solid var(--border);
}

.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;
  position: relative;
}

.nav-menu {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.nav-link {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #0A0A0A;
  background: var(--btn-gradient);
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

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

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

/* Footer */
.site-footer {
  background-color: var(--card-bg);
  color: var(--text-main);
  border-top: 1px solid var(--border);
  padding: 0;
}

.footer-top-row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 30px 0;
}

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

.footer-col {
  min-width: 0;
}

.footer-about {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  display: inline-block;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-shadow: 0 0 12px rgba(242, 193, 78, 0.4);
  white-space: nowrap;
}

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin: 0;
  opacity: 0.85;
}

.footer-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

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

.footer-nav li a {
  display: inline-block;
  font-size: 14px;
  color: var(--text-main);
  transition: color 0.2s ease, padding-left 0.2s ease;
  opacity: 0.85;
}

.footer-nav li a:hover {
  color: var(--primary);
  padding-left: 4px;
  opacity: 1;
}

.footer-mid-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-mid-block {
  width: 100%;
}

.footer-mid-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.footer-mid-cell {
  min-width: 0;
  min-height: 20px;
}

.footer-slot-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  background-color: #0A0A0A;
  padding: 18px 30px;
  text-align: center;
}

.footer-copyright {
  margin: 0;
  font-size: 13px;
  color: var(--text-main);
  opacity: 0.8;
}

.footer-slot-anchor-inner {
  min-height: 1px;
  width: 100%;
}

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

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
  }

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

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

  .mobile-nav-buttons {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #0A0A0A;
    border-bottom: 1px solid var(--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: 48px !important;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh !important;
    min-height: 100vh !important;
    background: var(--card-bg);
    border-bottom: none;
    padding-top: 80px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.6);
  }

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

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

  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
  }

  .nav-link {
    padding: 14px 16px;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    color: var(--text-main);
  }

  .nav-link:hover,
  .nav-link.active {
    background: var(--btn-gradient);
    color: #0A0A0A;
  }

  .hamburger-menu {
    display: flex;
    position: absolute;
    top: 8px;
    left: 15px;
  }

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

  .footer-top-row {
    padding: 16px 15px 0;
  }

  .footer-mid-section {
    padding: 0 15px 20px;
  }

  .footer-mid-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .footer-bottom {
    padding: 16px 15px;
  }

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