:root {
  --primary-color: #0A2463;
  --secondary-color: #FFD700;
  --text-color-light: #FFFFFF;
  --text-color-dark: #333333;
  --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 */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content isn't hidden by fixed header */
  color: var(--text-color-dark);
  overflow-x: hidden;
}

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

/* Shared Container for Header and Footer */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

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

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

.btn-primary:hover {
  background-color: #e6c200;
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.6);
}

.btn-secondary {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
  box-shadow: 0 4px 10px rgba(10, 36, 99, 0.4);
}

.btn-secondary:hover {
  background-color: #071a4f;
  border-color: #e6c200;
  box-shadow: 0 6px 15px rgba(10, 36, 99, 0.6);
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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

.site-header .logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  padding: 5px 0;
  display: block;
  order: 1;
}

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

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

.main-nav {
  background-color: #1a3a7f; /* Slightly lighter blue, contrasting with header-top */
  padding: 0;
  min-height: 50px;
  display: flex; /* Desktop: show nav */
  align-items: center;
}

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

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

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
  order: 0;
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu .bar:nth-child(3) { bottom: 0; }

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

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

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

.footer-col {
  flex: 1;
  min-width: 180px;
  margin-bottom: 20px;
}

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

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

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

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

.footer-col ul li a:hover {
  color: var(--secondary-color);
}

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

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

/* Mobile 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-top {
    padding: 10px 0;
  }

  .header-top .header-container {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: none; /* Ensure full width on mobile */
    justify-content: space-between;
    position: relative;
  }

  .hamburger-menu {
    display: block;
    order: 0;
    margin-right: auto; /* Push logo to center */
  }

  .site-header .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Adjust based on hamburger/button space */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    background-color: #071a4f; /* Darker blue for mobile buttons area */
    gap: 10px;
    flex-wrap: nowrap;
    overflow: hidden;
    justify-content: center;
    align-items: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    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; /* Hidden by default on mobile, shown with JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Align with the bottom of the fixed header */
    left: 0;
    width: 280px;
    height: calc(100vh - var(--header-offset));
    background-color: var(--primary-color);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    z-index: 1000;
  }

  .main-nav.active {
    display: flex; /* MUST be flex to show */
    transform: translateX(0); /* Slide in */
  }

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

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

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

  .footer-col {
    flex-basis: 45%; /* Two columns on mobile */
    min-width: unset;
  }

  .site-footer .footer-container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .footer-bottom .footer-container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Tablet styles for better spacing */
@media (min-width: 769px) and (max-width: 1024px) {
  .header-container, .nav-container, .footer-container {
    padding-left: 30px;
    padding-right: 30px;
  }

  .main-nav .nav-container {
    gap: 15px;
  }

  .nav-link {
    font-size: 15px;
  }

  .btn {
    padding: 8px 15px;
    font-size: 14px;
  }

  .site-header .logo {
    font-size: 22px;
  }
}

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