:root {
  --primary-color: #000000;
  --secondary-color: #FFFFFF;
  --login-button-color: #FCBC45;
  --register-button-color: #FFFFFF;
  --header-top-bg: var(--primary-color);
  --main-nav-bg: #1a1a1a;
  --header-offset: 100px; /* Desktop: header-top (~60px) + main-nav (~40px) */
}

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

/* Base styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: var(--secondary-color);
  line-height: 1.6;
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

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

a:hover {
  color: var(--login-button-color);
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--header-top-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-height: 60px; /* Base height for header-top */
}

.header-top {
  background-color: var(--header-top-bg);
  padding: 15px 0; /* Creates ~60px height with 28px font-size logo */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

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

.logo:hover {
  color: var(--login-button-color);
}

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

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-login:hover {
  background-color: #e0a83c;
  color: var(--primary-color);
}

.btn-register {
  background-color: var(--register-button-color);
  color: var(--primary-color);
  border: 1px solid var(--login-button-color);
}

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

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

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

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

.main-nav {
  background-color: var(--main-nav-bg);
  padding: 10px 0; /* Creates ~40px height with 16px font-size links */
  width: 100%;
  display: flex;
  flex-direction: row;
  position: static;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap;
  gap: 25px;
}

.nav-link {
  font-size: 16px;
  font-weight: bold;
  color: var(--secondary-color);
  padding: 5px 0;
  white-space: nowrap;
}

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

.mobile-buttons-area {
  display: none;
  background-color: var(--header-top-bg);
  padding: 10px 20px; /* Creates ~60px height with 40px estimated button height */
  justify-content: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

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

/* Footer styles */
.site-footer {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 40px 20px;
  text-align: center;
}

.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: 250px;
  text-align: left;
}

.footer-branding .footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  display: block;
  margin-bottom: 15px;
}

.footer-branding .copyright-text {
  font-size: 14px;
  color: #bbb;
  margin-top: 20px;
}

.footer-nav h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--login-button-color);
}

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

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

.footer-nav ul li a {
  color: #bbb;
  font-size: 15px;
  transition: color 0.3s ease;
}

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

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

  .site-header {
    min-height: auto;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    justify-content: space-between;
  }

  .logo {
    flex: 1;
    text-align: center;
    font-size: 24px;
    display: block;
  }
  /* Specific rule for image logos as per instructions, though our logo is text */
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .hamburger-menu {
    display: flex;
    order: -1;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below the header (header-top + mobile-buttons) */
    left: 0;
    width: 80%;
    height: calc(100% - var(--header-offset));
    background-color: var(--main-nav-bg);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 999;
  }

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

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

  .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-buttons-area {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
  }

  .mobile-buttons-area .btn {
    flex: 1;
  }

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

  .site-footer {
    padding: 30px 15px;
  }

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

  .footer-col {
    min-width: unset;
    text-align: center;
  }
  .footer-nav ul {
    text-align: center;
  }
  /* Body no-scroll class for mobile menu */
  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;
  }
}
