:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --text-color: #333333;
  --dark-blue-header: #1e88b5; /* Slightly darker than primary for header-top */
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: header-top (60px) + mobile-nav-buttons (50px) */
  }
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

a:hover {
  text-decoration: underline;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none; /* No underline */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.btn-login {
  background-color: var(--login-button-color); /* Orange */
  color: var(--secondary-color); /* White */
  border: none;
}

.btn-login:hover {
  background-color: #e06a00; /* Slightly darker orange */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.btn-register {
  background-color: var(--primary-color); /* Light Blue */
  color: var(--secondary-color); /* White */
  border: none;
}

.btn-register:hover {
  background-color: #1e88b5; /* Slightly darker blue */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

/* --- 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.1);
  background-color: var(--secondary-color); /* Default background, will be overridden by header-top/main-nav */
}

/* Header Top Area */
.header-top {
  background-color: var(--dark-blue-header); /* Darker blue for header top */
  color: var(--secondary-color);
  min-height: 60px; /* Desktop height */
  display: flex;
  align-items: center;
  padding: 0 20px; /* Default padding for header-top */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* White logo text */
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 0;
  display: block; /* Ensure logo is visible */
}

.logo:hover {
  color: var(--primary-color); /* Hover effect for logo */
  text-decoration: none;
}

.desktop-nav-buttons {
  display: flex; /* Show on desktop */
  gap: 10px;
  margin-left: auto; /* Push buttons to the right */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  order: 1; /* For mobile ordering */
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color); /* White bars */
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Main Navigation Area */
.main-nav {
  background-color: var(--primary-color); /* Primary light blue for main nav */
  min-height: 50px; /* Desktop height */
  display: flex; /* Show on desktop */
  align-items: center;
  padding: 0 20px; /* Default padding for main-nav */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center; /* Center menu items on desktop */
  align-items: center;
  gap: 25px;
  padding: 0 20px; /* Padding for content inside container */
}

.nav-link {
  color: var(--secondary-color); /* White nav links */
  font-weight: bold;
  padding: 10px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #cceeff; /* Lighter shade on hover */
  text-decoration: none;
}

/* Mobile Nav Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

/* Mobile Menu Overlay (Hidden 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.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* --- Site Footer --- */
.site-footer {
  background-color: #f5f5f5; /* Light grey footer background */
  color: var(--text-color);
  padding: 40px 20px 20px;
  font-size: 14px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 30px;
}

.footer-col {
  flex: 1;
  min-width: 250px;
  max-width: 30%;
}

.footer-col h3 {
  font-size: 18px;
  color: var(--dark-blue-header); /* Darker blue for footer headings */
  margin-bottom: 15px;
}

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

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

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

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

.footer-nav a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  color: #666666;
}

/* --- Mobile Styles (max-width: 768px) --- */
@media (max-width: 768px) {
  body {
    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; /* Mobile header-top height */
    padding: 0 15px; /* Smaller padding for mobile */
  }

  .header-container {
    padding: 0; /* Container itself doesn't need padding as header-top has it */
    width: 100%;
    max-width: none; /* Important: no max-width on mobile containers */
    justify-content: space-between; /* Space out hamburger and logo */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    color: var(--secondary-color);
    order: 1; /* Left side */
  }

  .logo {
    font-size: 20px;
    order: 2; /* Center */
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: calc(100% - 70px); /* Adjust max-width to allow space for hamburger */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* According to instructions */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    background-color: #f0f0f0; /* Light background for mobile buttons */
    padding: 10px 15px; /* Padding for the button row */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    min-height: 50px; /* Mobile button row height */
    justify-content: center; /* Center buttons if less than 2 */
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px; /* Max width for sidebar */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--dark-blue-header); /* Dark background for mobile menu */
    flex-direction: column;
    padding: 20px 0;
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align links to the left */
    gap: 15px;
    padding: 0 15px; /* Padding for mobile menu links */
    width: 100%;
    max-width: none; /* Important: no max-width on mobile containers */
  }

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

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

  .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-col {
    max-width: 100%;
    min-width: unset;
  }
}
/* 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;
  }
}
