:root {
  --primary-color: #4A148C;
  --secondary-color: #FFC107;
  --text-color: #333;
  --light-text-color: #f0f0f0;
  --dark-bg-color: #311B92; /* Darker variant of primary */
  --light-bg-color: #673AB7; /* Lighter variant of primary */
  --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 (50px) */
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f4f4f4;
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: var(--dark-bg-color); /* Fallback, specific sections have their own */
}

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

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  flex-shrink: 0;
  padding-right: 20px; /* Ensure space from hamburger/buttons */
}

.logo:hover {
  color: #FFF;
}

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

.btn {
  padding: 10px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  text-align: center;
  display: inline-block;
  line-height: 1;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

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

.btn-secondary {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
  background-color: #5E35B1;
  transform: translateY(-2px);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 1001;
  padding: 0;
  flex-shrink: 0;
}

.hamburger-menu .bar {
  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 .bar:nth-child(1) {
  top: 0;
}

.hamburger-menu .bar:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-menu .bar:nth-child(3) {
  bottom: 0;
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  background-color: var(--primary-color);
  padding: 10px 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  justify-content: center; /* Center buttons on desktop if only one */
}

.main-nav {
  background-color: var(--light-bg-color);
  padding: 10px 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.nav-link {
  color: var(--light-text-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
}

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

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

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

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

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

.footer-column p {
  color: #ccc;
  line-height: 1.8;
}

.footer-nav {
  list-style: none;
}

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  color: #aaa;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
  }

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

  .hamburger-menu {
    display: block;
    order: 0;
    margin-right: auto; /* Push logo to center */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px);
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Below header and mobile buttons */
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    justify-content: flex-start;
  }

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

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

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

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

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

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

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

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