:root {
  --primary-color: #26A9E0; /* 淡蓝色 */
  --secondary-color: #FFFFFF; /* 白色 */
  --button-login-color: #EA7C07; /* 橙色 */
  --dark-blue-bg: #1e8bc3; /* 用于header-top的深蓝色 */
  --text-color-dark: #333333;
  --text-color-light: #FFFFFF;
  --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 {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  padding-top: var(--header-offset); /* Apply header offset */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}
body.no-scroll {
  overflow: hidden;
}
a {
  text-decoration: none;
  color: var(--primary-color);
}
a:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  background-color: var(--button-login-color);
  color: var(--text-color-light);
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none; /* Remove underline for buttons */
}
.btn:hover {
  background-color: #d16b06; /* Darker orange */
  transform: translateY(-2px);
  text-decoration: none;
}
.btn-register {
  background-color: var(--button-login-color);
}
.btn-download {
  background-color: var(--primary-color);
}
.btn-download:hover {
  background-color: #1e8bc3; /* Darker primary color */
}

/* Site Header - Fixed & Suspended */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: var(--secondary-color); /* Fallback for overall header background */
}

/* Header Top Section (Desktop) */
.header-top {
  background-color: var(--dark-blue-bg); /* Darker blue for top bar */
  padding: 15px 0; /* Adjust height for ~60px total height */
  min-height: 30px; /* Ensure minimum height */
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for content inside container */
  height: 100%;
}

/* Logo */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-color-light); /* White text for logo on dark blue background */
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.logo:hover {
  text-decoration: none;
  color: var(--secondary-color);
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Main Navigation Section (Desktop) */
.main-nav {
  background-color: var(--primary-color); /* Primary blue for main nav */
  padding: 10px 0; /* Adjust height for ~50px total height */
  min-height: 30px; /* Ensure minimum height */
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
}
.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Center nav links */
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens if needed */
  height: 100%;
}
.main-nav .nav-link {
  color: var(--text-color-light);
  padding: 8px 15px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border-radius: 4px;
  white-space: nowrap;
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Above logo on mobile */
}
.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color-light);
  margin: 5px 0;
  transition: all 0.3s ease;
}

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

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

/* Footer Styles */
.site-footer {
  background-color: #333333; /* Dark background for footer */
  color: #cccccc;
  padding: 40px 20px 20px;
  font-size: 14px;
}
.site-footer a {
  color: var(--primary-color);
}
.site-footer a:hover {
  color: var(--secondary-color);
}
.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;
}
.footer-col h3 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 15px;
}
.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}
.footer-logo:hover {
  text-decoration: none;
  color: var(--primary-color);
}
.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li {
  margin-bottom: 8px;
}
.footer-nav a {
  color: #cccccc;
  text-decoration: none;
}
.footer-nav a:hover {
  text-decoration: underline;
  color: var(--primary-color);
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #444444;
  margin-top: 20px;
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Header Mobile Layout */
  .header-top {
    padding: 10px 0; /* Smaller padding for mobile top bar */
    min-height: 40px;
  }
  .header-container {
    padding: 0 15px; /* Smaller padding for mobile container */
    justify-content: space-between;
    width: 100%; /* Mobile container must be 100% width */
    max-width: none; /* Remove max-width on mobile */
  }
  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Position left */
    padding: 5px;
  }
  .logo {
    order: 2; /* Position middle */
    flex: 1 !important; /* Image LOGO centering rule */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    white-space: normal;
    word-break: break-word;
  }
  .logo img { /* If logo is an image */
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }
  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }

  /* Mobile Navigation Buttons */
  .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;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--dark-blue-bg); /* Match header-top background */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    min-height: 30px; /* Ensure minimum height */
  }
  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Account for 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;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Mobile Main Navigation */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header + mobile buttons */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: var(--primary-color);
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Allow scrolling for long menus */
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide into view */
  }
  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px; /* Adjust padding for mobile menu items */
    max-width: none; /* No max-width on mobile */
    width: 100%;
  }
  .main-nav .nav-link {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 5px;
    text-align: left;
    color: var(--text-color-light);
  }

  /* Hamburger Menu Active State */
  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* 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: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .mobile-menu-overlay.active {
    display: block; /* Show when active */
    opacity: 1;
  }

  /* Footer Mobile Layout */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }
  .footer-col {
    min-width: unset;
    width: 100%;
  }
  .footer-col h3 {
    margin-bottom: 10px;
  }

  /* Mobile Content Overflow Protection */
  .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;
  }
}
