:root {
  --header-offset: 105px; /* Desktop: Header Top (60px) + Main Nav (45px) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 120px; /* Mobile: Header Top (60px) + Mobile Buttons (60px) */
  }
}

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

/* General container styles */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Site Header - Fixed and Suspended */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: #fff; /* Neutral background for the whole fixed header */
  min-height: var(--header-offset);
}

/* Header Top - Desktop layout */
.header-top {
  background-color: #1A2E59; /* Primary color */
  color: #fff;
  padding: 15px 0;
  min-height: 60px;
  display: flex;
  align-items: center;
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFD700; /* Secondary color for logo */
  text-decoration: none;
  flex-shrink: 0; /* Prevent logo from shrinking */
  padding: 0;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  min-width: 90px;
}

.btn.login-btn {
  background-color: #FFD700; /* Secondary color for login */
  color: #1A2E59; /* Primary color for text */
}

.btn.login-btn:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
}

.btn.register-btn {
  background-color: #c0392b; /* A vibrant red for register */
  color: #fff;
}

.btn.register-btn:hover {
  background-color: #a52a22;
  transform: translateY(-2px);
}

/* Main Navigation - Desktop layout */
.main-nav {
  background-color: #FFD700; /* Secondary color */
  padding: 10px 0;
  display: flex; /* Desktop: always visible */
  justify-content: center;
  align-items: center;
  min-height: 45px;
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
  gap: 20px;
}

.nav-link {
  color: #1A2E59; /* Primary color for nav links */
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #0d1a33; /* Darker primary for hover */
}

/* Mobile specific elements - Hidden by default on desktop */
.hamburger-menu, .mobile-nav-buttons, .mobile-menu-overlay {
  display: none;
}

/* Footer styles */
.site-footer {
  background-color: #1A2E59; /* Primary color */
  color: #fff;
  padding: 40px 20px 20px;
  text-align: center;
}

.site-footer .footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  text-align: left;
  margin-bottom: 30px;
}

.footer-col {
  flex: 1;
  min-width: 250px;
  margin: 15px;
}

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

.site-footer p, .site-footer li, .site-footer a {
  font-size: 14px;
  color: #ccc;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-top: 20px;
  font-size: 13px;
  color: #aaa;
}

/* Mobile Responsive 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, .nav-container, .footer-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding-left: 15px;
    padding-right: 15px;
  }

  .site-header {
    display: block; /* Change to block for mobile stacking */
    min-height: auto; /* Auto height for mobile header components */
  }

  .header-top {
    padding: 15px 0;
    position: relative;
    z-index: 1002; /* Higher than menu and overlay */
    min-height: 60px;
  }

  .header-top .header-container {
    justify-content: flex-start; /* Align hamburger to start */
    position: relative;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1003; /* Highest for clickability */
    order: 1;
    margin-right: auto; /* Push it to the left */
  }

  .hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #FFD700; /* Gold bars */
    transition: all 0.3s ease-in-out;
  }

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

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

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

  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: auto; /* Allow natural width */
    flex-grow: 0;
    order: 2;
    font-size: 24px; /* Slightly smaller for mobile */
  }

  /* Image logo centering rule (as per prompt for img tags) */
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .mobile-nav-buttons {
    display: block; /* Show mobile buttons */
    background-color: #1A2E59; /* Same as header-top for continuity */
    padding: 10px 0;
    z-index: 1001;
    min-height: 60px;
    display: flex;
    align-items: center;
  }

  .mobile-nav-buttons .header-container {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: #1A2E59; /* Primary color for mobile menu */
    padding-top: var(--header-offset); /* Push menu content below fixed header */
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease-in-out;
    z-index: 1001;
    overflow-y: auto;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 20px;
    gap: 15px;
  }

  .main-nav .nav-link {
    color: #fff; /* White for mobile nav links */
    font-size: 18px;
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .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;
    align-items: center;
  }

  .footer-col {
    text-align: center;
    margin: 15px 0;
    min-width: unset;
    width: 100%;
  }

  .footer-col ul {
    padding: 0;
  }

  .footer-col li {
    display: inline-block;
    margin: 0 10px 8px;
  }
  .footer-col li a {
    white-space: nowrap;
  }
}

/* Body no-scroll for mobile menu */
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;
  }
}
