:root {
  --header-offset: 70px; /* Desktop: header-top (40px) + main-nav (30px) */
  --primary-color: #000000;
  --secondary-color: #FFFFFF;
  --login-btn-color: #FCBC45;
  --register-btn-color: #FFFFFF;
}

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

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.header-top {
  background-color: var(--primary-color); /* Black */
  color: var(--secondary-color); /* White text */
  padding: 10px 0;
  min-height: 40px;
  display: flex; /* Ensure flex for content alignment */
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* White */
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

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

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

.login-btn {
  background-color: var(--login-btn-color); /* FCBC45 */
  color: var(--primary-color); /* Black text for contrast */
}

.login-btn:hover {
  background-color: #e6a83d;
}

.register-btn {
  background-color: var(--register-btn-color); /* White */
  color: var(--primary-color); /* Black text for contrast */
  border: 1px solid var(--primary-color);
}

.register-btn:hover {
  background-color: #f0f0f0;
}

.main-nav {
  background-color: var(--secondary-color); /* White */
  padding: 10px 0;
  min-height: 30px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease-out;
}

.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;
  width: 100%;
}

.nav-link {
  color: var(--primary-color); /* Black text */
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #555;
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

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

.mobile-buttons {
  display: none;
  background-color: var(--primary-color);
  padding: 10px 20px;
  justify-content: center;
  gap: 12px;
  min-height: 40px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

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

.site-footer {
  background-color: var(--primary-color); /* Black */
  color: var(--secondary-color); /* White text */
  padding: 40px 20px;
  text-align: center;
}

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

.footer-col {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--login-btn-color); /* Yellow/Orange for headings */
}

.footer-col p {
  font-size: 14px;
  line-height: 1.8;
}

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

.footer-nav a {
  color: var(--secondary-color); /* White */
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

.copyright {
  margin-top: 40px;
  font-size: 13px;
  color: #bbb;
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    position: relative; /* For absolute positioning of logo if needed */
  }

  .logo {
    flex: 1; /* Allow logo to take available space for centering */
    text-align: center; /* Center text logo */
    font-size: 24px;
    order: 2; /* Place logo in the middle */
  }

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

  .hamburger-menu {
    display: flex;
    order: 1; /* Place it to the far left */
    margin-right: auto; /* Push logo to center */
  }

  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below the combined header-top and mobile-buttons */
    left: 0;
    width: 280px;
    height: calc(100vh - var(--header-offset));
    background-color: var(--secondary-color);
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    overflow-y: auto;
    align-items: flex-start;
    z-index: 1000;
  }

  .main-nav.active {
    display: flex;
    transform: translateX(0);
  }

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }
  .nav-link:last-child {
      border-bottom: none;
  }

  .mobile-buttons {
    display: flex;
    width: 100%;
    padding: 10px 15px;
    justify-content: center;
    align-items: center;
  }

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

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

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

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

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

  .footer-col h3 {
    text-align: center;
  }

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

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