:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px + 2px buffer */
  --primary-color: #C91F17;
  --auxiliary-color: #E53935;
  --card-bg-color: #D32F2F;
  --background-color: #B71C1C;
  --text-main-color: #FFF5E1;
  --border-color: #F2B544;
  --glow-color: #FFCC66;
  --gold-color: #F4D34D;
  --deep-red-color: #7A0E0E;
}

body {
  margin: 0;
  padding-top: var(--header-offset);
  font-family: Arial, sans-serif;
  color: var(--text-main-color);
  background-color: var(--background-color);
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

body.no-scroll {
  overflow: hidden;
}

/* Site Header - Fixed position, suspended */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Suspended effect */
  box-sizing: border-box;
}

/* Header Top - Desktop */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  background-color: var(--primary-color); /* Primary Red */
  color: var(--text-main-color);
  width: 100%;
  overflow: hidden;
}

.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; /* Padding for logo and buttons */
}

.logo {
  font-weight: bold;
  font-size: 24px;
  color: var(--glow-color); /* Gold color for logo text */
  text-decoration: none;
  white-space: nowrap;
  display: flex; /* Ensure flex context for potential img */
  align-items: center;
}

.logo img {
  display: block;
  max-height: 60px; /* Max height for desktop logo */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Main Navigation - Desktop */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  background-color: var(--deep-red-color); /* Deep Red for contrast */
  color: var(--text-main-color);
  width: 100%;
  overflow: hidden;
}

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

.nav-link {
  color: var(--text-main-color);
  text-decoration: none;
  padding: 0 15px;
  font-size: 16px;
  transition: color 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-link:hover {
  color: var(--glow-color); /* Gold hover effect */
  transform: translateY(-2px);
}

/* Buttons */
.btn {
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px; /* More rounded for iGaming feel */
  font-weight: bold;
  color: #000; /* Black text for gold button */
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Gold gradient */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 0 15px var(--glow-color); /* Add glow on hover */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002; /* Above logo on mobile */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-main-color);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

.header-spacer {
  display: none; /* Hidden on desktop */
}

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

.mobile-menu-overlay {
  display: none; /* Hidden by default */
  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: var(--card-bg-color); /* Darker Red */
  color: var(--text-main-color);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
  box-sizing: border-box;
}

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

.footer-col h3 {
  color: var(--glow-color); /* Gold headings */
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.footer-logo {
  font-weight: bold;
  font-size: 28px;
  color: var(--glow-color); /* Gold logo */
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

.footer-col.footer-dynamic-col .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-dynamic-row-bottom-slot .footer-slot-anchor-inner {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1200px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.7);
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) = 108px + 2px buffer */
  }

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden;
  }
  
  /* Prevent images in page content from overflowing */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Header Top - Mobile */
  .header-top {
    min-height: 60px;
    height: 60px; /* Fixed height for mobile */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Hamburger left, logo center, spacer right */
    width: 100%;
    max-width: none; /* Remove max-width for mobile */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    align-items: center;
    justify-content: center;
    width: 30px; /* Fixed width for hamburger icon */
    height: 30px; /* Fixed height for hamburger icon */
    position: relative;
    z-index: 1002;
    order: 1; /* Place it first */
  }
  
  .hamburger-menu span {
    position: absolute;
    width: 24px; /* Adjust span width for mobile */
    left: 3px;
  }

  .logo {
    order: 2; /* Place logo second */
    flex: 1 !important; /* Take available space to center */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px; /* Slightly smaller logo text */
    min-width: 0; /* Allow shrinking */
    text-align: center; /* For text-based logo centering within its flex item */
  }
  
  .logo img {
    max-height: 56px !important; /* Max height for mobile logo */
    max-width: calc(100% - 10px); /* Ensure it doesn't overlap too much */
  }

  .header-spacer {
    display: block; /* Show spacer on mobile */
    order: 3; /* Place spacer third */
    width: 30px; /* Match hamburger width to balance */
    height: 1px; /* Minimal height */
    flex-shrink: 0; /* Prevent spacer from shrinking */
  }

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

  /* Mobile Nav Buttons Bar */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons bar */
    min-height: 48px; /* Fixed height for mobile button bar */
    height: 48px; /* Ensure consistent height */
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden; /* Prevent horizontal overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Keep buttons in a single row */
    background-color: var(--auxiliary-color); /* Auxiliary Red for mobile button bar */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max 2 buttons, accounting for gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font for mobile buttons */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  /* Main Navigation - Mobile (Hidden by default, slide in) */
  .main-nav {
    min-height: 48px;
    height: auto; /* Allow height to adjust based on content */
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below header and mobile buttons */
    left: 0;
    width: 80%;
    max-width: 300px; /* Max width for mobile menu sidebar */
    height: calc(100vh - var(--header-offset)); /* Full height minus header */
    background-color: var(--deep-red-color); /* Deep Red */
    transform: translateX(-100%); /* Off-screen initially */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay, below hamburger */
    overflow-y: auto; /* Enable scrolling for long menus */
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* Remove max-width for mobile */
    padding: 15px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0; /* More padding for mobile links */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    justify-content: flex-start;
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer Mobile Styles */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 20px;
    margin-bottom: 20px;
  }

  .footer-col {
    text-align: center; /* Center content in footer columns */
  }

  .footer-col h3 {
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 10px;
  }

  .footer-nav {
    text-align: center;
  }
  
  .footer-nav li {
    margin-bottom: 5px;
  }

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

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

  .footer-dynamic-col .footer-slot-anchor-inner {
    justify-content: center;
  }

  .footer-dynamic-row .footer-slot-anchor-inner {
    justify-content: center;
    padding: 10px 0;
  }

  .footer-bottom {
    padding-top: 15px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
