/* Base Styles */
:root {
  --primary-color: #FFD700;
  --secondary-color: #8B0000;
  --accent-color: #00BFFF;
  --dark-bg-color: #1A1A1A;
  --medium-dark-bg-color: #333333;
  --text-color-light: #EEEEEE;
  --text-color-dark: #333333;

  /* Desktop Header Offset Calculation */
  /* header-top height (approx. 60px including padding) + main-nav height (approx. 50px including padding) */
  --header-offset: 110px; 
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #F8F8F8;
  color: var(--text-color-dark);
  line-height: 1.6;
}

/* Shared Container Styles */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  background-color: transparent; /* Backgrounds handled by header-top and main-nav */
}

.header-top {
  background-color: var(--dark-bg-color); /* Dark background for top bar */
  padding: 15px 0;
  color: var(--text-color-light);
  display: flex;
  align-items: center;
  min-height: 30px;
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  flex-shrink: 0;
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn-register {
  background: linear-gradient(45deg, var(--primary-color), #FFC107);
  color: var(--text-color-dark);
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}
.btn-register:hover {
  background: linear-gradient(45deg, #FFC107, var(--primary-color));
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.6);
}

.btn-login {
  background-color: var(--secondary-color);
  color: var(--text-color-light);
  box-shadow: 0 4px 10px rgba(139, 0, 0, 0.4);
}
.btn-login:hover {
  background-color: #A00000;
  box-shadow: 0 6px 15px rgba(139, 0, 0, 0.6);
}

.main-nav {
  background-color: var(--medium-dark-bg-color); /* Slightly lighter dark for nav bar */
  padding: 10px 0;
  display: flex; /* Desktop default: flex row */
  justify-content: center;
  align-items: center;
  min-height: 30px;
}

.main-nav .nav-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 25px;
}

.nav-link {
  color: var(--text-color-light);
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

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

/* Site Footer */
.site-footer {
  background-color: var(--dark-bg-color);
  color: var(--text-color-light);
  padding: 40px 0 20px;
  font-size: 14px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

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

.footer-nav a {
  display: block;
  color: #BBB;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  color: #999;
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    /* Mobile Header Offset Calculation */
    /* header-top height (approx. 60px) + mobile-nav-buttons height (approx. 50px) */
    --header-offset: 110px;
  }

  .header-container, .nav-container, .footer-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
  }

  .header-top .header-container {
    justify-content: space-between;
    padding-left: 15px;
    padding-right: 15px;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001;
    order: 1;
    margin-right: 15px;
  }

  .hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
  }

  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
  }

  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
  }

  .logo {
    order: 2;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    padding: 0 10px;
  }

  .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(--dark-bg-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for 10px gap */
    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 for mobile */
    position: fixed;
    top: var(--header-offset); /* Position below the fixed header + mobile buttons */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - var(--header-offset));
    background-color: var(--medium-dark-bg-color);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    overflow-y: auto;
  }

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

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

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

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

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

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

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

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

  body.no-scroll {
    overflow: 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;
  }
}
