:root {
    --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 {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    color: #FFFFFF;
    background-color: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden;
}

/* General Link Reset for Buttons */
.btn {
    text-decoration: none;
}

/* Site Header - Fixed & Suspended */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background-color: transparent; /* Managed by children */
}

.header-top {
    background-color: #000000; /* Primary black */
    padding: 10px 0;
    min-height: 40px;
    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 20px;
}

.logo {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    white-space: nowrap;
}

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

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

.login-btn {
    background-color: #FCBC45;
    color: #000000;
    border: 1px solid #FCBC45;
}

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

.register-btn {
    background-color: #FFFFFF;
    color: #000000;
    border: 1px solid #FFFFFF;
}

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

.main-nav {
    background-color: #1a1a1a; /* Dark gray, contrasting with primary black */
    padding: 10px 0;
    min-height: 30px;
    display: flex; /* Desktop default: flex */
    flex-direction: row; /* Desktop default: row */
    justify-content: center;
    align-items: center;
    position: static; /* Desktop default: static */
    width: 100%;
}

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

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
    white-space: nowrap;
}

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

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

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

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

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

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

/* Footer Styles */
.site-footer {
    background-color: #000000;
    color: #FFFFFF;
    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;
}

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

.footer-column h3 {
    color: #FCBC45;
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-column p,
.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer ul li a {
    color: #FFFFFF;
    text-decoration: none;
    line-height: 2;
    transition: color 0.3s ease;
}

.site-footer ul li a:hover {
    color: #FCBC45;
}

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

/* Mobile Styles */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
        justify-content: space-between;
    }

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

    .hamburger-menu {
        display: block;
    }

    .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);
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 20px;
    }

    .main-nav {
        display: none; /* Mobile default: hidden */
        flex-direction: column; /* Mobile: column */
        position: fixed; /* Mobile: fixed */
        top: var(--header-offset); /* Start below the header */
        left: 0;
        width: 280px;
        height: calc(100% - var(--header-offset));
        background-color: #000000; /* Menu background */
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
        align-items: flex-start;
    }

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

    .main-nav .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 0;
        width: 100%;
        max-width: none; /* Mobile container must be 100% */
    }

    .nav-link {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid #333333;
    }

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

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

    .mobile-nav-buttons .btn {
        flex: 1;
    }

    .site-footer .footer-container {
        flex-direction: column;
        gap: 20px;
    }

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

    .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;
  }
}
