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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    background-color: #f8f8f8;
}

body.no-scroll {
    overflow: hidden;
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #8B0000; /* Deep Red for the overall header */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.header-top {
    background-color: #8B0000; /* Deep Red */
    width: 100%;
    min-height: 60px; /* Assumed height */
    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: 10px 20px;
    box-sizing: border-box;
}

.logo {
    color: #FFD700; /* Gold */
    text-decoration: none;
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 5px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.login-btn {
    background-color: #FFD700; /* Gold */
    color: #8B0000; /* Deep Red */
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.login-btn:hover {
    background-color: #e6c200; /* Darker Gold */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.register-btn {
    background-color: #8B0000; /* Deep Red */
    color: #FFD700; /* Gold */
    border: 2px solid #FFD700;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.register-btn:hover {
    background-color: #6a0000; /* Darker Deep Red */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.main-nav {
    background-color: #FFD700; /* Gold, contrasting with header-top */
    width: 100%;
    min-height: 50px; /* Assumed height */
    display: flex; /* Desktop: visible and horizontal */
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: center; /* Center nav links horizontally */
    gap: 25px;
    padding: 10px 20px;
    box-sizing: border-box;
}

.nav-link {
    color: #8B0000; /* Deep Red */
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 3px;
    background-color: #8B0000;
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #a00000; /* Slightly darker Deep Red */
    transform: translateY(-2px);
}

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

.site-footer {
    background-color: #222; /* Dark Gray */
    color: #f0f0f0;
    padding: 40px 20px;
    font-size: 14px;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    text-align: left;
    gap: 20px;
}

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

.footer-col h3 {
    color: #FFD700; /* Gold */
    font-size: 18px;
    margin-bottom: 15px;
}

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

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

.footer-link {
    color: #f0f0f0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #FFD700; /* Gold */
}

.copyright {
    margin-top: 30px;
    border-top: 1px solid #444;
    padding-top: 20px;
    color: #ccc;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    .page-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-content {
        overflow-x: hidden;
        max-width: 100%;
    }

    .site-header {
        flex-direction: column; /* Stack header-top and mobile-buttons-area */
        align-items: flex-start;
    }

    .header-top {
        min-height: 60px; /* Assumed height */
        width: 100%;
        justify-content: space-between;
        padding: 0 15px; /* Adjust padding for mobile */
        box-sizing: border-box;
    }

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0; /* Header-top itself has padding */
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        text-align: center; /* For text logo */
    }
    .logo img {
        display: block !important;
        max-width: 100%;
        height: auto;
        max-height: 40px;
    }

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

    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
        z-index: 1001;
        position: relative; /* To position spans */
        margin-left: -5px; /* Adjust if needed to align with screen edge */
    }

    .hamburger-menu span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #FFD700; /* Gold */
        border-radius: 3px;
        transition: all 0.3s ease-in-out;
    }

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

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

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

    .mobile-buttons-area {
        display: flex;
        justify-content: center;
        gap: 10px;
        padding: 10px 15px;
        background-color: #6a0000; /* Darker Deep Red */
        width: 100%;
        box-sizing: border-box;
        min-height: 50px; /* Assumed height */
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header */
        left: 0;
        width: 80%; /* Menu width */
        max-width: 300px; /* Limit max width for menu */
        height: calc(100vh - var(--header-offset)); /* Full height below header */
        background-color: #FFD700; /* Gold */
        flex-direction: column;
        padding: 20px;
        box-sizing: border-box;
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease-in-out;
        z-index: 999;
        overflow-y: auto;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    }

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

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

    .nav-link {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(139, 0, 0, 0.2); /* Deep Red with transparency */
        color: #8B0000; /* Deep Red */
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }

    .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.5);
        z-index: 998;
        transition: opacity 0.3s ease-in-out;
        opacity: 0;
    }

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

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

    .footer-col {
        width: 100%;
        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;
  }
}
