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

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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--secondary-color); /* Default text color, overridden where needed */
  background-color: #FFFFFF; /* Page background */
  padding-top: var(--header-offset); /* Fixed header offset */
}

body.no-scroll {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  min-height: var(--header-offset); /* Ensure header has minimum height */
  display: flex; /* Use flex to stack header-top and main-nav */
  flex-direction: column;
}

.header-top {
  background-color: var(--primary-color); /* Black */
  color: var(--secondary-color);
  width: 100%;
  min-height: 60px; /* Desktop height */
  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; /* Desktop padding */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  padding: 10px 0; /* Vertical padding to help define height */
  display: block; /* Ensure it's always visible */
}

.desktop-nav-buttons {
  display: flex; /* Show on desktop */
  gap: 12px;
}

.btn {
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  text-decoration: none; /* Remove underline for buttons */
}

.login-btn {
  background-color: var(--accent-color-login); /* Gold/Orange */
  color: var(--primary-color); /* Black text for contrast */
}

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

.main-nav {
  background-color: #1a1a1a; /* Darker grey for contrast with black header-top */
  color: var(--secondary-color);
  width: 100%;
  min-height: 40px; /* Desktop height */
  display: flex; /* Desktop default: show */
  flex-direction: row; /* Desktop default: horizontal */
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center; /* Center menu items on desktop */
  align-items: center;
  padding: 0 20px; /* Desktop padding */
  gap: 25px; /* Spacing between nav links */
  flex-wrap: wrap; /* Allow wrapping if many links */
}

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

.nav-link:hover {
  color: var(--accent-color-login); /* Gold hover effect */
}

/* Hamburger menu and mobile buttons are hidden on desktop */
.hamburger-menu,
.mobile-nav-buttons-bar,
.mobile-menu-overlay {
  display: none;
}

/* Footer styles */
.site-footer {
  background-color: var(--primary-color); /* Black */
  color: var(--secondary-color);
  padding: 40px 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 {
  color: var(--accent-color-login); /* Gold heading */
  font-size: 18px;
  margin-bottom: 20px;
}

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

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

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

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

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

.footer-nav a:hover {
  color: var(--accent-color-login); /* Gold hover effect */
}

/* --- Mobile Specific Styles --- */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column; /* Stack header-top and mobile buttons bar */
  }

  .header-top {
    min-height: 60px; /* Mobile header-top height */
    justify-content: space-between; /* Space out hamburger and logo */
    padding: 0 15px; /* Mobile padding */
  }

  .header-container {
    padding: 0; /* No padding on container itself, handled by header-top */
    width: 100%;
    max-width: none; /* Important: no max-width on mobile */
    justify-content: space-between;
  }

  .logo {
    flex: 1 !important; /* Force logo to take available space */
    display: flex !important;
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    font-size: 24px;
    padding: 0; /* Remove vertical padding */
  }
  
  .logo img { /* If logo is an image */
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    background: none;
    border: none;
    cursor: pointer;
    padding: 15px 0; /* Adjust padding for click area */
    position: relative;
    z-index: 1001; /* Above logo and buttons */
    width: 30px; /* Fixed width for icon */
    height: 30px; /* Fixed height for icon */
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
  }

  .hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
  }

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

  .hamburger-icon::before {
    transform: translateY(-8px);
  }

  .hamburger-icon::after {
    transform: translateY(8px);
  }

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

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

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

  .mobile-nav-buttons-bar {
    display: block; /* Show mobile button bar */
    background-color: var(--primary-color);
    width: 100%;
    padding: 10px 15px;
    min-height: 50px; /* Mobile buttons bar height */
  }

  .mobile-buttons-container {
    display: flex;
    justify-content: center; /* Center the buttons */
    gap: 12px;
    max-width: none; /* Ensure it takes full width */
    width: 100%;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* Darker overlay for menu */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Below hamburger, above overlay */
    overflow-y: auto; /* Allow scrolling if menu content is long */
  }

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

  .nav-container {
    flex-direction: column; /* Vertical menu items */
    gap: 20px;
    padding: 40px 15px; /* More padding for mobile menu */
    width: 100%;
    max-width: none; /* Important: no max-width on mobile */
  }

  .nav-link {
    font-size: 22px;
    padding: 10px 0;
  }

  .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; /* Below main nav */
  }

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

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

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

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