:root {
  --primary-color: #007bff;
  --secondary-color: #ffc107;
  --header-top-bg: #0056b3; /* Darker shade of primary for contrast */
  --main-nav-bg: #007bff;   /* Primary color for main nav */
  --button-login-bg: #ffc107; /* Secondary color for login */
  --button-register-bg: #dc3545; /* Red for register, high contrast */
  --text-light: #ffffff;
  --text-dark: #333333;
  --header-offset: 110px; /* Desktop: header-top (70px) + main-nav (40px) */
}

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

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

/* Ensure mobile content doesn't overflow */
@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 - Fixed and Suspended */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: transparent; /* Base, actual colors set on sub-elements */
}

.header-top {
  background-color: var(--header-top-bg);
  padding: 15px 0;
  color: var(--text-light);
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.logo:hover {
  color: #fff;
}

.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  display: flex; /* Desktop default */
  flex-direction: row; /* Desktop default */
  justify-content: center;
}

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

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

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--secondary-color);
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  color: var(--text-dark); /* Default button text color */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.btn-login {
  background-color: var(--button-login-bg);
  color: var(--text-dark);
}

.btn-login:hover {
  background-color: #e0a800; /* Darker secondary */
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-register {
  background-color: var(--button-register-bg);
  color: var(--text-light);
}

.btn-register:hover {
  background-color: #c82333; /* Darker red */
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

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

/* Footer */
.site-footer {
  background-color: #333;
  color: #ccc;
  padding: 40px 20px;
  font-size: 14px;
}

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

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

.footer-brand p {
  margin: 0;
  line-height: 1.8;
}

.footer-column h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

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

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

.footer-column ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--secondary-color);
}

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

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

  .header-container {
    padding: 0 15px;
    flex-wrap: nowrap;
  }

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

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

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

  .hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

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

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background-color: #222; /* Darker background for mobile menu */
    padding-top: 80px;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
  }

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

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

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

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

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    background-color: var(--header-top-bg);
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box;
    order: 3; /* Ensure it's below header-top content */
    flex-wrap: wrap;
  }

  .mobile-nav-buttons .btn {
    flex: 1 1 auto; /* Allow buttons to grow/shrink */
    min-width: 120px;
    max-width: 160px;
  }

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
  }

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

  .site-footer .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-column {
    min-width: unset;
    width: 100%;
  }

  .footer-column ul {
    padding-left: 0;
  }
}

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