:root {
  --primary-color: #26A9E0; /* Light Blue */
  --secondary-color: #FFFFFF; /* White */
  --login-button-color: #EA7C07; /* Orange */
  --header-top-bg: var(--primary-color); /* Using primary color for header top */
  --main-nav-bg: var(--secondary-color); /* Using secondary color for main nav */
  --text-color: #000000;

  --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;
  line-height: 1.6;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: var(--secondary-color); /* Default background */
  color: var(--text-color);
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

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

a:hover {
  color: #1a7bb5; /* Darker shade of primary for hover */
}

/* --- Utility Classes --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* --- Site Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: var(--header-top-bg); /* Default background, will be overridden by sections */
}

.site-header .header-top {
  background-color: var(--header-top-bg);
  color: var(--secondary-color);
  padding: 10px 0;
  display: flex;
  align-items: center;
  min-height: 40px; /* Approx 60px total with padding */
}

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

.site-header .logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  padding: 5px 0;
  display: block; /* Ensure it respects padding/margin */
  white-space: nowrap; /* Prevent logo text from wrapping on desktop */
}

.site-header .desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

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

.site-header .btn-login {
  background-color: var(--login-button-color);
  color: var(--secondary-color);
  border: 2px solid var(--login-button-color);
}

.site-header .btn-login:hover {
  background-color: #d16b06; /* Slightly darker orange */
  transform: translateY(-2px);
}

.site-header .btn-register {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 2px solid var(--primary-color);
}

.site-header .btn-register:hover {
  background-color: #1a7bb5; /* Slightly darker blue */
  transform: translateY(-2px);
}

.site-header .main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  position: static; /* Desktop default: static */
  width: 100%;
}

.site-header .main-nav .nav-container {
  display: flex;
  justify-content: center; /* Center nav links on desktop */
  align-items: center;
  width: 100%;
  max-width: 1200px; /* Desktop container max-width */
  margin: 0 auto;
  padding: 0 20px; /* Desktop container padding */
}

.site-header .main-nav .nav-link {
  color: var(--text-color);
  padding: 8px 15px;
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap; /* Prevent nav links from wrapping on desktop */
}

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

.site-header .hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
}

.site-header .hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--secondary-color);
  transition: all 0.3s ease-in-out;
}

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

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

/* --- Footer --- */
.site-footer {
  background-color: #333; /* Dark background for footer */
  color: var(--secondary-color);
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.site-footer .footer-col {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}

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

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

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

.site-footer .footer-col ul li a {
  color: var(--secondary-color);
  text-decoration: none;
}

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

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

.site-footer .footer-bottom p {
  margin: 0;
}

/* --- Mobile Styles --- */
@media (max-width: 768px) {
  .site-header .header-top {
    padding: 8px 0;
    min-height: 44px; /* Adjust for mobile */
  }

  .site-header .header-top .header-container {
    padding: 0 15px; /* Mobile container padding */
    max-width: none; /* Mobile container takes full width */
    justify-content: space-between; /* Hamburger left, Logo center, space right */
    position: relative; /* For absolute positioning of logo if needed */
  }

  .site-header .logo {
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important; /* For centering text or image */
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    padding: 0;
    white-space: normal; /* Allow logo text to wrap on mobile if needed */
    text-align: center;
  }

  .site-header .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place hamburger on the left */
    margin-right: auto; /* Push logo to center */
  }

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

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

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

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

  .site-header .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Mobile button container padding */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--header-top-bg); /* Same as header top */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }

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

  .site-header .main-nav {
    display: none; /* Hide main nav by default on mobile */
    flex-direction: column; /* Vertical menu on mobile */
    position: fixed; /* Fixed position for mobile menu */
    top: var(--header-offset); /* Start below the header */
    left: 0;
    width: 250px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--main-nav-bg);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    overflow-y: auto; /* Enable scrolling for long menus */
    border-top: none; /* Remove border-top from main-nav on mobile */
  }

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

  .site-header .main-nav .nav-container {
    flex-direction: column;
    padding: 20px 0; /* Adjust padding for mobile menu items */
    max-width: none; /* Mobile container takes full width */
    align-items: flex-start; /* Align menu items to the left */
  }

  .site-header .main-nav .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    color: var(--text-color);
    white-space: normal; /* Allow nav links to wrap on mobile */
  }

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

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when menu is active */
  }

  .site-footer .footer-container {
    flex-direction: column;
    padding: 0 15px;
  }

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

  .site-footer .footer-col:not(:last-child) {
    margin-bottom: 25px;
  }

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