:root {
    --header-offset: 105px; /* Desktop: header-top (min-height 60px) + main-nav (min-height 45px) */
  }
  @media (max-width: 768px) {
    :root {
      --header-offset: 100px; /* Mobile: header-top (min-height 50px) + mobile-nav-buttons (min-height 50px) */
    }
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    background-color: #FFFFFF;
    color: #333333;
    line-height: 1.6;
    overflow-x: hidden;
  }

  /* General link styling */
  a {
    text-decoration: none;
    color: inherit;
  }

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

  .header-top {
    background-color: #000000; /* Primary color */
    color: #FFFFFF;
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px; /* Base padding */
  }

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

  .logo {
    font-size: 24px;
    font-weight: bold;
    color: #FCBC45; /* Contrasting color for logo */
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 0;
  }

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

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

  .btn-login {
    background-color: #000000; /* Primary color */
    color: #FCBC45; /* Login text color */
    border: 1px solid #FCBC45;
  }

  .btn-login:hover {
    background-color: #FCBC45;
    color: #000000;
  }

  .btn-register {
    background-color: #000000; /* Primary color */
    color: #FFFFFF; /* Register text color */
    border: 1px solid #FFFFFF;
  }

  .btn-register:hover {
    background-color: #FFFFFF;
    color: #000000;
  }

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

  .main-nav {
    background-color: #1a1a1a; /* Dark grey, distinct from header-top */
    color: #FFFFFF;
    min-height: 45px;
    display: flex;
    align-items: center;
    padding: 0 20px; /* Base padding */
  }

  .main-nav .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25px;
    padding: 5px 20px; /* Inner padding for desktop */
  }

  .main-nav .nav-link {
    color: #FFFFFF;
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
    white-space: nowrap;
  }

  .main-nav .nav-link:hover,
  .main-nav .nav-link.active {
    color: #FCBC45; /* Highlight color */
  }

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

  .hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
    margin-bottom: 5px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .hamburger-menu span:last-child {
    margin-bottom: 0;
  }

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

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

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

  .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;
    cursor: pointer;
  }

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

  /* Footer */
  .site-footer {
    background-color: #000000; /* Primary color */
    color: #FFFFFF;
    padding: 40px 20px 20px;
    font-size: 14px;
    text-align: center;
  }

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

  .footer-column {
    flex: 1;
    min-width: 150px;
    max-width: 250px;
  }

  .footer-column h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #FCBC45; /* Highlight color */
  }

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

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

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

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

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

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

    .header-top {
      min-height: 50px;
      padding: 0 15px;
      justify-content: space-between; /* Hamburger left, Logo centered, space right */
    }

    .header-container {
      width: 100%;
      max-width: none;
      padding: 0;
      justify-content: space-between; /* Ensures hamburger is left, logo is flex-centered */
    }

    .hamburger-menu {
      display: block;
      order: 1;
      margin-right: 15px;
    }

    .logo {
      order: 2;
      flex: 1;
      text-align: center;
      color: #FCBC45;
    }
    
    .desktop-nav-buttons {
      display: none;
    }

    .mobile-nav-buttons {
      display: flex; /* Always visible below header-top */
      background-color: #000000; /* Same as header-top for consistency */
      padding: 10px 15px;
      justify-content: center;
      min-height: 50px;
    }

    .nav-button-container {
      display: flex;
      gap: 10px;
      width: 100%;
      max-width: 400px; /* Optional: limit width of buttons on very wide mobile */
      justify-content: center;
    }

    .btn {
      flex: 1; /* Distribute buttons evenly */
      max-width: 150px;
      font-size: 14px;
      padding: 8px 15px;
    }

    .main-nav {
      display: none; /* Hidden by default */
      flex-direction: column;
      position: fixed;
      top: var(--header-offset); /* Start below the fixed header */
      left: 0;
      width: 280px;
      height: calc(100% - var(--header-offset));
      background-color: #1a1a1a;
      transform: translateX(-100%); /* Off-screen by default */
      transition: transform 0.3s ease;
      overflow-y: auto;
      padding: 20px 0;
    }

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

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

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

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

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

    .footer-column {
      max-width: 100%;
      text-align: center;
    }

    .footer-nav ul {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px 20px;
    }

    .footer-nav li {
      margin-bottom: 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;
  }
}
