: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) */
  }
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: #FFFFFF; /* Global background color */
  color: #333333;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Site Header - Fixed & Suspended */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent; /* Actual background will be set by header-top and main-nav */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Stack header-top and main-nav vertically */
}

/* Header Top Section */
.header-top {
  background-color: #000000; /* Primary color */
  color: #FFFFFF;
  padding: 10px 0; /* Adjust as needed for 60px height */
  min-height: 40px; /* To ensure min-height for content */
  display: flex; /* For inner container centering */
  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: #FFFFFF;
  text-transform: uppercase; /* Ensure JILILOVE is uppercase */
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px; /* Spacing between buttons */
}
.btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none; /* Remove underline */
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap; /* Prevent button text from wrapping */
}
.btn-login {
  background-color: #FCBC45; /* Login color */
  color: #000000;
}
.btn-login:hover {
  background-color: #e0a53b;
}
.btn-register {
  background-color: #FFFFFF; /* Register color */
  color: #000000;
  border: 1px solid #FCBC45; /* Add a subtle border for contrast against white backgrounds */
}
.btn-register:hover {
  background-color: #f0f0f0;
}

/* Main Navigation (Desktop) */
.main-nav {
  background-color: #333333; /* Dark gray, contrasting with header-top */
  color: #FFFFFF;
  padding: 10px 0; /* Adjust as needed for 50px height */
  min-height: 30px; /* To ensure min-height for content */
  display: flex; /* Desktop-first: show navigation */
  align-items: center;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center; /* Center menu items */
  gap: 30px; /* Space between nav links */
  padding: 0 20px; /* Desktop padding */
}
.nav-link {
  color: #FFFFFF;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}
.nav-link:hover {
  color: #FCBC45; /* Highlight color on hover */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001; /* Above mobile buttons and overlay */
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

.hamburger-menu.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) 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 */
.site-footer {
  background-color: #000000; /* Primary color */
  color: #FFFFFF;
  padding: 40px 20px 20px;
  text-align: center;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
  text-align: left;
}
.footer-col {
  flex: 1;
  min-width: 180px; /* Minimum width for columns before wrapping */
  margin-bottom: 20px;
}
.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #FCBC45; /* Highlight color for headings */
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col ul li a {
  color: #FFFFFF;
  font-size: 14px;
  transition: color 0.3s ease;
}
.footer-col ul li a:hover {
  color: #FCBC45;
}
.copyright {
  margin-top: 30px;
  font-size: 14px;
  color: #BBBBBB;
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Mobile Header Top */
  .header-top {
    padding: 10px 0; /* Consistent padding */
  }
  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    width: 100%; /* Occupy full width */
    max-width: none; /* Remove max-width restriction */
    justify-content: space-between; /* Hamburger left, Logo center, empty space right */
  }
  .logo {
    flex: 1; /* Allow logo to take available space for centering */
    text-align: center; /* Center text logo */
    font-size: 24px;
  }
  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons */
  }
  .hamburger-menu {
    display: block; /* Show hamburger menu */
    order: -1; /* Place hamburger menu to the left */
  }
  /* Create an empty space on the right to balance the logo centering */
  .header-container::after {
    content: '';
    display: block;
    width: 30px; /* Match hamburger width */
    height: 24px; /* Match hamburger height */
  }

  /* Mobile Navigation Menu */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset)); /* Full height minus header */
    background-color: #222222; /* Darker background for mobile menu */
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease-in-out;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 999; /* Below hamburger, above overlay */
  }
  .main-nav.active {
    display: flex; /* Show menu */
    transform: translateX(0); /* Slide in */
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align menu items to left */
    gap: 15px;
    padding: 20px 15px; /* Mobile padding */
    width: 100%; /* Occupy full width */
    max-width: none; /* Remove max-width restriction */
  }
  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator for mobile links */
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile Navigation Buttons - Below Logo */
  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 12px;
    background-color: #000000; /* Same as header-top for consistency */
    padding: 10px 15px; /* Padding for buttons */
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 998; /* Below main nav, above content */
  }

  /* 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.7);
    z-index: 990; /* Below mobile menu */
    transition: opacity 0.3s ease;
    opacity: 0;
  }
  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Footer Mobile */
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-col {
    min-width: unset;
    width: 100%;
  }
  .footer-col ul {
    margin-bottom: 20px;
  }

  /* 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;
  }
}

/* No-scroll class for body when mobile 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;
  }
}
