/* Base Styles */
:root {
  --primary-color: #E53935;
  --secondary-color: #FF5A4F;
  --text-main-color: #333333;
  --bg-color: #F5F7FA;
  --card-bg-color: #FFFFFF;
  --border-color: #E0E0E0;
  --dark-header-footer-bg: #1A1A1A; /* Custom dark background for header-top and footer */
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}

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

/* General Container for Centering Content */
.header-container, .nav-container, .footer-top-grid {
  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 10px rgba(0, 0, 0, 0.1);
}

/* Header Top Bar (Desktop) */
.header-top {
  background-color: var(--dark-header-footer-bg);
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #FFFFFF;
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 30px; /* Adjusted padding for better spacing */
}

/* Logo Styling */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  display: block;
  line-height: 1;
}
/* If logo is an image, uncomment and adjust below */
/* .logo img { display: block; max-height: 60px; height: auto; width: auto; max-width: 280px; object-fit: contain; } */

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

/* Buttons General Styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  color: #FFFFFF; /* Ensure button text is white for contrast */
  border: none;
}

.btn-primary {
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  box-shadow: 0 4px 10px rgba(229, 57, 53, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(229, 57, 53, 0.6); }

.btn-secondary {
  background: linear-gradient(180deg, #FF7043 0%, #E64A19 100%); /* Slightly different orange/red for secondary */
  box-shadow: 0 4px 10px rgba(255, 90, 79, 0.4);
}
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(255, 90, 79, 0.6); }

/* Main Navigation Bar (Desktop) */
.main-nav {
  background-color: var(--primary-color); /* Main Red */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 25px;
  padding: 0 20px;
}

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--secondary-color); }

/* Mobile Navigation Elements */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 22px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 9px; }
.hamburger-menu span:nth-child(3) { top: 18px; }

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

.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown on mobile */
  background-color: var(--primary-color); /* Matches main-nav for consistency on mobile */
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.overlay.active { opacity: 1; visibility: visible; }

/* Footer Styling */
.site-footer {
  background-color: var(--dark-header-footer-bg);
  color: #FFFFFF;
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer .logo {
  margin-bottom: 15px;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h3 {
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.footer-col p {
  margin-bottom: 15px;
  line-height: 1.8;
}

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

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

.footer-nav a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-nav a:hover { color: var(--secondary-color); }

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

/* Responsive Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) + 2px buffer */
  }
  body {
    padding-top: var(--header-offset);
    overflow-x: hidden;
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .header-top {
    min-height: 60px;
    height: 60px;
  }
  .header-top .header-container {
    padding: 0 15px;
    justify-content: space-between;
  }
  .logo {
    flex: 1 !important; /* Takes available space */
    display: flex !important;
    justify-content: center !important; /* Centers its content (the img/text) */
    align-items: center !important;
    /* Ensure no absolute positioning for Method 1 */
    position: static;
    left: unset;
    transform: unset;
    max-width: unset;
  }
  /* If logo is an image, uncomment and adjust below */
  /* .logo img { max-height: 56px !important; display: block !important; max-width: 100%; height: auto; } */

  .desktop-nav-buttons {
    display: none;
  }
  .hamburger-menu {
    display: block;
    order: -1; /* Place hamburger on the left */
    margin-left: 0;
  }

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--primary-color); /* Ensure it has a background */
  }
  .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 {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Adjust as needed */
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    align-items: flex-start; /* Align menu items to the left */
    padding: 20px 0;
  }
  .main-nav.active {
    display: flex; /* Must set display to show */
    transform: translateX(0);
  }
  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    max-width: none;
    padding: 0 20px;
  }
  .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-top-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-col h3 { margin-top: 20px; }
  .footer-nav li { display: inline-block; margin: 0 10px 10px 0; }
  .footer-nav li:last-child { margin-right: 0; }
}

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