:root {
  --primary-color: #26A9E0; /* Light blue */
  --accent-color: #FFFFFF; /* White */
  --login-button-color: #EA7C07; /* Orange */
  --black-color: #000000; /* Black */
  --text-dark: #333333;
  --text-light: #FFFFFF;

  --header-offset: 120px; /* Desktop: header-top (70px) + main-nav (50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 120px; /* Mobile: header-top (70px) + mobile-nav-buttons (50px) */
  }
}

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

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.2);
  background-color: var(--black-color); /* Fallback, specific sections will override */
}

/* Header Top Area (Desktop) */
.header-top {
  background-color: var(--black-color); /* Dark background for top bar */
  min-height: 70px; /* Fixed height for desktop top bar */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color); /* White logo text for dark background */
  text-decoration: none;
  padding: 10px 0; /* Add some vertical padding for clickable area */
  display: block; /* Ensure it's a block element for padding */
}

/* Desktop Nav Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 15px;
}

/* Mobile Nav Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  background-color: var(--black-color); /* Same as header-top for consistency */
  padding: 10px 20px;
  box-sizing: border-box;
  width: 100%;
  justify-content: center; /* Center buttons horizontally */
  align-items: center;
  min-height: 50px; /* Fixed height for mobile buttons */
}

/* Main Navigation Area (Desktop) */
.main-nav {
  background-color: var(--primary-color); /* Light blue for main nav */
  min-height: 50px; /* Fixed height for desktop main nav */
  display: flex; /* Display as flex for desktop */
  align-items: center;
  width: 100%;
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex; /* Flex for desktop menu items */
  justify-content: center; /* Center menu items */
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.main-nav .nav-link {
  color: var(--text-light); /* White text for light blue background */
  padding: 10px 15px;
  text-decoration: none;
  white-space: nowrap; /* Prevent menu items from wrapping */
  font-size: 15px;
  transition: background-color 0.3s ease;
}

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

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above logo on mobile */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 9px; }
.hamburger-menu span:nth-child(3) { top: 18px; }

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn-register {
  background-color: var(--primary-color);
  color: var(--text-light);
  box-shadow: 0 4px 8px rgba(38, 169, 224, 0.3);
}

.btn-register:hover {
  background-color: #208bc2; /* Slightly darker primary */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(38, 169, 224, 0.4);
  text-decoration: none;
}

.btn-download {
  background-color: var(--login-button-color); /* Orange for download */
  color: var(--text-light);
  box-shadow: 0 4px 8px rgba(234, 124, 7, 0.3);
}

.btn-download:hover {
  background-color: #c96a06; /* Slightly darker orange */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(234, 124, 7, 0.4);
  text-decoration: none;
}

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

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

/* Footer Styles */
.site-footer {
  background-color: var(--black-color);
  color: #cccccc;
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.site-footer .footer-col {
  flex: 1;
  min-width: 200px;
}

.site-footer .footer-logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 15px;
  display: block;
}

.site-footer .footer-description {
  margin-top: 10px;
  line-height: 1.8;
}

.site-footer h3 {
  color: var(--primary-color);
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

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

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

.site-footer .footer-nav a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* Responsive Styles */
@media (max-width: 768px) {
  /* Mobile Header Top */
  .header-top {
    min-height: 70px;
    padding: 0 15px; /* Adjust padding for mobile */
  }

  .header-container {
    padding: 0; /* Remove container padding, handled by header-top */
    width: 100%;
    max-width: none; /* Crucial: allow container to fill width */
    justify-content: space-between; /* Space out hamburger and logo */
    position: relative; /* For absolute logo centering */
  }

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

  .logo {
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important; /* Force flex for centering */
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    order: 1; /* Place logo second */
    margin: 0; /* Remove any default margins */
    padding: 0; /* Remove any default paddings */
    max-width: calc(100% - 100px); /* Leave space for hamburger and potential right element */
    font-size: 20px; /* Smaller font size for mobile logo */
  }

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

  /* Show mobile buttons on mobile */
  .mobile-nav-buttons {
    display: flex !important; /* Forced to display */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Adjusted padding for mobile */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    min-height: 50px;
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3; /* Adjust line height for wrapped text */
    border-radius: 20px; /* Slightly smaller border-radius for mobile buttons */
  }

  /* Main Navigation (Mobile - hidden by default, shown with JS) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical menu */
    position: fixed; /* Fixed position for off-canvas menu */
    top: var(--header-offset); /* Start below the header and mobile buttons */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--black-color); /* Dark background for mobile menu */
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    padding-top: 20px; /* Padding inside the menu */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Enable scrolling for long menus */
    box-sizing: border-box;
  }

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

  .main-nav .nav-container {
    flex-direction: column; /* Vertical links */
    padding: 0 15px; /* Adjust padding */
    align-items: flex-start; /* Align links to the left */
    max-width: none; /* Allow container to fill width */
  }

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    text-align: left;
    font-size: 16px;
  }

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

  .main-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }

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

  /* Footer Mobile */
  .site-footer .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

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

  .site-footer .footer-nav {
    text-align: center;
  }
}

/* Body no-scroll for mobile menu */
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;
  }
}
