/* General */
html { scroll-behavior: smooth; }
body {
  font-family: 'Arial', sans-serif;
  color: #F3F8FF; /* Text Main */
  background-color: #08162B; /* Deep Navy, a dark background for the site */
  margin: 0;
  line-height: 1.6;
  padding-top: var(--header-offset);
  overflow-x: hidden;
}
a { text-decoration: none; color: #1D5FD1; /* Accent for links */ }
a:hover { color: #4FA8FF; /* Glow for hover */ }
h1, h2, h3, h4, h5, h6 { color: #F3F8FF; /* Text Main */ margin-top: 0; margin-bottom: 10px; }

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

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background-color: transparent; /* Background set by header-top and main-nav */
  box-sizing: border-box;
}

/* Header Top */
.header-top {
  background-color: #08162B; /* Deep Navy */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.header-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding applied here */
}

/* Logo */
.logo {
  color: #F2C14E; /* Gold */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-shadow: 0 0 5px rgba(242, 193, 78, 0.5);
}
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile Nav Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default, shown on mobile */
  background-color: #10233F; /* Card BG */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Main Navigation */
.main-nav {
  background-color: #113B7A; /* Main Color */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.nav-container {
  box-sizing: border-box;
  height: 100%;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
}
.nav-link {
  color: #F3F8FF; /* Text Main */
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}
.nav-link:hover, .nav-link.active {
  color: #F2C14E; /* Gold */
  background-color: rgba(242, 193, 78, 0.1);
  border-radius: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  color: #F3F8FF; /* Text Main */
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Button gradient */
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(17, 68, 166, 0.4);
  white-space: nowrap;
}
.btn:hover {
  background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
  box-shadow: 0 6px 15px rgba(17, 68, 166, 0.6);
  transform: translateY(-2px);
}

/* Hamburger Menu */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002;
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #F3F8FF; /* Text Main */
  border-radius: 2px;
  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); }

/* Mobile Overlay */
.mobile-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;
}
.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* Footer */
.site-footer {
  background-color: #08162B; /* Deep Navy */
  color: #AFC4E8; /* Text Secondary */
  padding: 40px 20px 20px;
  font-size: 15px;
  border-top: 1px solid #1B3357; /* 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: #F3F8FF; /* Text Main */
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
}
.footer-col h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: #1D5FD1; /* Accent */
  margin-top: 5px;
}
.footer-col p {
  line-height: 1.8;
}
.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li {
  margin-bottom: 10px;
}
.footer-nav a {
  color: #AFC4E8; /* Text Secondary */
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-nav a:hover {
  color: #F2C14E; /* Gold */
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #1B3357; /* Divider */
  color: #AFC4E8; /* Text Secondary */
}
.footer-bottom p {
  margin: 0;
}

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

  /* Body */
  body { overflow-x: hidden; }

  /* Header Top */
  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0; /* Remove padding from header-top itself */
  }
  .header-container {
    padding: 0 15px;
    max-width: none;
    justify-content: space-between;
  }

  /* Logo Centering (Method 1: Flexbox) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: static !important;
    transform: none !important;
    max-width: 100%;
    order: 2;
  }
  .logo img {
    max-height: 56px !important;
    max-width: 100%;
  }

  /* Hamburger Menu */
  .hamburger-menu {
    display: block;
    order: 1;
  }

  /* Desktop Nav Buttons (Hidden on Mobile) */
  .desktop-nav-buttons {
    display: none;
    order: 3;
  }

  /* Mobile Nav Buttons (Shown on Mobile) */
  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px; padding-right: 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;
  }

  /* Main Navigation (Mobile) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 80%;
    height: calc(100vh - var(--header-offset));
    background-color: #113B7A; /* Main Color */
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 1001;
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0);
  }
  .nav-container {
    max-width: none;
    padding: 15px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    height: auto;
  }
  .nav-link {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border-bottom: 1px solid #1B3357; /* Divider */
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Body no-scroll for mobile menu */
  body.no-scroll {
    overflow: hidden;
  }

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col h3::after {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-nav li {
    margin-bottom: 5px;
  }

  /* Mobile content overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}
/* 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;
  }
}
