:root {
  --primary-color: #FFD700;
  --secondary-color: #000080;
  --header-top-bg: #000040; /* Darker navy for top bar */
  --main-nav-bg: #FFD700; /* Gold for main nav */
  --text-on-dark: #FFD700;
  --text-on-light: #000080;
  --header-offset: 100px; /* Desktop: header-top (55px) + main-nav (45px) */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: #f4f4f4;
  color: #333;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Shared Container Styles */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.header-top {
  background-color: var(--header-top-bg);
  padding: 15px 0;
  color: var(--text-on-dark);
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-on-dark);
  text-decoration: none;
  white-space: nowrap;
}

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

/* Main Navigation */
.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  display: flex; /* Desktop default: visible, horizontal */
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.main-nav .nav-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

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

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-primary {
  background: linear-gradient(to right, #FFD700, #FFA500);
  color: var(--secondary-color);
  border: none;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(to right, #FFA500, #FFD700);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

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

.btn-secondary:hover {
  background-color: #000060; /* Slightly lighter navy */
  border-color: #FFA500;
}

/* Hamburger Menu (Desktop - Hidden) */
.hamburger-menu {
  display: none;
}

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

/* Mobile Menu Overlay (Desktop - Hidden) */
.mobile-menu-overlay {
  display: none;
}

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

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

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

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

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

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

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

.footer-nav a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

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

  .header-container, .nav-container, .footer-container {
    padding: 0 15px;
    max-width: none; /* Remove max-width on mobile */
    width: 100%; /* Ensure container takes full width */
  }

  /* Header Top Bar */
  .header-top .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .hamburger-menu {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1001;
  }

  .hamburger-icon, .hamburger-icon::before, .hamburger-icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    position: absolute;
    transition: all 0.3s ease;
  }

  .hamburger-icon {
    top: 50%;
    transform: translateY(-50%);
  }

  .hamburger-icon::before {
    top: -8px;
  }

  .hamburger-icon::after {
    top: 8px;
  }

  .hamburger-menu.active .hamburger-icon {
    background-color: transparent;
  }

  .hamburger-menu.active .hamburger-icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .hamburger-menu.active .hamburger-icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .logo {
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    text-align: center;
    max-width: calc(100% - 60px); /* Account for hamburger menu width */
  }

  .desktop-nav-buttons {
    display: none;
  }

  /* Mobile Buttons */
  .mobile-nav-buttons {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--secondary-color); /* Background for mobile buttons */
    justify-content: center;
  }

  .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;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Mobile Navigation Menu */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Start below the header */
    left: 0;
    width: 70%; /* Adjust as needed */
    height: calc(100% - var(--header-offset));
    background-color: var(--main-nav-bg);
    flex-direction: column;
    align-items: flex-start;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    width: 100%;
    gap: 15px;
  }

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

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

  /* Mobile Menu Overlay */
  .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: 999;
    transition: opacity 0.3s ease-out;
    opacity: 0;
  }

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

  /* Footer */
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

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

  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
  }

  .footer-nav li {
    margin-bottom: 0;
  }

  .footer-nav a {
    white-space: nowrap;
  }
}

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