/* Base Styles */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --dark-red-variant: #6F0000;
  --light-gold-variant: #FFE066;
  --text-color-dark: #333;
  --text-color-light: #fff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  /* CRITICAL: Default padding for desktop (header-top + main-nav) */
  padding-top: 100px; /* This will be dynamically adjusted by JS */
}

body.no-scroll {
  overflow: hidden;
}

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background-color: var(--dark-red-variant); /* Fallback, individual sections will override */
}

/* Header Top Section */
.header-top {
  background-color: var(--dark-red-variant); /* Distinct from main-nav */
  padding: 10px 0;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.desktop-logo {
  display: block; /* Visible on desktop */
}

.mobile-logo,
.mobile-header-main,
.mobile-fixed-buttons,
.hamburger-menu,
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

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

/* Main Navigation Section */
.main-nav {
  background-color: var(--primary-color); /* Distinct from header-top */
  width: 100%;
  display: flex; /* CRITICAL: Default visible on desktop */
  justify-content: center;
  padding: 10px 0;
  flex-direction: row; /* CRITICAL: Default horizontal on desktop */
  position: static; /* CRITICAL: Default static on desktop */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--dark-red-variant);
  text-decoration: none;
  padding: 8px 15px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: var(--light-gold-variant);
  border-radius: 5px;
  color: var(--secondary-color);
}

/* 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;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-login {
  background-color: var(--primary-color);
  color: var(--dark-red-variant);
}

.btn-login:hover {
  background-color: var(--light-gold-variant);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-register {
  background-color: var(--secondary-color);
  color: var(--text-color-light);
}

.btn-register:hover {
  background-color: var(--dark-red-variant);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Hamburger Menu */
.hamburger-menu {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  position: relative;
  z-index: 1002; /* Above overlay */
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
  border-radius: 2px;
}

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

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

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  visibility: visible;
  opacity: 1;
}

/* Footer Styles */
.site-footer {
  background-color: #333;
  color: #f4f4f4;
  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-section {
  flex: 1;
  min-width: 250px;
}

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

.footer-section p,
.footer-section ul {
  margin-bottom: 10px;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li a {
  color: #f4f4f4;
  text-decoration: none;
  padding: 5px 0;
  display: block;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: #aaa;
}

/* Responsive Styles */
@media (max-width: 768px) {
  body {
    /* CRITICAL: Adjust padding for mobile fixed header (header-top + mobile-fixed-buttons) */
    padding-top: 120px; /* Example: ~60px for header-top, ~60px for mobile-fixed-buttons. Adjusted dynamically by JS. */
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between;
    width: 100%; /* CRITICAL: Must be 100% width */
    max-width: none; /* CRITICAL: No max-width */
  }

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

  .mobile-header-main {
    display: flex; /* Show mobile header elements */
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }

  .mobile-logo {
    display: block; /* Ensure mobile logo is visible */
    flex-grow: 1; /* Allow logo to take available space */
    text-align: center;
    padding-right: 40px; /* Offset hamburger button width for centering */
  }
  
  .hamburger-menu {
    display: flex; /* Show hamburger menu */
  }

  .mobile-fixed-buttons {
    display: block; /* Show mobile-specific button area */
    background-color: var(--dark-red-variant); /* Same as header-top for consistency */
    padding: 10px 0;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .mobile-fixed-buttons .button-container {
    width: 100%; /* CRITICAL: Must be 100% width */
    max-width: none; /* CRITICAL: No max-width */
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 15px;
  }

  .main-nav {
    position: fixed;
    top: 0; /* CRITICAL: Will be dynamically adjusted by JS to be below fixed header */
    left: 0;
    width: 280px; /* Sidebar width */
    height: 100%;
    background-color: #222; /* Dark background for mobile menu */
    flex-direction: column; /* CRITICAL: Vertical layout for mobile menu */
    padding-top: 20px; /* Space from top */
    transform: translateX(-100%); /* CRITICAL: Hidden by default */
    transition: transform 0.3s ease;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1001; /* Above overlay */
    display: none; /* CRITICAL: Default hidden state */
  }
  
  .main-nav.active {
    transform: translateX(0); /* CRITICAL: Visible when active */
    display: flex; /* CRITICAL: Display when active */
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%; /* CRITICAL: Must be 100% width */
    max-width: none; /* CRITICAL: No max-width */
  }

  .nav-link {
    color: var(--text-color-light);
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-section {
    min-width: unset;
    width: 100%;
  }
}
/* 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;
}
