:root {
  --primary-color: #26A9E0; /* Light Blue */
  --secondary-color: #FFFFFF; /* White */
  --accent-color: #EA7C07; /* Orange for buttons */
  --text-dark: #000000;
  --text-light: #FFFFFF;
  --header-top-bg: var(--text-dark); /* Black for top bar */
  --main-nav-bg: var(--primary-color); /* Light blue for nav bar */
  --header-offset: 100px; /* Desktop: header-top (approx 60px) + main-nav (approx 40px) */
}

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

/* Base Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  line-height: 1.6;
  color: var(--text-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

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

h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  margin-top: 0;
  margin-bottom: 15px;
}

/* General Container */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  font-size: 15px; /* Default button font size */
}

.btn-register {
  background-color: var(--accent-color);
  color: var(--text-light);
  border: 1px solid var(--accent-color);
}

.btn-register:hover {
  background-color: #D46A00; /* Darker orange */
  border-color: #D46A00;
}

.btn-login {
  background-color: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  margin-left: 10px;
}

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

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

.header-top {
  background-color: var(--header-top-bg); /* Black background for top bar */
  padding: 15px 0; /* Total height around 60px */
  display: flex;
  align-items: center;
  position: relative; /* For mobile logo positioning */
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%; /* Ensure container takes full width */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color); /* Light blue for logo text on black background */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  flex-shrink: 0; /* Prevent logo from shrinking */
}

.desktop-nav-buttons {
  display: flex;
  align-items: center;
  margin-left: auto; /* Push buttons to the right */
}

.main-nav {
  background-color: var(--main-nav-bg); /* Light blue background for nav bar */
  padding: 10px 0; /* Total height around 40px */
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.main-nav .nav-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--text-light); /* White text for nav links on blue background */
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent nav links from wrapping on desktop */
}

.nav-link:hover {
  color: var(--secondary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  padding: 5px;
  position: relative; /* For z-index */
  z-index: 1002; /* Above logo on mobile */
  flex-shrink: 0; /* Prevent hamburger from shrinking */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color); /* White lines on black background */
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Mobile Nav Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

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

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

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

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

.footer-col p {
  line-height: 1.8;
}

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

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

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
  /* Prevent content overflow */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  /* Header Top for Mobile */
  .header-top {
    padding: 10px 0; /* Total height around 50px */
  }
  .header-top .header-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding-left: 15px;
    padding-right: 15px;
    justify-content: flex-start; /* Align items to start for hamburger */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    margin-right: 15px; /* Space between hamburger and logo */
  }

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

  .logo {
    font-size: 20px;
    position: absolute !important; /* Absolute centering for logo */
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important; /* Ensure flex for image if any */
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Leave space for hamburger (30px + 15px margin + 15px right buffer = 60px, so 100px is safe) */
    color: var(--primary-color); /* Light blue for logo text */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Total height around 50px (10px top/bottom padding + btn height) */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    background-color: var(--secondary-color); /* White background for mobile buttons */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation for Mobile (Side Menu) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 70%;
    max-width: 300px; /* Optional: max width for side menu */
    height: calc(100% - var(--header-offset));
    background-color: var(--main-nav-bg); /* Light blue for mobile menu */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0; /* Vertical padding */
    box-sizing: border-box;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 1000;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0; /* No gap between vertical nav links */
    width: 100%;
    max-width: none;
    padding: 0 15px; /* Horizontal padding for nav links */
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-link:hover {
    color: var(--secondary-color);
    background-color: rgba(0, 0, 0, 0.1);
  }
  .nav-link::after {
    display: none;
  }

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

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

  /* Footer Mobile Styles */
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-col {
    max-width: 100%;
    min-width: unset;
    margin-bottom: 20px;
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }
}
/* 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;
  }
}
