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

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Important: padding-top for fixed header */
  background-color: var(--body-bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll from initial layout */
}

html {
  scroll-behavior: smooth;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* --- Header Styles --- */
.site-header {
  background-color: var(--card-bg);
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  min-height: 60px;
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-right: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

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

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

.nav-link {
  color: var(--text-main);
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.desktop-nav-buttons {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.mobile-nav-buttons {
  display: none !important; /* Hidden by default on desktop */
}

.btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  color: #333; /* Dark text for bright buttons */
}

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

.btn-register {
  background: var(--btn-gradient);
  border: 1px solid var(--border-color);
  box-shadow: 0 0 10px var(--glow-color);
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  text-decoration: none;
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 28px;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  z-index: 1001;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

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

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

  .site-header {
    min-height: 50px;
  }

  .header-container {
    padding: 10px 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1;
  }

  .logo {
    order: 2;
    flex: 1; /* Take available space */
    text-align: center; /* Center text logo */
    margin: 0;
    font-size: 24px;
  }

  .desktop-nav-buttons {
    display: none !important; /* Hide desktop buttons on mobile */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    order: 3;
    gap: 8px;
    margin-left: 10px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: var(--card-bg);
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease-out;
    z-index: 998;
    overflow-y: auto;
    align-items: flex-start;
  }

  .main-nav.active {
    display: flex; /* Show the menu */
    transform: translateX(0); /* Slide into view */
  }

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
  }

  .main-nav .nav-link:last-child {
    border-bottom: none;
  }

  .main-nav .nav-link::after {
    display: none; /* Hide underline effect on mobile menu */
  }

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

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

  /* Mobile Content Overflow 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;
  }
  body.no-scroll {
    overflow: hidden;
  }
}

/* --- Footer Styles --- */
.site-footer {
  background-color: var(--card-bg);
  padding: 40px 0 20px;
  color: var(--text-main);
  font-size: 14px;
}

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

.footer-cols-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.footer-description {
  margin-bottom: 15px;
  color: #ccc;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-nav a {
  display: block;
  color: #ccc;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: #aaa;
}

.footer-slot-anchor,
.footer-slot-anchor-inner {
  min-height: 1px;
  display: block;
}

/* Mobile Footer adjustments */
@media (max-width: 768px) {
  .footer-container {
    padding: 0 20px;
  }
  .footer-cols-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col h3,
  .footer-logo,
  .footer-description {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-nav a {
    display: inline-block;
    margin: 0 10px 8px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
