:root {
  --primary-color: #0A192F;
  --secondary-color: #FFD700;
  --text-light: #FFFFFF;
  --text-dark: #333333; /* For gold buttons */
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 120px; /* Mobile: header-top (60px) + mobile-nav-buttons (60px) */
  }
}

/* Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

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

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5em;
  color: var(--primary-color);
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: var(--text-light); /* Base for header, will be overridden by sections */
}

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

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Gold */
  padding: 10px 0;
  display: block; /* Ensure it's treated as a block for styling */
}

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

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

.btn-register {
  background-color: var(--secondary-color); /* Gold */
  color: var(--primary-color); /* Deep Blue text for contrast */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-register:hover {
  background-color: #e6c200; /* Slightly darker gold */
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-login {
  background-color: #5a6a7c; /* A softer blue/grey for login, contrasting but not as prominent as register */
  color: var(--text-light); /* White text */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-login:hover {
  background-color: #4a5a6c;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  background-color: #1A2B42; /* A darker blue for mobile button bar */
  padding: 10px 15px;
  box-sizing: border-box;
  width: 100%;
  justify-content: space-between;
  gap: 10px;
}

.main-nav {
  background-color: #1A2B42; /* Slightly lighter blue than header-top */
  min-height: 50px;
  display: flex; /* Desktop default */
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  box-sizing: border-box;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row; /* Desktop default */
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 0 20px;
  box-sizing: border-box;
}

.nav-link {
  color: var(--text-light); /* White text */
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color); /* Gold underline */
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--secondary-color); /* Gold on hover */
}

.nav-link:hover::after {
  width: 100%;
}

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

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--secondary-color); /* Gold lines */
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 9px; }
.hamburger-menu span:nth-child(3) { top: 18px; }

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.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;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color); /* Deep Blue */
  color: var(--text-light); /* White text */
  padding: 40px 20px;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
  text-align: left;
}

.footer-col {
  flex: 1;
  min-width: 250px; /* Minimum width for columns before wrapping */
}

.footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Gold */
  display: block;
  margin-bottom: 15px;
}

.site-footer h3 {
  color: var(--secondary-color); /* Gold */
  margin-bottom: 20px;
  font-size: 18px;
}

.site-footer p {
  font-size: 14px;
  line-height: 1.8;
  color: #CCCCCC; /* Lighter grey for general text */
}

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

.site-footer ul li a {
  color: #CCCCCC; /* Lighter grey for links */
  transition: color 0.3s ease;
  font-size: 14px;
}

.site-footer ul li a:hover {
  color: var(--secondary-color); /* Gold on hover */
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
  }
  
  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Position left */
  }

  .logo {
    order: 2; /* Center logo on mobile */
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
    padding: 0; /* Remove padding that might affect centering */
  }

  .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;
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Keep buttons in one line */
  }

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

  .main-nav {
    display: none; /* Hidden by default, shown by JS */
    flex-direction: column; /* Vertical menu */
    position: fixed; /* Fixed for mobile menu */
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--primary-color); /* Primary color for mobile menu */
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    align-items: flex-start; /* Align items to start */
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }

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

  .nav-container {
    flex-direction: column; /* Vertical links */
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    padding: 0 20px;
    max-width: none; /* No max-width on mobile containers */
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator for links */
  }

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

  .nav-link::after {
    display: none; /* Hide underline for mobile */
  }

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

  .footer-col {
    min-width: unset; /* Remove min-width for mobile */
    width: 100%;
  }

  .footer-col h3 {
    margin-top: 20px;
  }

  .footer-logo {
    font-size: 24px;
  }
  
  /* Mobile content overflow prevention */
  .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;
  }
}
