:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-btn-color: #EA7C07;
  --black-color: #000000;
  --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) */
  }
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
  padding-top: var(--header-offset); /* Apply header offset */
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

a:hover {
  text-decoration: underline;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none; /* Remove underline */
  white-space: nowrap; /* Prevent text wrapping on desktop */
  cursor: pointer;
  border: none;
}

.btn-register {
  background-color: var(--login-btn-color); /* #EA7C07 */
  color: var(--secondary-color); /* #FFFFFF */
}

.btn-register:hover {
  background-color: #d16b06; /* Slightly darker */
  color: var(--secondary-color);
  text-decoration: none;
}

.btn-login {
  background-color: var(--black-color); /* #000000 */
  color: var(--secondary-color); /* #FFFFFF */
  margin-left: 10px; /* Spacing between buttons */
}

.btn-login:hover {
  background-color: #222222; /* Slightly lighter */
  color: var(--secondary-color);
  text-decoration: none;
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-top {
  background-color: var(--primary-color); /* #26A9E0 */
  padding: 15px 0;
}

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

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

.logo:hover {
  text-decoration: none;
}

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

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

.main-nav {
  background-color: var(--secondary-color); /* #FFFFFF */
  padding: 10px 0;
  display: flex; /* Desktop default: flex */
  justify-content: center;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex; /* Desktop default: flex */
  justify-content: center; /* Center nav links on desktop */
  align-items: center;
  padding: 0 20px; /* Padding for desktop */
  flex-wrap: wrap; /* Allow wrapping if too many links */
}

.nav-link {
  color: #333;
  font-weight: bold;
  padding: 8px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 4px;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: #f0f0f0; /* Light background on hover */
  text-decoration: none;
}

.hamburger-menu {
  display: none; /* Hidden by default, shown on mobile */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above logo and buttons on mobile */
  margin-right: 15px; /* Spacing from logo */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color); /* White lines on blue header */
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

.hamburger-menu.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) 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;
  cursor: pointer;
}

/* Footer Styles */
.site-footer {
  background-color: #333; /* Dark grey for footer */
  color: var(--secondary-color); /* White text */
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer a {
  color: var(--secondary-color);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

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

.footer-col {
  flex: 1;
  min-width: 200px;
  margin-bottom: 30px;
}

.footer-col h3 {
  color: var(--primary-color); /* Primary blue for headings */
  font-size: 18px;
  margin-bottom: 15px;
}

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

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col p {
  line-height: 1.6;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color); /* Primary blue for footer logo */
  margin-top: 15px;
  display: inline-block;
}

.btn-affiliate {
  background-color: var(--login-btn-color); /* #EA7C07 */
  color: var(--secondary-color);
  margin-top: 10px;
}

.btn-affiliate:hover {
  background-color: #d16b06;
  color: var(--secondary-color);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: #bbb; /* Lighter grey for copyright text */
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    font-size: 24px; /* Smaller logo for mobile */
  }

  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for mobile buttons area */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background-color: #f0f0f0; /* Light background for mobile buttons */
    justify-content: center;
    align-items: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed; /* Fixed position for mobile menu */
    top: var(--header-offset); /* Position below header */
    left: 0;
    width: 250px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--secondary-color); /* White background */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Scrollable if content is long */
    padding: 20px 0;
    align-items: flex-start; /* Align links to the left */
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0; /* No horizontal padding for mobile menu links */
    width: 100%;
    max-width: none; /* No max-width for mobile container */
    align-items: flex-start;
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px; /* Larger padding for mobile links */
    border-bottom: 1px solid #eee; /* Separator for links */
    box-sizing: border-box;
    text-align: left;
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when menu is active */
  }

  .footer-container {
    flex-direction: column;
    padding: 0 15px; /* Smaller padding for mobile */
  }

  .footer-col {
    min-width: unset; /* Remove min-width for mobile */
    width: 100%;
    text-align: center; /* Center footer content on mobile */
  }

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

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

  .footer-col ul li {
    margin-bottom: 8px;
  }

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

  .footer-logo {
    text-align: center;
    display: block;
  }
  
  /* 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;
  }
}
