:root {
  --primary-color: #1A2B4C;
  --secondary-color: #FFD700;
  --text-color-light: #FFFFFF;
  --text-color-dark: #333333; /* For text on light backgrounds if needed */
  --header-top-bg: var(--primary-color);
  --main-nav-bg: #0F1C33; /* Darker than primary for contrast */
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-color-dark);
  padding-top: var(--header-offset); /* Apply header offset to body */
  overflow-x: hidden; /* Prevent horizontal scroll for mobile content */
}

body.no-scroll {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.header-top {
  background-color: var(--header-top-bg);
  padding: 10px 0;
  min-height: 40px; /* Logo + padding = ~60px total height */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

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

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

.btn:first-of-type { /* Login button */
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
}
.btn:first-of-type:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.btn-primary { /* Register button */
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: 1px solid var(--secondary-color);
}
.btn-primary:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  min-height: 30px; /* Nav links + padding = ~50px total height */
  display: flex; /* Desktop default: visible, horizontal */
  align-items: center;
  transition: transform 0.3s ease-in-out;
}

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

.nav-link {
  color: var(--text-color-light);
  font-weight: bold;
  padding: 10px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
  text-transform: uppercase;
}

.nav-link:hover {
  color: var(--secondary-color);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Mobile specific styles (hidden by default) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001;
  margin-right: 15px;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 8px; }
.hamburger-menu span:nth-child(3) { top: 16px; }

.hamburger-menu.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-buttons-area {
  display: none; /* Hidden on desktop */
  background-color: var(--header-top-bg);
  padding: 10px 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  min-height: 30px; /* Buttons + padding = ~50px total height */
  z-index: 999; /* Below hamburger menu */
}

.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: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer styles */
.site-footer {
  background-color: var(--primary-color);
  color: var(--text-color-light);
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-section h3 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-section p {
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

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

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
  white-space: nowrap;
  text-transform: uppercase;
}

.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);
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Hamburger left, Logo center */
    flex-wrap: nowrap;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    order: 0; /* Default order */
    margin-left: -45px; /* Adjust to visually center when hamburger is present */
  }

  .hamburger-menu {
    display: block; /* Show on mobile */
    order: -1; /* Place it first */
    margin-left: 0;
  }

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

  .mobile-buttons-area {
    display: flex; /* Show on mobile */
    justify-content: center;
    padding: 10px 15px;
    gap: 10px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical alignment */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + buttons */
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: var(--main-nav-bg);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out to the left */
    overflow-y: auto;
    z-index: 999;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    width: 100%;
    max-width: none; /* Ensure it takes full width */
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

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

  .footer-section {
    min-width: unset;
    flex: none;
  }

  /* Mobile content overflow protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}
/* 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;
  }
}
