:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-dark: #1a1a1a; /* Very dark grey for text on light backgrounds */
  --bg-dark: #1a1a1a; /* Dark background for header top and footer */
  --bg-nav: #8B0000; /* Dark red background for main nav */
  --text-light: #ffffff; /* White for text on dark backgrounds */
  --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) */
  }
}

/* General Body Styling & Reset */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default text color for potential dark page content */
  background-color: #333;
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

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

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  background-color: var(--bg-nav); /* Fallback, specific sections will override */
}

/* Header Top Section (Desktop: Logo Left, Buttons Right) */
.header-top {
  background-color: var(--bg-dark); /* Dark background for top bar */
  min-height: 60px; /* Approx height for logo/buttons */
  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; /* Padding for logo and buttons from container edges */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  padding: 10px 0; /* Ensures some vertical space */
  display: block; /* Ensure it takes up space for min-height */
  white-space: nowrap;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  text-decoration: none; /* Remove underline for buttons */
  white-space: nowrap; /* Prevent buttons from wrapping text */
  cursor: pointer;
}

.login-btn {
  background-color: var(--primary-color); /* Gold */
  color: var(--text-dark); /* Dark text for contrast */
  box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}

.login-btn:hover {
  background-color: #e6c200; /* Slightly darker gold */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 215, 0, 0.6);
}

.register-btn {
  background-color: var(--secondary-color); /* Dark Red */
  color: var(--text-light); /* White text for contrast */
  border: 2px solid var(--primary-color); /* Gold border */
  box-shadow: 0 4px 8px rgba(139, 0, 0, 0.4);
}

.register-btn:hover {
  background-color: #a30000; /* Slightly darker red */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(139, 0, 0, 0.6);
}

/* Main Navigation (Desktop: Centered Links) */
.main-nav {
  background-color: var(--bg-nav); /* Dark Red background for nav links */
  min-height: 50px; /* Approx height for nav links */
  display: flex; /* Show on desktop */
  align-items: center;
  justify-content: center; /* Center nav-container itself */
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center; /* Center nav links horizontally */
  align-items: center;
  padding: 10px 20px;
  gap: 25px; /* Space between nav links */
  flex-wrap: wrap; /* Allow links to wrap if too many */
}

.nav-link {
  color: var(--primary-color); /* Gold text for nav links */
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-light); /* White on hover */
}

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

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

/* Mobile Specific Styles */
.hamburger-menu, .mobile-nav-buttons, .mobile-menu-overlay {
  display: none; /* Hidden by default on desktop */
}

/* Footer Styling */
.site-footer {
  background-color: var(--bg-dark); /* Dark background for footer */
  color: var(--text-light);
  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);
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

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

.footer-col p {
  margin-bottom: 10px;
  color: #ccc;
}

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

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

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

.copyright {
  margin-top: 20px;
  font-size: 13px;
  color: #888;
}

/* Mobile Media Queries */
@media (max-width: 768px) {
  /* Mobile Image 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;
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    max-width: none; /* Remove max-width on mobile */
    width: 100%; /* Occupy full width */
    justify-content: space-between; /* Hamburger left, Logo center */
    position: relative; /* For absolute positioning of logo if needed */
  }

  .main-nav .nav-container {
    padding: 10px 15px; /* Smaller padding for mobile */
    max-width: none; /* Remove max-width on mobile */
    width: 100%; /* Occupy full width */
    flex-direction: column; /* Vertical links */
    align-items: flex-start; /* Align links to left */
    gap: 15px;
  }
  
  .header-top {
    min-height: 60px;
  }

  /* Hamburger Menu */
  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001; /* Above logo and buttons */
    position: relative;
    padding: 5px;
  }

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

  /* Mobile Logo Centering */
  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px 0; /* Adjust padding for mobile */
  }
  .logo img { /* If logo is an image */
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

  /* Hide desktop buttons, show mobile buttons */
  .desktop-nav-buttons {
    display: none;
  }

  .mobile-nav-buttons {
    display: flex; /* Show on mobile */
    background-color: var(--bg-dark); /* Same as header top */
    padding: 10px 15px;
    justify-content: center; /* Center buttons */
    min-height: 50px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  }
  .mobile-nav-buttons .nav-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: none;
    padding: 0; /* Reset container padding */
  }

  /* Mobile Navigation Menu (Hidden by default) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below fixed header + buttons */
    left: 0;
    width: 80%; /* Menu takes 80% width */
    max-width: 300px; /* Max width for menu */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--bg-nav); /* Dark Red background */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Scroll if menu content is long */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 999; /* Below hamburger, above overlay */
  }

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

  .main-nav .nav-link {
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2); /* Gold separator */
    color: var(--primary-color);
  }
  .main-nav .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile Menu Overlay */
  .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: 998; /* Below menu, above page content */
    opacity: 0;
    transition: opacity 0.3s ease;
  }

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

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

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

  .footer-nav {
    margin-bottom: 20px;
  }
}
/* 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
