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

/* Base Styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  padding-top: var(--header-offset); /* Fixed header offset */
}

* {
  box-sizing: border-box;
}

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

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

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-top {
  background-color: #0056b3; /* Darker blue from primary */
  color: #fff;
  padding: 15px 0;
  min-height: 60px;
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  display: block; /* Ensure logo is visible */
}

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

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

.btn-register {
  background-color: #28a745; /* Secondary color */
  color: #fff;
}

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

.btn-login {
  background-color: #007bff; /* Primary color */
  color: #fff;
}

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

.main-nav {
  background-color: #cfe2ff; /* Light blue, contrasting with header-top */
  padding: 10px 0;
  display: flex; /* Desktop default */
  flex-direction: row; /* Desktop default */
  position: static; /* Desktop default */
  min-height: 50px;
  align-items: center;
}

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

.nav-link {
  color: #000;
  padding: 8px 15px;
  display: block;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: #007bff;
  color: #fff;
  border-radius: 5px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
}

.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown by media query */
}

/* Footer Styles */
.site-footer {
  background-color: #0056b3; /* Darker blue, consistent with header-top */
  color: #fff;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.footer-col {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  margin-bottom: 20px;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 15px;
  display: block;
}

.footer-col p {
  line-height: 1.8;
  opacity: 0.9;
}

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #cfe2ff; /* Light blue for headings */
}

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

.footer-nav a {
  color: #fff;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-nav a:hover {
  opacity: 1;
}

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

/* Mobile Styles */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }

  .header-top {
    padding: 10px 0;
    min-height: 50px;
  }

  .header-container {
    padding: 0 15px;
    position: relative; /* For positioning hamburger and logo */
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    order: 0;
    position: relative;
  }

  .hamburger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
  }

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

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

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

  .logo {
    flex: 1; /* Allows logo to take available space */
    text-align: center;
    font-size: 20px;
    order: 1;
    display: block; /* Ensure it's block for text-align */
  }

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

  .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: #f8f9fa; /* Light background for mobile buttons */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    min-height: 54px; /* Approx height for 2 buttons (8px padding top/bottom + 34px button height) */
  }

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

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

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

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

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
  }
  .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;
  }

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

  .footer-col {
    max-width: 100%;
    width: 100%;
  }

  .footer-logo {
    text-align: center;
  }

  .footer-col h3 {
    text-align: center;
  }

  .footer-nav {
    padding: 0;
    list-style: none;
  }
}
/* 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;
  }
}
