:root {
  --header-offset: 104px; /* Desktop: 60px (header-top) + 44px (main-nav) */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 106px; /* Mobile: 60px (header-top) + 46px (mobile-nav-buttons) */
  }
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #f0f0f0;
  background-color: #1a1a1a;
  padding-top: var(--header-offset);
  overflow-x: hidden;
  line-height: 1.6;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
  background-color: #222222; /* Dark grey, distinct from main-nav */
  min-height: 60px;
  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: 15px 40px;
  box-sizing: border-box;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700; /* Primary color */
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

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

.btn {
  background-color: #FFD700; /* Primary color */
  color: #8B0000; /* Secondary color for text */
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  text-align: center;
  display: inline-block;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.btn:hover {
  background-color: #e0b800;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #FFD700; /* Primary color */
  border-radius: 3px;
  transition: all 0.3s ease;
}

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

.main-nav {
  background-color: #333333; /* Slightly lighter dark grey, distinct from header-top */
  min-height: 44px;
  display: flex;
  align-items: center;
}

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

.nav-link {
  color: #f0f0f0;
  text-decoration: none;
  padding: 8px 0;
  font-weight: bold;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #FFD700; /* Primary color */
}

.mobile-menu-overlay {
  display: none;
}

/* Footer styles */
.site-footer {
  background-color: #222222;
  color: #f0f0f0;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

.footer-logo {
  font-size: 20px;
  font-weight: bold;
  color: #FFD700; /* Primary color */
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

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

.footer-col p {
  line-height: 1.6;
  color: #cccccc;
}

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

.footer-nav li a {
  color: #cccccc;
  text-decoration: none;
  line-height: 2.2;
  transition: color 0.3s ease;
}

.footer-nav li a:hover {
  color: #FFD700; /* Primary color */
}

.footer-bottom {
  border-top: 1px solid #444444;
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
}

.footer-bottom p {
  color: #cccccc;
  font-size: 13px;
}

/* Responsive styles */
@media (max-width: 768px) {
  .header-container {
    padding: 15px;
    position: relative;
    justify-content: center;
  }
  
  .hamburger-menu {
    display: flex;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  .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);
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0;
    padding: 0;
    max-width: calc(100% - 70px); /* Account for hamburger width + padding */
    text-align: center;
  }

  .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: #444444;
    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-nav {
    display: none;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - var(--header-offset));
    background-color: #1a1a1a;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 999;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
  }

  .main-nav.active {
    display: flex;
    transform: translateX(0);
  }

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

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid #444444;
  }

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

  .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: 998;
  }

  .mobile-menu-overlay.active {
    display: block;
  }

  .site-footer .footer-container {
    flex-direction: column;
    padding: 0 15px;
  }

  .footer-col {
    min-width: 100%;
  }

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

/* No-scroll class for body when mobile 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;
  }
}
