:root {
  --primary-color: #E53935;
  --accent-color: #FF5A4F;
  --text-main-color: #333333;
  --background-color: #F5F7FA;
  --card-bg-color: #FFFFFF;
  --border-color: #E0E0E0;
  --header-offset: 122px;
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  color: var(--text-main-color);
  background-color: var(--background-color);
  line-height: 1.6;
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: var(--card-bg-color);
}

.header-top {
  box-sizing: border-box;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #C62828; /* Darker red for top bar */
  width: 100%;
  padding: 0 20px; /* Default padding for desktop, adjusted in container */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--card-bg-color); /* White text for logo on dark background */
  text-decoration: none;
  display: block;
  line-height: 1;
  max-width: 280px; /* Limit logo width */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

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

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

.btn {
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  color: #FFFFFF;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-color) 0%, var(--primary-color) 100%);
}

.btn-secondary {
  background: linear-gradient(180deg, #FF7043 0%, #E64A19 100%); /* Slightly different gradient for contrast */
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.main-nav {
  box-sizing: border-box;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--accent-color); /* Lighter red for main nav */
  width: 100%;
  padding: 0 20px; /* Default padding for desktop, adjusted in container */
}

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

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  padding: 0 15px;
  font-weight: bold;
  font-size: 15px;
  transition: color 0.3s ease;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #F5F7FA; /* Lighter hover for contrast */
  background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001; /* Above other header elements */
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu .bar:nth-child(3) { bottom: 0; }

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

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

.overlay.active {
  display: block;
  opacity: 1;
}

.site-footer {
  background-color: var(--card-bg-color);
  padding: 40px 20px 20px;
  color: var(--text-main-color);
  border-top: 1px solid var(--border-color);
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

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

.footer-about .footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-about p {
  font-size: 14px;
  line-height: 1.8;
  color: #555555;
}

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

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

.footer-nav li a {
  color: #555555;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: #777777;
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

  .header-top {
    height: 60px !important;
    padding: 0 15px;
    justify-content: space-between;
  }

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

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0;
    font-size: 20px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    max-width: calc(100% - 100px); /* Account for hamburger menu */
  }

  .logo img {
    max-height: 56px !important;
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--card-bg-color);
    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);
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    height: auto;
    min-height: 48px;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    max-width: 80%;
    background-color: var(--primary-color);
    flex-direction: column;
    align-items: flex-start;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    box-sizing: border-box;
    display: none; /* Hidden by default */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }

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

  .hamburger-menu {
    display: block;
    order: -1; /* Place to the left */
    margin-right: 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col {
    margin-bottom: 20px;
  }

  .footer-about .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-nav {
    text-align: center;
  }

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