:root {
  --header-offset: 120px; /* Desktop: Header + button area total height */
  --primary-color: #CC0000;
  --secondary-color: #FFD700;
  --text-on-dark: #FFFFFF;
  --text-on-light: #333333;
}
@media (max-width: 768px) {
  :root {
    --header-offset: 200px; /* Mobile: Header + mobile button area total height */
  }
}

@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;
  }
}

/* Base styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: var(--text-on-light);
  line-height: 1.6;
  background-color: #f4f4f4;
  overflow-x: hidden; 
}

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

/* Site Header - Fixed, desktop first */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: var(--primary-color); /* Default background, will be overridden for main-nav */
}

.header-top {
  background-color: var(--primary-color); /* Red */
  padding: 10px 0;
}

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

.logo {
  font-size: 2.2em;
  font-weight: bold;
  color: var(--secondary-color); /* Gold for logo text */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  padding: 5px 0;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  transition: all 0.3s ease;
  text-decoration: none; /* Remove underline */
  cursor: pointer;
}

.btn-register {
  background-color: var(--primary-color); /* Red */
  color: var(--text-on-dark); /* White */
  border: 2px solid var(--primary-color);
}

.btn-register:hover {
  background-color: #A00000; /* Darker red */
  border-color: #A00000;
}

.btn-login {
  background-color: var(--secondary-color); /* Gold */
  color: var(--text-on-light); /* Dark gray */
  border: 2px solid var(--secondary-color);
}

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

/* Main Navigation */
.main-nav {
  background-color: var(--secondary-color); /* Gold background for main nav */
  padding: 10px 0;
  width: 100%;
  display: flex; /* Desktop default: flex */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  justify-content: center; /* Center nav links */
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  color: var(--text-on-light); /* Dark gray text on gold background */
  padding: 10px 15px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

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

/* Mobile specific elements - hidden by default on desktop */
.hamburger-menu,
.mobile-button-area,
.mobile-menu-overlay {
  display: none;
}

/* Hamburger menu icon */
.hamburger-menu {
  width: 30px;
  height: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  cursor: pointer;
  z-index: 1001; 
  padding: 5px; 
  box-sizing: content-box; 
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: var(--text-on-dark); /* White bars */
  transition: all 0.3s ease;
}

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

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

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

/* Footer */
.site-footer {
  background-color: #333333; /* Dark gray */
  color: #CCCCCC; /* Light gray */
  padding: 40px 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;
  max-width: 300px;
}

.footer-col h3 {
  color: var(--secondary-color); /* Gold for footer headings */
  margin-bottom: 15px;
  font-size: 1.2em;
}

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

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

.footer-nav a {
  color: #CCCCCC; /* Light gray for footer links */
  transition: color 0.3s ease;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  /* Mobile Header */
  .header-top {
    padding: 10px 0;
    justify-content: space-between;
  }

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

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

  .hamburger-menu {
    display: flex; 
    order: 1; 
  }

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

  /* Mobile Button Area */
  .mobile-button-area {
    display: block; 
    background-color: var(--primary-color); /* Red background */
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .mobile-button-container {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    display: flex;
    justify-content: center; 
    gap: 10px;
    padding: 0 15px;
  }

  .btn {
    flex: 1; 
    max-width: 150px; 
    font-size: 0.9em;
    padding: 8px 15px;
  }

  /* Mobile Navigation Menu */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; 
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile button area */
    left: 0;
    width: 80%; 
    height: calc(100vh - var(--header-offset)); 
    background-color: rgba(0, 0, 0, 0.9); /* Dark overlay background */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Off-screen initially */
    transition: transform 0.3s ease;
    overflow-y: auto; 
    z-index: 999; 
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-on-dark); /* White text */
  }

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

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    z-index: 998; 
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }

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

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

  .footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

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

/* Ensure body scroll is managed when menu is open */
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;
  }
}
