:root {
  --primary-color: #26A9E0; /* 淡蓝色 */
  --secondary-color: #FFFFFF;
  --login-button-color: #EA7C07; /* 登录按钮颜色 */
  --background-color: #FFFFFF;
  --black-color: #000000;

  /* Header Offset - Desktop */
  --header-offset: 110px; 
}

@media (max-width: 768px) {
  /* Header Offset - Mobile */
  --header-offset: 100px; 
}

/* Base Styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  padding-top: var(--header-offset); /* Apply header offset to body */
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

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

a:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none; /* Remove underline for buttons */
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

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

.btn-register:hover {
  background-color: #1A8EC7; /* Slightly darker primary */
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-login {
  background-color: var(--login-button-color);
  color: var(--secondary-color);
  border: 2px solid var(--login-button-color);
  margin-left: 10px; /* Spacing between buttons */
}

.btn-login:hover {
  background-color: #C26606; /* Slightly darker login color */
  transform: translateY(-2px);
  text-decoration: none;
}

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

/* Header Top Section (Desktop) */
.header-top {
  background-color: #1A8EC7; /* Darker blue for header top */
  width: 100%;
  min-height: 60px; /* For offset calculation */
  padding: 10px 0; /* Add padding to contribute to min-height */
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%; /* Ensure it spans full width within max-width */
  padding: 0 20px; /* Padding for logo and buttons from container edges */
  box-sizing: border-box;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* White logo text on dark blue background */
  text-decoration: none;
  white-space: nowrap; /* Prevent logo text from wrapping */
  display: block; /* Ensure logo is visible */
}

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  align-items: center;
}

/* Main Navigation Section (Desktop) */
.main-nav {
  background-color: var(--primary-color); /* Primary blue for main nav */
  width: 100%;
  min-height: 50px; /* For offset calculation */
  padding: 10px 0; /* Add padding to contribute to min-height */
  display: flex; /* Default to flex for desktop */
  align-items: center; /* Vertically center nav links */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Horizontal for desktop */
  justify-content: center; /* Center menu items */
  align-items: center;
  width: 100%;
  padding: 0 20px; /* Padding for nav links from container edges */
  box-sizing: border-box;
}

.nav-link {
  color: var(--secondary-color);
  padding: 8px 15px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  white-space: nowrap; /* Prevent nav links from wrapping */
  border-radius: 3px;
}

.nav-link:hover {
  background-color: #1A8EC7; /* Slightly darker primary on hover */
  text-decoration: none;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 25px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above mobile menu overlay */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color); /* White lines on dark blue header-top */
  border-radius: 3px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 11px; }
.hamburger-menu span:nth-child(3) { top: 22px; }

/* Mobile Navigation Buttons (Hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

/* Mobile menu overlay */
.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;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

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

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

.footer-section {
  flex: 1;
  min-width: 250px; /* Minimum width for columns before wrapping */
  margin-bottom: 20px;
}

.footer-logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color); /* Primary color for footer logo */
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
}

.footer-section h3 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
}

.footer-section p {
  line-height: 1.8;
  color: #AAA;
}

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

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

.footer-section ul li a {
  color: #AAA;
  text-decoration: none;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  /* Prevent content overflow */
  .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 {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Ensure shadow is present on mobile */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    width: 100%;
    max-width: none; /* No max-width on mobile */
    justify-content: space-between; /* Space between hamburger and logo */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Place hamburger first */
    margin-right: 15px; /* Space between hamburger and logo */
  }

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

  .logo {
    order: 2; /* Place logo second */
    flex: 1 !important; /* Allow logo to take available space for centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    white-space: normal; /* Allow logo text to wrap if too long */
    text-align: center; /* Center text if it wraps */
  }
  /* If logo is an image, you might need this */
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Adjust as needed */
  }

  .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; /* Padding for mobile buttons */
    background-color: #F0F8FF; /* Light background for mobile buttons section */
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    justify-content: center; /* Center buttons if less than 2 */
    align-items: center;
  }

  .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; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure text breaks */
    overflow-wrap: break-word;
  }

  /* Main Navigation (Mobile) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Start below the visible header + mobile buttons */
    left: 0;
    width: 280px; /* Mobile menu width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--primary-color);
    flex-direction: column; /* Vertical for mobile */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    box-sizing: border-box;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    z-index: 999; /* Below overlay, above content */
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

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

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

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

  /* Footer responsive */
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-section {
    min-width: unset; /* Remove min-width for full width */
    width: 100%;
  }

  .footer-section h3 {
    margin-top: 20px;
  }

  .footer-section ul {
    margin-bottom: 20px;
  }
}
/* 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;
  }
}
