:root {
  --primary-color: #004aad;
  --secondary-color: #ffcc00;
  --header-offset: 95px; /* Desktop: header-top (55px) + main-nav (40px) */
}

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

* {
  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);
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

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

.header-top {
  background-color: #003a80; /* Darker blue, contrasting with main-nav */
  padding: 15px 0;
  display: flex;
  align-items: center;
  min-height: 55px; /* Ensure content fits */
}

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

.logo {
  color: #fff;
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 1px;
  white-space: nowrap;
  display: block;
}

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

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

.btn-login {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-login:hover {
  background-color: #002a66;
  transform: translateY(-2px);
}

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

.btn-register:hover {
  background-color: #e6b800;
  transform: translateY(-2px);
}

.main-nav {
  background-color: var(--secondary-color); /* Golden, contrasting with header-top */
  padding: 10px 0;
  display: flex;
  justify-content: center;
  min-height: 40px; /* Ensure content fits */
}

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

.nav-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  padding: 8px 0;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  white-space: nowrap;
  font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
  color: #002a66;
  border-bottom: 2px solid #002a66;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
}

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

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

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

.footer-section {
  flex: 1;
  min-width: 200px;
}

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

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

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

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

.footer-section ul li 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);
}

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

/* --- Mobile Styles --- */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    max-width: none;
    width: 100%;
    justify-content: space-between;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 1.5rem;
    order: 2; /* Logo in center */
  }

  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .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;
    order: 1; /* Hamburger on left */
  }

  .hamburger-menu:focus {
    outline: none;
  }

  .hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #fff;
    transition: all 0.3s ease;
  }

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

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

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

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: var(--primary-color);
    transform: translateX(-100%); /* Off-screen */
    transition: transform 0.3s ease;
    padding-top: 100px; /* Space for header content */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
  }

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

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

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

  .nav-link:hover,
  .nav-link.active {
    color: var(--secondary-color);
    border-bottom: 1px solid var(--secondary-color);
  }

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    background-color: #003a80; /* Match header-top background */
    padding: 10px 15px;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-height: 60px; /* Ensure content fits */
  }

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

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

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 15px;
  }

  .footer-section {
    width: 100%;
    margin-bottom: 20px;
  }

  .footer-section ul {
    padding: 0;
  }

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