:root {
  --primary-color: #0A2463; /* Deep Blue */
  --secondary-color: #FFD700; /* Gold */
  --text-light: #FFFFFF;
  --text-dark: #333333;

  --header-offset: 110px; /* Desktop: header-top (~60px) + main-nav (~50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: header-top (~60px) + mobile-buttons (~50px) */
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

html {
  scroll-behavior: smooth;
}

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: var(--text-dark);
  overflow-x: hidden; /* Prevent horizontal scroll */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--primary-color); /* Fallback, sections have specific colors */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

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

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Gold text for logo */
  text-decoration: none;
  text-transform: uppercase;
  display: block;
  padding: 5px 0;
  line-height: 1;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(1px);
}

.btn-login {
  background-color: var(--primary-color); /* Primary color for Login button */
  color: var(--text-light); /* White text for Login button */
  border: 1px solid var(--secondary-color); /* Gold border for Login */
}

.btn-login:hover {
  background-color: #05143a; /* Slightly darker blue */
  color: var(--secondary-color);
}

.btn-register {
  background-color: var(--secondary-color); /* Secondary color for Register button */
  color: var(--primary-color); /* Deep blue text for Register button */
}

.btn-register:hover {
  background-color: #e6c200; /* Slightly darker gold */
  color: var(--text-dark);
}

.hamburger-menu {
  display: none;
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
  margin-right: 20px;
}

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

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

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

.main-nav {
  background-color: var(--secondary-color); /* Gold background for main nav */
  padding: 10px 0;
  min-height: 30px; /* Adjusted min-height for nav items */
  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 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--primary-color); /* Deep blue text for nav links */
  text-decoration: none;
  padding: 8px 15px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease, border-radius 0.3s ease;
  white-space: nowrap;
  border-radius: 5px;
}

.nav-link:hover {
  color: var(--text-light); /* White text on hover */
  background-color: var(--primary-color); /* Deep blue background on hover */
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color); /* Deep Blue */
  color: var(--text-light);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
}

.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: 250px;
}

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

.footer-section p, .footer-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-section a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--secondary-color); /* Gold on hover */
}

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

/* Mobile specific styles */
@media (max-width: 768px) {
  .header-top {
    min-height: 50px; /* Adjust height for mobile */
    padding: 5px 0;
  }
  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* No max-width on mobile */
    justify-content: space-between;
    position: relative;
  }

  .hamburger-menu {
    display: block;
    order: 0;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
    order: 1;
    padding: 0;
    text-align: center; /* For text logo */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

  /* Placeholder for empty space on right to balance logo centering */
  .header-container::after {
    content: '';
    width: 30px; /* Same width as hamburger */
    order: 2;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Optional: limit mobile menu width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--primary-color);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease-out;
    overflow-y: auto;
    z-index: 999;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
    padding-bottom: 20px;
  }

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

  .nav-container {
    flex-direction: column;
    padding: 20px 15px;
    max-width: none;
    width: 100%;
    align-items: flex-start;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-radius: 0;
  }

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

  .nav-link:hover {
    background-color: #05143a;
    color: var(--secondary-color);
  }

  .mobile-buttons {
    display: flex;
    background-color: var(--primary-color);
    padding: 10px 15px;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
  }

  .mobile-buttons .btn {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 6px;
  }

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 998;
    transition: opacity 0.3s ease-out;
    opacity: 0;
  }

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

  body.no-scroll {
    overflow: hidden;
  }

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

  .footer-section {
    min-width: unset;
  }

  .footer-section h3,
  .footer-section p,
  .footer-section ul {
    text-align: center;
  }
  .footer-section ul li {
    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;
  }
}
