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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #FFFFFF;
  background-color: #0A1931;
}

/* --- General Shared Styles --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: #0A1931; /* Fallback for transparency issues */
  direction: ltr;
}

.header-top {
  background-color: #0A1931; /* Primary color */
  padding: 15px 0;
  min-height: 30px; /* To ensure content fits */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFD700; /* Auxiliary color */
  text-decoration: none;
  display: block;
  white-space: nowrap;
}

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

.btn {
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-register {
  background-color: #FFD700; /* Auxiliary color */
  color: #0A1931; /* Primary color for text */
}

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

.btn-login {
  background-color: #0A1931; /* Primary color */
  color: #FFD700; /* Auxiliary color */
  border: 1px solid #FFD700;
}

.btn-login:hover {
  background-color: #FFD700;
  color: #0A1931;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002;
}

.hamburger-menu::before, .hamburger-menu::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: #FFD700;
  left: 0;
  transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger-menu::before {
  top: 0;
}

.hamburger-menu::after {
  top: 10px;
}

.hamburger-menu.active::before {
  transform: rotate(45deg);
  top: 5px;
}

.hamburger-menu.active::after {
  transform: rotate(-45deg);
  top: 5px;
}

.hamburger-menu.active::before, .hamburger-menu.active::after {
  background-color: #FFD700;
}

.main-nav {
  background-color: #1A2B47; /* A darker shade of blue, distinct from header-top */
  width: 100%;
  display: flex; /* Desktop default */
  min-height: 40px; /* To ensure content fits */
}

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

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

.nav-link:hover {
  color: #FFD700;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* --- Footer Styles --- */
.site-footer {
  background-color: #0A1931; /* Primary color */
  color: #FFFFFF;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
  direction: ltr;
}

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

.footer-col {
  flex: 1 1 250px; /* Allows columns to grow/shrink, min-width 250px */
  min-width: 200px; /* Ensure some minimum width on smaller desktops */
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700; /* Auxiliary color */
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-col h3 {
  color: #FFD700; /* Auxiliary color */
  margin-bottom: 20px;
  font-size: 18px;
}

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

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

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

.footer-nav a:hover {
  color: #FFD700;
}

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

.footer-bottom p {
  margin: 0;
}

/* --- Mobile Specific Styles --- */
@media (max-width: 768px) {
  .header-top {
    padding: 10px 0;
    position: relative;
    min-height: 50px;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    justify-content: space-between;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .hamburger-menu {
    display: block;
    position: relative;
    z-index: 1002;
    margin-right: auto; /* Push logo to center */
  }

  /* Mobile specific buttons container */
  .mobile-nav-buttons {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #0A1931; /* Same as header-top */
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    height: auto;
  }

  /* Mobile menu styles */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; /* Adjusted by JS to be below header-top and mobile-nav-buttons */
    left: 0;
    height: 100%;
    width: 80%;
    max-width: 300px; /* Max width for mobile menu */
    background-color: #1A2B47;
    flex-direction: column;
    padding-top: var(--header-offset); /* Offset by header height */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  }

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

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

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

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

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

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

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

  .footer-col {
    min-width: unset;
    flex: 1 1 100%;
  }

  /* Mobile content overflow prevention */
  .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;
  }
}
