:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-color-dark: #333;
  --text-color-light: #fff;
  --header-offset: 130px; /* Desktop: header-top (70px) + main-nav (60px) */
}

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

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

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

.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(--secondary-color); /* Dark Red for top bar */
  padding: 10px 0; /* Vertical padding */
  min-height: 50px; /* To ensure content fits */
  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; /* Horizontal padding for desktop */
  box-sizing: border-box;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Gold for logo */
  text-transform: uppercase;
  display: block; /* Ensure visibility */
  padding: 5px 0;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  text-decoration: none; /* Remove underline */
  white-space: nowrap; /* Prevent breaking on desktop */
}

.btn-register {
  background: linear-gradient(135deg, var(--primary-color), gold);
  color: var(--secondary-color); /* Dark Red text on Gold button */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-register:hover {
  background: linear-gradient(135deg, gold, var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}

.btn-login {
  background-color: var(--primary-color); /* Gold */
  color: var(--secondary-color); /* Dark Red text on Gold button */
  border: 2px solid var(--secondary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-login:hover {
  background-color: gold;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

.hamburger-menu span {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--primary-color); /* Gold for hamburger lines */
  margin: 6px 0;
  transition: all 0.3s ease;
}

/* Main Navigation */
.main-nav {
  background-color: #333; /* Dark background for navigation, contrasting with header-top */
  padding: 10px 0; /* Vertical padding */
  min-height: 40px; /* To ensure content fits */
  display: flex; /* Desktop default */
  flex-direction: row; /* Desktop default */
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row; /* Desktop default */
  justify-content: center;
  align-items: center;
  padding: 0 20px; /* Horizontal padding for desktop */
  gap: 25px;
  box-sizing: border-box;
}

.nav-link {
  color: var(--text-color-light); /* White text for nav links */
  font-weight: bold;
  font-size: 16px;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color); /* Gold on hover */
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-nav-buttons {
  display: none; /* Hidden 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;
}

/* Footer Styles */
.site-footer {
  background-color: #222; /* Dark background for footer */
  color: #bbb;
  padding: 40px 20px;
  font-size: 14px;
}

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

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color); /* Gold for footer logo */
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

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

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

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

.footer-nav a {
  color: #bbb;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color); /* Gold on hover */
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #444;
  color: #888;
}

/* Mobile styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Hamburger left, Logo center, empty space right */
    position: relative; /* For absolute positioning of logo if needed */
    min-height: 40px;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Left side */
    margin-right: auto; /* Push logo to center if it's flex: 1 */
  }

  .logo {
    order: 2; /* Center */
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Smaller logo on mobile */
  }
  
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Adjust as needed */
  }
  
  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%; /* Ensure it doesn't exceed screen width */
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for the button container */
    overflow: hidden; /* Prevent overflow */
    gap: 10px; /* Space between buttons */
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background-color: #444; /* A slightly different background for mobile buttons */
    justify-content: center; /* Center buttons if less than 2 */
  }

  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space evenly */
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure text breaks within button */
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu on mobile */
    position: fixed; /* Fixed position for sidebar menu */
    top: var(--header-offset); /* Start below the header */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #222; /* Dark background for mobile menu */
    padding: 20px 0;
    box-sizing: border-box;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column; /* Vertical links in mobile menu */
    padding: 0 15px;
    gap: 15px;
    align-items: flex-start; /* Align links to the left */
  }

  .nav-link {
    width: 100%; /* Full width for mobile links */
    padding: 10px 0;
  }

  .nav-link::after {
    height: 1px; /* Thinner underline for mobile */
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when menu is active */
  }

  .site-footer {
    padding: 30px 15px;
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

  .footer-col {
    min-width: unset;
    width: 100%;
  }

  .footer-bottom {
    margin-top: 30px;
  }
  
  /* Mobile content overflow protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* Hamburger menu active state (X icon) */
.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);
}
/* 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;
  }
}
