/* Global Reset & Body */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #FFFFFF; /* Base background */
    padding-top: var(--header-offset); /* Apply header offset */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

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

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

/* Header Top Section (Desktop) */
.header-top {
    background-color: #000000; /* Primary color for top bar */
    color: #FFFFFF;
    padding: 15px 0; /* Vertical padding for desktop header-top */
    min-height: 30px; /* Ensure minimum height for content */
}

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

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #FCBC45; /* Yellowish-gold for logo text */
    text-decoration: none;
    text-transform: uppercase;
    display: block;
}

.desktop-nav-buttons {
    display: flex; /* Show on desktop */
    gap: 12px;
}

/* Main Navigation Section (Desktop) */
.main-nav {
    background-color: #FFFFFF; /* Secondary color for main nav */
    padding: 10px 0; /* Vertical padding for desktop main-nav */
    min-height: 20px; /* Ensure minimum height for content */
    display: flex; /* Show on desktop */
    flex-direction: row; /* Horizontal on desktop */
    align-items: center;
    justify-content: center; /* Center menu items */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center; /* Center items */
    align-items: center;
    padding: 0 20px; /* Desktop horizontal padding */
    flex-wrap: wrap; /* Allow wrapping on smaller screens if needed */
}

.nav-link {
    color: #333; /* Dark text for nav links */
    text-decoration: none;
    padding: 8px 15px;
    font-weight: bold;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap; /* Prevent menu items from breaking */
}

.nav-link:hover, .nav-link.active {
    color: #FCBC45; /* Yellowish-gold on hover/active */
    background-color: #f0f0f0;
    border-radius: 4px;
}

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

.btn-login {
    background-color: #FCBC45; /* Login button color */
    color: #000000; /* Black text for login button */
    box-shadow: 0 4px 8px rgba(252, 188, 69, 0.4);
}
.btn-login:hover {
    background-color: #e0a53b;
    box-shadow: 0 6px 12px rgba(252, 188, 69, 0.6);
}

.btn-register {
    background-color: #000000; /* Register button color (using primary for contrast) */
    color: #FFFFFF; /* White text for register button */
    border: 2px solid #FFFFFF; /* White border for register button */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}
.btn-register:hover {
    background-color: #333333;
    border-color: #FCBC45;
    color: #FCBC45;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001; /* Above logo on mobile */
    left: 0;
}
.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FFFFFF; /* White lines on black header-top */
    margin-bottom: 5px;
    transition: all 0.3s ease;
}
.hamburger-menu span:last-child {
    margin-bottom: 0;
}

/* Mobile Buttons (Hidden on Desktop) */
.mobile-buttons {
    display: none; /* Hidden by default on desktop */
    background-color: #000000; /* Darker background for mobile buttons */
    padding: 10px 15px;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
    display: none; /* Hidden by default on desktop */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Footer Styles */
.site-footer {
    background-color: #000000; /* Footer background */
    color: #FFFFFF;
    padding: 40px 20px;
    font-size: 14px;
    margin-top: 30px; /* Add some space above the footer */
}

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

.footer-col {
    flex: 1;
    min-width: 200px;
    max-width: 300px; /* Limit width for larger screens */
}

.footer-col h3 {
    color: #FCBC45; /* Yellowish-gold for footer headings */
    font-size: 18px;
    margin-bottom: 15px;
}

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

.footer-nav {
    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;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    color: #bbb;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    /* Header Top */
    .header-container {
        padding: 10px 15px; /* Smaller padding for mobile */
        width: 100%; /* Important: mobile container full width */
        max-width: none; /* Important: remove max-width */
        position: relative; /* For absolute positioning of logo */
    }

    .hamburger-menu {
        display: block; /* Show hamburger menu on mobile */
        order: 1; /* Place it first */
        margin-right: auto; /* Push logo to center by being flex item */
    }

    .logo {
        order: 2; /* Place logo second */
        flex: 1; /* Allow logo to take available space */
        text-align: center; /* Center text logo */
        font-size: 24px; /* Smaller logo on mobile */
        position: absolute; /* Absolute positioning for better centering */
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 70px); /* Adjust width to not overlap hamburger/empty space */
        display: block !important; /* Ensure visibility for text logo */
    }

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

    /* Mobile Buttons */
    .mobile-buttons {
        display: flex; /* Show mobile buttons */
        justify-content: center;
        align-items: center;
        padding: 10px 15px;
        background-color: #000000; /* Darker background for mobile buttons */
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        gap: 10px;
    }
    .mobile-buttons .btn {
        flex: 1; /* Make buttons take equal width */
        max-width: 150px; /* Limit button width */
        font-size: 14px;
        padding: 8px 15px;
    }

    /* Main Navigation (Mobile - Hidden by default) */
    .main-nav {
        position: fixed;
        top: var(--header-offset); /* Position below fixed header/buttons */
        left: 0;
        width: 280px; /* Sidebar width */
        height: calc(100% - var(--header-offset)); /* Fill remaining height */
        background-color: #222; /* Dark background for mobile menu */
        flex-direction: column; /* Vertical menu */
        padding: 20px 0;
        box-shadow: 2px 0 5px rgba(0,0,0,0.3);
        transform: translateX(-100%); /* Hide off-screen by default */
        transition: transform 0.3s ease;
        display: none; /* Crucial: hide by default */
        overflow-y: auto; /* Enable scrolling for long menus */
    }
    .main-nav.active {
        transform: translateX(0); /* Show when active */
        display: flex; /* Crucial: show when active */
    }

    .nav-container {
        flex-direction: column; /* Vertical menu items */
        padding: 0;
        width: 100%; /* Important: mobile container full width */
        max-width: none; /* Important: remove max-width */
    }

    .nav-link {
        color: #FFFFFF; /* White text for mobile nav links */
        padding: 12px 20px;
        width: 100%;
        box-sizing: border-box;
        border-bottom: 1px solid #333;
    }
    .nav-link:last-child {
        border-bottom: none;
    }
    .nav-link:hover, .nav-link.active {
        background-color: #333;
        color: #FCBC45;
    }

    /* Hamburger Menu Active State (X icon) */
    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        gap: 20px;
    }
    .footer-col {
        max-width: 100%; /* Full width on mobile */
        text-align: center;
    }
    .footer-col h3 {
        text-align: center;
    }
    .footer-nav {
        text-align: center;
    }

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

/* Utility for no-scroll on body */
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;
  }
}
