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

/* General */
html { scroll-behavior: smooth; }
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  color: #333333;
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 15px; }
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header-top {
  background-color: #0F5B8B; /* Dark blue */
  color: #FFFFFF;
  min-height: 60px;
  display: flex;
  align-items: center;
}
.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 60px;
}
.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
}
.logo:hover { text-decoration: none; color: #f0f0f0; }

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}
.btn {
  padding: 10px 18px;
  border-radius: 5px;
  color: #FFFFFF;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  border: none;
}
.btn-register { background-color: #EA7C07; } /* Orange */
.btn-register:hover { background-color: #D46F06; }
.btn-login { background-color: #26A9E0; } /* Light blue */
.btn-login:hover { background-color: #1A8BCF; }

/* Mobile Navigation Buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

/* Main Navigation */
.main-nav {
  background-color: #26A9E0; /* Primary light blue */
  color: #FFFFFF;
  min-height: 50px;
  display: flex; /* Desktop default */
  align-items: center;
  justify-content: center;
}
.main-nav .nav-container {
  display: flex; /* Desktop default */
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 25px;
  min-height: 50px;
}
.nav-link {
  color: #FFFFFF;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.nav-link:hover {
  color: #e0e0e0;
  text-decoration: none;
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
  flex-shrink: 0;
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 10.5px; }
.hamburger-menu span:nth-child(3) { top: 21px; }

/* Hamburger menu active state */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* Mobile Menu Overlay (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.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Header Placeholder (hidden on desktop) */
.mobile-header-placeholder {
  display: none; /* Hidden by default on desktop */
}

/* Footer */
.site-footer {
  background-color: #333333; /* Dark grey */
  color: #f0f0f0;
  padding: 40px 0 20px;
  font-size: 14px;
}
.site-footer h3 {
  color: #FFFFFF;
  font-size: 16px;
  margin-bottom: 15px;
}
.site-footer p { margin-bottom: 10px; }
.site-footer a { color: #26A9E0; }
.site-footer a:hover { color: #FFFFFF; text-decoration: underline; }

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}
.footer-col {
  flex: 1;
  min-width: 200px;
}
.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li { margin-bottom: 8px; }

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 30px;
  border-top: 1px solid #444444;
  background-color: #222222; /* Slightly darker grey */
}
.footer-bottom p {
  margin: 0;
  color: #bbbbbb;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    justify-content: space-between;
  }
  .hamburger-menu {
    display: block;
    order: 0;
    margin-right: auto;
    width: 30px;
    height: 30px;
  }
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 1;
    font-size: 20px;
    max-width: calc(100% - 60px); /* Account for hamburger and placeholder */
    text-align: center; /* For text logo */
  }
  .logo img {
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }
  .mobile-header-placeholder {
    display: block;
    order: 2;
    flex-shrink: 0;
    width: 30px; /* Match hamburger width */
    margin-left: auto;
  }
  .desktop-nav-buttons {
    display: none;
  }

  /* Mobile Navigation Buttons */
  .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: #0F5B8B;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-height: 60px; /* Ensure buttons row has height */
  }
  .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;
    line-height: 1.3;
  }

  /* Main Navigation (Mobile) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 250px;
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    background-color: #26A9E0;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0);
  }
  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    width: 100%;
    gap: 15px;
  }
  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-link:last-child { border-bottom: none; }

  /* Footer adjustments */
  .footer-container {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
  }
  .footer-col {
    min-width: unset;
    width: 100%;
  }
  .footer-nav ul { text-align: left; }

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