:root {
  --primary-color: #0A2342;
  --accent-color: #FFD700;
  --action-color: #DC143C;
  --header-offset: 110px; /* Desktop: header-top (70px) + main-nav (40px) */
}

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

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

.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(--primary-color);
}

.header-top {
  background-color: var(--primary-color);
  padding: 15px 0;
  color: #fff;
}

.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: var(--accent-color);
  text-decoration: none;
  text-transform: uppercase;
  flex-shrink: 0;
}

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

.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;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

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

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

.register-btn {
  background-color: var(--action-color);
  color: #fff;
}

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

.main-nav {
  background-color: #1A3A60; /* Slightly lighter primary for distinction */
  padding: 10px 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

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

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

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  padding: 0;
  z-index: 1001;
  position: relative;
}

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

.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);
}

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

.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: 999;
  backdrop-filter: blur(5px);
}

.site-footer {
  background-color: var(--primary-color);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section {
  flex: 1;
  min-width: 180px;
  text-align: left;
}

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

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

.footer-nav li a {
  color: #ccc;
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  margin-top: 30px;
  font-size: 14px;
  color: #ccc;
}

@media (max-width: 768px) {
  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    margin-left: -30px; /* Offset for hamburger menu */
  }

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

  .hamburger-menu {
    display: flex;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 250px;
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }

  .main-nav.active {
    display: flex;
    transform: translateX(0);
  }

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

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

  .mobile-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 20px;
    background-color: #1A3A60; /* Matches main-nav background */
    width: 100%;
    box-sizing: border-box;
  }

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

  .footer-container {
    flex-direction: column;
    align-items: center;
  }

  .footer-section {
    text-align: center;
    margin-bottom: 20px;
  }

  .footer-section h3 {
    margin-bottom: 10px;
  }

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