:root {
  --primary-color: #CC0000;
  --secondary-color: #FFD700;
  --header-top-bg: #A00000; /* Darker red for top bar */
  --main-nav-bg: #FFD700; /* Gold for main navigation */
  --text-light: #ffffff;
  --text-dark: #333333;
  --header-offset: 120px; /* Desktop */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile */
  }
}

/* Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  padding-top: var(--header-offset); /* Apply header offset */
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

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

/* Site Header - Fixed & Global Styles (Desktop First) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: var(--header-top-bg); /* Default background for entire header */
  box-sizing: border-box; /* Ensure padding doesn't add to total width */
  overflow-x: hidden; /* Prevent header overflow on mobile */
}

/* Header Top - Desktop Layout */
.header-top {
  background-color: var(--header-top-bg);
  min-height: 70px; /* Desktop height */
  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 30px; /* Desktop padding */
  box-sizing: border-box;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Gold color for logo */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure visibility */
  white-space: nowrap; /* Prevent wrapping for text logo */
  line-height: 1;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex; /* Show on desktop */
  gap: 15px;
  margin-left: auto; /* Push buttons to the right */
}

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

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
  border: 1px solid var(--primary-color);
}

.btn-primary:hover {
  background-color: #E00000; /* Slightly lighter red */
  border-color: #E00000;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-dark);
  border: 1px solid var(--secondary-color);
}

.btn-secondary:hover {
  background-color: #FFE066; /* Slightly lighter gold */
  border-color: #FFE066;
}

/* Main Navigation - Desktop Layout */
.main-nav {
  background-color: var(--main-nav-bg);
  min-height: 50px; /* Desktop height */
  display: flex; /* Show on desktop */
  align-items: center;
  position: static; /* Desktop - normal flow */
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row; /* Desktop - horizontal */
  justify-content: center; /* Center navigation links */
  align-items: center;
  padding: 10px 20px;
  box-sizing: border-box;
}

.nav-link {
  color: var(--text-dark);
  padding: 8px 15px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

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

/* Mobile Specific Styles */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 22px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above logo on mobile */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-light);
  border-radius: 3px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 9px; }
.hamburger-menu span:nth-child(3) { top: 18px; }

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

/* Mobile Navigation Buttons - Hidden on desktop */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown via media query */
}

.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;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Media Query for Mobile */
@media (max-width: 768px) {
  /* Header Offset for Mobile */
  :root {
    --header-offset: 110px; /* Mobile */
  }

  /* Mobile Top Bar */
  .header-top {
    min-height: 60px; /* Mobile height */
    padding: 0 15px; /* Mobile padding */
  }

  .header-container {
    padding: 0; /* Remove padding from container as header-top has it */
    justify-content: space-between; /* Hamburger left, Logo center */
    position: relative; /* For absolute logo centering */
    min-height: 60px; /* Ensure height for logo */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Place it first */
    margin-right: auto; /* Push logo to center, creating blank space on right */
  }

  .logo {
    order: 2; /* Place logo second */
    position: absolute !important; /* Absolute positioning for centering */
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: calc(100% - 100px); /* Account for hamburger width */
    font-size: 24px;
    display: flex !important; /* Ensure flex for potential image logo centering */
    align-items: center !important;
    justify-content: center !important;
    height: 100%;
  }

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

  /* Mobile Navigation Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Mobile padding for buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #E6E6E6; /* Light grey background for mobile buttons */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

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

  /* Main Navigation - Mobile Layout (Hamburger Menu Content) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical links */
    position: fixed; /* Fixed position for slide-out menu */
    top: var(--header-offset); /* Below header and mobile buttons */
    left: 0;
    width: 280px; /* Width of the slide-out menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #333333; /* Dark background for mobile menu */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Scrollable if many links */
    z-index: 1000;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align links to the left */
    padding: 20px 15px; /* Mobile padding */
    width: 100%;
    max-width: none; /* No max-width on mobile */
  }

  .nav-link {
    color: var(--text-light); /* Light text on dark background */
    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);
  }

  /* Prevent body overflow for page content images */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* Footer Styles */
.site-footer {
  background-color: #333333;
  color: #cccccc;
  padding: 40px 20px;
  font-size: 14px;
  box-sizing: border-box;
}

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

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  display: block;
  line-height: 1;
}

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

.footer-description {
  margin-top: 10px;
  line-height: 1.8;
  color: #aaaaaa;
}

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

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

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

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

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

/* Mobile Footer */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }
  .footer-col {
    min-width: unset; /* Allow columns to shrink */
    width: 100%;
    text-align: center;
  }
  .footer-col h3 {
    text-align: center;
  }
  .footer-nav {
    text-align: center;
  }
  .footer-logo {
    text-align: center;
  }
}
/* 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;
  }
}
