:root {
  --header-offset: 122px;
  --primary: #C91F17;
  --secondary: #E53935;
  --btn-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  --card-bg: #D32F2F;
  --bg: #B71C1C;
  --text-main: #FFF5E1;
  --border-glow: #F2B544;
  --glow: #FFCC66;
  --gold: #F4D34D;
  --deep-red: #7A0E0E;
}

body {
  margin: 0;
  padding-top: var(--header-offset);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  overflow-x: hidden;
}

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--deep-red);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid var(--border-glow);
}

.header-top {
  background: var(--deep-red);
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
}

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

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
}

.logo-text {
  color: var(--gold);
  text-shadow: 0 0 10px var(--glow), 0 2px 4px rgba(0, 0, 0, 0.5);
}

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

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid var(--border-glow);
  line-height: 1.2;
  background: var(--btn-gradient);
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--glow);
}

.btn-register {
  background: var(--btn-gradient);
}

.btn-login {
  background: var(--btn-gradient);
}

/* Main Nav */
.main-nav {
  background: var(--card-bg);
  width: 100%;
  display: flex;
  min-height: 52px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--primary);
  color: var(--text-main);
  box-shadow: 0 0 8px var(--glow);
}

/* Hamburger - hidden on desktop */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  background: transparent;
  border: none;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text-main);
  border-radius: 3px;
  transition: all 0.3s ease;
}

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

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

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

/* Mobile buttons */
.mobile-nav-buttons {
  display: none;
  gap: 10px;
  padding: 8px 15px;
  background: var(--deep-red);
  border-bottom: 1px solid var(--border-glow);
}

/* 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;
}

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

/* ========== FOOTER ========== */
.site-footer {
  background: var(--deep-red);
  color: var(--text-main);
  border-top: 3px solid var(--border-glow);
  padding: 40px 0 0;
  margin-top: 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3 {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 15px;
  letter-spacing: 0.5px;
}

.footer-logo {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  margin-bottom: 12px;
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-main);
  opacity: 0.9;
}

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

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

.footer-nav a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

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

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-main);
  opacity: 0.8;
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 768px) {
  :root {
    --header-offset: 146px;
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
  }

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

  .hamburger-menu {
    display: flex;
  }

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

  /* Logo center in mobile */
  .logo {
    flex: 1;
    justify-content: center;
    font-size: 1.5rem;
  }

  .header-container {
    display: flex;
    align-items: center;
  }

  .hamburger-menu {
    order: 1;
  }

  .logo {
    order: 2;
  }

  .header-container::after {
    content: '';
    width: 45px;
    order: 3;
  }

  /* Mobile nav buttons */
  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    max-width: 160px;
  }

  /* Main nav hidden by default on mobile */
  .main-nav {
    display: none;
    position: fixed;
    top: 108px;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: calc(100% - 108px);
    background: var(--card-bg);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-top: 2px solid var(--border-glow);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 15px 0;
    min-height: auto;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 0;
  }

  .nav-link {
    padding: 12px 20px;
    font-size: 1rem;
    text-align: left;
    border-left: 3px solid transparent;
  }

  .nav-link:hover {
    background: var(--primary);
    border-left-color: var(--gold);
  }

  /* 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: 998;
  }

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

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-container {
    padding: 0 15px;
  }

  .footer-bottom {
    font-size: 0.8rem;
  }

  /* Mobile content 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
