:root {
  --primary-color: #003366;
  --secondary-color: #FFD700;
  --dark-blue: #002244;
  --orange-gold: #FFA500;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

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: #333;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* --- Header Styles --- */
.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(--dark-blue); /* Default background for entire header */
}

.header-top {
  width: 100%;
  background-color: var(--dark-blue); /* Distinct background for top section */
  padding: 15px 0; /* Target 60px height */
  min-height: 30px;
}

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

.logo {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 28px;
  font-weight: bold;
  text-transform: uppercase;
  white-space: nowrap;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1; /* Ensure consistent height */
  border: none; /* No border for buttons */
  cursor: pointer;
}

.btn-login {
  background-color: var(--orange-gold); /* Vibrant for Login */
  color: var(--primary-color);
}

.btn-login:hover {
  background-color: #e09b00;
}

.btn-register {
  background-color: var(--secondary-color); /* Prominent for Register */
  color: var(--primary-color);
}

.btn-register:hover {
  background-color: #e6c200;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  width: 40px;
  height: 40px;
}

.hamburger-menu span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 5px auto;
  transition: all 0.3s ease;
}

/* Main Navigation */
.main-nav {
  width: 100%;
  background-color: var(--secondary-color); /* Distinct background for nav section */
  display: flex; /* Desktop default: flex */
  padding: 10px 0; /* Target 50px height */
  min-height: 30px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px; /* Desktop padding */
}

.nav-link {
  color: var(--primary-color);
  text-decoration: none;
  padding: 8px 15px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
  font-size: 16px;
}

.nav-link:hover {
  background-color: rgba(0, 51, 102, 0.1); /* Light hover effect */
  border-radius: 4px;
}

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

.mobile-menu-overlay {
  display: none; /* Hidden by default */
}

/* --- Footer Styles --- */
.site-footer {
  background-color: var(--primary-color);
  color: #fff;
  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;
  padding-bottom: 30px;
}

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

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

.footer-column p {
  line-height: 1.8;
  color: #ccc;
}

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

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

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

.footer-nav a:hover {
  color: var(--secondary-color);
}

.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 Specific Styles --- */
@media (max-width: 768px) {
  .header-top {
    padding: 15px 0;
    height: 60px; /* Fixed height for top bar */
    display: flex;
    align-items: center;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Crucial: no max-width on mobile */
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Hamburger left, Logo center */
    position: relative;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .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);
  }

  .logo {
    order: 2;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust logo size for mobile */
    position: relative; /* To center text logo */
    left: 0; /* Reset for flex centering */
    transform: none; /* Reset for flex centering */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .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 width */
    max-width: 300px; /* Optional: max width for side menu */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    flex-direction: column;
    background-color: var(--primary-color);
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* Crucial: no max-width on mobile */
    flex-direction: column;
    align-items: flex-start; /* Align menu items to left */
    padding: 0 20px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff; /* White text on dark blue background */
    font-size: 18px;
  }

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

  .mobile-buttons-area {
    display: flex; /* Show mobile buttons area */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--dark-blue); /* Same as header-top for consistency */
    height: 50px; /* Fixed height for buttons area */
    min-height: 30px;
  }
  .mobile-buttons-area .btn {
    font-size: 16px;
    padding: 8px 15px;
  }

  .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.7);
    z-index: 998;
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when active */
  }

  /* Footer adjustments for mobile */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

  .footer-column {
    min-width: unset;
    flex: none;
  }

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

  .footer-nav {
    text-align: center;
  }
  .footer-nav li {
    display: inline-block; /* For better layout on smaller screens */
    margin: 0 8px 8px;
  }
  .footer-nav a {
    white-space: nowrap;
  }

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