:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #1E90FF; /* Deep Sky Blue */
  --text-color-light: #FFFFFF;
  --text-color-dark: #333333;
  --header-bg-top: #000000; /* Black for top bar */
  --header-bg-nav: #333333; /* Darker grey for nav bar */
  --footer-bg: #1a1a1a; /* Dark grey for footer */
  --button-bg-register: var(--primary-color);
  --button-text-register: var(--text-color-dark);
  --button-bg-login: var(--secondary-color);
  --button-text-login: var(--text-color-light);

  /* Header Offset Calculation: header-top (60px) + main-nav (60px) = 120px */
  --header-offset: 120px;
}

@media (max-width: 768px) {
  :root {
    /* Mobile Header Offset: header-top (60px) + mobile-nav-buttons (55px) = 115px */
    --header-offset: 115px;
  }
}

/* Base Styles */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  padding-top: var(--header-offset); /* Apply header offset to body */
  overflow-x: hidden;
}

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

a:hover {
  text-decoration: underline;
}

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

/* Site 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 Bar */
.header-top {
  background-color: var(--header-bg-top);
  color: var(--text-color-light);
  padding: 10px 0;
  min-height: 40px; /* Actual height 10+40+10 = 60px */
  display: flex;
  align-items: center;
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  flex-grow: 1;
}

.site-header .logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  line-height: 1;
}

.site-header .logo:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

/* Buttons General Style */
.btn {
  padding: 10px 18px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  cursor: pointer;
  border: none;
  line-height: 1.2;
  display: inline-flex; /* For better vertical alignment of text */
  align-items: center;
  justify-content: center;
}

.btn-register {
  background-color: var(--button-bg-register);
  color: var(--button-text-register);
}

.btn-register:hover {
  background-color: #E6C200; /* Slightly darker gold */
  transform: translateY(-2px);
}

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

.btn-login:hover {
  background-color: #1A80E6; /* Slightly darker deep sky blue */
  transform: translateY(-2px);
}

/* Main Navigation */
.main-nav {
  background-color: var(--header-bg-nav);
  padding: 10px 0;
  display: flex; /* Desktop default: flex */
  justify-content: center;
  align-items: center;
  min-height: 40px; /* Actual height 10+40+10 = 60px */
}

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

.main-nav .nav-link {
  color: var(--text-color-light);
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.main-nav .nav-link:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  z-index: 1001;
  padding: 5px;
  box-sizing: content-box;
}

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

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

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

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

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

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

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

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

.footer-col p a {
  color: var(--text-color-light);
}

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

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

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

.site-footer .footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
  line-height: 1;
}

.site-footer .footer-logo:hover {
  color: var(--primary-color);
  text-decoration: none;
}

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .header-top .header-container {
    padding: 0 15px;
    position: relative;
    min-height: 50px; /* Adjusted to fit 60px total height with padding */
  }

  .site-header .logo {
    font-size: 24px;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1;
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    text-align: center;
    display: block !important;
  }

  /* Hamburger Menu visible on mobile */
  .hamburger-menu {
    display: flex;
    order: -1;
    z-index: 1001;
  }

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

  /* Mobile navigation buttons visible on mobile */
  .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(--header-bg-top);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 35px; /* Ensures approx 55px total height with padding */
  }

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

  /* Main Navigation (mobile) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 80%;
    height: calc(100% - var(--header-offset));
    background-color: var(--header-bg-nav);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    padding: 20px 0;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    padding: 0 15px;
    gap: 10px;
    align-items: flex-start;
  }

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

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

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

  /* Hamburger Menu Animation */
  .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);
  }

  /* Prevent body scroll */
  body.no-scroll {
    overflow: hidden;
  }

  /* Footer responsive */
  .site-footer .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

  .footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .footer-nav ul li {
    width: auto;
  }
  .footer-nav ul li a {
    padding: 5px 10px;
  }

  /* Mobile content overflow prevention */
  .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;
  }
}
