:root {
  --primary-color: #0A1931;
  --secondary-color: #FFD700;
  --dark-blue-variant: #1A2B47;
  --text-color-light: #f0f0f0;
  --text-color-dark: #333;
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --mobile-button-area-height: 50px;
  --header-height-desktop: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop));
  --header-height-mobile: calc(var(--header-top-height-desktop) + var(--mobile-button-area-height));
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-light);
  background-color: #0D1F3F; /* A slightly lighter background for main content */
  padding-top: var(--header-height-desktop); /* Global padding for fixed header */
}

body.no-scroll {
  overflow: hidden;
}

/* Site Header - Fixed and Floating */
.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(--primary-color); /* Fallback, but specific areas will override */
}

.site-header .header-top {
  background-color: var(--primary-color); /* Distinct from main-nav */
  min-height: var(--header-top-height-desktop); /* Ensure sufficient height */
  display: flex;
  align-items: center;
}

.site-header .header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px; /* Padding for logo and buttons */
}

.site-header .logo {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 28px;
  font-weight: bold;
  text-transform: uppercase; /* As per instruction for Latin script */
  letter-spacing: 1px;
  display: block; /* Ensure logo is visible */
}

.site-header .desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.site-header .btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  font-size: 16px;
  text-align: center;
}

.site-header .btn-login {
  background-color: #555;
  color: var(--text-color-light);
}

.site-header .btn-login:hover {
  background-color: #777;
  transform: translateY(-2px);
}

.site-header .btn-register {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.site-header .btn-register:hover {
  background-color: #FFEA00;
  transform: translateY(-2px);
}

.site-header .main-nav {
  background-color: var(--dark-blue-variant); /* Distinct from header-top */
  min-height: var(--main-nav-height-desktop); /* Ensure sufficient height */
  display: flex;
  align-items: center;
}

.site-header .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center; /* Center menu items */
  padding: 0 30px;
}

.site-header .nav-link {
  color: var(--text-color-light);
  text-decoration: none;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: var(--secondary-color);
  background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Above logo */
  order: 0; /* Leftmost */
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

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

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

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

.mobile-button-area {
  display: none; /* Hidden on desktop */
}

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

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

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color);
  color: var(--text-color-light);
  padding: 40px 0 20px;
  font-size: 15px;
}

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.site-footer .footer-col {
  flex: 1;
  min-width: 250px;
}

.site-footer .footer-col h3 {
  color: var(--secondary-color);
  font-size: 20px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

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

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

.site-footer .footer-col ul li a,
.site-footer .footer-col p a {
  color: var(--text-color-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer .footer-col ul li a:hover,
.site-footer .footer-col p a:hover {
  color: var(--secondary-color);
}

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

.site-footer .footer-bottom p {
  margin: 0;
}

/* Mobile Styles */
@media (max-width: 768px) {
  body {
    padding-top: var(--header-height-mobile); /* Override for mobile */
  }

  .site-header .header-container,
  .site-header .mobile-button-area > .header-container,
  .site-footer .footer-container {
    padding: 0 15px; /* Smaller padding on mobile */
    max-width: none; /* Important: remove max-width on mobile */
    width: 100%;
  }

  .site-header .header-top {
    min-height: var(--header-top-height-desktop); /* Consistent height */
  }

  .site-header .header-container {
    justify-content: space-between;
  }

  .site-header .logo {
    font-size: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    order: 1;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 0; /* Position to the left */
    position: relative; /* For z-index to work */
    z-index: 1002; /* Above logo and mobile buttons */
  }

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

  .mobile-button-area {
    display: flex; /* Show mobile buttons */
    background-color: var(--primary-color);
    padding: 10px 0;
    min-height: var(--mobile-button-area-height);
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative; /* Ensure z-index works */
    z-index: 1000; /* Below hamburger, above main content */
  }

  .mobile-button-area .btn {
    font-size: 15px;
    padding: 8px 15px;
  }

  .site-header .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-height-mobile); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 280px; /* Mobile menu width */
    height: calc(100% - var(--header-height-mobile)); /* Full height below header */
    background-color: var(--dark-blue-variant);
    overflow-y: auto;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    padding: 20px 0;
  }

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

  .site-header .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }

  .site-header .nav-link {
    width: 100%;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

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

  .site-footer .footer-col {
    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;
}
