:root {
  --primary-color: #007bff;
  --secondary-color: #28a745;
  --header-top-bg: #0056b3; /* Darker blue for header top */
  --main-nav-bg: #e9ecef; /* Light gray for main navigation */
  --footer-bg: #343a40; /* Dark gray for footer */
  --footer-text-color: #f8f9fa;
  --text-color-dark: #333;
  --text-color-light: #fff;

  --header-offset: 110px; /* Desktop: header-top (approx 60px) + main-nav (approx 50px) */
}

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

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

body.no-scroll {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

a:hover {
  text-decoration: underline;
}

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

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

.btn-login:hover {
  background-color: #0069d9;
  color: var(--text-color-light);
  transform: translateY(-2px);
  text-decoration: none;
}

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

.btn-register:hover {
  background-color: #218838;
  color: var(--text-color-light);
  transform: translateY(-2px);
  text-decoration: none;
}

/* --- Site Header --- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: var(--header-top-bg); /* Fallback background for header */
  display: flex; /* For stacking header-top and main-nav */
  flex-direction: column;
}

.header-top {
  background-color: var(--header-top-bg);
  padding: 10px 0;
  min-height: 40px;
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-color-light);
  display: block;
  white-space: nowrap;
  padding: 5px 0;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

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

.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  min-height: 30px;
  display: flex; /* Desktop: visible, horizontal */
  align-items: center;
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  width: 100%;
}

.nav-link {
  color: var(--text-color-dark);
  padding: 8px 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.hamburger-menu {
  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(--text-color-light);
  margin: 5px 0;
  transition: all 0.3s ease;
}

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

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

/* --- Site Footer --- */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text-color);
  padding: 40px 20px;
  text-align: center;
}

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

.footer-col {
  flex: 1;
  min-width: 200px;
  text-align: left;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-color-light);
  display: block;
  margin-bottom: 15px;
}

.footer-logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

.footer-info p {
  font-size: 14px;
  margin: 0;
  color: #bbb;
}

.footer-nav h3 {
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--text-color-light);
}

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

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

.footer-nav a {
  color: #bbb;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* --- Mobile Styles --- */
@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; /* Stack header-top and mobile-buttons vertically */
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* IMPORTANT: Remove max-width on mobile */
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: 1;
  }

  .logo {
    order: 2;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    padding: 0;
  }

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

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Starts below the fixed header + mobile buttons */
    left: 0;
    width: 80%;
    height: calc(100vh - var(--header-offset));
    background-color: #333; /* Dark background for mobile menu */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    z-index: 999;
  }

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

  .nav-container {
    flex-direction: column;
    padding: 20px 0;
    width: 100%;
    max-width: none; /* IMPORTANT: Remove max-width on mobile */
  }

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

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

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

  .mobile-buttons {
    display: flex; /* Show mobile buttons */
    background-color: var(--header-top-bg);
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    min-height: 30px;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 998;
  }

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

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

  /* Hamburger menu active state (X icon) */
  .hamburger-menu.active .hamburger-icon:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-menu.active .hamburger-icon:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active .hamburger-icon:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

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

  .footer-col {
    text-align: center;
    min-width: unset;
  }

  .footer-nav ul {
    text-align: center;
  }

  .footer-info .footer-logo {
    margin: 0 auto 15px auto;
  }
}
/* 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;
  }
}
