:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --card-bg: #11271B;
  --background-color: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
  /* Header offset for desktop (header-top 68px + main-nav 52px) */
  --header-offset: 122px; 
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Important for fixed header */
  background-color: var(--background-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent body overflow on desktop as well */
}

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

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Suspended effect */
  background-color: var(--deep-green); /* Solid background */
  box-sizing: border-box;
}

/* Header Top Section */
.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop fixed height */
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  justify-content: center; /* Center container */
  background-color: var(--deep-green); /* Deep Green */
  border-bottom: 1px solid var(--divider-color);
}

.header-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px; /* Max width for desktop */
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for logo and buttons */
  height: 100%;
}

.site-header .logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--gold-color); /* Gold color for logo text */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is always visible */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px; /* Limit logo width */
}

/* Image Logo (if applicable, for text logo this is ignored) */
.site-header .logo img {
  display: block;
  max-height: 60px; /* Desktop max height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile Navigation Buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  background-color: var(--card-bg); /* Different background color for mobile buttons */
  border-bottom: 1px solid var(--divider-color);
}

/* Main Navigation Section */
.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop fixed height */
  height: 52px; /* Desktop fixed height */
  display: flex; /* Visible on desktop */
  align-items: center;
  justify-content: center; /* Center container */
  background-color: var(--card-bg); /* Card BG */
  width: 100%;
  transition: transform 0.3s ease; /* Smooth animation for mobile menu */
}

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

.nav-link {
  color: var(--text-main);
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping on desktop */
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-color);
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  border: none;
  color: var(--text-main); /* Text color for buttons */
}

.btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Green gradient */
  box-shadow: 0 4px 15px rgba(87, 227, 141, 0.4); /* Glow effect */
}

.btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 6px 20px rgba(87, 227, 141, 0.6);
}

.btn-secondary {
  background-color: var(--card-bg); /* Use card background for secondary */
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--deep-green);
  border-color: var(--primary-color);
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above header */
  padding: 5px;
  box-sizing: content-box;
}

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

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

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

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

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

/* Overlay for 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; /* Below menu, above main content */
}

.overlay.active {
  display: block;
}

/* Footer Styles */
.site-footer {
  background-color: var(--deep-green); /* Deep Green */
  color: var(--text-secondary);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
  box-sizing: border-box;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
  border-bottom: 1px solid var(--divider-color);
  padding-bottom: 30px;
}

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

.footer-col p {
  margin-bottom: 15px;
  color: var(--text-secondary);
}

.footer-col .logo {
  font-size: 20px;
  margin-bottom: 15px;
  display: block;
  color: var(--gold-color);
}

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

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

.footer-nav a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--divider-color); /* Divider color for footer bottom border */
}

.footer-bottom p {
  margin: 0;
  color: var(--text-secondary);
}


/* --- Mobile Styles --- */
@media (max-width: 768px) {
  /* Header offset for mobile (header-top 60px + mobile-nav-buttons 48px) */
  :root {
    --header-offset: 110px; /* 60 + 48 + 2 (buffer) */
  }

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Prevent body overflow */
  }

  .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }

  /* Header Top Section (Mobile) */
  .header-top {
    min-height: 60px; /* Mobile fixed height */
    height: 60px; /* Mobile fixed height */
    justify-content: space-between; /* Hamburger left, Logo center, empty right */
    padding: 0 15px; /* Padding for hamburger and potential right content */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Remove container padding as header-top has it */
    position: relative; /* For absolute logo positioning if needed */
  }
  
  /* Mobile Logo Centering (Method 1: Flexbox) */
  .site-header .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute; /* To allow hamburger to be truly left */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 80px); /* Adjust max-width to not overlap hamburger */
    text-align: center;
  }
  
  /* Image Logo (if applicable) */
  .site-header .logo img {
    max-height: 56px !important; /* Mobile max height */
    max-width: 100%;
  }

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

  /* Hamburger Menu visible on mobile */
  .hamburger-menu {
    display: block;
    order: -1; /* Place it at the start of flex container */
    margin-right: auto; /* Push logo to center, if logo is flex:1 */
  }

  /* Mobile Navigation Buttons (visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Force display on mobile */
    min-height: 48px; /* Mobile fixed height */
    height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%; /* Ensure no overflow */
    box-sizing: border-box;
    padding: 0 15px; /* Padding for buttons */
    overflow: hidden; /* Prevent button overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Keep buttons on one line */
    background-color: var(--card-bg); /* Match main nav background */
    border-bottom: 1px solid var(--divider-color);
  }

  .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 gap */
    padding: 8px 12px; /* Reduced padding */
    font-size: 13px; /* Reduced font size */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break */
    overflow-wrap: break-word;
    text-align: center;
  }

  /* Main Navigation Section (Mobile - hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Below the fixed header + mobile buttons */
    left: 0;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    width: 280px; /* Sidebar width */
    flex-direction: column; /* Vertical on mobile */
    align-items: flex-start;
    justify-content: flex-start;
    background-color: var(--deep-green); /* Deep Green */
    transform: translateX(-100%); /* Off-screen to the left */
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.4);
    overflow-y: auto; /* Enable scrolling for long menus */
    padding: 20px 0;
    box-sizing: border-box;
    z-index: 1000; /* Same as header, but overlay is 999 */
  }

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

  .nav-container {
    flex-direction: column; /* Vertical menu items */
    align-items: flex-start;
    padding: 0 20px;
    height: auto; /* Adjust height based on content */
    gap: 15px;
  }

  .nav-link {
    width: 100%; /* Full width for menu items */
    padding: 10px 0;
    font-size: 17px;
    border-bottom: 1px solid var(--divider-color);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-link::after { /* Remove underline effect for mobile menu */
    display: none;
  }

  /* Footer Styles (Mobile) */
  .site-footer {
    padding: 30px 15px 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    margin-bottom: 20px;
    padding-bottom: 20px;
  }

  .footer-col {
    text-align: center;
  }
  .footer-col h3 {
    margin-top: 20px;
    margin-bottom: 10px;
  }
  .footer-col:first-child .footer-logo {
    margin-bottom: 15px;
  }
  .footer-col:first-child p {
    padding: 0 10px;
  }

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

  .footer-bottom {
    padding-top: 15px;
  }

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