/* General Body & Reset */
:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #DC143C; /* Crimson Red */
    --dark-bg: #1a1a1a;
    --light-text: #f0f0f0;
    --dark-text: #333;
    --accent-color: #007bff;
    --border-color: #333;
    --header-height: 80px;
    --topbar-height: 40px;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    color: var(--dark-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

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

.btn-login {
    background-color: var(--dark-bg);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-login:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    border-color: var(--primary-color);
}

.btn-register {
    background-color: var(--secondary-color);
    color: var(--light-text);
    border: 1px solid var(--secondary-color);
    margin-left: 10px;
}

.btn-register:hover {
    background-color: #b31133; /* Darken secondary color */
    border-color: #b31133;
}

/* Header Styles */
.site-header {
    background-color: var(--dark-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top-bar {
    background-color: #000;
    color: var(--light-text);
    font-size: 0.85em;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-content {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.top-links li {
    display: inline-block;
    margin-right: 15px;
}

.top-links a {
    color: var(--light-text);
    font-weight: 500;
}

.top-links a:hover {
    color: var(--primary-color);
}

.language-selector {
    position: relative;
    display: inline-block;
}

.lang-toggle {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    font-size: 0.9em;
}

.lang-toggle img {
    margin-right: 5px;
    border-radius: 2px;
}

.lang-toggle .fa-chevron-down {
    margin-left: 8px;
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

.lang-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #222;
    min-width: 120px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
    display: none;
    z-index: 10;
}

.lang-dropdown li a {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: var(--light-text);
}

.lang-dropdown li a:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.lang-dropdown li a img {
    margin-right: 10px;
}

.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo .site-logo {
    height: 50px; /* Adjust as needed */
    width: auto;
    display: block;
}

.main-navigation {
    flex-grow: 1;
    text-align: center;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.menu-toggle .icon-bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    margin-bottom: 5px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.open .icon-bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.menu-toggle.open .icon-bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open .icon-bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.menu-items {
    display: flex;
    justify-content: center;
}

.menu-items li {
    position: relative;
    margin: 0 15px;
}

.menu-items li a {
    color: var(--light-text);
    font-weight: 600;
    padding: 10px 0;
    display: block;
    position: relative;
}

.menu-items li a i {
    margin-right: 8px;
    color: var(--primary-color);
}

.menu-items li a:hover {
    color: var(--primary-color);
}

.menu-items li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.menu-items li a:hover::after {
    width: 100%;
}

.has-submenu > a .submenu-arrow {
    margin-left: 5px;
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

.has-submenu:hover > a .submenu-arrow {
    transform: rotate(180deg);
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #222;
    min-width: 180px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
    display: none;
    z-index: 10;
}

.submenu li a {
    padding: 10px 20px;
    white-space: nowrap;
    color: var(--light-text);
}

.submenu li a:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.has-submenu:hover .submenu {
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
}

.user-auth {
    margin-left: 20px;
}

.search-box {
    margin-left: 15px;
    position: relative;
}

.search-toggle {
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
}

.search-toggle:hover {
    color: var(--primary-color);
}

.search-input-wrapper {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #222;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: none;
    width: 250px;
}

.search-input-wrapper input {
    width: calc(100% - 40px);
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background-color: #333;
    color: var(--light-text);
}

.search-input-wrapper input::placeholder {
    color: #aaa;
}

.search-submit {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1.1em;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* Marquee Section */
.marquee-section {
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    overflow: hidden;
}

.marquee-section .container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.marquee-container {
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-icon {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-right: 15px;
    flex-shrink: 0;
}

.marquee-wrapper {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 1.5em; /* Ensure consistent height for scrolling */
}

.marquee-content {
    display: inline-block;
    padding-left: 100%; /* Start off-screen */
    animation: marquee-scroll 30s linear infinite;
    color: var(--dark-text);
    font-weight: 500;
}

.marquee-content span {
    margin-right: 50px; /* Space between messages */
}

.marquee-content span:last-child {
    margin-right: 0;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); } /* Scrolls the entire content width */
}

.marquee-pause-btn {
    background: none;
    border: none;
    color: var(--dark-text);
    font-size: 1.1em;
    cursor: pointer;
    margin-left: 15px;
    flex-shrink: 0;
}

.marquee-pause-btn:hover {
    color: var(--secondary-color);
}

/* Footer Styles */
.site-footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 40px 0 20px;
    font-size: 0.9em;
    position: relative; /* For back-to-top button */
}

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-col {
    flex: 1 1 22%; /* Approx 4 columns */
    margin-bottom: 20px;
    padding-right: 20px;
}

.footer-col:last-child {
    padding-right: 0;
}

.footer-col h3, .footer-col h4 {
    color: var(--primary-color);
    font-size: 1.1em;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.footer-col p {
    margin-bottom: 10px;
    color: #ccc;
}

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

.footer-col ul li a {
    color: #ccc;
    display: flex;
    align-items: center;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-col ul li i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 0.9em;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    background-color: #333;
    color: var(--light-text);
    border-radius: 50%;
    margin-right: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.payment-methods {
    margin-top: 20px;
}

.payment-methods h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.payment-icon {
    height: 30px;
    width: auto;
    margin-right: 10px;
    border: 1px solid #555;
    border-radius: 3px;
    background-color: #444;
}

.age-restriction {
    display: flex;
    align-items: center;
    color: var(--secondary-color);
    font-weight: bold;
    margin-top: 15px;
}

.age-restriction i {
    margin-right: 8px;
    font-size: 1.2em;
}

.licensing-badges {
    margin-top: 15px;
}

.license-badge {
    height: 40px;
    width: auto;
    margin-right: 10px;
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    color: #aaa;
}

.footer-bottom p {
    margin: 5px 0;
}

#backToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed position */
    bottom: 30px; /* Place the button at the bottom of the page */
    right: 30px; /* Place the button at the right */
    z-index: 99; /* Make sure it does not overlap */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: var(--primary-color); /* Set a background color */
    color: var(--dark-bg); /* Text color */
    cursor: pointer; /* Add a mouse pointer on hover */
    padding: 15px; /* Some padding */
    border-radius: 50%; /* Rounded corners */
    font-size: 18px; /* Increase font size */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, color 0.3s ease;
}

#backToTopBtn:hover {
    background-color: var(--secondary-color);
    color: var(--light-text);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .menu-items {
        display: none; /* Hide main menu on smaller screens */
        flex-direction: column;
        position: absolute;
        top: calc(var(--header-height) + var(--topbar-height) - 1px); /* Below header, adjust for border */
        left: 0;
        width: 100%;
        background-color: #222;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
        padding-bottom: 10px;
    }

    .menu-items.active {
        display: flex;
    }

    .menu-toggle {
        display: block; /* Show hamburger menu */
        order: 1; /* Place before logo */
        margin-right: 15px;
    }
    
    .logo {
        order: 2;
        margin: 0 auto;
    }

    .header-actions {
        order: 3;
        margin-left: auto;
    }

    .menu-items li {
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .menu-items li:last-child {
        border-bottom: none;
    }

    .menu-items li a {
        padding: 15px 20px;
    }

    .submenu {
        position: static;
        display: none;
        background-color: #333;
        box-shadow: none;
        border-radius: 0;
        padding-left: 20px;
    }

    .has-submenu.active .submenu {
        display: block;
    }

    .has-submenu > a .submenu-arrow {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

    .footer-col {
        flex: 1 1 48%; /* 2 columns on medium screens */
    }
}

@media (max-width: 768px) {
    .header-top-bar .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .top-bar-content {
        width: 100%;
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
    }
    .header-main .container {
        flex-wrap: wrap;
        justify-content: center;
    }
    .logo, .header-actions {
        flex: 1 1 50%;
        text-align: center;
        margin-bottom: 15px;
    }
    .logo {
        order: 2;
    }
    .menu-toggle {
        order: 1;
        margin-right: auto; /* Push to left */
    }
    .header-actions {
        order: 3;
        justify-content: flex-end;
    }
    .user-auth {
        margin-left: 0;
    }
    .search-box {
        margin-left: 10px;
    }
    .search-input-wrapper {
        width: 200px;
        right: auto;
        left: 0;
    }
    .footer-col {
        flex: 1 1 100%; /* 1 column on small screens */
        padding-right: 0;
    }
    .marquee-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    .marquee-icon, .marquee-pause-btn {
        margin-bottom: 10px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
