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

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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile content overflow protection */
@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;
  }
}

/* Base styles for links and buttons */
a {
  text-decoration: none;
  color: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline */
  font-size: 14px;
}

.btn-login {
  background-color: var(--login-btn-bg);
  color: var(--primary-color); /* Black text on yellow background */
  border: none;
}

.btn-login:hover {
  background-color: #e5a83a; /* Slightly darker yellow */
  opacity: 0.9;
}

.btn-register {
  background-color: var(--register-btn-bg);
  color: var(--primary-color); /* Black text on white background */
  border: none;
}

.btn-register:hover {
  background-color: #f0f0f0; /* Light gray */
  opacity: 0.9;
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: transparent; /* Base, will be overridden by header-top and main-nav */
}

.header-top {
  background-color: var(--primary-color); /* Black background */
  min-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 logo and buttons */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* White text for logo on black background */
  white-space: nowrap;
  padding: 10px 0;
  display: block; /* Ensure it's not inline-block by default for mobile centering */
}

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

.main-nav {
  background-color: var(--secondary-color); /* White background */
  min-height: 50px; /* Fixed height for main-nav */
  display: flex; /* Desktop: visible */
  align-items: center;
}

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

.nav-link {
  color: var(--primary-color); /* Black text for nav links on white background */
  padding: 10px 15px;
  font-weight: bold;
  transition: color 0.3s ease;
  white-space: nowrap;
  font-size: 15px;
}

.nav-link:hover {
  color: #555; /* Darker grey on hover */
}

/* Mobile specific styles */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001; /* Above mobile nav buttons */
  position: relative;
  margin-right: 15px; /* Space between hamburger and logo */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color); /* White lines on black background */
  transition: all 0.3s ease-in-out;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  background-color: var(--primary-color); /* Same as header-top */
  min-height: 60px; /* Fixed height for mobile buttons */
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Match header shadow */
}

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

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

@media (max-width: 768px) {
  .site-header {
    box-shadow: none; /* Remove shadow from site-header on mobile, will be on header-top and mobile-nav-buttons */
  }

  .header-top {
    min-height: 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Add shadow to top bar */
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center */
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important; /* Use flex for centering */
    justify-content: center !important; /* Center logo text horizontally */
    align-items: center !important; /* Center logo text vertically */
    padding: 0; /* Remove vertical padding from logo on mobile */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger menu */
    order: -1; /* Place it at the beginning */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header parts */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--secondary-color); /* White background */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    overflow-y: auto; /* Enable scrolling for long menus */
    min-height: unset; /* Remove min-height from desktop */
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: flex-start; /* Align menu items to the left */
    padding: 20px 15px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #eee; /* Separator for menu items */
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    position: relative; /* Make it part of the normal flow below header-top */
    min-height: 60px; /* Fixed height */
  }
}

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color); /* Black background */
  color: var(--secondary-color); /* White text */
  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-col {
  flex: 1;
  min-width: 200px;
}

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

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

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

.footer-col ul li a {
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: #aaa;
}

.footer-logo {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.footer-description {
  line-height: 1.6;
  color: #ccc;
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  text-align: center;
  border-top: 1px solid #333;
  padding-top: 20px;
  color: #ccc;
}

.copyright {
  margin: 0;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 30px 15px 15px;
  }

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

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

  .footer-bottom {
    margin-top: 30px;
    padding-top: 15px;
  }
}

/* Ensure body scroll is prevented when menu is open */
body.no-scroll {
  overflow: 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;
  }
}
