:root {
  --primary-color: #0A192F;
  --accent-color: #FFD700;
  --text-color-light: #F0F2F5;
  --text-color-dark: #0A192F;
  --header-offset: 120px; /* Desktop: header-top (~70px) + main-nav (~50px) */
}

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

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

/* Header Styles */
.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); /* Primary Dark Blue */
  padding: 10px 0; /* Creates ~70px height with 50px min-height content */
  min-height: 50px;
  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; /* Ensure logo and buttons are not tight to edge */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-color);
  text-decoration: none;
  padding: 5px 0;
  display: block;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  font-size: 15px;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-login {
  background-color: var(--accent-color); /* Gold */
  color: var(--text-color-dark); /* Dark text for contrast */
}

.btn-login:hover {
  background-color: #E6C200; /* Slightly darker gold */
  transform: translateY(-1px);
}

.btn-register {
  background-color: var(--primary-color); /* Dark Blue */
  color: var(--accent-color); /* Gold text for contrast */
  border: 1px solid var(--accent-color);
}

.btn-register:hover {
  background-color: #050F1A; /* Slightly darker primary */
  transform: translateY(-1px);
}

.main-nav {
  background-color: #1A2A3D; /* Darker Greyish Blue, distinct from header-top */
  padding: 10px 0; /* Creates ~50px height with 30px min-height content */
  min-height: 30px;
  display: flex; /* Desktop default: flex */
  justify-content: center;
  align-items: center;
}

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

.nav-link {
  color: var(--text-color-light);
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
}

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

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

.nav-link:hover {
  color: var(--accent-color);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Above mobile-nav-buttons */
}

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

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

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

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

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

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

.footer-section {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}

.footer-section h3 {
  color: var(--accent-color);
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 5px;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent-color);
}

.footer-section p {
  line-height: 1.8;
  color: #CCC;
}

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

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

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

.footer-section ul li a:hover {
  color: var(--accent-color);
}

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

.footer-bottom p {
  margin: 0;
  color: #AAA;
}

/* Mobile specific styles */
@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;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-top {
    width: 100%;
    padding: 10px 0; /* Adjust padding for ~60px height */
    min-height: 40px;
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    width: 100%;
    max-width: none; /* Crucial: no max-width on mobile */
    justify-content: space-between;
  }

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

  .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);
  }

  .logo {
    order: 2; /* Place logo second */
    flex: 1 !important; /* Image logo centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    padding: 0;
  }

  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    width: 100%;
    background-color: #1A2A3D; /* Different background for button area */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-height: 30px;
  }

  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute buttons evenly */
    max-width: 150px;
    text-align: center;
    font-size: 14px;
    padding: 8px 15px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout for mobile menu */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--primary-color);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-out;
    align-items: flex-start; /* Align menu items to the left */
    padding: 20px 0;
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column; /* Vertical links */
    align-items: flex-start; /* Align to left */
    gap: 0; /* Remove gap for vertical list */
    padding: 0 20px;
    width: 100%;
    max-width: none; /* Crucial: no max-width on mobile */
  }

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

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

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

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

  .footer-section {
    min-width: auto;
    width: 100%;
  }

  .footer-bottom {
    padding-top: 15px;
    margin-top: 20px;
  }
}
/* 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;
  }
}
