:root {
  --primary-color: #000000;
  --secondary-color: #FFFFFF;
  --login-btn-color: #FCBC45;
  --register-btn-color: #FFFFFF;
  --text-dark: #000000;
  --text-light: #FFFFFF;
  --header-offset: 100px; /* Desktop: header-top (approx 60px) + main-nav (approx 40px) */
}

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

/* Base Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--secondary-color);
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.header-top {
  background-color: var(--primary-color); /* Primary color for header top */
  padding: 10px 0;
  min-height: 40px;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--login-btn-color); /* Using login button color for contrast */
  text-transform: uppercase;
  padding: 5px 0;
  display: block; /* Ensure logo is always visible */
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none; /* Remove underline for buttons */
  font-size: 14px;
}

.btn-login {
  background-color: var(--login-btn-color);
  color: var(--text-dark);
}

.btn-register {
  background-color: var(--register-btn-color);
  color: var(--text-dark);
  border: 1px solid var(--login-btn-color);
}

.btn-login:hover {
  opacity: 0.9;
  box-shadow: 0 0 10px var(--login-btn-color);
}

.btn-register:hover {
  opacity: 0.9;
  box-shadow: 0 0 10px var(--register-btn-color);
}

.main-nav {
  background-color: #333333; /* Darker shade for main nav, contrasting with header-top */
  padding: 5px 0;
  min-height: 30px;
  display: flex; /* Desktop: always visible */
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 25px; /* Spacing between nav links */
}

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

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

.mobile-menu-toggle {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  position: relative;
  transition: background-color 0.3s ease;
}

.hamburger-icon::before, .hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  position: absolute;
  transition: transform 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.mobile-menu-toggle.active .hamburger-icon {
  background-color: transparent;
}

.mobile-menu-toggle.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

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

.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.7);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Site Footer */
.site-footer {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 40px 20px;
  font-size: 14px;
  line-height: 1.8;
}

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

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

.footer-section h3 {
  color: var(--login-btn-color);
  font-size: 18px;
  margin-bottom: 20px;
}

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

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

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

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

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

.footer-contact a {
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

.footer-contact a:hover {
  color: var(--login-btn-color);
}

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

/* Media Queries for Mobile */
@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;
  }

  .site-header {
    flex-direction: column;
  }

  .header-top {
    padding: 10px 0;
  }

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

  .logo {
    flex: 1;
    text-align: center;
    font-size: 24px;
    order: 2; /* Logo in center */
  }

  .mobile-menu-toggle {
    display: block;
    order: 1; /* Hamburger on left */
    color: var(--secondary-color);
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 80%;
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--primary-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 20px 0;
    overflow-y: auto;
  }

  .main-nav.active {
    display: flex; /* Must set display to flex */
    transform: translateX(0);
  }

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0; /* Remove gap for vertical list */
  }

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

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

  .mobile-nav-buttons {
    display: flex; /* Always visible */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: #1a1a1a; /* Slightly lighter dark for contrast with header-top */
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 990; /* Below hamburger menu and main nav */
    min-height: 30px;
  }

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

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

  .footer-nav {
    padding-left: 0;
  }

  .footer-nav li {
    display: inline-block;
    margin: 0 5px 10px 5px; /* Inline for mobile footer links */
  }
}

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