:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --text-color-dark: #333333;
  --text-color-light: #FFFFFF;
  --header-offset: 105px; /* Desktop: header-top (60px) + main-nav (45px) */
}

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

/* Base Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  color: var(--text-color-dark);
  background-color: var(--secondary-color);
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  border: none;
  color: var(--text-color-light);
}

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

.btn-primary:hover {
  background-color: #d16b06;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.btn-secondary:hover {
  background-color: #1f8ec7;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Header Styles */
.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(--secondary-color);
  overflow-x: hidden;
}

.header-top {
  background-color: var(--primary-color); /* Distinct background for top section */
  padding: 15px 0;
  position: relative;
  min-height: 60px; /* Ensure enough height */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  display: block;
  padding: 0;
}

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

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

.main-nav {
  background-color: #000000; /* Distinct background for main nav */
  padding: 10px 0;
  min-height: 45px; /* Ensure enough height */
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
}

.main-nav .nav-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.main-nav .nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.main-nav .nav-link:hover {
  color: var(--login-button-color);
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002;
  margin-right: 15px; /* Space between hamburger and logo */
}

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

.hamburger-menu .icon::before, .hamburger-menu .icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu .icon::before {
  top: -10px;
}

.hamburger-menu .icon::after {
  bottom: -10px;
}

.hamburger-menu.active .icon {
  background-color: transparent;
}

.hamburger-menu.active .icon::before {
  top: 0;
  transform: rotate(45deg);
}

.hamburger-menu.active .icon::after {
  bottom: 0;
  transform: rotate(-45deg);
}

.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;
  backdrop-filter: blur(2px);
}

/* Footer Styles */
.site-footer {
  background-color: #000000; /* Dark background for footer */
  color: #cccccc;
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

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

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

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

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

.site-footer a {
  color: #cccccc;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

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

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

.site-footer .footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333333;
  color: #999999;
}

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

  .site-header {
    padding-bottom: 0; /* No extra padding for mobile */
  }

  .header-top .header-container {
    justify-content: space-between;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .logo {
    order: 2;
    flex: 1 !important; /* Allow flex to center it */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    max-width: calc(100% - 70px); /* Account for hamburger menu */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    background-color: #1a1a1a; /* Dark background for mobile buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons, with gap */
    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); /* Start below the fixed header + buttons */
    left: 0;
    width: 80%;
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    align-items: flex-start;
    background-color: #111111;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    padding: 20px 0;
    overflow-y: auto;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
  }

  .main-nav .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #333333;
  }

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

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

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

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