:root {
  --primary-color: #FFD700;
  --secondary-color: #8B0000;
  --text-color-light: #FFFFFF;
  --text-color-dark: #333333;
  --header-offset: 120px; /* Desktop: header-top (70px) + main-nav (50px) */
}

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

/* Global styles for body and typography */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not covered by fixed header */
  background-color: #1a1a1a;
  color: var(--text-color-light);
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  background-color: #2a2a2a; /* Default background, will be overridden by header-top/main-nav */
  min-height: var(--header-offset);
  display: flex;
  flex-direction: column;
}

.header-top {
  background-color: #1a1a1a; /* Darker background for top section */
  padding: 15px 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
}

.logo {
  font-size: 2.2em;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is visible */
  text-decoration: none;
}

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

.btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-register {
  background: linear-gradient(90deg, var(--primary-color) 0%, #FFC107 100%);
  color: var(--secondary-color);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-register:hover {
  background: linear-gradient(90deg, #FFC107 0%, var(--primary-color) 100%);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.btn-login {
  background-color: var(--secondary-color);
  color: var(--text-color-light);
  border: 2px solid var(--secondary-color);
  box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

.btn-login:hover {
  background-color: #a00000;
  border-color: #a00000;
  box-shadow: 0 6px 20px rgba(139, 0, 0, 0.6);
}

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

.main-nav {
  background-color: #3a3a3a; /* Lighter dark background for main nav */
  padding: 10px 0;
  width: 100%;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-color-light);
  padding: 8px 15px;
  margin: 0 5px;
  font-weight: bold;
  font-size: 0.95em;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 5px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: rgba(255, 215, 0, 0.1);
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.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: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer */
.site-footer {
  background-color: #1a1a1a;
  color: #cccccc;
  padding: 40px 20px;
  font-size: 0.9em;
}

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

.footer-column {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
}

.footer-column h3 {
  color: var(--primary-color);
  font-size: 1.2em;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 5px;
}

.footer-column p {
  line-height: 1.6;
}

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

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

.footer-link {
  color: #cccccc;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--primary-color);
}

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

.footer-bottom p {
  margin: 0;
  font-size: 0.85em;
}

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

  .site-header {
    min-height: auto;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    justify-content: space-between;
    position: relative; /* For absolute logo positioning */
    min-height: 50px;
  }

  .hamburger-menu {
    display: block;
    order: 1;
  }

  .logo {
    order: 2;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 1.8em;
    max-width: calc(100% - 100px); /* Adjust for hamburger and potential right-side elements */
  }

  .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: #2a2a2a; /* Slightly darker than header-top */
    justify-content: center;
    align-items: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Half width minus gap */
    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; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: #333333;
    flex-direction: column;
    align-items: flex-start;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
  }

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

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

  .nav-link {
    width: 100%;
    margin: 5px 0;
    padding: 10px 15px;
    font-size: 1.1em;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  }

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

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

  .footer-column {
    max-width: 100%;
    min-width: unset;
    text-align: center;
  }

  .footer-column h3 {
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
  }

  .footer-nav {
    text-align: center;
  }

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