:root {
  --header-offset: 120px; /* Desktop: Header + button area total height */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 130px; /* Mobile: Header top (logo/hamburger) + mobile buttons area total height */
  }
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #333;
  line-height: 1.6;
}

/* Global Container for consistency */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Site Header - Fixed Navigation (Desktop First) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent; /* Handled by header-top and main-nav */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Stacks header-top and main-nav */
}

.header-top {
  background-color: #0A2463; /* Primary Deep Blue */
  padding: 15px 0;
  display: flex;
  align-items: center;
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #E0A441; /* Gold */
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 0; /* Ensures it has some height */
}

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

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

.btn-register {
  background: linear-gradient(90deg, #E0A441, #FFD700);
  color: #0A2463;
  box-shadow: 0 4px 15px rgba(224, 164, 65, 0.4);
}
.btn-register:hover {
  background: linear-gradient(90deg, #FFD700, #E0A441);
  box-shadow: 0 6px 20px rgba(224, 164, 65, 0.6);
  transform: translateY(-2px);
}

.btn-login {
  background-color: transparent;
  color: #E0A441;
  border: 2px solid #E0A441;
}
.btn-login:hover {
  background-color: #E0A441;
  color: #0A2463;
  transform: translateY(-2px);
}

.btn-download {
  background-color: #0A2463;
  color: #E0A441;
  border: 2px solid #E0A441;
}
.btn-download:hover {
  background-color: #E0A441;
  color: #0A2463;
  transform: translateY(-2px);
}

/* Main Navigation (Desktop First) */
.main-nav {
  background-color: #1C1C1C; /* Very Dark Grey */
  padding: 10px 0;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  align-items: center;
  justify-content: center;
  flex-grow: 1; /* Allows it to take available space */
}

.main-nav .nav-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 8px 15px;
  transition: color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
  border-radius: 5px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #E0A441; /* Gold */
  background-color: rgba(224, 164, 65, 0.1);
  transform: translateY(-2px);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  width: 40px;
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.hamburger-menu .bar {
  display: block;
  width: 30px;
  height: 3px;
  background-color: #E0A441; /* Gold */
  transition: all 0.3s ease;
  border-radius: 2px;
}

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

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

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

/* Mobile specific elements (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default 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;
  transition: opacity 0.3s ease;
}

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

/* Footer */
.site-footer {
  background-color: #0A2463; /* Primary Deep Blue */
  color: #FFFFFF;
  padding: 40px 0;
  font-size: 14px;
}

.site-footer .footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-column {
  flex: 1;
  min-width: 200px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #E0A441; /* Gold */
  text-decoration: none;
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

.footer-column h3 {
  font-size: 18px;
  color: #E0A441; /* Gold */
  margin-bottom: 20px;
  text-transform: uppercase;
}

.footer-column p {
  margin-bottom: 10px;
  color: #ccc;
}

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

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

.site-footer .footer-nav a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer .footer-nav a:hover {
  color: #E0A441; /* Gold */
}

/* Mobile Styles (Overrides Desktop) */
@media (max-width: 768px) {
  .header-container, .nav-container, .footer-container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: none; /* Crucial for mobile full width */
    width: 100%;
  }

  .site-header {
    flex-direction: column;
  }

  .header-top {
    padding: 10px 0;
    position: relative; /* For logo absolute positioning */
    align-items: center;
  }
  
  .header-top .header-container {
    justify-content: space-between;
    position: relative;
  }

  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Adjust based on hamburger/button width */
    font-size: 24px;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: -1; /* Move to left */
    margin-right: auto;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Stack vertically */
    position: fixed;
    top: var(--header-offset); /* Below header-top and mobile-nav-buttons */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: #0A2463; /* Primary Deep Blue for mobile menu */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Off-screen */
    transition: transform 0.3s ease;
    padding: 20px 0;
    overflow-y: auto;
    z-index: 999;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-radius: 5px;
    text-align: left;
    color: #FFFFFF;
    font-size: 17px;
  }

  .nav-link:hover, .nav-link.active {
    background-color: rgba(224, 164, 65, 0.2);
    color: #E0A441;
  }

  .mobile-nav-buttons {
    display: flex; /* Show on mobile */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: #1C1C1C; /* Darker background for buttons */
    width: 100%;
    flex-wrap: wrap;
  }

  .mobile-nav-buttons .btn {
    flex: 1 1 auto; /* Allow buttons to grow/shrink */
    max-width: 120px; /* Limit max width for smaller screens */
    font-size: 14px;
    padding: 8px 15px;
  }

  .site-footer .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
  }

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

  .footer-column h3 {
    margin-top: 0;
  }

  .site-footer .footer-nav {
    padding-left: 0;
  }

  .site-footer .footer-nav li {
    display: inline-block;
    margin: 0 8px 8px 8px;
  }
  .site-footer .footer-nav a {
    white-space: nowrap;
  }
}

/* Ensure body doesn't scroll 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;
}
