:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-button-color: #EA7C07;
    --text-color-dark: #333333;
    --text-color-light: #FFFFFF;
    --header-top-bg: #003366; /* Dark blue for header-top */
    --main-nav-bg: #26A9E0; /* Primary color for main-nav */
    --header-offset: 110px; /* Desktop: header-top (~60px) + main-nav (~50px) */
  }
  @media (max-width: 768px) {
    :root {
      --header-offset: 105px; /* Mobile: header-top (~60px) + mobile-nav-buttons (~45px) */
    }
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding-top: var(--header-offset); /* Apply header offset to body */
    color: var(--text-color-dark);
    background-color: var(--secondary-color);
    overflow-x: hidden; /* Prevent body horizontal scroll */
  }

  body.no-scroll {
    overflow: hidden;
  }

  a {
    text-decoration: none;
    color: var(--primary-color);
  }

  a:hover {
    text-decoration: underline;
  }

  .site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--secondary-color); /* Default background, overridden by sub-sections */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-height: auto; /* Ensure content adapts */
  }

  .header-top {
    background-color: var(--header-top-bg);
    padding: 10px 0;
    min-height: 40px; /* Base height for header-top content */
    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;
    box-sizing: border-box;
  }

  .logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block; /* Ensure it's not inline for flexbox */
    white-space: nowrap;
    flex-shrink: 0; /* Prevent logo from shrinking */
  }

  .logo:hover {
    text-decoration: none;
    color: var(--primary-color);
  }

  .desktop-nav-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto; /* Push buttons to the right */
    flex-shrink: 0; /* Prevent buttons from shrinking */
  }

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

  .btn-register {
    background-color: var(--primary-color);
    color: var(--text-color-light);
  }

  .btn-register:hover {
    background-color: #1A86B9;
    transform: translateY(-1px);
    text-decoration: none;
  }

  .btn-login {
    background-color: var(--login-button-color);
    color: var(--text-color-light);
  }

  .btn-login:hover {
    background-color: #C26300;
    transform: translateY(-1px);
    text-decoration: none;
  }

  .main-nav {
    background-color: var(--main-nav-bg);
    padding: 10px 0;
    display: flex; /* Desktop default: flex */
    flex-direction: row; /* Desktop default: row */
    align-items: center;
    justify-content: center;
    min-height: 30px; /* Base height for main-nav content */
  }

  .main-nav .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    flex-wrap: wrap; /* Allow wrapping for many links on smaller desktops */
  }

  .nav-link {
    color: var(--text-color-light);
    padding: 8px 15px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: nowrap;
  }

  .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    text-decoration: none;
  }

  .hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
    order: 0; /* Default order for desktop (not visible) */
    color: var(--secondary-color);
  }

  .hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px 0;
    transition: all 0.3s ease;
  }

  /* Hamburger menu active state */
  .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-nav-buttons {
    display: none; /* Hidden on desktop */
    background-color: var(--header-top-bg); /* Match header-top background */
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

  .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: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

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

  /* Footer styles */
  .site-footer {
    background-color: var(--header-top-bg);
    color: var(--secondary-color);
    padding: 40px 0;
    font-size: 14px;
  }

  .site-footer a {
    color: var(--primary-color);
  }

  .site-footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
  }

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

  .footer-col {
    flex: 1;
    min-width: 250px;
    max-width: 30%; /* Adjust as needed for column distribution */
  }

  .footer-logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
  }

  .footer-logo:hover {
    text-decoration: none;
    color: var(--primary-color);
  }

  .site-footer h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
  }

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

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

  .site-footer ul li a {
    color: var(--secondary-color);
    transition: color 0.3s ease;
  }

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

  .site-footer p {
    line-height: 1.6;
    margin-bottom: 10px;
  }

  /* Mobile styles */
  @media (max-width: 768px) {
    .header-top {
      padding: 10px 0;
    }

    .header-container {
      width: 100%;
      max-width: none; /* Important: remove max-width on mobile */
      padding: 0 15px;
      justify-content: space-between;
      position: relative; /* For absolute positioning of logo */
    }

    .hamburger-menu {
      display: block;
      order: 1;
      color: var(--secondary-color);
    }

    .logo {
      order: 2;
      flex: 1; /* Allows logo to take available space */
      text-align: center;
      font-size: 20px;
      position: absolute; /* Force center */
      left: 50%;
      transform: translateX(-50%);
      width: calc(100% - 100px); /* Adjust width to avoid overlapping hamburger/buttons */
      white-space: normal; /* Allow logo text to wrap */
      display: flex !important; /* For text logo centering with flex */
      justify-content: center !important;
      align-items: center !important;
      height: 100%; /* Occupy full height of header-container */
    }

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

    .mobile-nav-buttons {
      display: flex !important; /* Show mobile buttons */
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      padding: 10px 15px;
      overflow: hidden;
      gap: 10px;
      flex-wrap: nowrap;
      justify-content: center; /* Center buttons if less than 2 */
    }

    .mobile-nav-buttons .btn {
      flex: 1; min-width: 0;
      max-width: calc(50% - 5px); /* For two buttons */
      box-sizing: border-box;
      padding: 8px 12px;
      font-size: 13px;
      white-space: normal;
      word-wrap: break-word;
      overflow-wrap: break-word;
    }

    .main-nav {
      display: none; /* Hidden by default on mobile */
      position: fixed;
      top: var(--header-offset); /* Position below fixed header and mobile buttons */
      left: 0;
      width: 250px;
      height: calc(100% - var(--header-offset));
      background-color: var(--main-nav-bg);
      flex-direction: column;
      align-items: flex-start;
      transform: translateX(-100%); /* Slide out of view */
      transition: transform 0.3s ease;
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
      z-index: 9999;
      overflow-y: auto; /* Enable scrolling for long menus */
      padding-bottom: 20px; /* Add some padding at the bottom */
    }

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

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

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

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

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

    .footer-col {
      max-width: 100%;
      min-width: unset;
    }

    .page-content img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-content {
      overflow-x: hidden;
      max-width: 100%;
    }
    body {
      overflow-x: 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;
  }
}
