:root {
    --primary-color: #2C3E50;
    --secondary-color: #E6B800;
    --header-top-bg: #202d3b; /* Darker variant of primary for header top */
    --main-nav-bg: #34495e; /* Slightly lighter primary for main nav */
    --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}
@media (max-width: 768px) {
    :root {
        --header-offset: 105px; /* Mobile: header-top (60px) + mobile-nav-buttons (45px) */
    }
}

html {
    scroll-behavior: smooth;
}
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Header Styles --- */
.site-header {
    background-color: transparent; /* Background handled by sections */
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    min-height: auto; /* Ensure content fits */
}

.site-header a {
    text-decoration: none;
    color: inherit;
}

.header-top {
    background-color: var(--header-top-bg);
    padding: 10px 0;
    color: #fff;
    height: 60px; /* Fixed height for header-top */
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

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

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block; /* Ensure it's not inline for flex alignment */
    padding: 0;
}

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

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

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(230, 184, 0, 0.4);
}

.btn-primary:hover {
    background-color: #ffda44;
    box-shadow: 0 6px 12px rgba(230, 184, 0, 0.6);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.mobile-nav-buttons {
    display: none; /* Hidden by default on desktop */
    background-color: var(--header-top-bg); /* Match header top for consistency */
    padding: 10px 0;
    box-sizing: border-box;
}

.main-nav {
    background-color: var(--main-nav-bg);
    padding: 0;
    height: 50px; /* Fixed height for main-nav */
    box-sizing: border-box;
    display: flex; /* Desktop: visible, row */
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

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

.nav-link {
    color: #fff;
    padding: 8px 15px;
    font-size: 16px;
    font-weight: bold;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 4px;
}

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

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

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

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

.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;
    transition: opacity 0.3s ease;
    opacity: 0;
}

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

/* --- Footer Styles --- */
.site-footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 40px 20px 20px;
    font-size: 14px;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    text-align: left;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: inline-block;
}

.site-footer h3 {
    color: var(--secondary-color);
    font-size: 18px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.site-footer p {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.7);
}

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

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

.footer-nav a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    margin-top: 20px;
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* --- Responsive Styles (Mobile First Approach - Overriding Desktop) --- */
@media (max-width: 768px) {
    .header-top {
        height: 60px; /* Adjust height for mobile */
        padding: 5px 0;
    }
    .header-container {
        padding: 0 15px;
        width: 100%;
        max-width: none; /* Ensure it takes full width */
        justify-content: space-between;
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        order: 1;
    }

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

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

    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: var(--header-top-bg);
        justify-content: center;
        height: 45px; /* Fixed height for mobile buttons */
    }
    .mobile-nav-buttons .btn {
        flex: 1;
        min-width: 0;
        max-width: calc(50% - 5px); /* Two buttons with 10px gap */
        box-sizing: border-box;
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.2;
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: 0;
        left: 0;
        width: 250px;
        height: 100%;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: flex-start;
        padding-top: 80px;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease;
        overflow-y: auto;
        height: 100vh; /* Full viewport height */
        box-sizing: border-box;
        justify-content: flex-start;
    }

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

    .main-nav .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
        width: 100%;
        max-width: none; /* Ensure it takes full width */
        height: auto;
    }

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

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

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

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

    .site-footer h3 {
        margin-top: 20px;
    }

    /* Prevent content overflow */
    .page-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-content {
        overflow-x: hidden;
        max-width: 100%;
    }
}

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