:root {
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
  --primary-color: #FFD700;
  --secondary-color: #008000;
  --accent-color: #DC143C;
  --dark-bg-color: #1a1a1a;
  --text-color-light: #f0f0f0;
  --text-color-dark: #333;
}

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

/* Global styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  color: var(--text-color-dark);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

.header-top {
  background-color: var(--dark-bg-color); /* Dark background for contrast */
  padding: 15px 0; /* Vertical padding, aiming for ~60px height */
  min-height: 30px;
  display: flex;
  align-items: center;
}

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

.logo {
  color: var(--primary-color);
  font-size: 2em;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}

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

.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;
  color: var(--text-color-dark); /* Default text color for buttons */
}

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

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

.btn-register {
  background-color: var(--secondary-color);
  color: var(--text-color-light);
}

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

.main-nav {
  background-color: var(--primary-color); /* Gold background for main nav */
  padding: 10px 0; /* Vertical padding, aiming for ~50px height */
  min-height: 30px;
  display: flex;
  align-items: center;
}

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

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

.nav-link:hover {
  color: var(--secondary-color);
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: 0.4s;
}

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

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

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Footer styles */
.site-footer {
  background-color: var(--dark-bg-color);
  color: var(--text-color-light);
  padding: 40px 20px 20px;
  font-size: 0.9em;
}

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

.footer-col {
  flex: 1;
  min-width: 200px;
}

.footer-logo {
  color: var(--primary-color);
  font-size: 1.8em;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-col h3 {
  color: var(--primary-color);
  font-size: 1.2em;
  margin-bottom: 15px;
}

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

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

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

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

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

/* Mobile 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 {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    justify-content: space-between;
  }

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
  }

  .hamburger-menu {
    display: block;
    order: 1;
    color: var(--text-color-light);
  }

  .hamburger-menu .bar {
    background-color: var(--text-color-light);
  }

  .logo {
    order: 2;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 1.8em;
    padding-right: 0;
  }

  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the header */
    left: 0;
    width: 80%;
    height: calc(100% - var(--header-offset));
    background-color: var(--dark-bg-color);
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 9999;
  }

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

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

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

  .main-nav .nav-link:hover {
    color: var(--primary-color);
  }

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

  .mobile-buttons-area {
    display: flex;
    justify-content: center;
    gap: 10px;
    background-color: var(--secondary-color); /* Dark green background */
    padding: 10px 15px; /* Vertical padding, aiming for ~60px height */
    min-height: 40px;
    width: 100%;
    box-sizing: border-box;
  }

  .mobile-buttons-area .btn {
    flex: 1;
    max-width: 150px;
    padding: 10px 15px;
    font-size: 0.9em;
  }

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

  .footer-col {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .footer-logo {
    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;
  }
}
