:root {
  --primary-color: #1A2E4E;
  --secondary-color: #FFD700;
  --header-offset: 110px; /* Desktop: header-top 60px + main-nav 50px */
}

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

/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

.page-content img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
}
.page-content {
  overflow-x: hidden;
  max-width: 100%;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: var(--primary-color); /* Default background for entire header */
}

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

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

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

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

.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;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-register {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.btn-register:hover {
  background-color: #e6c200;
}

.btn-login {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
}

.btn-login:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

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

.main-nav {
  background-color: var(--secondary-color); /* Bright Gold */
  min-height: 50px;
  display: flex; /* Desktop: always visible */
  align-items: center;
  padding: 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  gap: 25px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  padding: 15px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #000;
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1002;
  padding: 0;
  margin-right: 15px; /* Spacing from logo */
  flex-shrink: 0;
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 3px;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

.hamburger-menu .bar:last-child {
  margin-bottom: 0;
}

/* Mobile Menu Overlay */
.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;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Site Footer */
.site-footer {
  background-color: var(--primary-color);
  color: #fff;
  padding: 40px 20px 20px;
  font-size: 14px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col {
  flex: 1;
  min-width: 250px;
  max-width: 30%;
}

.footer-logo {
  color: var(--secondary-color);
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

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

.site-footer p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
}

.footer-nav {
  list-style: none;
}

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-container,
  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0 15px; /* Smaller padding for mobile */
  }

  .header-top {
    justify-content: space-between;
    padding: 10px 0;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
  }

  .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 {
    flex: 1 !important; /* Force logo to take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0;
    padding: 0;
    font-size: 24px;
  }

  .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; /* Padding for the button container */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--primary-color); /* Same as header-top for consistency */
    justify-content: center;
    align-items: center;
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset)); /* Take full height below header */
    background-color: var(--primary-color);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    padding: 20px 0;
    z-index: 1001;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    gap: 0;
  }

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

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

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

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

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

  .footer-logo {
    text-align: center;
  }
  .site-footer h3 {
    text-align: center;
  }
  .footer-nav {
    text-align: center;
  }
  .site-footer p {
    text-align: center;
  }
}

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