:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-btn-color: #EA7C07;
  --text-color-dark: #000000;
  --text-color-light: #FFFFFF;
  --header-top-bg: #1F8FC4; /* Darker variant of primary for contrast */
  --main-nav-bg: #26A9E0; /* Primary color for main nav */
  --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) */
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  padding-top: var(--header-offset); /* Apply header offset to body */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

.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: var(--header-top-bg);
  padding: 10px 0;
  min-height: 40px;
  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;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-color-light);
  text-decoration: none;
  display: block; /* Ensure logo is visible */
  flex-shrink: 0;
  white-space: nowrap;
}

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

.btn {
  display: inline-block;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  border: none;
  line-height: 1;
}

.btn-login {
  background-color: var(--login-btn-color);
  color: var(--text-color-light);
}

.btn-login:hover {
  background-color: #CC6906; /* Darker shade for hover */
}

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

.btn-register:hover {
  background-color: #1F8FC4; /* Darker shade for hover */
}

.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0;
  min-height: 30px;
  display: flex; /* Desktop default: flex */
  align-items: center;
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap;
}

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

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

/* Hamburger menu styles (desktop hidden) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  flex-shrink: 0;
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color-light);
  margin: 5px 0;
  transition: 0.4s;
}

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

.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

/* Footer styles */
.site-footer {
  background-color: var(--text-color-dark);
  color: var(--text-color-light);
  padding: 40px 20px;
  text-align: center;
}

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

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

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-color-light);
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.footer-info p {
  font-size: 14px;
  line-height: 1.8;
  margin-top: 10px;
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li a {
  color: var(--text-color-light);
  text-decoration: none;
  display: block;
  padding: 5px 0;
  font-size: 14px;
}

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

/* Mobile styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    position: relative;
  }

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

  /* For image logo if used */
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Adjust as needed */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place it at the beginning */
    margin-right: auto; /* Push logo to center */
    color: var(--text-color-light);
  }

  .hamburger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

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

  .hamburger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  .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;
    background-color: #207DB0; /* Slightly different background for mobile buttons */
    justify-content: center;
    align-items: center;
    min-height: 45px;
  }

  .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; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 250px;
    height: calc(100vh - var(--header-offset));
    flex-direction: column; /* Vertical menu on mobile */
    background-color: var(--main-nav-bg);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    align-items: flex-start;
    padding: 20px 0;
  }

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

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

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

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

  .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.5);
    z-index: 999;
  }

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

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

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

  .footer-logo {
    margin-bottom: 10px;
  }

  .footer-col h3 {
    margin-bottom: 10px;
  }

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

  .footer-nav li a {
    padding: 3px 0;
  }

  /* Mobile content overflow protection */
  .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 for body when menu is active */
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;
  }
}
