:root {
  --primary-color: #007bff;
  --secondary-color: #28a745;
  --header-top-bg: #0056b3; /* Darker primary blue */
  --main-nav-bg: #e9ecef; /* Light gray */
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

/* Base styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  padding-top: var(--header-offset); /* Apply header offset to body */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #fff; /* Overall header background */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
}

/* Header Top Section (Desktop: Logo + Buttons | Mobile: Hamburger + Logo) */
.header-top {
  background-color: var(--header-top-bg);
  padding: 10px 0;
  color: #fff;
  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 20px;
  width: 100%;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase; /* Ensure logo text is uppercase */
  display: block; /* Ensure logo is visible */
  white-space: nowrap;
}

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

/* Main Navigation (Desktop: Menu below header-top | Mobile: Hidden by default) */
.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  display: flex; /* Desktop: visible */
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center; /* Desktop: centered */
  align-items: center;
  min-height: 50px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
  width: 100%;
}

.nav-link {
  color: #333;
  text-decoration: none;
  padding: 8px 15px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: rgba(0, 123, 255, 0.1);
  border-radius: 4px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap; /* Prevent buttons from wrapping */
  border: none; /* Remove default button border */
}

.btn-login {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 6px rgba(0, 123, 255, 0.2);
}

.btn-login:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

.btn-register {
  background-color: var(--secondary-color);
  color: #fff;
  box-shadow: 0 4px 6px rgba(40, 167, 69, 0.2);
}

.btn-register:hover {
  background-color: #218838;
  transform: translateY(-2px);
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001; /* Above logo and buttons */
  position: absolute;
  left: 20px;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

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

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

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

/* Mobile Navigation Buttons (Mobile Only) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  justify-content: center;
  gap: 10px;
  padding: 10px 15px;
  background-color: var(--header-top-bg); /* Same as header-top for consistency */
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Subtle shadow below buttons */
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 998;
}

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

/* Footer */
.site-footer {
  background-color: #333;
  color: #f8f8f8;
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-section {
  flex: 1;
  min-width: 200px; /* Minimum width for columns */
}

.footer-section h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-section p {
  color: #ccc;
}

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

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

.footer-section ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #444;
  color: #ccc;
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    justify-content: center; /* Center logo in mobile header-top */
    position: relative; /* For absolute positioning of hamburger */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    left: 15px; /* Align with container padding */
  }

  .logo {
    flex: 1; /* Allow logo to take available space for centering */
    text-align: center;
    padding-left: 30px; /* Offset for hamburger menu */
    padding-right: 30px; /* Balance for hamburger menu */
  }

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

  .main-nav {
    display: none; /* Hide menu by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Optional: max width for mobile menu */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: #fff; /* Menu background */
    flex-direction: column; /* Vertical menu */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-out;
    z-index: 999; /* Below overlay */
    overflow-y: auto; /* Scroll for long menus */
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  }

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

  .nav-container {
    flex-direction: column;
    padding: 20px 15px;
    width: 100%; /* Ensure container takes full width */
    max-width: none; /* Remove max-width on mobile */
    align-items: flex-start; /* Align menu items to the left */
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    color: #333;
    border-bottom: 1px solid #eee;
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
  }

  .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-footer {
    padding: 30px 15px 15px;
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

  .footer-section {
    min-width: unset; /* Remove min-width for mobile */
  }

  .footer-bottom {
    margin-top: 30px;
  }
}

/* Body no-scroll class for mobile menu */
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;
  }
}
