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

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

/* Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #E0E0E0; /* Light grey for general text on dark backgrounds */
  background-color: #000; /* Dark background for the site */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  min-height: auto; /* Ensure content is not cut off */
  background-color: var(--secondary-color); /* Dark background for the whole header */
}

/* Header Top Area (Desktop: Logo Left, Buttons Right) */
.header-top {
  background-color: var(--secondary-color); /* Dark black */
  padding: 10px 0;
  display: flex;
  align-items: center;
  min-height: 40px; /* Base height for header-top */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Gold color for logo */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is visible */
  padding: 5px 0;
  line-height: 1; /* Adjust line height for better vertical centering */
}

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

/* Mobile Navigation Buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

/* Main Navigation (Desktop: Menu Centered Below Header Top) */
.main-nav {
  background-color: var(--primary-color); /* Gold background for nav */
  width: 100%;
  display: flex; /* Desktop default: visible and flex */
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  min-height: 30px; /* Base height for main-nav */
}

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

.nav-link {
  color: var(--secondary-color); /* Black text on gold background */
  font-weight: bold;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #fff; /* White on hover */
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
}

/* Buttons */
.btn {
  padding: 10px 18px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none; /* Remove underline for buttons */
}

.btn-register {
  background-color: var(--accent-color); /* Red for register */
  color: #fff;
  border: 1px solid var(--accent-color);
}

.btn-register:hover {
  background-color: #e00;
  border-color: #e00;
  box-shadow: 0 0 10px rgba(220, 20, 60, 0.6);
}

.btn-login {
  background-color: var(--primary-color); /* Gold for login */
  color: var(--secondary-color);
  border: 1px solid var(--primary-color);
}

.btn-login:hover {
  background-color: #e6b800;
  border-color: #e6b800;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Footer */
.site-footer {
  background-color: var(--secondary-color); /* Black footer */
  color: #E0E0E0;
  padding: 40px 20px 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-col h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: bold;
}

.footer-col p {
  line-height: 1.6;
}

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

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

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

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

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

.footer-bottom p {
  margin: 0;
  color: #A0A0A0;
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Body content overflow fix */
  .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 Top Mobile Layout (Hamburger Left, Logo Centered) */
  .header-top {
    padding: 5px 0;
    min-height: 40px; /* Reduced height for mobile */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    position: relative; /* For absolute positioning of logo */
    height: 50px; /* Fixed height for mobile header-top */
  }

  .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;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color); /* Gold lines */
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .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);
  }

  /* Logo Centering for Mobile */
  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Account for hamburger and potential right-side element */
    font-size: 24px; /* Smaller font size for mobile logo */
    padding: 0;
    line-height: 1;
    height: 100%; /* Take full height of parent for vertical centering */
  }

  /* Hide Desktop Buttons on Mobile */
  .desktop-nav-buttons {
    display: none;
  }

  /* Mobile Navigation Buttons (Visible Below Header Top) */
  .mobile-nav-buttons {
    display: flex !important; /* Force display on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for mobile button area */
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--secondary-color); /* Same as header-top for continuity */
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Subtle separator */
    min-height: 45px; /* Ensure buttons have enough space */
    justify-content: center; /* Center buttons if less than 2 */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Ensure long words break */
    overflow-wrap: break-word;
  }

  /* Main Navigation Mobile (Hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Start below the header */
    left: 0;
    width: 70%; /* Slide-out menu width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Fill remaining viewport height */
    background-color: var(--secondary-color); /* Dark background for mobile menu */
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    align-items: flex-start; /* Align menu items to the left */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    gap: 15px; /* Spacing between mobile nav links */
    width: 100%;
    max-width: none; /* No max-width on mobile containers */
  }

  .nav-link {
    color: #fff; /* White text on dark mobile menu */
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .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.6);
    z-index: 999; /* Below menu, above content */
    opacity: 0;
    transition: opacity 0.3s ease;
  }

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

  /* Footer Mobile Layout */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

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

  .footer-col h3 {
    margin-bottom: 10px;
  }
}

/* Ensure body scroll is prevented 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;
  }
}
