:root {
  --primary-color: #1A202C;
  --secondary-color: #FFD700;
  --text-color-light: #F0F0F0;
  --text-color-dark: #1A202C;
  --header-offset: 110px; /* Desktop: 60px (header-top) + 50px (main-nav) */
}

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

/* Base Styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-light);
  background-color: #0d121c;
}

/* Header Styles */
.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(--primary-color); /* Fallback, specific sections will override */
  display: flex;
  flex-direction: column; /* Default to column for easier mobile override */
}

.header-top {
  background-color: var(--primary-color);
  width: 100%;
  padding: 10px 0;
}

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

.logo {
  color: var(--secondary-color);
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  display: block; /* Ensure it's visible by default */
  padding: 0;
  margin: 0;
}

.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.3s ease;
  white-space: nowrap;
  font-size: 16px;
  text-align: center;
}

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

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

.btn-register {
  background-color: #3f51b5; /* A complementary blue */
  color: var(--text-color-light);
}

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

.main-nav {
  background-color: #2C3A4D; /* Distinct from header-top */
  width: 100%;
  display: flex; /* Default to flex for desktop */
  flex-direction: row; /* Default to row for desktop */
  position: static; /* Default to static for desktop */
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  flex-wrap: wrap; /* Allow items to wrap on smaller desktop screens */
}

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

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 25px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
}

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

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

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

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  background-color: var(--primary-color);
  padding: 10px 0;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mobile-nav-buttons .header-container {
  justify-content: center;
  gap: 12px;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.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;
  font-size: 14px;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-col h3 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-col p {
  margin-bottom: 10px;
  color: #ccc;
}

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

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

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

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
  margin: 0;
  color: #aaa;
}

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

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

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

  .hamburger-menu {
    display: block;
    order: 0;
  }

  .logo {
    order: 1;
    flex-grow: 1; /* Allows logo to take available space for centering */
    text-align: center;
    font-size: 24px;
    padding-right: 30px; /* Offset for hamburger menu width to visually center */
  }

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

  .mobile-nav-buttons {
    display: block;
  }

  .mobile-nav-buttons .header-container {
    padding: 0 15px;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    background-color: var(--primary-color);
    transform: translateX(-100%); /* Off-screen by default */
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    z-index: 1000; /* Same as header, but overlay is 999 */
  }

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

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

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

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

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

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

  .footer-col h3 {
    margin-top: 20px;
  }

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

  /* Mobile content overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* Ensure body padding for fixed header */
body {
  padding-top: var(--header-offset);
}

/* No scroll for body when mobile menu is active */
body.no-scroll {
  overflow: 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;
  }
}
