:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --background-color: #FFFFFF;
  --text-color-dark: #000000;
  --text-color-light: #FFFFFF;
  --header-top-bg: var(--primary-color);
  --main-nav-bg: var(--secondary-color);
  --header-offset: 120px; /* Desktop: header-top (70px) + main-nav (50px) */
}

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

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  color: var(--text-color-dark);
  background-color: var(--background-color);
}

/* Shared Container Styles */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Site Header - Fixed Navigation */
.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(--main-nav-bg); /* Default background, overridden by header-top and main-nav */
}

/* Header Top - Logo & Buttons */
.header-top {
  background-color: var(--header-top-bg);
  color: var(--text-color-light);
  padding: 15px 0;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-color-light);
  text-decoration: none;
  white-space: nowrap;
  padding-right: 20px;
}

.desktop-nav-buttons {
  display: flex;
  gap: 15px;
  margin-left: auto;
}

/* Main Navigation */
.main-nav {
  background-color: var(--main-nav-bg);
  border-top: 1px solid rgba(0,0,0,0.1);
  padding: 10px 0;
  min-height: 30px;
  display: flex; /* Desktop default: flex for horizontal layout */
  justify-content: center;
  align-items: center;
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  gap: 25px;
}

.nav-link {
  color: var(--text-color-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 8px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--login-button-color);
  color: var(--text-color-light);
}

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

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

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

/* Hamburger Menu (Desktop - Hidden) */
.hamburger-menu {
  display: none;
  width: 30px;
  height: 22px;
  position: relative;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  z-index: 1001;
}

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

.mobile-nav-buttons, .mobile-spacer {
  display: none; /* Hidden on desktop */
}

/* Site Footer */
.site-footer {
  background-color: #333;
  color: #fff;
  padding: 40px 0;
  font-size: 14px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

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

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.site-footer p {
  margin: 0 0 10px 0;
  line-height: 1.6;
}

.site-footer h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

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

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

/* Mobile Styles */
@media (max-width: 768px) {
  .header-container, .nav-container, .footer-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .header-top .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: flex;
    width: 30px;
    flex-shrink: 0;
  }

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

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

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

  .mobile-spacer {
    display: block;
    width: 30px; /* Balance the hamburger menu width */
    flex-shrink: 0;
  }

  .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;
    background-color: var(--main-nav-bg);
    border-top: 1px solid rgba(0,0,0,0.1);
    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 on mobile */
    flex-direction: column; /* Vertical layout */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: var(--main-nav-bg);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    z-index: 999;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .nav-link {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    width: 100%;
    box-sizing: border-box;
  }

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

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

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

  body.no-scroll {
    overflow: hidden;
  }

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

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

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

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