:root {
    --primary-color: #000000;
    --secondary-color: #FFFFFF;
    --login-btn-bg: #FCBC45;
    --register-btn-bg: #FFFFFF;
    --header-offset: 90px; /* Desktop: header-top (50px) + main-nav (40px) */
}

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

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--secondary-color); /* Background: #FFFFFF */
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    overflow-x: hidden;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--primary-color); /* Default background for entire header */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
    background-color: var(--primary-color); /* Header-top: #000000 */
    padding: 10px 0;
    min-height: 50px;
}

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

.logo {
    font-size: 2.2em;
    font-weight: bold;
    color: var(--login-btn-bg); /* Use FCBC45 for logo to stand out against black */
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    padding: 0;
    margin: 0;
}

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

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    border: none; /* Ensure no default button border */
    font-size: 0.9em;
}

.login-btn {
    background-color: var(--login-btn-bg); /* #FCBC45 */
    color: var(--primary-color); /* #000000 */
}

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

.register-btn {
    background-color: var(--register-btn-bg); /* #FFFFFF */
    color: var(--primary-color); /* #000000 */
}

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

.main-nav {
    background-color: #222222; /* Slightly lighter black for contrast with header-top */
    padding: 10px 0;
    min-height: 40px;
    display: flex; /* Desktop default: flex */
    flex-direction: row; /* Desktop default: row */
    justify-content: center;
}

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

.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 10px 15px;
    font-weight: bold;
    white-space: nowrap;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
    color: var(--login-btn-bg); /* Highlight with login button color */
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

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

.flex-spacer {
    display: none; /* Hidden on desktop */
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color); /* #000000 */
    color: var(--secondary-color); /* #FFFFFF */
    padding: 40px 0 20px;
}

.site-footer h3 {
    color: var(--login-btn-bg); /* #FCBC45 */
    margin-bottom: 15px;
    font-size: 1.2em;
}

.site-footer p {
    font-size: 0.9em;
    margin-bottom: 10px;
}

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

.footer-col {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding-right: 20px;
}

.footer-nav {
    list-style: none;
}

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

.footer-nav a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--login-btn-bg);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.footer-bottom p {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
    }
    
    .nav-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
    }

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

    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
        position: relative;
        z-index: 1001;
    }

    .hamburger-menu .bar {
        width: 100%;
        height: 3px;
        background-color: var(--secondary-color);
        transition: all 0.3s ease;
        border-radius: 2px;
    }

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

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

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

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 1.8em;
        padding: 0;
        margin: 0; /* Override any desktop margin */
    }
    
    .logo img {
        display: block !important;
        max-width: 100%;
        height: auto;
        max-height: 40px;
    }

    .flex-spacer {
        display: block;
        width: 30px; /* To balance hamburger menu width for logo centering */
    }

    .mobile-buttons-area {
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #111111; /* Darker than main-nav, lighter than header-top */
        padding: 10px 0;
        min-height: 50px;
        width: 100%;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    .mobile-buttons-area .header-container {
        justify-content: center;
        gap: 10px;
        padding: 0 15px;
    }
    
    .mobile-buttons-area .btn {
        flex: 1; /* Make buttons take equal space */
        text-align: center;
        max-width: 150px;
    }

    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: var(--header-offset); /* Start below the fixed header + mobile buttons */
        left: 0;
        width: 80%; /* Menu takes 80% width */
        max-width: 300px; /* Optional: limit max width even on larger tablets */
        height: calc(100vh - var(--header-offset)); /* Fill remaining viewport height */
        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;
        box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    }

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

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

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

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

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

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

    body.no-scroll {
        overflow: hidden;
    }

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

    .footer-col {
        padding-right: 0;
        margin-bottom: 20px;
        min-width: unset;
        width: 100%;
    }

    .footer-nav {
        padding: 0;
    }

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