
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --dark-background: #1A202C;
  --login-button-color: #EA7C07;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

/* General Body & Container Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.header-top {
  background-color: var(--dark-background);
  color: var(--secondary-color);
  padding: 15px 0;
  display: flex;
  align-items: center;
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Ensure padding inside container */
  min-height: 30px; /* Base height for logo/buttons */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  padding: 0;
  margin: 0;
  line-height: 1;
  display: block; /* Ensure logo is visible */
}

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

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

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

.btn-login:hover {
  background-color: #d16b06;
  transform: translateY(-1px);
}

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

.btn-register:hover {
  background-color: #1e88b8;
  transform: translateY(-1px);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  width: 40px;
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  margin-right: 15px; /* Space between hamburger and logo */
}

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

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

.main-nav .nav-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  padding: 0 20px; /* Ensure padding inside container */
}

.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  padding: 8px 0;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #cceeff;
  border-bottom: 2px solid #cceeff;
}

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

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

/* Footer Styles */
.site-footer {
  background-color: var(--dark-background);
  color: var(--secondary-color);
  padding: 40px 0 20px 0;
  font-size: 14px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding: 0 20px;
}

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

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

.footer-col p {
  margin: 0 0 10px 0;
  color: #ccc;
}

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

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

.footer-link {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* Mobile Styles */
@media (max-width: 768px) {
  .header-top {
    padding: 10px 0;
    min-height: 50px;
  }

  .header-top .header-container {
    padding: 0 15px;
    position: relative;
    justify-content: flex-start; /* For hamburger menu */
    min-height: 30px; /* Ensure content has space */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: absolute; /* For robust centering */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger menu */
    height: auto; /* Ensure height adjusts */
  }

  .hamburger-menu {
    display: flex; /* Show on mobile */
    order: -1; /* Place at the beginning */
    margin-right: auto; /* Push logo to center */
  }

  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }

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

  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  .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;
    background-color: var(--dark-background); /* Consistent with header-top */
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: hidden;
    justify-content: center;
    align-items: center;
    min-height: 30px; /* Base height for buttons */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* For two buttons with 10px gap */
    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;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow-y: auto;
    padding-bottom: 20px; /* Ensure content doesn't stick to bottom */
  }

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

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

  .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.active {
    display: block;
  }

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

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

  .footer-col ul {
    text-align: center;
  }

  .footer-col ul li {
    display: inline-block;
    margin: 0 8px 8px 8px;
  }
  
  .footer-bottom {
    padding: 20px 15px;
  }

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