:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}
body {
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F3F8FF; /* Text Main */
  background-color: #08162B; /* Deep Navy as general background */
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Suspended effect */
}

/* Header Top Area */
.header-top {
  background-color: #08162B; /* Deep Navy */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}
.header-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for logo and buttons */
  height: 100%;
}
.logo {
  font-size: 24px;
  font-weight: bold;
  color: #F2C14E; /* Gold for logo text */
  text-transform: uppercase;
  white-space: nowrap; /* Prevent logo text from wrapping */
  flex-shrink: 0;
}
/* If logo is image, use these */
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Button gradient */
  color: #F3F8FF; /* Text Main */
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Main Navigation Area */
.main-nav {
  background-color: #113B7A; /* Primary */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}
.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  height: 100%;
}
.nav-link {
  color: #F3F8FF; /* Text Main */
  padding: 0 15px;
  font-weight: bold;
  white-space: nowrap;
  transition: color 0.2s ease;
  height: 100%; /* Make clickable area full height */
  display: flex;
  align-items: center;
}
.nav-link:hover {
  color: #F2C14E; /* Gold */
}

/* Hamburger menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Above header */
  flex-shrink: 0;
}
.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #F3F8FF; /* Text Main */
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger-menu span:last-child {
  margin-bottom: 0;
}
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Overlay (hidden on desktop) */
.mobile-overlay {
  display: none; /* Hidden by default on desktop */
  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-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Navigation Buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  background-color: #10233F; /* Card BG */
  min-height: 48px;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0 15px; /* Adjust padding for mobile */
  overflow: hidden;
  gap: 10px;
  flex-wrap: nowrap; /* Ensure buttons stay in one line */
}

/* Site Footer */
.site-footer {
  background-color: #08162B; /* Deep Navy */
  padding: 40px 20px 20px;
  color: #AFC4E8; /* Text Secondary */
  font-size: 14px;
}
.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #1B3357; /* Divider */
}
.footer-col .footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: #F2C14E; /* Gold */
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}
.footer-col p {
  line-height: 1.8;
  color: #AFC4E8;
}
.footer-col h3 {
  color: #F3F8FF; /* Text Main */
  font-size: 18px;
  margin-bottom: 15px;
}
.footer-nav li {
  margin-bottom: 8px;
}
.footer-nav a {
  color: #AFC4E8; /* Text Secondary */
  transition: color 0.2s ease;
}
.footer-nav a:hover {
  color: #F2C14E; /* Gold */
}
.footer-bottom {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  color: #AFC4E8; /* Text Secondary */
}
.footer-bottom a {
    pointer-events: none;
    cursor: default;
    color: inherit;
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) + 2px buffer */
  }
  .header-top {
    min-height: 60px;
    height: 60px;
  }
  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Hamburger left, logo center, empty right */
    position: relative; /* For logo absolute positioning if needed */
  }
  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 0; /* Leftmost */
  }
  .logo {
    order: 1; /* Center */
    flex: 1 !important; /* Allow logo to grow/shrink */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    color: #F2C14E; /* Gold */
    white-space: normal; /* Allow logo text to wrap if too long */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 56px; /* Mobile max height */
  }

  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    height: 48px; /* Fixed height for mobile buttons */
    padding: 0 15px;
    background-color: #10233F; /* Card BG */
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* For two buttons with 10px gap */
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile, shown by JS */
    position: fixed;
    top: var(--header-offset); /* Below fixed header */
    left: 0;
    width: 70%; /* Side menu width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: #113B7A; /* Primary */
    flex-direction: column;
    padding: 20px 0;
    overflow-y: auto;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 9999; /* Above overlay */
  }
  .main-nav.active {
    display: flex; /* Show menu */
    transform: translateX(0); /* Slide in */
  }
  .nav-container {
    flex-direction: column;
    padding: 0 15px;
    height: auto; /* Auto height for vertical menu */
    max-width: none; /* Remove max-width for mobile */
    align-items: flex-start; /* Align menu items to left */
  }
  .nav-link {
    width: 100%;
    padding: 10px 15px;
    justify-content: flex-start;
  }

  .mobile-overlay {
    top: 0; /* Overlay covers entire screen */
  }

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    text-align: center;
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col h3 {
    text-align: center;
  }
  .footer-nav {
    padding: 0;
  }
  .footer-nav li {
    text-align: center;
  }
  .footer-bottom {
    padding-top: 15px;
  }

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

/* Ensure body padding-top is applied only once */
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;
  }
}
