:root {
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 115px; /* Mobile: header-top (60px) + mobile-nav-buttons (50px) + small buffer */
  }
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

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

/* Site Header - Fixed and elevated */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #000; /* Neutral background for fixed header */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  min-height: var(--header-offset);
  display: flex;
  flex-direction: column; /* Default desktop, overridden by mobile later */
}

/* Header Top Section */
.header-top {
  width: 100%;
  background-color: #8B0000; /* Dark Red - Secondary Color */
  padding: 10px 0;
  height: 60px; /* Fixed height for offset calculation */
  display: flex;
  align-items: center;
}

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

/* Logo */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700; /* Gold - Primary Color */
  text-transform: uppercase;
  white-space: nowrap;
  display: block;
}

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

/* Main Navigation Menu */
.main-nav {
  width: 100%;
  background-color: #FFD700; /* Gold - Primary Color */
  display: flex; /* Desktop default: flex */
  height: 50px; /* Fixed height for offset calculation */
  align-items: center;
}

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

.nav-link {
  color: #333; /* Dark text for contrast on gold */
  padding: 8px 15px;
  transition: color 0.3s, background-color 0.3s;
  font-weight: 600;
  white-space: nowrap;
}

.nav-link:hover {
  color: #8B0000; /* Dark Red on hover */
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  z-index: 1001;
}

.hamburger-menu .bar1, .hamburger-menu .bar2, .hamburger-menu .bar3 {
  width: 100%;
  height: 3px;
  background-color: #FFD700; /* Gold bars */
  transition: all 0.3s ease;
  border-radius: 5px;
}

/* Buttons */
.btn {
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  border: none;
}

.login-btn {
  background-color: #FFD700; /* Gold button */
  color: #8B0000; /* Dark Red text */
}

.login-btn:hover {
  background-color: #fff; /* White on hover */
  color: #8B0000;
}

.register-btn {
  background-color: #8B0000; /* Dark Red button */
  color: #FFD700; /* Gold text */
}

.register-btn:hover {
  background-color: #fff; /* White on hover */
  color: #8B0000;
}

/* Mobile Navigation Buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

/* Mobile Menu Overlay (hidden on desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden by default on desktop */
}

/* Footer */
.site-footer {
  background-color: #333;
  color: #fff;
  padding: 40px 20px 20px;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
  text-align: left;
}

.footer-section {
  flex: 1 1 280px; /* Allows sections to wrap */
  margin-bottom: 20px;
}

.footer-section h3 {
  color: #FFD700; /* Gold headings */
  margin-bottom: 15px;
  font-size: 1.2em;
}

.footer-section p {
  font-size: 0.9em;
  line-height: 1.8;
  color: #ccc;
}

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

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

.footer-nav a {
  color: #FFD700; /* Gold links */
  font-size: 0.9em;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 0.8em;
  color: #ccc;
}

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

  .site-header {
    flex-direction: column;
    align-items: center;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Mobile container must be full width */
    padding: 0 15px;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger menu */
    order: 0; /* Position left */
  }

  .logo {
    order: 1; /* Position in center */
    flex: 1; /* Take available space for centering */
    text-align: center; /* Center text logo */
    /* Image LOGO centering rules */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons */
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical menu items */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Optional: max width for menu */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: #333; /* Dark background for mobile menu */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .main-nav.active {
    display: flex; /* MUST be flex/block to show */
    transform: translateX(0); /* Slide in */
  }

  .nav-container {
    width: 100%;
    max-width: none; /* Mobile container must be full width */
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFD700; /* Gold links on dark background */
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    width: 100%;
    background-color: #8B0000; /* Dark Red background */
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    height: 50px; /* Fixed height for offset calculation */
    align-items: center;
  }

  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999; /* Below menu, above content */
    display: none;
    transition: opacity 0.3s ease;
    opacity: 0;
  }

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

  .hamburger-menu.active .bar1 {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  .hamburger-menu.active .bar2 {
    opacity: 0;
  }

  .hamburger-menu.active .bar3 {
    transform: rotate(45deg) translate(-5px, -6px);
  }

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

  .footer-section {
    flex: 1 1 100%;
    text-align: center;
  }

  .footer-nav {
    padding: 0;
  }
}

.body.no-scroll {
  overflow: hidden;
}
/* Payment Methods 图标容器样式 */
.payment-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.payment-icons img,
.payment-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Game Providers 图标容器样式 */
.game-providers-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.game-providers-icons img,
.game-provider-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Social Media 图标容器样式 */
.social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.social-media-icons img,
.social-media-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
