:root {
  --primary-color: #FFD700;
  --secondary-color: #1A1A1A;
  --header-offset: 110px; /* Desktop: header-top (~60px) + main-nav (~50px) */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  background-color: #f4f4f4;
  color: #333;
  overflow-x: hidden; /* Prevent horizontal scroll for body */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* General link styles */
a {
  text-decoration: none;
  color: inherit;
}

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

.header-top {
  background-color: var(--secondary-color); /* Dark background for top section */
  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(--primary-color); /* Gold logo text */
  text-decoration: none;
  text-transform: uppercase; /* Ensure logo text is uppercase */
  display: block;
  padding: 0;
  white-space: nowrap;
}

.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-color 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn-login {
  background-color: var(--primary-color); /* Gold button */
  color: var(--secondary-color); /* Dark text on gold */
}

.btn-login:hover {
  background-color: #e6c200; /* Darker gold on hover */
}

.btn-register {
  background-color: var(--secondary-color); /* Dark button */
  color: var(--primary-color); /* Gold text on dark */
  border: 1px solid var(--primary-color); /* Gold border for register */
}

.btn-register:hover {
  background-color: #333333; /* Lighter dark on hover */
  color: var(--primary-color);
  border-color: #e6c200;
}

.main-nav {
  background-color: var(--primary-color); /* Gold background for nav section */
  padding: 10px 0;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  justify-content: center; /* Center menu items */
  position: static; /* Desktop default: static */
  width: 100%;
}

.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;
  gap: 20px;
}

.nav-link {
  color: var(--secondary-color); /* Dark text on gold background */
  text-decoration: none;
  font-weight: bold;
  padding: 5px 10px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
  border-radius: 3px;
}

.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Mobile specific elements (hidden on desktop) */
.hamburger-menu, .mobile-nav-buttons, .mobile-menu-overlay {
  display: none;
}

/* Footer Styles */
.site-footer {
  background-color: var(--secondary-color); /* Dark background for footer */
  color: #fff;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
}

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

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-section h3 {
  color: var(--primary-color); /* Gold headings */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-section p, .footer-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-section ul li a {
  color: #ccc;
  text-decoration: none;
  display: block;
  padding: 5px 0;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  color: #aaa;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  .site-header {
    display: flex;
    flex-direction: column;
  }

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

  .logo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    order: 2;
    font-size: 24px;
  }
  
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    order: 1;
    z-index: 1001;
    padding: 5px;
  }

  .hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 2px;
    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);
  }

  .main-nav {
    display: none; /* Mobile default: hidden */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 80%;
    max-width: 300px; /* Limit mobile menu width */
    height: calc(100% - var(--header-offset));
    background-color: var(--secondary-color);
    padding: 20px 0;
    overflow-y: auto;
    transform: translateX(-100%); /* Hidden off-screen */
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
  }

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

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

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

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

  .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    background-color: var(--secondary-color);
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box;
    order: 3; /* Ensure buttons are below logo/hamburger */
  }
  
  .mobile-nav-buttons .btn {
    flex: 1;
    text-align: center;
    padding: 8px 15px;
  }

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

  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* 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 for mobile menu */
  body.no-scroll {
    overflow: hidden;
  }

  /* Footer mobile adjustments */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }
  .footer-section {
    min-width: unset;
    width: 100%;
    text-align: center;
  }
  .footer-section ul {
    text-align: center;
  }
  .footer-section ul li a {
    display: inline-block;
    padding: 5px 10px;
  }
}
/* 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;
  }
}
