:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --button-login-color: #EA7C07;
  --text-color: #000000;
  --background-color: #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 {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--secondary-color); /* White background for the overall header */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-height: auto; /* Ensure content adaptation */
}

.header-top {
  background-color: var(--primary-color); /* Vibrant blue for the top bar */
  padding: 10px 0;
  color: var(--secondary-color);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for logo and buttons */
  position: relative; /* For mobile logo absolute positioning */
  min-height: 40px; /* Minimum height for desktop top bar */
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  display: block;
  padding: 5px 0;
  line-height: 1;
}

.desktop-nav-buttons {
  display: flex;
  gap: 15px;
  margin-left: auto;
}

.btn {
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  display: inline-block;
  color: var(--secondary-color);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.btn-register:hover {
  background-color: #1e8bc3; /* Slightly darker primary */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

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

.btn-login:hover {
  background-color: #c96806; /* Slightly darker login color */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

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

.main-nav {
  background-color: #1e8bc3; /* Darker blue for main navigation */
  padding: 10px 0;
  display: flex; /* Desktop: default flex for horizontal menu */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow menu items to wrap if needed */
}

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

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

/* Footer Styles */
.site-footer {
  background-color: #333333; /* Dark gray for footer background */
  color: var(--secondary-color);
  padding: 40px 20px;
  font-size: 0.9rem;
  line-height: 1.8;
}

.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: 180px;
}

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

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

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

.footer-nav ul li a {
  color: var(--secondary-color);
  text-decoration: none;
  display: block;
  padding: 5px 0;
}

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

.copyright {
  margin-top: 20px;
  text-align: left;
}

/* Mobile Styles */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }

  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .header-top {
    padding: 0;
  }

  .header-top .header-container {
    padding: 0 15px;
    min-height: 60px; /* Ensure sufficient height for hamburger and logo */
    width: 100%;
    max-width: none;
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu */
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1002; /* Above logo and overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .hamburger-menu::before, .hamburger-menu::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: var(--secondary-color);
    transition: transform 0.3s ease;
  }

  .hamburger-menu::before {
    transform: translateY(-8px);
  }

  .hamburger-menu::after {
    transform: translateY(8px);
  }

  .hamburger-menu.active::before {
    transform: rotate(45deg);
  }

  .hamburger-menu.active::after {
    transform: rotate(-45deg);
  }

  .hamburger-menu.active::before, .hamburger-menu.active::after {
    top: 50%;
    left: 50%;
    transform-origin: center;
    margin-left: -15px;
    margin-top: -1.5px;
  }

  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1; /* Ensure logo is above other elements if they overlap slightly */
    font-size: 1.5rem; /* Adjust as needed */
    max-width: calc(100% - 80px); /* Account for hamburger and placeholder */
    white-space: nowrap; /* Prevent logo text from wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .header-right-placeholder {
    display: block; /* Show placeholder to balance hamburger menu */
    width: 40px; /* Match hamburger width */
    height: 40px; /* Match hamburger height */
    visibility: hidden;
    flex-shrink: 0;
  }

  .mobile-nav-buttons {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--secondary-color); /* White background for mobile buttons */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 50% minus half of gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-radius: 20px;
    box-shadow: none; /* Remove shadow to make them less heavy */
  }
  
  .mobile-nav-buttons .btn-register {
    background-color: var(--primary-color);
  }
  .mobile-nav-buttons .btn-login {
    background-color: var(--button-login-color);
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Starts below the header + mobile buttons */
    left: 0;
    width: 250px;
    height: calc(100vh - var(--header-offset));
    background-color: #333333; /* Dark background for mobile menu */
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
  }

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

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

  .nav-link {
    color: var(--secondary-color);
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
  }

  .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0;
  }

  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .mobile-menu-overlay.active {
    display: block; /* Show when active */
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .footer-col {
    min-width: unset;
  }
  .footer-col h3, .footer-logo {
    text-align: center;
  }
  .footer-nav ul {
    text-align: 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;
  }
}
