:root {
    --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) */
    }
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #FFFFFF; /* Default text color for dark backgrounds */
    background-color: #FFFFFF; /* Main background color */
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll on body */
  }

  body.no-scroll {
    overflow: hidden;
  }

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

  .site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: transparent; /* Base for fixed header */
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }

  .header-top {
    background-color: #1a1a1a; /* Dark grey for header-top, contrasting with main-nav */
    padding: 10px 0;
    min-height: 40px;
    display: flex; /* Ensure flex for hamburger/logo/buttons */
    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: #FCBC45; /* Gold/Orange for logo to stand out */
    text-transform: uppercase;
    display: block; /* Ensure it's not hidden */
    padding: 5px 0;
  }

  .desktop-nav-buttons {
    display: flex;
    gap: 12px;
  }

  .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    line-height: 1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  }

  .btn-login {
    background-color: #FCBC45; /* Gold/Orange */
    color: #000000; /* Black for contrast */
  }

  .btn-register {
    background-color: #FFFFFF; /* White */
    color: #000000; /* Black for contrast */
  }

  .main-nav {
    background-color: #000000; /* Black for main-nav, contrasting with header-top */
    padding: 10px 0;
    min-height: 30px;
    display: flex; /* Desktop default: flex */
    flex-direction: row; /* Desktop default: row */
    justify-content: center; /* Center menu items */
  }

  .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: #FFFFFF;
    padding: 8px 15px;
    font-weight: bold;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
    border-radius: 5px;
  }

  .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FCBC45;
  }

  .hamburger-menu {
    display: none; /* Hidden on desktop */
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
  }

  .hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FCBC45; /* Gold/Orange */
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
  }

  .hamburger-menu span:nth-child(1) { top: 0; }
  .hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
  .hamburger-menu span:nth-child(3) { bottom: 0; }

  .hamburger-menu.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
  }

  .mobile-nav-buttons {
    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.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

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

  .site-footer {
    background-color: #000000; /* Black footer */
    color: #FFFFFF;
    padding: 40px 20px 20px;
    font-size: 14px;
    line-height: 1.6;
  }

  .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .footer-col {
    flex: 1;
    min-width: 200px;
    padding: 0 10px; /* Add some padding for better spacing */
  }

  .footer-col h3 {
    color: #FCBC45; /* Gold/Orange for footer headings */
    font-size: 18px;
    margin-bottom: 15px;
    text-transform: uppercase;
  }

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

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

  .footer-nav a {
    color: #FFFFFF;
    transition: color 0.3s ease;
  }

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

  .footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 20px;
    color: rgba(255, 255, 255, 0.7);
  }

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

    .header-container {
      width: 100%;
      max-width: none; /* Remove max-width for mobile */
      padding: 0 15px;
      justify-content: flex-start; /* Hamburger at start */
      height: 60px; /* Fixed height for header-top on mobile */
    }

    .hamburger-menu {
      display: block; /* Show hamburger menu */
      margin-right: 15px; /* Space between hamburger and logo */
      align-self: center;
    }

    .logo {
      flex: 1 !important; /* Take remaining space */
      display: flex !important; /* Use flex to center its content */
      justify-content: center !important; /* Center content horizontally */
      align-items: center !important; /* Center content vertically */
      text-align: center; /* Fallback for text logo */
      font-size: 20px; /* Adjust font size for mobile */
      max-width: calc(100% - 80px); /* Prevent logo from overlapping hamburger */
      padding: 0; /* Reset padding for flex centering */
    }

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

    .mobile-nav-buttons {
      display: flex; /* Show mobile buttons */
      justify-content: center;
      gap: 10px;
      background-color: #1a1a1a; /* Same as header-top for continuity */
      padding: 10px 15px;
      min-height: 30px;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    .main-nav {
      display: none; /* Hidden by default */
      position: fixed;
      top: var(--header-offset); /* Position below fixed header and mobile buttons */
      left: 0;
      width: 80%;
      max-width: 300px; /* Limit sidebar width */
      height: calc(100vh - var(--header-offset));
      background-color: #000000; /* Black for menu */
      flex-direction: column; /* Vertical menu */
      align-items: flex-start;
      transform: translateX(-100%); /* Off-screen by default */
      transition: transform 0.3s ease;
      z-index: 1000;
      overflow-y: auto;
      box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    }

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

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

    .nav-link {
      width: 100%;
      padding: 12px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      text-align: left;
    }

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

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

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

    .footer-col h3 {
      text-align: center;
    }

    .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;
  }
}
