:root {
  --primary-color: #26A9E0; /* 淡蓝色 */
  --secondary-color: #FFFFFF; /* 白色 */
  --login-btn-color: #EA7C07; /* 登录按钮橙色 */
  --text-color: #000000; /* 黑色 */
  --header-top-bg: #26A9E0; /* 顶部区域背景 */
  --main-nav-bg: #FFFFFF; /* 菜单栏背景 */
  --footer-bg: #26A9E0; /* 页脚背景 */
  --footer-bottom-bg: #1a8cc2; /* 页脚底部背景，主色调的深色变体 */
  --mobile-buttons-bg: #F0F0F0; /* 移动端按钮区域背景 */

  --header-offset: 110px; /* 桌面端：header-top (60px) + main-nav (50px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* 移动端：header-top (60px) + mobile-nav-buttons (50px) */
  }
}

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

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-login {
  background-color: var(--login-btn-color);
  color: var(--secondary-color);
  border: none;
}

.btn-login:hover {
  background-color: #d16b06; /* Darker shade of login color */
}

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

.btn-register:hover {
  background-color: #1f8ec7; /* Darker shade of primary color */
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: var(--secondary-color); /* Default background, will be overridden by header-top and main-nav */
}

.header-top {
  background-color: var(--header-top-bg); /* Primary color for top bar */
  padding: 10px 0; /* Vertical padding */
  min-height: 40px; /* Ensure minimum height for content */
  box-sizing: border-box;
}

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

.logo {
  font-weight: bold;
  font-size: 24px;
  color: var(--secondary-color);
  text-decoration: none;
  padding: 5px 0; /* Padding for logo text */
  white-space: nowrap;
}

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  padding: 5px;
  z-index: 1002; /* Above overlay */
  margin-right: 15px; /* Space between hamburger and logo */
}

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

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

.main-nav {
  background-color: var(--main-nav-bg); /* Secondary color for nav bar, distinct from top bar */
  padding: 10px 0; /* Vertical padding */
  border-top: 1px solid rgba(0, 0, 0, 0.05); /* Subtle separator */
  min-height: 30px; /* Ensure minimum height */
  box-sizing: border-box;

  /* Desktop default: flex, row, static */
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center; /* Center nav items horizontally */
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  padding: 8px 15px;
  font-weight: 500;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent nav links text from wrapping on desktop */
}

.nav-link:hover {
  color: var(--primary-color);
  text-decoration: none;
}

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

.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: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer styles */
.site-footer {
  background-color: var(--footer-bg); /* Primary color for footer */
  color: var(--secondary-color);
  padding-top: 40px;
  font-size: 14px;
}

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

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

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

.footer-col {
  flex: 1;
  min-width: 280px; /* Adjust min-width for better responsiveness */
  margin-bottom: 20px;
  padding-right: 20px; /* Space between columns */
}

.footer-col:last-child {
  padding-right: 0;
}

.footer-col h3 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

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

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

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

.footer-bottom {
  background-color: var(--footer-bottom-bg); /* Darker shade for bottom bar */
  text-align: center;
  padding: 15px 20px;
  font-size: 13px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  /* Mobile header-top layout: Hamburger left, Logo centered */
  .site-header .header-container {
    padding: 10px 15px; /* Smaller padding for mobile */
    width: 100%;
    max-width: none; /* Ensure container takes full width */
    position: relative; /* For absolute positioning of logo if needed */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger menu */
    order: -1; /* Move to the left */
    z-index: 1002;
    margin-right: 0; /* Reset margin */
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center content horizontally */
    align-items: center !important;
    font-size: 20px; /* Smaller logo text for mobile */
    position: static !important; /* Reset any absolute positioning */
    transform: none !important; /* Reset any transform */
    max-width: calc(100% - 70px); /* Adjust max-width to not overlap hamburger */
  }

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

  /* Mobile buttons (below header-top, above main-nav) */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for the button bar */
    overflow: hidden; /* Prevent horizontal scroll */
    gap: 10px; /* Space between buttons */
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background-color: var(--mobile-buttons-bg); /* Distinct background for mobile button bar */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Subtle shadow */
  }

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

  /* Mobile main navigation (hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout for menu items */
    position: fixed;
    top: 0;
    left: 0;
    width: 75%; /* Slide in from left, occupy 75% width */
    max-width: 300px; /* Max width for the mobile menu panel */
    height: 100%;
    background-color: var(--main-nav-bg);
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1001; /* Above overlay, below hamburger */
    overflow-y: auto; /* Allow scrolling if menu content is long */
    padding-top: 60px; /* Space for fixed header content */
  }

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

  .main-nav .nav-container {
    flex-direction: column; /* Vertical layout for links */
    align-items: flex-start; /* Align links to the left */
    padding: 20px;
    width: 100%;
    max-width: none; /* Ensure container takes full width */
  }

  .nav-link {
    width: 100%; /* Full width for each link */
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    white-space: normal; /* Allow text to wrap */
  }

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

  /* Footer adjustments for mobile */
  .footer-container {
    flex-direction: column; /* Stack columns vertically */
    padding: 0 15px 30px;
  }

  .footer-col {
    min-width: 100%; /* Full width for each column */
    padding-right: 0;
  }

  .footer-col:last-child {
    margin-bottom: 0;
  }

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

/* Utility to prevent scroll when menu is open */
body.no-scroll {
  overflow: 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;
  }
}
