:root {
    --primary-color: #1a1a2e;
    --secondary-color: #e94560;
    --text-light: #ffffff;
    --text-dark: #1a1a2e;
    --header-offset: 120px; /* Desktop: header-top (70px) + main-nav (50px) */
  }

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

  /* Basic Reset & Body Styling */
  body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    color: var(--text-light);
    background-color: #0f0f1a; /* Slightly darker than primary for body background */
    line-height: 1.6;
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    overflow-x: hidden; /* Prevent horizontal scroll on body */
  }

  /* Shared Container Styling */
  .header-container, .nav-container, .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }

  /* Site Header (Fixed Navigation) */
  .site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: transparent; /* Background set by child elements */
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }

  .header-top {
    background-color: var(--primary-color); /* Deep blue for top section */
    min-height: 70px;
    display: flex;
    align-items: center;
    padding: 10px 0;
  }

  .header-top .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color); /* Vibrant red for logo */
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 0;
    display: block;
  }

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

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

  .login-btn {
    background-color: var(--secondary-color); /* Vibrant red */
    color: var(--text-light);
  }

  .login-btn:hover {
    background-color: #d63851; /* Slightly darker red */
    transform: translateY(-2px);
  }

  .register-btn {
    background-color: #33334d; /* Darker shade of primary */
    color: var(--text-light);
    border: 1px solid var(--secondary-color);
  }

  .register-btn:hover {
    background-color: var(--secondary-color); /* Vibrant red */
    transform: translateY(-2px);
  }

  .main-nav {
    background-color: var(--secondary-color); /* Vibrant red for main nav */
    min-height: 50px;
    display: flex; /* Desktop default: flex */
    align-items: center;
    padding: 5px 0;
  }

  .main-nav .nav-container {
    display: flex;
    justify-content: center;
    gap: 30px;
  }

  .nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 10px 15px;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
  }

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

  .hamburger-menu, .mobile-buttons-wrapper, .mobile-menu-overlay {
    display: none; /* Hidden by default on desktop */
  }

  /* Site Footer */
  .site-footer {
    background-color: var(--primary-color); /* Deep blue for footer */
    color: #cccccc;
    padding: 40px 0 20px 0;
    font-size: 14px;
  }

  .site-footer .footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
  }

  .footer-section {
    flex: 1;
    min-width: 250px;
  }

  .footer-section h3 {
    color: var(--secondary-color); /* Vibrant red for footer headings */
    font-size: 18px;
    margin-bottom: 15px;
  }

  .footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary-color); /* Vibrant red for footer logo */
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
  }

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

  .footer-section p a {
    color: #cccccc;
    text-decoration: none;
  }

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

  .footer-nav li a {
    color: #cccccc;
    text-decoration: none;
    padding: 5px 0;
    display: block;
    transition: color 0.3s ease;
  }

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

  .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
  }

  .footer-bottom p {
    margin: 0;
    color: #aaaaaa;
  }

  /* 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-top {
      min-height: 60px;
      padding: 5px 0;
    }

    .header-top .header-container {
      justify-content: center; /* Center logo by default */
      position: relative;
    }

    .logo {
      flex: 1 !important;
      display: flex !important;
      justify-content: center !important;
      align-items: center !important;
      font-size: 24px;
    }

    .logo img {
      display: block !important;
      max-width: 100%;
      height: auto;
      max-height: 40px;
    }

    .desktop-nav-buttons {
      display: none;
    }

    .hamburger-menu {
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      width: 30px;
      height: 25px;
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 0;
      position: absolute;
      left: 20px;
      top: 50%;
      transform: translateY(-50%);
      z-index: 1001;
    }

    .hamburger-menu span {
      display: block;
      width: 100%;
      height: 3px;
      background-color: var(--text-light);
      border-radius: 3px;
      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-buttons-wrapper {
      display: flex; /* Always visible below logo on mobile */
      background-color: #2a2a44; /* Darker shade for buttons section */
      min-height: 50px;
      align-items: center;
      justify-content: center;
      padding: 10px 0;
      gap: 15px;
    }

    .mobile-buttons-wrapper .header-container {
      display: flex;
      justify-content: center;
      gap: 15px;
      width: 100%;
      max-width: none;
      padding: 0 15px;
    }

    .mobile-buttons-wrapper .btn {
      flex: 1;
      text-align: center;
      max-width: 150px;
    }

    .main-nav {
      display: none; /* Hidden by default */
      flex-direction: column;
      position: fixed;
      top: var(--header-offset); /* Position below the fixed header parts */
      left: 0;
      width: 80%;
      height: calc(100% - var(--header-offset));
      background-color: var(--primary-color); /* Deep blue for mobile menu */
      overflow-y: auto;
      transition: transform 0.3s ease-in-out;
      transform: translateX(-100%);
      padding: 20px 0;
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4);
      z-index: 999;
      align-items: flex-start; /* Align links to the left */
    }

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

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

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

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

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

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

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

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

    .footer-logo {
      margin-bottom: 10px;
    }

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

  /* Utility class for body scroll lock */
  body.no-scroll {
    overflow: hidden;
  }

  /* Ensure all text has sufficient contrast */
  .header-top, .main-nav, .mobile-buttons-wrapper, .site-footer {
    color: var(--text-light);
  }

  .header-top a, .main-nav a, .mobile-buttons-wrapper a, .site-footer a {
    color: inherit;
  }

  .login-btn, .register-btn {
    color: var(--text-light);
  }

  .logo {
    color: var(--secondary-color);
  }

  .footer-section h3 {
    color: var(--secondary-color);
  }

  .footer-logo {
    color: var(--secondary-color);
  }
/* 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;
  }
}
