:root {
  --primary-color: #B80000;
  --accent-color: #FFD700;
  --dark-bg: #222222;
  --text-light: #FFFFFF;
  --text-dark: #222222;
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: header-top (60px) + mobile-buttons (50px) */
  }
  .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 {
  margin: 0;
  font-family: Arial, sans-serif;
  padding-top: var(--header-offset);
  color: var(--text-dark);
}

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

.header-top {
  background-color: var(--dark-bg);
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-color);
  text-decoration: none;
  padding: 10px 0;
  display: block;
}

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

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

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

.btn-login:hover {
  background-color: #e6c200;
}

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

.btn-register:hover {
  background-color: #990000;
}

.main-nav {
  background-color: var(--primary-color);
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
}

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

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

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--accent-color);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 5px 0;
  transition: 0.4s;
}

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

.mobile-menu-overlay {
  display: none;
}

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column {
  flex: 1;
  min-width: 180px;
}

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

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

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
  padding-top: 20px;
}

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

/* Mobile Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    justify-content: flex-start; /* Align hamburger left */
  }

  .hamburger-menu {
    display: block;
    order: 0;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 1;
    font-size: 24px;
    padding: 10px 0;
  }

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

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    align-items: flex-start;
    padding-top: 20px;
  }

  .main-nav.active {
    display: flex; /* Must be flex/block to show */
    transform: translateX(0);
  }

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

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

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

  .mobile-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    background-color: var(--dark-bg);
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box;
    z-index: 998;
    min-height: 50px;
  }

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

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

  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

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

  .footer-column {
    min-width: unset;
    width: 100%;
    text-align: center;
  }

  .footer-column ul li {
    display: inline-block;
    margin: 0 8px 10px 8px;
  }

  .footer-column ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-bottom {
    padding: 0 15px;
  }
}

/* No-scroll class for body */
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;
  }
}
