:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-btn-color: #EA7C07;
  --background-color: #FFFFFF;
  --text-color: #000000;
  --header-offset: 120px; /* Desktop */
}

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

/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Header styles - Desktop First */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  background-color: var(--secondary-color); /* Fallback/base for header */
}

.header-top {
  background-color: #1a8ccb; /* Darker blue for top bar */
  padding: 15px 0;
  color: var(--secondary-color);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  min-height: 40px; /* Ensure space for logo/buttons */
}

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

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
}

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

.btn-register:hover {
  background-color: #c76500;
  transform: translateY(-2px);
}

.btn-login {
  background-color: #007bff;
  color: var(--secondary-color);
}

.btn-login:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
}

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

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

.main-nav {
  background-color: var(--primary-color); /* Light blue for main nav */
  padding: 10px 0;
  display: flex; /* Desktop default */
  flex-direction: row; /* Desktop default */
  justify-content: center;
  align-items: center;
  position: static; /* Desktop default */
  min-height: 30px; /* Ensure space for nav links */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
}

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

.nav-link:hover {
  color: #e0e0e0;
}

.mobile-menu-overlay {
  display: none; /* Hidden by default */
}

/* Footer styles */
.site-footer {
  background-color: #333;
  color: var(--secondary-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;
  border-bottom: 1px solid #444;
}

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

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  display: block;
}

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

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

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

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
  padding-top: 20px;
  font-size: 13px;
  color: #bbb;
}

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

  .site-header {
    min-height: auto;
  }

  .header-container {
    padding: 0 15px;
    position: relative;
    min-height: 60px; /* Increased height for better mobile layout */
  }

  .hamburger-menu {
    display: block;
    order: 1;
    color: var(--secondary-color);
  }

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

  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: block !important;
    text-align: center;
    max-width: calc(100% - 100px); /* Adjust based on hamburger width */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 20px;
    order: 2;
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--primary-color); /* Match main nav or a complementary color */
    justify-content: center;
  }
  .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 in mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 250px;
    height: calc(100% - var(--header-offset));
    background-color: #333; /* Dark background for mobile menu */
    padding: 20px;
    transform: translateX(-100%); /* Slide out */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    overflow-y: auto;
    justify-content: flex-start;
    align-items: flex-start;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    color: var(--secondary-color);
    border-bottom: 1px solid #555;
  }

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

  .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;
    transition: opacity 0.3s ease;
  }

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

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-col {
    min-width: unset;
    width: 100%;
  }

  .footer-col h3 {
    margin-top: 20px;
  }

  .footer-nav {
    padding-left: 0;
  }
}

/* Ensure contrast for text (WCAG AA) */
.btn-register, .btn-login {
  color: var(--secondary-color); /* White text on vivid background */
}

.logo, .hamburger-menu span {
  color: var(--secondary-color); /* White on darker blue */
}

.nav-link {
  color: var(--secondary-color); /* White on primary blue */
}

.footer-col p, .footer-nav a, .footer-bottom p {
  color: var(--secondary-color); /* White on dark gray */
}

.footer-logo {
  color: var(--primary-color); /* Primary blue on dark gray */
}

.footer-col h3 {
  color: var(--primary-color); /* Primary blue on dark gray */
}
/* 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;
  }
}
