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

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

/* Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-color-dark);
  line-height: 1.6;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden;
}

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 5px rgba(0, 0, 0, 0.2);
  background-color: var(--secondary-color); /* Fallback, overridden by specific sections */
}

.header-top {
  background-color: var(--secondary-color); /* Deep red for top bar */
  padding: 15px 0;
  min-height: 30px; /* Ensures minimum height for content */
  display: flex;
  align-items: center;
  color: var(--text-color-light);
}

.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: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Gold for logo */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is always visible */
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-register {
  background-color: var(--primary-color); /* Gold for register */
  color: var(--text-color-dark);
}

.btn-register:hover {
  background-color: darken(var(--primary-color), 10%); /* Slightly darker gold on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-login {
  background-color: var(--secondary-color); /* Deep red for login */
  color: var(--text-color-light);
  border: 1px solid var(--primary-color);
}

.btn-login:hover {
  background-color: darken(var(--secondary-color), 10%); /* Slightly darker red on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.main-nav {
  background-color: var(--text-color-dark); /* Black for main navigation */
  padding: 10px 0;
  min-height: 30px;
  display: flex; /* Desktop default: flex */
  justify-content: center;
  align-items: center;
}

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

.nav-link {
  color: var(--text-color-light);
  padding: 10px 15px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 5px;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-color); /* Gold on hover */
  background-color: rgba(255, 215, 0, 0.1); /* Slight gold background on hover */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 22px;
  position: relative;
  z-index: 1002;
  margin-right: 15px;
}

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

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

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

.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown on mobile */
  background-color: var(--secondary-color);
  padding: 10px 0;
  box-sizing: border-box;
}

.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 Styles */
.site-footer {
  background-color: var(--text-color-dark); /* Black background for footer */
  color: var(--text-color-light);
  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;
  padding: 0 20px;
  box-sizing: border-box;
}

.footer-section {
  flex: 1;
  min-width: 250px;
  margin-bottom: 30px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  display: block;
}

.footer-section h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.footer-section p {
  color: #ccc;
  line-height: 1.8;
}

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

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

.footer-nav a {
  color: #ccc;
  transition: color 0.3s ease;
}

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

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

/* Mobile Styles */
@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;
  }

  .site-header {
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .header-top {
    padding: 15px 0;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Important for mobile */
    justify-content: space-between;
    position: relative; /* For absolute logo centering if needed */
  }

  .hamburger-menu {
    display: block; /* Visible on mobile */
    order: 1;
  }

  .logo {
    order: 2;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 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); /* Two buttons with 10px 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 */
    flex-direction: column; /* Vertical layout for mobile menu */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: var(--text-color-dark); /* Black for mobile menu */
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 1001;
    padding: 20px 0;
    box-sizing: border-box;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Important for mobile */
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

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

  .footer-section {
    min-width: unset;
    width: 100%;
    text-align: center;
  }
  .footer-section p, .footer-section ul {
    text-align: center;
  }
  .footer-nav li {
    display: inline-block;
    margin: 0 5px 10px;
  }
  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* 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;
  }
}
