:root {
  --primary-color: #FFD700;
  --secondary-color: #000080;
  --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) */
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

/* Shared Link Styles */
a {
  text-decoration: none;
  color: inherit;
}

/* 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.1);
  display: flex;
  flex-direction: column;
}

.header-top {
  background-color: var(--secondary-color); /* Midnight Blue */
  padding: 15px 0;
  min-height: 60px;
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color); /* Gold */
  text-transform: uppercase;
  display: block;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.btn-login {
  background-color: var(--primary-color); /* Gold */
  color: var(--secondary-color); /* Midnight Blue */
}

.btn-login:hover {
  background-color: #e6c200; /* Slightly darker gold */
  transform: translateY(-2px);
}

.btn-register {
  background-color: var(--secondary-color); /* Midnight Blue */
  color: var(--primary-color); /* Gold */
  border: 1px solid var(--primary-color);
}

.btn-register:hover {
  background-color: #000066; /* Slightly darker midnight blue */
  transform: translateY(-2px);
}

.main-nav {
  background-color: var(--primary-color); /* Gold */
  padding: 10px 0;
  min-height: 40px;
  display: flex; /* Desktop default: flex */
  justify-content: center;
  align-items: center;
}

.main-nav .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;
  gap: 25px;
}

.nav-link {
  color: var(--secondary-color); /* Midnight Blue */
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #fff;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--primary-color); /* Gold */
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

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

/* Site Footer */
.site-footer {
  background-color: var(--secondary-color); /* Midnight Blue */
  color: #fff;
  padding: 40px 20px 20px;
  font-size: 0.9rem;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
  text-align: left;
  margin-bottom: 30px;
}

.footer-col {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.footer-col h3, .footer-col h4 {
  color: var(--primary-color); /* Gold */
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.footer-col p {
  margin-bottom: 15px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  color: #ccc;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-top: 20px;
  color: #ccc;
}

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

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: -1; /* Place it at the beginning */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 1.5rem;
  }

  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--secondary-color); /* Midnight Blue */
    min-height: 50px;
  }

  .main-nav {
    display: none; /* Hide main nav by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset));
    background-color: var(--secondary-color); /* Midnight Blue */
    overflow-y: auto;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    padding: 20px 0;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .nav-link {
    color: #fff;
    font-size: 1.1rem;
    width: 100%;
    padding: 10px 20px;
  }

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

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

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

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

  .footer-nav {
    align-items: center;
  }

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