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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-dark);
  background-color: #f4f4f4;
  padding-top: var(--header-offset); /* Apply header offset to body */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: var(--secondary-color); /* Deep Blue */
  transition: transform 0.3s ease-in-out;
  overflow-x: hidden; /* Prevent header content from causing horizontal scroll */
}

.header-top {
  display: flex;
  align-items: center;
  min-height: 60px; /* Desktop header-top height */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color); /* Gold */
  text-decoration: none;
  padding: 10px 0;
  display: block;
}

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

.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  background-color: var(--secondary-color); /* Deep Blue */
  padding: 10px 20px;
  box-sizing: border-box;
  min-height: 50px; /* Mobile button area height */
}

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

.btn-primary {
  background-color: var(--primary-color); /* Gold */
  color: var(--text-dark); /* Deep Blue */
}

.btn-primary:hover {
  background-color: #e6c200;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background-color: var(--secondary-color); /* Deep Blue */
  color: var(--text-light); /* White */
  border: 1px solid var(--primary-color); /* Gold border for contrast */
}

.btn-secondary:hover {
  background-color: #0d123d;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.main-nav {
  background-color: var(--primary-color); /* Gold */
  width: 100%;
  display: flex; /* Desktop default: flex */
  min-height: 50px; /* Desktop main-nav height */
}

.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;
  box-sizing: border-box;
}

.nav-link {
  color: var(--text-dark); /* Deep Blue */
  text-decoration: none;
  padding: 15px 20px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(26, 35, 126, 0.1); /* Slight deep blue tint on hover */
  color: var(--secondary-color); /* Deep Blue */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 25px;
  position: relative;
  cursor: pointer;
  z-index: 1002;
  margin-right: 15px;
}

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

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

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

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

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

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--secondary-color); /* Deep Blue */
  color: var(--text-light); /* White */
  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;
}

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

.footer-section h3 {
  color: var(--primary-color); /* Gold */
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 18px;
}

.footer-section p, .footer-section ul {
  margin: 0 0 10px 0;
  padding: 0;
  list-style: none;
}

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

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

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

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

.footer-bottom p {
  margin: 0;
  color: var(--text-light);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .site-header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    justify-content: space-between; /* Keep space-between for hamburger-logo-space */
  }

  .hamburger-menu {
    display: block;
    order: 1;
    margin-right: 0; /* Adjusted for flex centering of logo */
  }

  .logo {
    order: 2;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
  }

  .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-x: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center; /* Center buttons if only one */
  }

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

  .main-nav {
    display: none; /* Hide main nav by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100vh - var(--header-offset));
    background-color: var(--secondary-color); /* Deep Blue */
    flex-direction: column; /* Vertical menu */
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
  }

  .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: 20px 15px;
    width: 100%;
    max-width: none;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    color: var(--primary-color); /* Gold text on deep blue menu */
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

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

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

  body.no-scroll {
    overflow: hidden;
  }

  /* Ensure content images do not overflow */
  .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;
  }
}
