:root {
  --primary-color: #0A2463;
  --secondary-color: #FFD700;
  --dark-blue-variant: #071C4B;
  --header-top-bg: var(--dark-blue-variant);
  --main-nav-bg: var(--secondary-color);
  --header-offset: 110px; /* Desktop: header-top (approx 60px) + main-nav (approx 50px) */
}

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

/* Base Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Fixed header offset */
  color: #333;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

a {
  text-decoration: none;
  color: inherit;
}

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

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

.header-top {
  background-color: var(--header-top-bg);
  padding: 10px 0;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  padding: 5px 0;
  text-transform: uppercase;
  display: block; /* Ensure logo is visible */
  white-space: nowrap;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  text-decoration: none; /* Remove underline */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
}

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

.login-btn:hover {
  background-color: #FFEA00; /* Slightly lighter gold */
}

.register-btn {
  background-color: #FFC107; /* A slightly different gold for contrast */
  color: var(--primary-color);
}

.register-btn:hover {
  background-color: #FFD54F; /* Lighter shade */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Above other mobile elements */
  position: relative;
}

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

.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  width: 100%;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-wrap: wrap; /* Allow wrapping for many links */
}

.nav-link {
  color: var(--primary-color);
  padding: 10px 18px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 3px;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(10, 36, 99, 0.1); /* Light primary color tint */
  color: var(--primary-color);
}

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

.mobile-menu-overlay {
  display: none;
}

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color);
  color: #fff;
  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-section {
  flex: 1;
  min-width: 200px;
}

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

.footer-section ul li a {
  color: #ccc;
  padding: 5px 0;
  display: block;
}

.footer-section ul li a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-section.copyright {
  flex-basis: 100%;
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
}

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

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Important: remove max-width */
    justify-content: space-between; /* To keep hamburger left, logo centered */
  }

  .logo {
    flex: 1 !important; /* Take up available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    padding: 0; /* Adjust padding for mobile centering */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place it to the left */
  }

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

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

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

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

  .mobile-buttons-area {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--header-top-bg); /* Same as header-top for consistency */
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color); /* Dark blue for mobile menu */
    flex-direction: column;
    align-items: flex-start;
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 20px 0;
    overflow-y: auto;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    max-width: none; /* Important: remove max-width */
    width: 100%;
  }

  .nav-link {
    color: #fff;
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }

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

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

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

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

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

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

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