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

html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    color: #333333;
    background-color: #FFFFFF;
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-color: #000000; /* Primary color for overall header */
}

.header-top {
    background-color: #000000; /* Primary color for top section */
    padding: 15px 0;
    display: flex;
    align-items: center;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #FCBC45; /* Login button color for logo for contrast */
    text-decoration: none;
    white-space: nowrap;
}

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

.btn {
    text-decoration: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    border: none;
}

.login-btn {
    background-color: #FCBC45; /* Login button color */
    color: #000000;
}

.login-btn:hover {
    background-color: #e0a53c;
}

.register-btn {
    background-color: #FFFFFF; /* Register button color */
    color: #000000;
    border: 1px solid #FCBC45;
}

.register-btn:hover {
    background-color: #f0f0f0;
    border-color: #e0a53c;
}

.main-nav {
    background-color: #333333; /* Darker shade for navigation bar */
    width: 100%;
    display: flex;
    min-height: 50px;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 10px 30px;
    flex-wrap: wrap;
}

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    padding: 8px 15px;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: #FCBC45;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    order: -1; /* Move to the left on mobile */
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #FFFFFF;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}

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

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

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

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

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

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

/* Footer styles */
.site-footer {
    background-color: #000000;
    color: #FFFFFF;
    padding: 40px 20px;
    font-size: 14px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding-bottom: 30px;
    border-bottom: 1px solid #222222;
}

.footer-section h4 {
    color: #FCBC45;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
}

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

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

.footer-nav a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #FCBC45;
}

.copyright {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: #BBBBBB;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .header-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
        justify-content: flex-start; /* Align items to start */
    }

    .logo {
        flex: 1 !important; /* Forces logo to take available space */
        display: flex !important;
        justify-content: center !important; /* Centers the logo horizontally */
        align-items: center !important;
        font-size: 20px;
    }
    
    .desktop-nav-buttons {
        display: none;
    }

    .hamburger-menu {
        display: block;
        margin-right: 15px; /* Space between hamburger and logo */
    }

    .mobile-nav-buttons {
        display: flex;
        justify-content: center;
        gap: 10px;
        padding: 10px 15px;
        background-color: #000000; /* Same as header-top */
    }

    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: var(--header-offset); /* Position below header and mobile buttons */
        left: 0;
        width: 80%; /* Sidebar width */
        height: calc(100vh - var(--header-offset));
        background-color: #222222;
        flex-direction: column;
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }

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

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

    .nav-link {
        width: 100%;
        text-align: left;
        padding: 12px 10px;
        border-bottom: 1px solid #333333;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h4 {
        margin-top: 20px;
    }

    .page-content img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-content {
      overflow-x: hidden;
      max-width: 100%;
    }
    body {
      overflow-x: 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;
  }
}
