:root {
  --primary-color: #007bff;
  --secondary-color: #ffc107;
  --text-color-dark: #333;
  --text-color-light: #fff;
  --background-light: #f8f9fa;
  --header-offset: 110px; /* Desktop: header-top (min-height ~60px) + main-nav (min-height ~50px) = 110px */
}

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

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
}

@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.no-scroll {
    overflow: hidden;
  }
}

/* Site Header - Fixed & Suspended */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--background-light); /* Base for clarity, sections override */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

/* Header Top Section (Desktop: Logo + Buttons) */
.header-top {
  background-color: var(--primary-color); /* Deep Blue */
  padding: 10px 0;
  min-height: 60px; /* Sufficient height for logo/buttons */
  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 {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-color-light);
  text-decoration: none;
  text-transform: uppercase;
  display: block;
  padding: 5px 0;
  line-height: 1;
}

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

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-login {
  background-color: var(--primary-color);
  color: var(--text-color-light);
  border: 2px solid var(--text-color-light);
}

.btn-login:hover {
  background-color: var(--text-color-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-register {
  background-color: var(--secondary-color);
  color: var(--text-color-dark);
  border: 2px solid var(--secondary-color);
}

.btn-register:hover {
  background-color: #e6b300; /* Slightly darker gold */
  color: var(--text-color-dark);
  border-color: #e6b300;
}

/* Main Navigation (Desktop: Menu items) */
.main-nav {
  background-color: var(--background-light); /* Light Gray, contrasts with primary-color */
  padding: 10px 0;
  min-height: 50px; /* Sufficient height for nav links */
  display: flex; /* Desktop default: flex */
  align-items: center;
  justify-content: center;
}

.main-nav .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;
  gap: 25px;
}

.nav-link {
  color: var(--text-color-dark);
  text-decoration: none;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

/* Mobile Specific Styles */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  font-size: 30px;
  background: none;
  border: none;
  color: var(--text-color-light);
  cursor: pointer;
  padding: 5px 10px;
  z-index: 1001; /* Above logo */
  transition: transform 0.3s ease;
}

.mobile-nav-buttons-wrapper {
  display: none; /* Hidden on desktop */
}

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

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

/* Footer */
.site-footer {
  background-color: #343a40; /* Dark gray for footer background */
  color: #f8f9fa;
  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: 180px;
}

.footer-section h3 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 15px;
}

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

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

.footer-nav a {
  color: #ced4da;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.contact-info p {
  margin-bottom: 8px;
}

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

@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
  }

  .main-nav .nav-container {
    padding: 0 15px;
  }

  /* Header Top (Mobile) */
  .header-top {
    justify-content: space-between;
    padding: 10px 0;
  }

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

  .hamburger-menu.active {
    transform: rotate(90deg); /* Example X animation */
  }

  .logo {
    flex: 1; /* Allow logo to take available space */
    text-align: center; /* Center text logo */
    order: 1;
    font-size: 22px;
  }

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

  /* Mobile Buttons Area - Always visible below header-top */
  .mobile-nav-buttons-wrapper {
    display: flex; /* Show mobile buttons */
    background-color: #343a40; /* Darker background for button area */
    padding: 10px 0;
    min-height: 50px;
    align-items: center;
  }

  .mobile-nav-buttons-wrapper .nav-container {
    justify-content: center;
    gap: 15px;
    width: 100%; /* Important: mobile containers must be 100% */
    max-width: none; /* Important: remove max-width on mobile */
  }

  .mobile-nav-buttons-wrapper .btn {
    padding: 8px 15px;
    font-size: 14px;
  }

  /* Main Navigation (Mobile) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header parts */
    left: 0;
    width: 250px;
    height: calc(100% - var(--header-offset)); /* Take remaining height */
    background-color: var(--background-light);
    transform: translateX(-100%); /* Slide out to left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow-y: auto;
    align-items: flex-start; /* Align menu items to the left */
    padding: 20px 0;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding: 0 20px;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }

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

  /* Footer Mobile */
  .footer-container {
    flex-direction: column;
    gap: 25px;
  }

  .footer-section {
    min-width: unset;
    width: 100%;
    text-align: center;
  }

  .footer-section h3 {
    margin-bottom: 10px;
  }

  .footer-nav {
    text-align: center;
  }
}

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