/* General Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
  padding-top: var(--header-offset); /* Crucial for fixed header */
  overflow-x: hidden; /* Prevent body overflow */
}

a {
  text-decoration: none;
  color: #F2FFF6; /* Text Main */
}

a:hover {
  color: #2AD16F; /* Lighter green from button gradient */
}

/* Header Variables & Fixed Positioning */
:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent; /* Base, actual backgrounds for sections */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Suspended effect */
}

/* Header Top Area */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #0A4B2C; /* Deep Green - different from main-nav */
  width: 100%;
  padding: 0 20px; /* Padding for edges */
}

.header-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0; /* Header-top has padding */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #F2C14E; /* Gold for logo */
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  padding: 5px 0; /* Vertical padding */
  display: block; /* Ensure it's a block for consistent styling */
}

.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;
  gap: 10px;
  align-items: center;
}

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

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

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #F2FFF6; /* 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: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

.hamburger-menu.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* Main Navigation Area */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background-color: #11271B; /* Card BG - different from header-top */
  width: 100%;
}

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

.nav-link {
  color: #F2FFF6; /* Text Main */
  padding: 10px 15px;
  white-space: nowrap;
  font-size: 15px;
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: #57E38D; /* Glow */
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
  color: #F2FFF6; /* Text Main */
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

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

.overlay.active {
  display: block;
  opacity: 1;
}

/* Footer Styles */
.site-footer {
  background-color: #08160F; /* Background */
  color: #A7D9B8; /* Text Secondary */
  padding: 40px 20px 20px;
  border-top: 1px solid #1E3A2A; /* Divider */
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

.footer-col h3 {
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  font-size: 18px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #F2C14E; /* Gold */
  margin-bottom: 15px;
  display: block;
}

.footer-info p {
  line-height: 1.8;
  font-size: 14px;
}

.footer-nav {
  list-style: none;
}

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

.footer-nav a {
  color: #A7D9B8; /* Text Secondary */
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #2AD16F; /* Lighter green */
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #1E3A2A; /* Divider */
  font-size: 13px;
  color: #A7D9B8; /* Text Secondary */
}

.footer-bottom a {
  text-decoration: none;
  color: inherit;
}

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

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

  /* Header Top */
  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px; /* Smaller padding */
    justify-content: space-between; /* Space between hamburger and logo */
    position: relative; /* For absolute logo centering */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Remove container padding as header-top has it */
  }

  .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); /* Leave space for hamburger */
    padding: 0;
  }

  .logo img {
    max-height: 56px !important; /* Mobile max-height */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    position: relative; /* Ensure it stays visible */
    z-index: 1002; /* Above logo if needed */
  }
  
  /* Mobile Navigation Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    height: 48px; /* Fixed height for consistency */
    align-items: center;
    justify-content: center; /* Center buttons if less than 2, or if 2 and space allows */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #0A4B2C; /* Same as header-top for consistency */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.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;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center; /* Center text within button */
  }

  /* Main Navigation (Mobile Menu) */
  .main-nav {
    min-height: auto; /* Auto height for content */
    height: auto;
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below header */
    left: 0;
    width: 70%; /* Adjust as needed */
    max-width: 300px; /* Max width for the side menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #11271B; /* Card BG */
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    padding: 20px 0;
    overflow-y: auto; /* Scroll if content is long */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0; /* Remove container padding */
    width: 100%;
    max-width: none; /* No max-width on mobile */
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid #1E3A2A; /* Divider */
    text-align: left;
  }

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

  .overlay.active {
    display: block;
    opacity: 1;
  }

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col {
    margin-bottom: 30px;
  }

  .footer-col:last-child {
    margin-bottom: 0;
  }

  .footer-nav {
    padding: 0;
  }
}

/* Scroll lock for body 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;
  }
}
