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

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

/* Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  padding-top: var(--header-offset); /* Apply header offset to body */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

a:hover {
  text-decoration: underline;
}

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

.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;
  text-decoration: none; /* Remove underline for buttons */
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn-register {
  background-color: var(--login-button-color); /* Orange */
  color: var(--secondary-color); /* White */
  border: 2px solid var(--login-button-color);
}

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

.btn-login {
  background-color: transparent;
  color: var(--secondary-color); /* White */
  border: 2px solid var(--secondary-color);
}

.btn-login:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Header Styles - Desktop First */
.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); /* Base white for the whole fixed header */
}

.header-top {
  background-color: var(--header-top-bg); /* Darker blue */
  min-height: 60px; /* Ensure minimum height */
  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;
  box-sizing: border-box;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* White */
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  padding: 10px 0; /* Add some vertical padding for alignment */
}

.logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

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

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

.main-nav {
  background-color: var(--main-nav-bg); /* Primary blue */
  min-height: 50px; /* Ensure minimum height */
  display: flex; /* Desktop: display flex */
  align-items: center;
  justify-content: center; /* Center nav links */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on narrower desktop screens */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.nav-link {
  color: var(--secondary-color); /* White */
  padding: 10px 15px;
  font-weight: bold;
  white-space: nowrap; /* Prevent nav links from wrapping on desktop */
  transition: background-color 0.3s ease;
}

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001; /* Above logo on mobile */
  margin-right: 15px; /* Spacing from logo */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

.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;
  opacity: 1;
}

/* Footer Styles */
.site-footer {
  background-color: var(--black-color); /* Black background for footer */
  color: var(--secondary-color); /* White text */
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

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

.footer-col h3 {
  color: var(--primary-color); /* Light blue for headings */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  display: block;
}

.footer-logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

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

.footer-nav li a {
  color: #CCC;
  padding: 5px 0;
  display: block;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #CCC;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .header-container, .nav-container {
    padding: 0 15px; /* Smaller padding on mobile */
    max-width: none; /* No max-width on mobile containers */
    width: 100%;
  }

  /* Header Top Mobile Layout */
  .header-top .header-container {
    justify-content: space-between;
    position: relative; /* For logo absolute positioning if needed */
    min-height: 60px; /* Ensure height for hamburger/logo */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Place hamburger first */
  }

  .logo {
    order: 2; /* Place logo second */
    flex-grow: 1; /* Allow logo to take available space for centering */
    text-align: center; /* Center text logo */
    padding: 10px 0; /* Adjust padding */
    font-size: 20px; /* Smaller font size for logo on mobile */
    display: flex; /* Use flex for centering */
    justify-content: center;
    align-items: center;
  }

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

  /* Mobile Buttons Section */
  .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 container */
    overflow: hidden;
    gap: 10px; /* Space between buttons */
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background-color: var(--header-top-bg); /* Same background as header-top */
  }

  .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 Navigation Mobile State */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 80%; /* Menu takes 80% width */
    max-width: 300px; /* Max width for mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    flex-direction: column; /* Vertical layout */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    box-sizing: border-box;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    background-color: var(--main-nav-bg); /* Primary blue */
    z-index: 999; /* Below overlay, above content */
    overflow-y: auto; /* Allow scrolling if menu content is long */
  }

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

  .nav-link {
    width: 100%; /* Full width for mobile nav links */
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  /* Footer Mobile Layout */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

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

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* Ensure body scroll is prevented 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;
  }
}
