:root {
  --primary-color: #007bff;
  --secondary-color: #ffc107;
  --text-color-dark: #333;
  --text-color-light: #fff;
  --header-offset: 110px; /* Desktop: (header-top: 60px) + (main-nav: 50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: (header-top: 60px) + (mobile-nav-buttons-wrapper: 50px) */
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

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

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: var(--text-color-light); /* Base for contrast, sections will override */
}

/* Header Top Section */
.header-top {
  background-color: var(--primary-color);
  padding: 15px 0;
  color: var(--text-color-light);
  min-height: 30px;
}

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

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

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

.desktop-nav-buttons .btn,
.mobile-nav-buttons-wrapper .btn {
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  min-width: 80px;
  text-align: center;
  white-space: nowrap;
}

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

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

.register-btn {
  background-color: #28a745;
  color: var(--text-color-light);
}

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

/* Main Navigation */
.main-nav {
  background-color: var(--secondary-color);
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  min-height: 30px;
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap;
}

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

.main-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

/* Mobile specific elements */
.hamburger-menu {
  display: none;
  width: 30px;
  height: 24px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-color-light);
  transition: all 0.3s ease;
}

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

.mobile-nav-buttons-wrapper {
  display: none;
  background-color: #f8f9fa;
  padding: 10px 0;
  min-height: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.mobile-buttons-container {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* Mobile Menu Overlay */
.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;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Footer */
.site-footer {
  background-color: #343a40;
  color: #f8f9fa;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.site-footer .footer-col {
  flex: 1;
  min-width: 250px;
  margin-bottom: 20px;
}

.site-footer .footer-col.brand-info {
  min-width: 100%;
  text-align: center;
}

.site-footer .footer-logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-color-light);
  text-decoration: none;
  margin-bottom: 10px;
  display: inline-block;
}

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

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

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

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

.site-footer p {
  margin: 0;
  color: #adb5bd;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  .site-header {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

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

  .hamburger-menu {
    display: flex;
    order: 1;
  }

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

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

  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background-color: var(--primary-color);
    flex-direction: column;
    align-items: flex-start;
    padding-top: var(--header-offset);
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

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

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

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

  .mobile-buttons-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    justify-content: center;
  }

  .mobile-nav-buttons-wrapper .btn {
    padding: 8px 16px;
    font-size: 14px;
  }

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

  .site-footer .footer-col {
    min-width: auto;
    width: 100%;
  }

  .site-footer .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;
  }
}
