:root {
  --primary-color: #000000;
  --secondary-color: #FFFFFF;
  --login-btn-color: #FCBC45;
  --register-btn-color: #FFFFFF;
  --background-color: #FFFFFF;
  --header-offset: 105px; /* Desktop: header-top (60px) + main-nav (45px) */
}

/* Global Box Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: var(--background-color);
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
}

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

/* Header Top Section - Desktop */
.header-top {
  background-color: var(--primary-color); /* Black */
  color: var(--secondary-color); /* White text */
  padding: 0 20px;
  height: 60px; /* Fixed height for header-top */
  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; /* Padding for content inside container */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  text-transform: uppercase;
  line-height: 1;
}

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

/* Main Navigation - Desktop */
.main-nav {
  background-color: #1a1a1a; /* Darker grey, contrasting with primary-color */
  color: var(--secondary-color);
  padding: 0 20px;
  height: 45px; /* Fixed height for main-nav */
  display: flex; /* Always display for desktop */
  align-items: center;
  justify-content: center; /* Center nav links */
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.main-nav .nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  color: var(--login-btn-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-login {
  background-color: var(--login-btn-color);
  color: var(--primary-color); /* Black text for contrast */
  border: 1px solid var(--login-btn-color);
}

.btn-login:hover {
  background-color: #e6a83a;
  border-color: #e6a83a;
}

.btn-register {
  background-color: var(--register-btn-color);
  color: var(--primary-color); /* Black text for contrast */
  border: 1px solid var(--register-btn-color);
}

.btn-register:hover {
  background-color: #f0f0f0;
  border-color: #f0f0f0;
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  position: relative;
  transition: all 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  position: absolute;
  transition: all 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

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

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

/* Footer Styles */
.site-footer {
  background-color: #1a1a1a; /* Dark grey, slightly lighter than header-top */
  color: #bbb;
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

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

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

.footer-section p {
  margin-bottom: 15px;
  line-height: 1.8;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.footer-nav a:hover {
  color: var(--login-btn-color);
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 105px; /* Mobile: header-top (60px) + mobile-nav-buttons (45px) */
  }

  /* Mobile content overflow protection */
  .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 {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile container width */
    justify-content: space-between;
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: 0; /* Place hamburger menu to the left */
  }

  .logo {
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important; /* Use flex for centering */
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    font-size: 24px;
  }
  
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: #222; /* Darker background for mobile menu */
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: flex-start;
  }

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

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

  .main-nav .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #333;
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 12px;
    background-color: var(--primary-color);
    padding: 10px 15px;
    height: 45px; /* Fixed height for mobile buttons */
    align-items: center;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 990; /* Below hamburger menu, above main content */
  }

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

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

  .site-footer {
    padding: 30px 15px 15px;
  }

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

  .footer-section {
    flex: 1 1 100%;
    min-width: auto;
    text-align: center;
  }

  .footer-section h3 {
    margin-bottom: 10px;
  }

  .footer-nav {
    align-items: center;
  }

  .footer-bottom {
    margin-top: 30px;
  }
}
/* 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;
  }
}
