:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-color: #000000;
  --login-button-color: #EA7C07;
  --header-top-bg: #1e8bc3; /* Darker shade of primary for header-top */
  --header-nav-bg: var(--primary-color); /* Primary color for main-nav */
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

/* General Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  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;
}

.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;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline */
}

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

.btn-register:hover {
  background-color: #1a8cc4; /* Slightly darker primary */
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-login {
  background-color: var(--login-button-color);
  color: var(--secondary-color);
  border: 1px solid var(--login-button-color);
}

.btn-login:hover {
  background-color: #c96a06; /* Slightly darker login color */
  transform: translateY(-2px);
  text-decoration: none;
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  background-color: var(--header-top-bg); /* Default background for entire header */
}

.header-top {
  background-color: var(--header-top-bg); /* Specific background for the top bar */
  padding: 15px 0; /* Adjusted for desktop */
  display: flex;
  align-items: center;
  min-height: 60px; /* Ensure minimum height */
  box-sizing: border-box;
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px; /* Desktop padding */
  width: 100%; /* Ensure container fills parent */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0; /* Prevent logo from shrinking */
  white-space: nowrap; /* Keep logo on one line */
}

.logo:hover {
  color: var(--primary-color); /* Hover effect */
  text-decoration: none;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  margin-left: auto; /* Push buttons to the right */
  flex-shrink: 0;
}

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  background-color: var(--header-top-bg); /* Same as header-top */
  padding: 10px 20px; /* Desktop padding, will be overridden for mobile */
  gap: 10px;
  min-height: 50px; /* Ensure minimum height */
  box-sizing: border-box;
  width: 100%;
}

.main-nav {
  background-color: var(--header-nav-bg); /* Specific background for the nav bar */
  padding: 10px 0; /* Adjusted for desktop */
  display: flex; /* Desktop: always visible */
  align-items: center;
  min-height: 50px; /* Ensure minimum height */
  box-sizing: border-box;
}

.main-nav .nav-container {
  display: flex;
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center; /* Desktop: center items */
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px; /* Desktop padding */
  width: 100%;
  gap: 20px; /* Spacing between nav links */
}

.nav-link {
  color: var(--secondary-color);
  font-weight: bold;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--text-color); /* Darker on hover */
  text-decoration: none;
}

/* Hamburger Menu (Desktop: hidden) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above other elements */
  flex-shrink: 0;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--secondary-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: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

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

/* Mobile Menu Overlay (Desktop: hidden) */
.mobile-menu-overlay {
  display: none; /* Hidden by default on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

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

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

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

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

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

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

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

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

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

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

.site-footer .footer-bottom p {
  margin: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* Header adjustments for mobile */
  .site-header {
    min-height: auto; /* Allow height to adjust */
  }

  .header-top {
    padding: 10px 0; /* Smaller padding for mobile */
    min-height: 50px; /* Adjust minimum height */
    position: relative; /* For logo absolute positioning if needed */
  }

  .header-top .header-container {
    padding: 0 15px; /* Smaller padding for mobile container */
    flex-wrap: nowrap;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 0; /* Place to the left */
    margin-right: 15px; /* Spacing from logo */
  }

  .logo {
    flex: 1; /* Allow logo to take available space */
    text-align: center; /* Center text logo */
    font-size: 20px; /* Smaller font size for mobile */
    order: 1; /* Place logo in the middle */
  }
  
  .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; /* Mobile padding */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    justify-content: center; /* Center buttons if less than 2 */
    min-height: 50px; /* Ensure minimum height */
    background-color: var(--header-top-bg); /* Match header-top background */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    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 text breaks within button */
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hide main nav by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--header-nav-bg);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    z-index: 999; /* Below overlay, but above content */
    overflow-y: auto; /* Enable scrolling for long menus */
    padding: 0; /* Remove padding from main-nav itself */
  }

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

  .main-nav .nav-container {
    flex-direction: column; /* Vertical links */
    align-items: flex-start; /* Align links to the left */
    padding: 20px 15px; /* Padding inside the mobile menu */
    gap: 15px; /* Spacing between links */
    max-width: none; /* Remove max-width for mobile container */
    width: 100%;
  }

  .nav-link {
    width: 100%; /* Full width links */
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when menu is active */
  }
  
  /* Footer adjustments for mobile */
  .site-footer .footer-container {
    flex-direction: column;
    padding: 0 15px;
  }

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

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

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