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

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

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

.site-header {
  position: fixed;
  top: 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 have their own colors */
}

.header-top {
  background-color: #1A709D; /* Darker blue */
  padding: 15px 0;
  min-height: 60px; /* Ensures height for desktop, for mobile it's overridden */
  display: flex; /* For mobile layout */
  align-items: center; /* For mobile logo centering */
}

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

.logo {
  color: var(--secondary-color);
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  order: 0; /* Default order for desktop */
  white-space: nowrap; /* Prevent logo text from wrapping */
  display: block; /* Ensure visibility */
}

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

.btn {
  padding: 10px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  text-align: center;
  display: inline-block;
  cursor: pointer;
  border: none;
  color: var(--secondary-color); /* White text for buttons */
}

.btn-register {
  background-color: var(--primary-color);
}

.btn-register:hover {
  background-color: #1e8bc3; /* Slightly darker primary on hover */
  transform: translateY(-1px);
}

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

.btn-login:hover {
  background-color: #c96a06; /* Slightly darker login color on hover */
  transform: translateY(-1px);
}

.main-nav {
  background-color: var(--primary-color); /* Primary blue */
  width: 100%;
  display: flex; /* Desktop default: flex */
  min-height: 50px; /* Ensures height for desktop */
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

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

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  position: relative;
  z-index: 1001; /* Above logo on mobile */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Mobile specific styles */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  background-color: var(--secondary-color); /* White background for mobile buttons */
  padding: 10px 15px; /* Adjust padding for mobile container */
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap; /* Prevent wrapping */
  overflow: hidden; /* Prevent overflow */
  min-height: 50px; /* Ensures height for mobile buttons */
}

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

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

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

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

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

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

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

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

.footer-col ul li a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
}

.footer-info .footer-logo {
  color: var(--primary-color);
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
}

.footer-info p {
  margin-top: 15px;
  line-height: 1.8;
}

/* Mobile specific overrides */
@media (max-width: 768px) {
  .header-top {
    padding: 10px 0; /* Smaller padding on mobile */
    min-height: 50px; /* Ensures height for mobile */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile container */
    flex-wrap: nowrap; /* Ensure items stay in one line for top bar */
    justify-content: space-between; /* Space out hamburger, logo, empty space */
    max-width: none; /* Remove max-width for mobile container */
  }

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

  .logo {
    order: 1; /* Center logo */
    flex: 1 !important; /* Allow flex to center it */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Smaller font size for mobile logo */
    margin: 0; /* Remove any default margins */
    max-width: calc(100% - 100px); /* Limit width to prevent overlap with hamburger */
  }

  .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; /* Adjust padding for mobile button container */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center; /* Center buttons if less than 2 */
  }

  .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; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure text breaks correctly */
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical links */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Take remaining height */
    background-color: var(--primary-color);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align links to the left */
    padding: 20px 15px;
    max-width: none; /* Remove max-width for mobile container */
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 5px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
  }

  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

  .footer-col {
    min-width: unset;
    flex: none;
    width: 100%;
    text-align: center;
  }

  .footer-col h3 {
    text-align: center;
  }

  .footer-col ul {
    text-align: center;
  }

  .footer-info .footer-logo {
    text-align: center;
  }

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