:root {
  --primary-color: #26A9E0; /* 淡蓝色 */
  --secondary-color: #FFFFFF; /* 白色 */
  --dark-header-bg: #002B45; /* 深蓝色，用于header-top */
  --light-nav-bg: #26A9E0; /* 主色调，用于main-nav */
  --login-btn-color: #EA7C07; /* 登录按钮橙色 */
  --text-color: #333333; /* 深灰色文本 */
  --header-offset: 110px; /* 桌面端 */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 95px; /* 移动端 */
  }
}

/* Base styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Fixed header offset */
  background-color: var(--secondary-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

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

a:hover {
  text-decoration: underline;
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--secondary-color); /* Default background, will be overridden by sections */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-height: auto; /* Allow content to define height, but ensure sections have min-height */
  display: flex;
  flex-direction: column;
}

.header-top {
  background-color: var(--dark-header-bg); /* 深蓝色背景 */
  color: var(--secondary-color);
  padding: 15px 0;
  display: flex;
  align-items: center;
  min-height: 60px; /* Minimum height for header-top */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  white-space: nowrap; /* Prevent logo text from wrapping */
}

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

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: inline-block;
  text-align: center;
  color: var(--secondary-color); /* Button text color */
}

.btn-login {
  background-color: var(--login-btn-color); /* 橙色 */
}

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

.btn-register {
  background-color: var(--primary-color); /* 主色调蓝色 */
}

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

.main-nav {
  background-color: var(--light-nav-bg); /* 主色调蓝色背景 */
  padding: 10px 0;
  display: flex; /* Desktop default: flex */
  min-height: 50px; /* Minimum height for main-nav */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 0 20px; /* Padding for container edges */
  box-sizing: border-box;
}

.nav-link {
  color: var(--secondary-color);
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  position: relative;
  z-index: 1001; /* Ensure hamburger is above other elements */
}

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

/* Mobile specific button container, hidden on desktop */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  background-color: var(--dark-header-bg); /* Same as header-top for consistency */
  padding: 10px 15px; /* Adjust padding for mobile */
  box-sizing: border-box;
  width: 100%;
}

/* Mobile menu overlay */
.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.5);
  z-index: 998; /* Below menu, above content */
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer styles */
.site-footer {
  background-color: var(--dark-header-bg); /* Using dark blue for footer */
  color: var(--secondary-color);
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

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

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

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

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

.footer-col a {
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}


/* Mobile responsiveness */
@media (max-width: 768px) {
  /* Prevent body overflow (redundant but good to ensure) */
  body {
    overflow-x: hidden;
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

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

  .header-container {
    padding: 0 15px;
    justify-content: space-between;
    position: relative;
    max-width: none; /* Important: no max-width for mobile container */
    width: 100%;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 1;
    margin-right: auto; /* Push logo to center */
    position: relative;
    z-index: 1002;
  }

  .logo {
    order: 2;
    flex: 1; /* Allow logo to take available space for centering */
    text-align: center; /* Center text logo */
    font-size: 20px;
    margin-left: -30px; /* Counteract hamburger width for better centering */
    color: var(--secondary-color);
  }

  .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-left: 15px; padding-right: 15px;
    overflow: hidden; /* Prevent horizontal scroll from buttons */
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    justify-content: center; /* Center buttons if less than 2 */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu items */
    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 menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--dark-header-bg); /* Dark background for mobile menu */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    z-index: 999; /* Above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
    padding: 20px 0;
  }

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

  /* Hamburger menu animation */
  .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);
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px 20px;
  }

  .footer-col {
    min-width: unset;
    max-width: 100%;
  }
}
/* 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;
  }
}
