:root {
  --primary-dark-blue: #0A2342;
  --mid-dark-blue: #2D4B6C;
  --secondary-gold: #FFD700;
  --button-hover-gold: #E5C100;
  --text-light: #FFFFFF;
  --text-dark: #333333;
  --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) */
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  padding-top: var(--header-offset); /* Fixed header offset */
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column; /* Stacks header-top and main-nav on desktop as well, controlled by media query */
}

.header-top {
  background-color: var(--primary-dark-blue);
  height: 60px;
  display: flex;
  align-items: center;
}

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

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

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

.btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
  font-size: 14px;
  text-align: center;
}

.btn-login {
  background-color: #555;
  color: var(--text-light);
  border: 1px solid #555;
}

.btn-login:hover {
  background-color: #666;
  border-color: #666;
}

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

.btn-register:hover {
  background-color: var(--button-hover-gold);
  border-color: var(--button-hover-gold);
}

.main-nav {
  background-color: var(--mid-dark-blue);
  height: 50px;
  display: flex;
  align-items: center;
}

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

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  padding: 10px 0;
  font-weight: 500;
  font-size: 16px;
  transition: color 0.3s, background-color 0.3s;
  white-space: nowrap;
}

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

.hamburger-menu,
.mobile-nav-buttons,
.mobile-menu-overlay {
  display: none;
}

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

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

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

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

.footer-section p {
  margin: 0;
  line-height: 1.8;
}

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

.footer-section li a {
  color: var(--text-light);
  text-decoration: none;
  margin-bottom: 8px;
  display: block;
  transition: color 0.3s;
}

.footer-section li a:hover {
  color: var(--secondary-gold);
}

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

.footer-bottom p {
  margin: 0;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
  }

  .header-top {
    height: 60px;
    position: relative; /* For logo absolute positioning if needed, but flex handles it */
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    order: -1; /* Puts it on the far left */
  }

  .hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-gold);
    transition: all 0.3s ease-in-out;
  }

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

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

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

  .logo {
    flex: 1 !important; /* Allows logo to take available space for centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }

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

  .mobile-nav-buttons {
    display: flex;
    background-color: var(--primary-dark-blue);
    padding: 10px 0;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    height: 50px; /* Explicit height for offset calculation */
  }

  .mobile-nav-buttons .nav-container {
    width: 100%;
    max-width: none;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 15px;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; /* Will be covered by header-top and mobile-nav-buttons, JS adjusts */
    left: 0;
    width: 80%;
    max-width: 300px; /* Optional: limit mobile menu width */
    height: 100vh;
    background-color: var(--primary-dark-blue);
    flex-direction: column;
    transform: translateX(-100%); /* Off-screen */
    transition: transform 0.3s ease-out;
    z-index: 1001;
    overflow-y: auto;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: calc(60px + 50px + 20px) 20px 20px; /* Adjust padding to clear fixed header-top and mobile-nav-buttons */
    gap: 15px;
    width: 100%;
    max-width: none;
  }

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

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
  }

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

  /* Footer Mobile */
  .footer-container {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

  .footer-section {
    flex: 1 1 100%;
    margin-bottom: 15px;
  }

  .footer-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .footer-section li a {
    font-size: 13px;
    margin-bottom: 5px;
  }

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