:root {
  --primary-color: #003366;
  --auxiliary-color: #FFD700;
  --text-light: #FFFFFF;
  --text-dark: #333333;
  --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) */
  }
}

/* Global styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  background-color: #f4f4f4;
  color: var(--text-dark);
}

a {
  text-decoration: none;
  color: inherit;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline for buttons */
  border: none;
}

.btn-register {
  background-color: var(--auxiliary-color); /* Gold */
  color: var(--primary-color); /* Deep blue */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-register:hover {
  background-color: #e0c000; /* Slightly darker gold */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-login {
  background-color: var(--primary-color); /* Deep blue */
  color: var(--auxiliary-color); /* Gold */
  border: 1px solid var(--auxiliary-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-login:hover {
  background-color: #002244; /* Slightly darker blue */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header styles (Desktop First) */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
  background-color: var(--primary-color); /* Deep blue */
  color: var(--text-light);
  min-height: 60px; /* Ensure sufficient height */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--auxiliary-color); /* Gold */
  text-transform: uppercase;
  display: block; /* Ensure logo is visible */
}

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

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

.main-nav {
  background-color: var(--auxiliary-color); /* Gold */
  min-height: 50px; /* Ensure sufficient height */
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  align-items: center;
  position: static; /* Desktop default: static */
}

.main-nav .nav-container {
  display: flex;
  justify-content: center; /* Center nav links on desktop */
  align-items: center;
  width: 100%;
  padding-top: 10px;
  padding-bottom: 10px;
}

.nav-link {
  color: var(--primary-color); /* Deep blue */
  padding: 8px 15px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(0, 51, 102, 0.1); /* Light blue tint on hover */
  border-radius: 3px;
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001; /* Above logo on mobile */
  margin-right: 20px;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--auxiliary-color);
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 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-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: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

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

.site-footer h3 {
  color: var(--auxiliary-color); /* Gold */
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
}

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

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

.footer-column p {
  line-height: 1.6;
}

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

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

.footer-nav a {
  color: var(--text-light);
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--auxiliary-color); /* Gold */
}

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

/* Mobile-specific styles */
@media (max-width: 768px) {
  /* Header adjustments */
  .header-container, .nav-container, .footer-container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: none; /* Important: remove max-width for mobile containers */
    width: 100%; /* Ensure containers fill width */
  }

  .header-top .header-container {
    justify-content: space-between; /* Hamburger left, Logo center, space right */
    position: relative; /* For logo centering */
    min-height: 60px;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Place hamburger first */
  }

  .logo {
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important;
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    order: 2; /* Place logo second */
    font-size: 24px;
    margin-right: 0; /* Reset margin */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Add padding to the button container */
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background-color: var(--primary-color); /* Match header-top background */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Account for gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hide nav by default on mobile */
    flex-direction: column; /* Stack nav links vertically */
    position: fixed; /* Fixed position for mobile menu */
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 250px; /* Width of the sliding menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--primary-color); /* Deep blue for mobile menu */
    transform: translateX(-100%); /* Hide off-screen to the left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align links to the left */
    padding: 20px 0;
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    color: var(--text-light); /* White text on deep blue */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  /* Footer adjustments */
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

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