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

@media (max-width: 768px) {
  :root {
    --header-offset: 99px; /* Mobile: header-top (50px) + mobile-nav-buttons (49px) */
  }
  .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: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  padding-top: var(--header-offset);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: var(--text-light); /* Base for header, specific sections will override */
}

/* Header Top Area */
.header-top {
  background-color: #2c2c2c; /* Dark grey, contrasting with primary red */
  color: var(--text-light);
  padding: 10px 0;
  min-height: 60px; /* desktop header-top height */
  display: flex;
  align-items: center;
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 26px;
  font-weight: 900;
  color: var(--secondary-color);
  text-decoration: none;
  padding: 5px 0;
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  line-height: 1;
}

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

.btn-primary:hover {
  background-color: #A00000;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

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

.btn-secondary:hover {
  background-color: #E6C200;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Main Navigation Area */
.main-nav {
  background-color: var(--primary-color); /* Primary color for main nav, contrasting with top */
  padding: 10px 0;
  min-height: 50px; /* desktop main-nav height */
  display: flex; /* Desktop default: flex */
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
  gap: 25px;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  padding: 5px 0;
  transition: color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.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 {
  color: var(--secondary-color);
  transform: translateY(-1px);
}

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

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  position: relative;
  z-index: 1002;
  padding: 5px;
}

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

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

/* Mobile Nav Buttons (Mobile Only) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown by media query */
  background-color: #3a3a3a; /* Slightly lighter dark for buttons */
  padding: 10px 15px;
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Mobile Menu Overlay */
.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;
  transition: opacity 0.3s ease;
}

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

/* Footer Styles */
.site-footer {
  background-color: #222;
  color: var(--text-light);
  padding: 40px 0 20px;
  font-size: 14px;
  border-top: 5px solid var(--primary-color);
}

.site-footer h3 {
  color: var(--secondary-color);
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

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

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

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

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

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

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

/* Mobile Specific Styles */
@media (max-width: 768px) {
  .header-top {
    min-height: 50px; /* mobile header-top height */
    padding: 5px 0;
  }
  .header-top .header-container {
    padding: 0 15px;
    position: relative;
    justify-content: space-between;
  }
  .hamburger-menu {
    display: flex;
    order: 1;
  }
  .logo {
    order: 2;
    flex: 1;
    text-align: center;
    font-size: 20px;
    white-space: normal;
    max-width: calc(100% - 60px); /* Account for hamburger width */
  }
  .desktop-nav-buttons {
    display: none;
  }
  .mobile-nav-buttons {
    display: flex !important;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    min-height: 49px; /* mobile-nav-buttons height: 10px padding + 29px button + 10px padding */
  }
  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* 50% minus half of the gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and buttons */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100vh - var(--header-offset));
    background-color: #333; /* Darker background for mobile menu */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

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

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

  .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-container {
    flex-direction: column;
    gap: 20px;
  }
  .footer-column {
    min-width: unset;
    width: 100%;
    text-align: center;
  }
  .footer-column ul {
    padding: 0;
  }
}

/* Helper class for no scroll */
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;
  }
}
