:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-btn-color: #EA7C07;
  --text-color: #333333;
  --header-offset: 100px; /* Desktop: header-top (60px) + main-nav (40px) */
}

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

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding-top: var(--header-offset); /* Apply offset here */
  color: var(--text-color);
  background-color: var(--secondary-color);
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

a:hover {
  text-decoration: underline;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: var(--secondary-color); /* Fallback, specific sections will override */
}

.header-top {
  background-color: #000000; /* Darker background for top bar */
  padding: 15px 0; /* Vertical padding */
  min-height: 30px; /* Ensure minimum height for content */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px; /* Horizontal padding for desktop */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* White text for dark background */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure it's not hidden */
}

.desktop-nav-buttons {
  display: flex; /* Show on desktop */
  gap: 12px;
}

.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);
}

.btn-register:hover {
  background-color: #1a7fb0; /* Darker shade */
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-login {
  background-color: var(--login-btn-color);
  color: var(--secondary-color);
}

.btn-login:hover {
  background-color: #c76705; /* Darker shade */
  transform: translateY(-2px);
  text-decoration: none;
}

.main-nav {
  background-color: var(--primary-color); /* Lighter blue for nav bar */
  padding: 10px 0;
  min-height: 20px;
  display: flex; /* Show on desktop by default */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Horizontal on desktop */
  justify-content: center; /* Center nav links */
  align-items: center;
  padding: 0 20px; /* Horizontal padding for desktop */
}

.nav-link {
  color: var(--secondary-color);
  padding: 8px 15px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline */
}

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

/* Mobile specific elements (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above logo and buttons */
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--secondary-color); /* White lines on dark background */
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

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

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

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

.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;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer Styles */
.site-footer {
  background-color: #333333; /* Darker background for footer */
  color: var(--secondary-color);
  padding: 40px 0;
  font-size: 14px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0 40px;
  gap: 20px; /* Gap between columns */
}

.footer-column {
  flex: 1;
  min-width: 200px; /* Minimum width for columns before wrapping */
  margin-bottom: 20px;
}

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

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

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

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

.footer-column ul li a {
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

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

.footer-brand p {
  line-height: 1.8;
  color: #cccccc;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px; /* Smaller horizontal padding for mobile */
    justify-content: space-between; /* Hamburger left, logo center, space right */
    position: relative; /* For proper logo centering */
    min-height: 50px; /* Ensure enough height for logo */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: -1; /* Place it first in flex order */
    align-self: center; /* Center vertically */
  }

  .logo {
    flex: 1; /* Allow logo to take available space */
    display: flex;
    justify-content: center; /* Center logo horizontally */
    align-items: center;
    font-size: 20px; /* Smaller font size for mobile logo */
  }

  /* To balance the logo when hamburger is present, create a pseudo-element */
  .header-container::after {
    content: '';
    width: 30px; /* Match hamburger width */
    height: 20px; /* Match hamburger height */
    display: block;
    visibility: hidden; /* Keep it invisible */
  }

  .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 mobile button container */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background-color: #1A7FB0; /* Different background for mobile buttons */
  }

  .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; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
    overflow-wrap: break-word; /* Allow text to break words */
  }

  .main-nav {
    display: none; /* Hide main nav by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    flex-direction: column; /* Vertical menu */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    background-color: var(--primary-color); /* Same as desktop nav, or slightly different */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto; /* Allow scrolling if menu content is long */
  }

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

  .nav-container {
    flex-direction: column; /* Vertical links */
    align-items: flex-start;
    padding: 0; /* Reset padding for mobile */
    width: 100%;
    max-width: none; /* Remove max-width for mobile container */
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px; /* Larger padding for mobile links */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }

  .footer-container {
    flex-direction: column;
    padding: 0 15px;
  }

  .footer-column {
    min-width: 100%;
    text-align: center;
  }

  .footer-column h3 {
    margin-top: 20px;
  }

  .footer-logo {
    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;
  }
}

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