:root {
  --primary-color: #26A9E0; /* 淡蓝色 */
  --secondary-color: #FFFFFF; /* 白色 */
  --login-button-color: #EA7C07; /* 登录按钮橙色 */
  --text-color-dark: #333333;
  --text-color-light: #FFFFFF;
  --header-offset: 100px; /* 桌面端 */
}

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

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: var(--secondary-color);
  color: var(--text-color-dark);
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

body.no-scroll {
  overflow: hidden;
}

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

a:hover {
  text-decoration: underline;
}

.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); /* Default background, will be overridden by specific sections */
}

.header-top {
  background-color: #1e88e5; /* Darker blue variant for top bar */
  padding: 15px 0;
  min-height: 60px; /* Baseline height */
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Inner padding for desktop */
  width: 100%; /* Ensure it takes full width within its context */
  box-sizing: border-box;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-color-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--secondary-color);
  text-decoration: none;
}

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

.btn {
  padding: 10px 18px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline for buttons */
  color: var(--text-color-light); /* Default button text color */
  border: none;
  cursor: pointer;
}

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

.btn-register {
  background-color: var(--primary-color); /* Primary blue for register */
}

.btn-register:hover {
  background-color: #1e84d4; /* Darker blue on hover */
}

.btn-login {
  background-color: var(--login-button-color); /* Orange for login */
}

.btn-login:hover {
  background-color: #d56f06; /* Darker orange on hover */
}

.main-nav {
  background-color: var(--primary-color); /* Light blue for main nav */
  padding: 10px 0;
  min-height: 40px; /* Baseline height */
  display: flex; /* Desktop default: flex */
  justify-content: center;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

.nav-link {
  color: var(--text-color-light);
  padding: 8px 15px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

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

/* Hamburger menu for mobile */
.hamburger-menu {
  display: none; /* Hidden on desktop */\  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001; /* Above logo */
  position: relative;
}

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

.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-nav-buttons {
  display: none !important; /* Hidden on desktop, will be flex on mobile */
  justify-content: center;
  padding: 10px 15px; /* Padding for the container */
  background-color: var(--secondary-color); /* White background for mobile buttons */
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

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

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

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

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

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

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

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

.footer-col ul li a {
  color: #cccccc;
  transition: color 0.3s ease;
}

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

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

/* Responsive styles for mobile */
@media (max-width: 768px) {
  /* Header Offset for mobile */
  :root {
    --header-offset: 100px; /* Adjust if mobile header height changes */
  }

  .header-top {
    padding: 10px 0; /* Smaller padding for mobile */
    min-height: 50px;
  }

  .header-container {
    padding: 0 15px; /* Smaller inner padding for mobile */
    justify-content: space-between; /* Keep space-between */
    width: 100%;
    max-width: none; /* Crucial for mobile to take full width */
    position: relative; /* For logo centering if needed */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 1; /* Left side */
    margin-right: auto; /* Push logo to center */
  }

  .logo {
    order: 2; /* Center logo */
    flex: 1 !important; /* Allow logo to take available space for centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px; /* Smaller font size for mobile */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Adjust as needed */
  }

  .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 the container */
    overflow: hidden; /* Prevent horizontal overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    justify-content: center; /* Center buttons if there's only one */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px 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;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 70%; /* Adjust width of mobile menu */
    height: calc(100% - var(--header-offset));
    flex-direction: column; /* Vertical layout for mobile menu */
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Initially off-screen */
    transition: transform 0.3s ease;
    background-color: var(--primary-color); /* Same as desktop main-nav */
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile */
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

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

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

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

  .footer-bottom {
    padding: 15px;
  }
  
  /* Mobile content image overflow fix */
  .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;
  }
}
