/* Global Reset & Base Styles */
body {
  padding-top: 90px; /* Initial padding for fixed header height (header-top + main-nav on desktop, header-top + mobile-button-area on mobile) */
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden; /* Prevent horizontal scroll when mobile menu is off-screen */
}

body.no-scroll {
  overflow: hidden;
}

/* Site Header (Fixed) */
.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: #fff; /* Default background, will be covered by header-top and main-nav */
  min-height: 50px; /* Ensure content adaptation */
}

/* Header Top Area (Desktop First) */
.header-top {
  background-color: #0056b3; /* Darker blue */
  padding: 10px 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px; /* Desktop padding */
}

/* Logo */
.logo {
  font-family: 'Arial Black', Gadget, sans-serif;
  font-size: 28px;
  font-weight: bold;
  color: #ffc107; /* Yellow color for logo */
  text-decoration: none;
  white-space: nowrap;
}

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

/* Main Navigation Area (Desktop First) */
.main-nav {
  background-color: #f8f9fa; /* Light grey/white for contrast */
  padding: 10px 0;
  display: flex; /* Desktop: show as flex row */
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center; /* Center nav items */
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
}

.nav-link {
  color: #343a40; /* Dark text */
  text-decoration: none;
  padding: 8px 15px;
  font-weight: 600;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #007bff; /* Primary blue on hover */
  background-color: #e9ecef;
  border-radius: 4px;
}

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

.btn-login {
  background-color: #007bff; /* Primary blue */
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.btn-login:hover {
  background-color: #0056b3;
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}

.btn-register {
  background-color: #ffc107; /* Secondary yellow */
  color: #343a40; /* Dark text for contrast */
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
}

.btn-register:hover {
  background-color: #e0a800;
  box-shadow: 0 6px 15px rgba(255, 193, 7, 0.4);
}

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

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffc107; /* Yellow for visibility on dark background */
  margin: 5px 0;
  transition: all 0.3s ease;
}

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

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

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

/* Mobile Button Area (Hidden by default on desktop) */
.mobile-button-area {
  display: none; /* Hidden on desktop */
  background-color: #0069d9; /* A slightly lighter blue than header-top */
  padding: 8px 0;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  z-index: 998; /* Below hamburger and main nav */
}

.mobile-button-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 15px; /* Mobile padding */
}

/* Mobile Menu Overlay (Hidden by default) */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  cursor: pointer;
}

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

/* Footer Styles */
.site-footer {
  background-color: #212529; /* Dark background */
  color: #f8f9fa; /* Light text */
  padding: 40px 20px 20px;
  font-size: 14px;
  margin-top: 50px;
}

.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: #ffc107; /* Secondary yellow for headings */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-col p,
.footer-col a {
  color: #ced4da; /* Lighter grey for text */
  text-decoration: none;
  line-height: 1.8;
}

.footer-col a:hover {
  color: #007bff; /* Primary blue on hover */
}

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

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

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

/* Mobile Styles (Max-width: 768px) */
@media (max-width: 768px) {
  .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

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

  .header-container {
    width: 100%;
    max-width: none; /* CRITICAL: Mobile container full width */
    padding: 0 15px; /* Mobile padding */
    justify-content: center; /* Center logo by default */
    position: relative; /* For hamburger positioning */
  }

  .logo {
    font-size: 24px;
    flex-grow: 1; /* Allow logo to take available space */
    text-align: center; /* Center logo text */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    position: absolute;
    left: 15px; /* Align to left edge of container */
    top: 50%;
    transform: translateY(-50%);
  }

  .mobile-button-area {
    display: block; /* Show on mobile */
    position: relative; /* Normal flow below header-top */
    background-color: #0069d9;
    padding: 8px 0;
    z-index: 998;
  }

  .mobile-button-container {
    width: 100%;
    max-width: none; /* CRITICAL: Mobile container full width */
    padding: 0 15px;
    justify-content: center;
  }

  .main-nav {
    display: none; /* CRITICAL: Hidden by default for mobile, controlled by JS */
    flex-direction: column; /* Vertical alignment */
    position: fixed;
    top: 0; /* Align to top of viewport */
    left: 0;
    width: 75%; /* Slide in from left */
    height: 100%;
    background-color: #343a40; /* Dark background for mobile menu */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-out;
    padding-top: 84px; /* Space for fixed header content (header-top + mobile-button-area) */
    align-items: flex-start; /* Align menu items to left */
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* CRITICAL: Mobile container full width */
    flex-direction: column;
    align-items: flex-start;
    padding: 0; /* Remove padding from container, add to links */
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    color: #f8f9fa; /* Light text for dark menu */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }

  .nav-link:hover {
    background-color: #495057;
    color: #007bff;
  }

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

  .footer-col {
    min-width: unset; /* Remove min-width for mobile */
    text-align: center;
  }
  .footer-col h3 {
    text-align: center;
  }
  .footer-nav {
    text-align: center;
  }
  .footer-col p {
    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;
}
