:root {
    --primary-color: #FFD700;
    --secondary-color: #1A202C;
    --accent-color: #DC143C;
    --header-offset: 130px; /* Desktop: Calculated based on header-top (70px) + main-nav (60px) */
}

@media (max-width: 768px) {
    :root {
        --header-offset: 130px; /* Mobile: Calculated based on header-top (70px) + mobile-nav-buttons (60px) */
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    background-color: #f4f4f4;
    color: #333;
    overflow-x: hidden;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-color: var(--secondary-color); /* Default background, overridden by sections */
}

.header-top {
    background-color: var(--secondary-color); /* Dark Grey */
    color: #fff;
    min-height: 70px; /* Ensures enough space for logo/buttons */
    display: flex;
    align-items: center;
    padding: 0 20px; /* General padding for edges */
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px; /* Padding for content inside container */
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color); /* Gold */
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    flex-shrink: 0;
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color); /* Gold */
    margin: 5px 0;
    transition: all 0.3s ease;
}

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

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

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

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

.mobile-nav-buttons {
    display: none; /* Hidden by default on desktop, shown on mobile */
    background-color: var(--secondary-color); /* Dark Grey, same as header-top */
    padding: 10px 0;
    min-height: 60px; /* Ensures enough space for buttons */
    justify-content: center;
    align-items: center;
}

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

.main-nav {
    background-color: var(--primary-color); /* Gold - contrasting with header-top */
    min-height: 60px; /* Ensures enough space for nav links */
    display: flex; /* Desktop default: flex */
    align-items: center;
    width: 100%;
    transition: transform 0.3s ease;
}

.main-nav .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: center; /* Center nav links */
    align-items: center;
    padding: 10px 20px;
    gap: 20px;
}

.nav-link {
    color: var(--secondary-color); /* Dark Grey */
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
    text-align: center;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(26, 32, 44, 0.1);
    border-radius: 5px;
    color: var(--secondary-color);
}

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

.btn-login {
    background-color: var(--primary-color); /* Gold */
    color: var(--secondary-color); /* Dark Grey */
}

.btn-login:hover {
    background-color: #e6c200; /* Slightly darker gold */
    transform: translateY(-2px);
}

.btn-register {
    background-color: var(--accent-color); /* Dark Red */
    color: #fff;
}

.btn-register:hover {
    background-color: #b3102f; /* Slightly darker red */
    transform: translateY(-2px);
}

/* Footer Styles */
.site-footer {
    background-color: var(--secondary-color); /* Dark Grey */
    color: #f4f4f4;
    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-section {
    flex: 1;
    min-width: 250px;
}

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

.footer-section p,
.footer-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 1.8;
}

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

.footer-section a:hover {
    color: var(--primary-color); /* Gold */
}

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

.copyright {
    color: #aaa;
}

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

    .header-top {
        justify-content: space-between;
        padding: 0 15px;
    }

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .hamburger-menu {
        display: block;
        order: 0; /* Place hamburger on the far left */
    }

    .logo {
        flex: 1 !important; /* Forces logo to take available space */
        display: flex !important;
        justify-content: center !important; /* Centers the logo */
        align-items: center !important;
        order: 1;
        font-size: 24px;
    }

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

    .mobile-nav-buttons {
        display: flex; /* Show mobile buttons */
        padding: 10px 15px;
    }
    
    .mobile-nav-buttons .nav-container {
        max-width: none;
        width: 100%;
        padding: 0;
        display: flex;
        justify-content: center;
        gap: 10px;
    }

    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 300px; /* Max width for mobile menu */
        height: 100vh;
        background-color: var(--secondary-color); /* Dark Grey for mobile menu background */
        flex-direction: column;
        padding-top: var(--header-offset); /* Push menu content down */
        transform: translateX(-100%); /* Slide out from left */
        transition: transform 0.3s ease-in-out;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
        z-index: 999;
    }

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

    .main-nav .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 15px;
        gap: 15px;
        width: auto; /* Allow content to dictate width */
        max-width: none;
    }

    .nav-link {
        width: 100%;
        padding: 12px 15px;
        border-radius: 0;
        color: #fff; /* White text for mobile menu */
    }

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

    .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;
        cursor: pointer;
    }

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

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

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

/* Body no-scroll class for mobile menu */
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;
  }
}
