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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: #FFFFFF;
  color: #333333;
  overflow-x: hidden;
}

/* --- General Container & Flexbox for Layout --- */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  align-items: center;
}

/* --- Site Header (Fixed Navigation) --- */
.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: #FFFFFF; /* Fallback */
}

.header-top {
  background-color: #1A8EC7; /* Darker primary blue */
  min-height: 60px;
  display: flex;
  align-items: center;
  padding: 10px 0; /* Adjust padding for content height */
}

.header-top .header-container {
  justify-content: space-between;
}

.logo {
  color: #FFFFFF;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  line-height: 40px;
  white-space: nowrap; /* Prevent logo text from wrapping on desktop */
}

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

.btn {
  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;
  display: inline-block;
  text-align: center;
  border: none;
  cursor: pointer;
  line-height: 1.2;
}

.btn-register {
  background-color: #EA7C07; /* Orange for register */
  color: #FFFFFF;
}

.btn-register:hover {
  background-color: #D46F06;
  transform: translateY(-2px);
}

.btn-login {
  background-color: #26A9E0; /* Primary blue for login */
  color: #FFFFFF;
}

.btn-login:hover {
  background-color: #1F8EC7;
  transform: translateY(-2px);
}

.main-nav {
  background-color: #26A9E0; /* Primary blue */
  min-height: 50px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  padding: 10px 0; /* Adjust padding for content height */
}

.main-nav .nav-container {
  justify-content: center;
  gap: 25px;
}

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #E0F2F7; /* Lighter shade of blue */
  transform: translateY(-2px);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001; /* Above logo on mobile */
  margin-right: 15px; /* Space between hamburger and logo on mobile */
}

.hamburger-menu .icon-bar {
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  transition: all 0.3s ease;
  border-radius: 2px;
}

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

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

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

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

/* --- Site Footer --- */
.site-footer {
  background-color: #333333;
  color: #FFFFFF;
  padding: 40px 0 20px;
  font-size: 14px;
}

.footer-container {
  flex-direction: column;
  align-items: flex-start;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 30px;
  gap: 20px;
}

.footer-column {
  flex: 1;
  min-width: 250px;
  margin-bottom: 20px;
}

.footer-logo {
  color: #FFFFFF;
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-column h3 {
  color: #26A9E0;
  font-size: 18px;
  margin-bottom: 15px;
}

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

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

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

.footer-nav-links a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav-links a:hover {
  color: #26A9E0;
}

.footer-bottom {
  width: 100%;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #555555;
}

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

/* --- Mobile Responsive 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-container, .nav-container, .footer-container {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
  }

  .header-top {
    min-height: 60px;
    padding: 10px 0;
  }

  .header-top .header-container {
    justify-content: flex-start; /* Adjust alignment for hamburger */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
  }

  .logo {
    flex-grow: 1; /* Allows logo to take available space for centering */
    text-align: center;
    font-size: 20px;
    line-height: 40px; /* Ensure vertical alignment */
    margin-left: -45px; /* Offset to visually center logo despite hamburger */
  }

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

  .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;
    background-color: #F0F0F0; /* Light background for mobile buttons bar */
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for gap */
    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 header and mobile buttons */
    left: 0;
    width: 80%; /* Width of the mobile menu */
    max-width: 300px; /* Max width for larger mobile screens */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #333333; /* Dark background for mobile menu */
    flex-direction: column;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-out;
    overflow-y: auto;
    z-index: 999;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    padding: 20px 15px;
    align-items: flex-start;
    gap: 15px;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }

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

  .footer-columns {
    flex-direction: column;
    gap: 0;
  }

  .footer-column {
    min-width: unset;
    width: 100%;
    margin-bottom: 30px;
    text-align: center;
  }

  .footer-column h3 {
    text-align: center;
  }

  .footer-nav-links {
    text-align: center;
  }
}
/* 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;
  }
}
