:root {
  --header-top-height: 68px;
  --main-nav-height: 52px;
  --header-offset: 122px;
  --primary: #F2C14E;
  --secondary: #FFD36B;
  --btn-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --text-main: #FFF6D6;
  --card-bg: #111111;
  --bg-dark: #0A0A0A;
  --border-color: #3A2A12;
  --glow: #FFD36B;
  --font-main: 'Segoe UI', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text-main);
  padding-top: var(--header-offset);
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  min-height: auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
  background: var(--bg-dark);
}

/* Top Bar */
.header-top {
  background: #111111;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 30px;
  min-height: 68px;
  gap: 15px;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(242, 193, 78, 0.4);
  display: block;
  line-height: 1.3;
}

.logo:hover { color: var(--secondary); }

/* Desktop Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 100px;
  line-height: 1.6;
}

.btn:focus { outline: 2px solid var(--secondary); }

.btn-register {
  background: var(--btn-gradient);
  color: #0A0A0A;
  box-shadow: 0 0 10px rgba(255, 216, 106, 0.3);
}

.btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 216, 106, 0.5);
  background: linear-gradient(180deg, #FFE080 0%, #E8B51A 100%);
  color: #000;
}

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

.btn-login:hover {
  background: rgba(242, 193, 78, 0.2);
  color: var(--secondary);
  border-color: var(--secondary);
}

.btn-download {
  background: #333333;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-download:hover {
  background: #444444;
  color: var(--secondary);
  border-color: var(--primary);
}

/* ===== Nav ===== */
.main-nav {
  background: #1a1a1a;
  width: 100%;
  display: flex;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  min-height: 52px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  width: 100%;
  position: relative;
}

.nav-menu {
  display: flex;
  flex-direction: row;
  list-style: none;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
}

.nav-menu li {
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: 12px 14px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.3s ease, background 0.3s ease;
  white-space: nowrap;
  line-height: 1.5;
}

.nav-menu a:hover {
  color: var(--primary);
  background: rgba(242, 193, 78, 0.1);
  text-shadow: 0 0 8px rgba(242, 193, 78, 0.3);
}

.nav-menu a.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

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

.mobile-nav-header {
  display: none;
}

.hamburger-menu {
  display: none;
}

.mobile-menu-overlay {
  display: none;
}

/* ===== Footer ===== */
.site-footer {
  background: #111111;
  color: var(--text-main);
  border-top: 2px solid var(--border-color);
  margin-top: 40px;
  padding: 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 30px 25px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 30px;
  margin-bottom: 35px;
}

.footer-col h3.footer-title {
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  text-transform: capitalize;
}

.footer-col h3.footer-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--btn-gradient);
  border-radius: 2px;
}

.footer-logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 1px;
}

.footer-logo:hover { color: var(--secondary); }

.footer-description {
  color: #AA9F87;
  font-size: 14px;
  line-height: 1.7;
  margin: 15px 0;
}

.footer-social { display: none; }

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

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

.footer-nav a {
  color: #C9BFA8;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.7;
  transition: color 0.3s, padding-left 0.3s;
}

.footer-nav a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-contact { font-style: normal; }

.footer-contact-item {
  color: #C9BFA8;
  font-size: 14px;
  line-height: 2;
  margin-bottom: 8px;
}

.user-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.footer-hl {
  display: block;
  margin: 12px 0;
}

.btn-footer {
  padding: 8px 12px;
  font-size: 12px;
  margin-right: 5px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 25px;
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-copyright {
  color: #AA9F87;
  font-size: 14px;
  line-height: 1.7;
}

.footer-license {
  color: #777;
  font-size: 13px;
  line-height: 1.7;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  body {
    padding-top: var(--header-offset);
  }

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

  .header-container {
    width: 100%;
    max-width: none;
    padding: 8px 15px;
    gap: 10px;
    min-height: 60px;
  }

  .logo {
    font-size: 20px;
    font-weight: 700;
  }

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

  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 340px;
    height: 100vh;
    overflow-y: auto;
    background: #111111;
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s ease, display 0s ease 0.3s;
    border-right: 1px solid var(--border-color);
    padding: 0;
    min-height: 100vh;
  }

  .main-nav.active {
    display: block;
    transform: translateX(0);
    transition: transform 0.3s ease, display 0s ease 0s;
  }

  .mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
  }

  .mobile-logo {
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    white-space: normal;
    line-height: 1.4;
  }

  .mobile-logo:hover {
    color: var(--secondary);
  }

  .mobile-nav-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    background: #1a1a1a;
    border-bottom: 1px solid var(--border-color);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 90px;
    font-size: 12px;
    padding: 8px 10px;
  }

  .mobile-nav-buttons .btn-download {
    background: var(--btn-gradient);
    color: #0A0A0A;
    border: none;
  }

  .mobile-nav-buttons .btn-download:hover {
    background: linear-gradient(180deg, #FFE080 0%, #E8B51A 100%);
    color: #000;
  }

  .nav-container {
    width: 100%;
    max-width: none;
    display: block;
    padding: 0;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    padding: 0;
  }

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-menu a {
    display: block;
    padding: 15px 18px;
    text-align: left;
    width: 100%;
  }

  .hamburger-menu {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 34px;
    height: 34px;
    position: relative;
    z-index: 1003;
    align-items: center;
    justify-content: center;
  }

  .hamburger-menu span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    margin: 4px auto;
    transition: all 0.3s ease;
    border-radius: 2px;
  }

  .hamburger-menu:hover span {
    background: var(--secondary);
  }

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

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

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

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
  }

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

  body.no-scroll {
    overflow: hidden;
  }

  /* Footer mobile */
  .footer-container {
    padding: 30px 15px 20px;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .header-top {
    background: #111111;
  }

  .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 (min-width: 769px) and (max-width: 1024px) {
  .header-container { padding: 10px 20px; }
  .desktop-nav-buttons { gap: 5px; }
  .desktop-nav-buttons .btn { padding: 9px 14px; min-width: 85px; font-size: 13px; }
  .nav-menu a { padding: 11px 10px; font-size: 13px; }
}

@media (min-width: 769px) {
  .header-container {
    max-width: 1200px;
  }

  .btn {
    display: inline-block;
  }

  .mobile-logo {
    display: none;
  }
}

@media (max-width: 380px) {
  .logo {
    font-size: 18px;
  }

  .header-top {
    padding: 0;
  }

  .header-container {
    padding-left: 10px;
    padding-right: 10px;
    gap: 8px;
  }

  .main-nav {
    width: 85%;
  }

  .btn {
    font-size: 12px;
    padding: 8px 6px;
    min-width: 70px;
  }
}

:root { --header-offset: 122px; }
body { padding-top: var(--header-offset); }

@media (max-width: 768px) {
  :root { --header-offset: 110px; }
  .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;
}
