:root {
  --primary-color: #0A192F;
  --secondary-color: #FFD700;
  --text-color-light: #f8f8f8;
  --text-color-dark: #333;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 100px; /* Mobile: header-top (50px) + mobile-nav-buttons (50px) */
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: #f0f2f5;
  color: var(--text-color-dark);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* --- Header Styles --- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  background-color: var(--primary-color);
  box-sizing: border-box;
  overflow-x: hidden;
}

.header-top {
  background-color: var(--primary-color); /* Dark blue */
  color: var(--text-color-light);
  min-height: 60px; /* Desktop height */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Gold color for logo */
  text-transform: uppercase;
  padding: 10px 0;
  display: block;
  line-height: 1;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}

.btn-primary {
  background-color: var(--secondary-color); /* Gold */
  color: var(--primary-color); /* Dark blue text on gold */
  border: 1px solid var(--secondary-color);
}

.btn-primary:hover {
  background-color: #e0b800; /* Slightly darker gold */
  border-color: #e0b800;
}

.btn-secondary {
  background-color: var(--primary-color); /* Dark blue */
  color: var(--secondary-color); /* Gold text on dark blue */
  border: 1px solid var(--secondary-color);
}

.btn-secondary:hover {
  background-color: #1a3a5e; /* Slightly lighter dark blue */
  border-color: #1a3a5e;
}

.main-nav {
  background-color: var(--secondary-color); /* Gold for nav bar */
  min-height: 50px; /* Desktop height */
  display: flex; /* Desktop default: visible and row */
  flex-direction: row;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

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

.nav-link {
  color: var(--primary-color); /* Dark blue text on gold nav */
  padding: 15px 20px;
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.1); /* Slight hover effect */
  color: var(--primary-color);
}

/* Hamburger menu for mobile */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--secondary-color); /* Gold lines */
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

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

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

/* Mobile nav buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown on mobile */
}

/* Mobile menu overlay */
.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: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- Footer Styles --- */
.site-footer {
  background-color: var(--primary-color); /* Dark blue */
  color: var(--text-color-light);
  padding: 40px 20px 20px;
  font-size: 14px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 30px;
}

.footer-col {
  flex: 1;
  min-width: 250px;
}

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

.site-footer h3 {
  color: var(--secondary-color); /* Gold */
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
}

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

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

.site-footer ul li a {
  color: var(--text-color-light);
  transition: color 0.3s ease;
}

.site-footer ul li a:hover {
  color: var(--secondary-color); /* Gold on hover */
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
  .site-header {
    min-height: 50px; /* Mobile header-top height */
  }

  .header-top {
    min-height: 50px; /* Mobile height for hamburger + logo */
    padding: 0 15px;
  }

  .header-container {
    padding: 0;
    width: 100%;
    max-width: none;
    justify-content: space-between;
    position: relative;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1;
    margin-right: auto; /* Push logo to center */
    align-self: center;
  }

  .logo {
    order: 2;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    padding: 0;
    white-space: nowrap;
    max-width: calc(100% - 80px);
    text-align: center;
    line-height: 1;
  }
  
  .header-container::after {
    content: '';
    display: block;
    width: 30px; /* Balance hamburger width */
    order: 3;
    margin-left: auto;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .mobile-nav-buttons {
    display: flex !important;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--primary-color);
    min-height: 50px;
    justify-content: center;
    align-items: 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;
    line-height: 1.2;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 250px;
    height: calc(100vh - var(--header-offset));
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    background-color: var(--primary-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    z-index: 999;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    width: 100%;
    max-width: none;
  }

  .nav-link {
    width: 100%;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    color: var(--text-color-light);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-link:hover {
    background-color: rgba(255, 215, 0, 0.1);
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

  .footer-col {
    min-width: unset;
    flex: none;
    width: 100%;
    text-align: center;
  }

  .footer-col ul {
    text-align: center;
  }
  .footer-col ul li a {
    display: inline-block;
    padding: 5px 0;
  }

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