:root {
  --primary-color: #26A9E0; /* Light Blue */
  --secondary-color: #FFFFFF; /* White */
  --login-button-color: #EA7C07; /* Orange */
  --dark-blue-bg: #1A7BB0; /* Darker shade of primary for contrast */
  --text-color-dark: #333333;
  --text-color-light: #FFFFFF;

  /* Header offset calculation for desktop */
  --header-top-height-desktop: 60px; /* Estimated header-top visual height */
  --main-nav-height-desktop: 50px; /* Estimated main-nav visual height */
  --header-offset: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop: 110px */
}

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

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

a:hover {
  text-decoration: underline;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Header Top Section (Logo + Desktop Buttons) */
.header-top {
  background-color: var(--dark-blue-bg); /* Darker blue for top section */
  color: var(--text-color-light);
  min-height: var(--header-top-height-desktop); /* Ensure height matches offset calculation */
  display: flex;
  align-items: center;
}

.header-top .header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px; /* Adjusted padding to ensure logo/buttons don't hug edges */
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.site-header .logo:hover {
  color: var(--primary-color);
  text-decoration: none;
}

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

/* Main Navigation Section */
.main-nav {
  background-color: var(--primary-color); /* Light blue for main nav */
  min-height: var(--main-nav-height-desktop); /* Ensure height matches offset calculation */
  display: flex; /* Desktop: visible and flex */
  align-items: center;
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  width: 100%;
  display: flex;
  justify-content: center; /* Center nav links horizontally */
  align-items: center;
  flex-wrap: wrap;
}

.main-nav .nav-link {
  color: var(--text-color-light);
  padding: 8px 15px;
  display: block;
  font-weight: bold;
  white-space: nowrap; /* Prevent breaking for two-word terms */
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  text-decoration: none;
}

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

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

.btn-primary:hover {
  background-color: #1a8cc4; /* Slightly darker primary */
  text-decoration: none;
}

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

.btn-login:hover {
  background-color: #c76b00; /* Slightly darker login color */
  text-decoration: none;
}

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

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

/* Mobile specific button container (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden by default on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Site Footer */
.site-footer {
  background-color: var(--dark-blue-bg); /* Darker blue for footer */
  color: var(--text-color-light);
  padding: 40px 20px 20px;
  font-size: 14px;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  text-align: left;
  gap: 20px;
}

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

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

.footer-logo:hover {
  color: var(--primary-color);
}

.footer-col p {
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
}

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

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

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    /* Header offset calculation for mobile */
    --header-top-height-mobile: 60px; /* Hamburger + Logo row */
    --mobile-nav-buttons-height: 40px; /* Estimated height for mobile buttons */
    --header-offset: calc(var(--header-top-height-mobile) + var(--mobile-nav-buttons-height)); /* Mobile: 100px */
  }
  
  body {
    padding-top: var(--header-offset); /* Apply mobile header offset */
    overflow-x: hidden;
  }

  /* Mobile content overflow protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Header Top for Mobile */
  .header-top {
    min-height: var(--header-top-height-mobile); /* Match mobile offset calculation */
    padding: 0;
  }

  .header-top .header-container {
    padding: 10px 15px; /* Smaller padding for mobile container */
    max-width: none; /* Remove max-width for mobile container */
    width: 100%;
    position: relative;
    justify-content: space-between;
  }

  /* Hamburger Menu */
  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 0;
    margin-right: 15px; /* Space between hamburger and logo */
  }

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

  /* Mobile Logo Centering (Text Logo) */
  .site-header .logo {
    font-size: 22px;
    flex: 1; /* Allow logo to take available space */
    text-align: center; /* Center text logo */
    padding: 0;
    margin: 0;
    display: block;
    max-width: calc(100% - 70px); /* Account for hamburger width + padding */
  }

  /* Desktop Buttons (Hidden on Mobile) */
  .desktop-nav-buttons {
    display: none;
  }

  /* Mobile Buttons (Visible on Mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Force display on mobile */
    background-color: var(--dark-blue-bg); /* Same as header-top for continuity */
    padding: 8px 15px; /* Vertical padding, horizontal matches container */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    gap: 10px; /* Space between buttons */
    flex-wrap: nowrap; /* Keep buttons on one line */
    justify-content: center;
    min-height: var(--mobile-nav-buttons-height); /* Match mobile offset calculation */
  }

  .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 Navigation (Mobile - hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--primary-color); /* Primary color for mobile menu */
    overflow-y: auto;
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
  }

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

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

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 20px;
    text-align: left;
    white-space: normal;
  }

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

  /* Footer for Mobile */
  .footer-container {
    flex-direction: column;
    text-align: center;
  }

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

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

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