:root {
  --primary-color: #0A2463;
  --secondary-color: #E3B23C;
  --text-light: #ffffff;
  --text-dark: #333333;
  --header-top-bg: var(--primary-color);
  --main-nav-bg: var(--secondary-color);
  --btn-login-bg: var(--secondary-color);
  --btn-register-bg: #FFD700;
  --btn-text-color: var(--primary-color);
  --footer-bg: var(--primary-color);
  --footer-text: var(--text-light);
  --header-offset: 100px; /* Desktop: header-top (60px) + main-nav (40px) */
}

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

/* Base Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  color: var(--text-dark);
  line-height: 1.6;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 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 */
}

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

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 30px; /* Approximate content height for offset calculation */
}

.logo {
  color: var(--secondary-color);
  font-size: 2.2em;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is visible by default */
}

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

.btn {
  background-color: var(--btn-login-bg);
  color: var(--btn-text-color);
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

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

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  display: flex; /* Desktop: visible and horizontal */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center;
  align-items: center;
  gap: 25px;
  height: 20px; /* Approximate content height for offset calculation */
}

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

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

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

/* Site Footer */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 40px 20px 20px;
  font-size: 0.9em;
}

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

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

.footer-column h3 {
  color: var(--secondary-color);
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.2em;
}

.footer-column p {
  margin-bottom: 10px;
}

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

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

.footer-nav a {
  color: var(--footer-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* Mobile Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Ensure full width on mobile */
    height: 30px; /* Approximate content height for offset calculation */
  }

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

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

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

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

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

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

  .logo {
    flex: 1 !important; /* Ensure logo takes available space for centering */
    text-align: center;
    font-size: 1.8em;
  }

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

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--header-top-bg);
    width: 100%;
    height: 30px; /* Approximate content height for offset calculation */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header parts */
    left: 0;
    width: 80%; /* Adjust as needed */
    height: calc(100% - var(--header-offset));
    background-color: var(--main-nav-bg);
    flex-direction: column;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 1000; /* Below overlay, above body */
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  }

  .main-nav.active {
    display: flex; /* Must set display to make it visible */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 0; /* Remove gap for vertical list */
  }

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

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

  .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.5);
    z-index: 999; /* Below main-nav */
  }

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

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

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

  /* Mobile content overflow prevention */
  .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;
  }
}
