:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #1E90FF; /* Royal Blue */
  --text-color-dark: #333;
  --text-color-light: #fff;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  line-height: 1.6;
  color: var(--text-color-dark);
  overflow-x: hidden; /* For mobile content overflow */
}

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

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  min-height: var(--header-offset); /* Ensure header has enough height */
}

.header-top {
  background-color: var(--secondary-color); /* Royal Blue */
  color: var(--text-color-light);
  padding: 10px 0;
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 2em;
  font-weight: 900;
  color: var(--primary-color); /* Gold color for the logo text */
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: color 0.3s ease;
}

.logo:hover {
  color: var(--text-color-light);
}

.desktop-nav-buttons {
  display: flex; /* Always visible on desktop */
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none; /* Remove underline */
  white-space: nowrap; /* Prevent buttons from wrapping */
  cursor: pointer;
  border: none;
}

.btn-login {
  background-color: var(--primary-color); /* Gold */
  color: var(--text-color-dark);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-login:hover {
  background-color: var(--text-color-light);
  color: var(--primary-color);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.btn-register {
  background-color: var(--secondary-color); /* Royal Blue */
  color: var(--text-color-light);
  box-shadow: 0 4px 10px rgba(30, 144, 255, 0.4);
}

.btn-register:hover {
  background-color: var(--primary-color);
  color: var(--text-color-dark);
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.6);
}

.main-nav {
  background-color: var(--primary-color); /* Gold */
  padding: 10px 0;
  display: flex; /* Desktop default: flex */
  justify-content: center;
  align-items: center;
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px; /* Desktop padding */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  width: 100%;
}

.nav-link {
  color: var(--text-color-dark);
  font-weight: 600;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease, transform 0.2s ease;
  text-transform: uppercase;
  font-size: 0.95em;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  background-color: var(--secondary-color); /* Royal Blue underline */
  transition: width 0.3s ease, left 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
  transform: translateX(0);
}

.nav-link:hover {
  color: #000;
  transform: translateY(-2px);
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001;
}

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

.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); background-color: var(--text-color-light); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); background-color: var(--text-color-light); }

.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  background-color: var(--secondary-color); /* Royal Blue */
  padding: 10px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mobile-nav-buttons .header-container {
  justify-content: center;
  gap: 12px;
}

/* Footer Styles */
.site-footer {
  background-color: #1a1a1a; /* Dark background for footer */
  color: #ccc;
  padding: 40px 20px 20px;
  text-align: center;
}

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

.footer-col {
  flex: 1;
  min-width: 180px;
  margin-bottom: 20px;
}

.footer-col h3 {
  color: var(--primary-color); /* Gold for footer headings */
  font-size: 1.2em;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.footer-nav a {
  display: block;
  color: #ccc;
  margin-bottom: 8px;
  transition: color 0.3s ease;
  font-size: 0.95em;
}

.footer-nav a:hover {
  color: var(--primary-color); /* Gold on hover */
}

.copyright {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #333;
  font-size: 0.9em;
  color: #888;
}

/* Mobile specific styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    height: 50px; /* Fixed height for top bar on mobile */
  }

  .nav-container {
    padding: 0 15px;
    max-width: none; /* Remove max-width on mobile */
    width: 100%;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 1.8em;
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu */
    order: -1; /* Place it at the beginning */
  }

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    margin: 0 5px;
    padding: 8px 15px;
    font-size: 0.9em;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below the header and mobile buttons */
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-offset)); /* Full height minus header */
    background-color: rgba(0, 0, 0, 0.95); /* Darker overlay background for menu */
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease-in-out;
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

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

  .main-nav .nav-link {
    color: var(--text-color-light);
    font-size: 1.4em;
    padding: 12px 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
  }
  .main-nav .nav-link:last-child {
    border-bottom: none;
  }
  .main-nav .nav-link::after {
    background-color: var(--primary-color);
  }

  .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.6); /* Semi-transparent overlay */
    z-index: 999;
  }

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

  .site-header {
    min-height: auto;
  }
  
  /* Prevent content overflow on mobile */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-col {
    min-width: unset;
    width: 100%;
  }
  .footer-nav a {
    display: inline-block;
    margin: 0 10px 8px;
  }
}

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