:root {
  --header-offset: 100px;
}
@media (max-width: 768px) {
  :root {
    --header-offset: 108px;
  }
}

html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  color: #333333;
  padding-top: var(--header-offset);
  line-height: 1.6;
  overflow-x: hidden;
}

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

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  background-color: #FFFFFF; /* Secondary color for header background */
}

.header-top {
  background-color: #26A9E0; /* Primary color for top bar */
  padding: 10px 0;
  min-height: 40px;
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF; /* Contrasting with header-top background */
  white-space: nowrap;
}

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

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

.btn-login {
  background-color: #EA7C07;
  color: #FFFFFF;
}

.btn-login:hover {
  background-color: #cc6d06;
}

.btn-register {
  background-color: #FFFFFF;
  color: #26A9E0;
  border: 1px solid #26A9E0;
}

.btn-register:hover {
  background-color: #f0f0f0;
  color: #1e87b7;
}

.main-nav {
  background-color: #333333; /* Darker color for main nav, contrasting with header-top */
  padding: 10px 0;
  display: flex;
  position: static;
  flex-direction: row;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  width: 100%;
}

.nav-link {
  color: #FFFFFF;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #26A9E0;
}

.hamburger-menu,
.mobile-nav-buttons,
.mobile-menu-overlay {
  display: none;
}

.site-footer {
  background-color: #333333;
  color: #FFFFFF;
  padding: 40px 0 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}

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

.footer-col h4,
.footer-logo {
  color: #26A9E0;
  margin-bottom: 15px;
  font-size: 18px;
}

.footer-col p {
  font-size: 14px;
  color: #CCCCCC;
}

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

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

.footer-nav a {
  color: #CCCCCC;
  transition: color 0.3s ease;
  font-size: 14px;
}

.footer-nav a:hover {
  color: #26A9E0;
}

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

.footer-bottom p {
  color: #CCCCCC;
  font-size: 14px;
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    flex-wrap: nowrap;
    position: relative;
    min-height: 60px;
    width: 100%;
    max-width: none;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 25px;
    height: 20px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
  }

  .hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
    transition: all 0.3s ease;
  }

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

  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Adjust based on hamburger/empty space width */
    font-size: 20px;
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    background-color: #26A9E0;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .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;
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 70%;
    height: calc(100% - var(--header-offset));
    background-color: #333333;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 999;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

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

  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 998;
    display: none;
  }

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

  body.no-scroll {
    overflow: hidden;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 15px;
  }

  .footer-col {
    min-width: unset;
    width: 100%;
    margin-bottom: 20px;
  }

  .footer-nav {
    padding: 0;
  }

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