/* General reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #F3F8FF; /* Text Main */
  background-color: #08162B; /* Deep Navy as general background */
  padding-top: var(--header-offset); /* Critical for fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
  min-width: 320px; /* Ensure minimum width */
}

a {
  text-decoration: none;
  color: #AFC4E8; /* Text Secondary */
}

a:hover {
  color: #F3F8FF; /* Text Main on hover */
}

ul {
  list-style: none;
}

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

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

/* Header Top Section */
.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%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for logo and buttons */
}

/* Logo */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: #F2C14E; /* Gold */
  text-transform: uppercase;
  display: block; /* Ensure visibility */
  white-space: nowrap; /* Prevent breaking */
  overflow: hidden; /* Hide overflow if text is too long */
  text-overflow: ellipsis; /* Add ellipsis */
}

.logo img {
  display: block;
  max-height: 60px; /* Matches 68px header-top height */
  height: auto;
  width: auto;
  max-width: 280px; /* Limit logo width */
  object-fit: contain;
}

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

/* Main Navigation */
.main-nav {
  background-color: #113B7A; /* Primary color */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}

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

.nav-link {
  color: #F3F8FF; /* Text Main */
  font-weight: bold;
  padding: 5px 0;
  white-space: nowrap;
  font-size: 15px; /* Slightly smaller font for more links */
}

.nav-link:hover {
  color: #F2C14E; /* Gold on hover */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  z-index: 1001;
  padding: 5px;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #F3F8FF; /* Text Main */
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 25px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  color: #F3F8FF; /* Text Main for button text */
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Button gradient */
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none; /* Remove underline */
  font-size: 14px;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  color: #F3F8FF; /* Keep text color same on hover */
}

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

/* Footer Styles */
.site-footer {
  background-color: #10233F; /* Card BG */
  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 h3 {
  color: #F3F8FF; /* Text Main */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-col p {
  line-height: 1.8;
  color: #AFC4E8;
}

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

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

.footer-nav a {
  color: #AFC4E8; /* Text Secondary */
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #F2C14E; /* Gold on hover */
}

.footer-bottom {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  color: #AFC4E8; /* Text Secondary */
  font-size: 13px;
}

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

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

/* Mobile styles */
@media (max-width: 768px) {
  body {
    padding-top: var(--header-offset); /* Mobile header offset */
  }

  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) + 2px buffer */
  }

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

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

  /* Header Top Mobile */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Hamburger left, Logo center */
    position: relative; /* For absolute logo centering */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: static !important; /* Reset absolute if applied by Method 2 */
    transform: none !important; /* Reset transform if applied by Method 2 */
    font-size: 20px; /* Smaller logo text on mobile */
  }
  .logo img {
    max-height: 56px !important; /* Matches 60px header-top height */
    max-width: calc(100% - 100px); /* Leave space for hamburger */
  }

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

  /* Mobile Navigation Buttons */
  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    background-color: #113B7A; /* Primary color, different from header-top */
    align-items: center;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
  }

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

  /* Hamburger Menu (Visible on Mobile) */
  .hamburger-menu {
    display: flex;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Hamburger Menu Active State */
  .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);
  }

  /* Main Navigation (Mobile) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    height: calc(100vh - var(--header-offset));
    background-color: #113B7A;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    height: auto;
    max-height: calc(100vh - var(--header-offset));
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    gap: 15px;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #1B3357;
  }
  .nav-link:last-child {
    border-bottom: none;
  }

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

  .footer-col h3 {
    margin-top: 20px;
  }

  .footer-logo {
    margin: 0 auto 15px;
  }
}
/* 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;
  }
}
