:root {
    --primary-color: #1A202C;
    --secondary-color: #FFD700;
    --text-color-light: #F0F0F0;
    --text-color-dark: #1A202C;
    --header-top-height-desktop: 60px;
    --main-nav-height-desktop: 50px;
    --header-offset: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop */
}

@media (max-width: 768px) {
    :root {
        --header-top-height-mobile: 60px;
        --mobile-nav-buttons-height-mobile: 50px;
        --header-offset: calc(var(--header-top-height-mobile) + var(--mobile-nav-buttons-height-mobile)); /* Mobile */
    }
}

/* Base Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding-top: var(--header-offset); /* Fixed header offset */
    line-height: 1.6;
    color: var(--text-color-light);
    background-color: #2D3748; /* Slightly lighter than primary for body background */
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.btn-login {
    background-color: var(--secondary-color);
    color: var(--text-color-dark);
}

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

.btn-register {
    background-color: #E53E3E; /* A contrasting red for register */
    color: var(--text-color-light);
}

.btn-register:hover {
    background-color: #CC2C2C;
    transform: translateY(-2px);
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header-top {
    background-color: var(--primary-color); /* Dark Slate */
    padding: 15px 0;
    height: var(--header-top-height-desktop); /* Fixed height for calculation */
    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 {
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color); /* Gold */
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block; /* Ensure logo is visible by default */
}

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

.main-nav {
    background-color: #333C4E; /* Slightly lighter dark slate for contrast */
    padding: 10px 0;
    height: var(--main-nav-height-desktop); /* Fixed height for calculation */
    display: flex; /* Desktop default: flex */
    flex-direction: row; /* Desktop default: row */
    justify-content: center;
    align-items: center;
}

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

.nav-link {
    color: var(--text-color-light);
    font-weight: bold;
    font-size: 16px;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 0;
    height: 3px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

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

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    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-nav-buttons {
    display: none; /* Hidden on desktop */
    background-color: var(--primary-color);
    padding: 10px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 990; /* Below header-top and hamburger */
    height: var(--mobile-nav-buttons-height-mobile); /* Fixed height for calculation */
}

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

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

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding: 40px 20px 20px;
    font-size: 14px;
    line-height: 1.8;
}

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

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

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

.footer-section p {
    color: #B0B0B0;
}

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

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

.footer-nav a {
    color: #B0B0B0;
    transition: color 0.3s ease;
}

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

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

/* 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 {
        padding: 10px 0;
        height: var(--header-top-height-mobile); /* Fixed height for calculation */
    }

    .header-container {
        padding: 0 15px;
        justify-content: flex-start; /* Hamburger on left */
        width: 100%;
        max-width: none; /* Ensure full width */
    }

    .hamburger-menu {
        display: block;
        order: 1;
    }

    .logo {
        order: 2;
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        padding-right: 40px; /* Offset for hamburger space */
    }

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

    .main-nav {
        display: none; /* Hidden by default on mobile */
        flex-direction: column; /* Vertical alignment */
        position: fixed;
        top: var(--header-offset); /* Start below the fixed header */
        left: 0;
        width: 75%;
        height: calc(100% - var(--header-offset));
        background-color: var(--primary-color); /* Same as header-top for consistency */
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
        transform: translateX(-100%); /* Off-screen to the left */
        transition: transform 0.3s ease-out;
        overflow-y: auto;
        z-index: 999; /* Below overlay, above body */
        padding: 20px 0;
    }

    .main-nav.active {
        display: flex; /* Must be flex to show */
        transform: translateX(0); /* Slide in */
    }

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
        gap: 15px;
        width: 100%;
        max-width: none; /* Ensure full width */
    }

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

    .nav-link::after {
        display: none; /* Hide underline effect on mobile */
    }

    .mobile-nav-buttons {
        display: block; /* Show mobile buttons */
        position: relative; /* Position below header-top */
        width: 100%;
        z-index: 990; /* Below main-nav when active */
        padding: 10px 0;
    }

    .mobile-nav-buttons-container {
        padding: 0 15px;
    }

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

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

    .footer-section {
        min-width: unset;
    }
}
/* 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;
  }
}
