/* Basic Reset & Typography */
:root {
    --primary-color: #e53935; /* Red */
    --secondary-color: #ffb300; /* Gold */
    --dark-bg: #1a1a1a;
    --light-bg: #ffffff;
    --text-color: #333333;
    --light-text-color: #f0f0f0;
    --border-color: #e0e0e0;
    --header-height: 70px;
    --top-bar-height: 40px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

body.no-scroll {
    overflow: hidden;
}

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

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

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

ul {
    list-style: none;
}

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

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

.btn-primary:hover {
    background-color: #c62828;
    border-color: #c62828;
}

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

.btn-secondary:hover {
    background-color: #e6a200;
    border-color: #e6a200;
}

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

.header-top-bar {
    background-color: #222;
    padding: 10px 0;
    font-size: 0.85em;
    border-bottom: 1px solid #333;
}

.top-bar-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.language-selector {
    position: relative;
    cursor: pointer;
    padding: 5px 0;
}

.language-selector .current-lang, .language-selector-mobile .current-lang-mobile {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--light-text-color);
}

.language-selector .lang-dropdown, .language-selector-mobile .lang-dropdown-mobile {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #333;
    min-width: 120px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    overflow: hidden;
    display: none;
    z-index: 10;
}

.language-selector.active .lang-dropdown,
.language-selector-mobile.active .lang-dropdown-mobile {
    display: block;
}

.language-selector .lang-dropdown li a, .language-selector-mobile .lang-dropdown-mobile li a {
    display: block;
    padding: 8px 15px;
    color: var(--light-text-color);
    white-space: nowrap;
}

.language-selector .lang-dropdown li a:hover, .language-selector-mobile .lang-dropdown-mobile li a:hover {
    background-color: var(--primary-color);
}

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

.auth-buttons .btn-login {
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 8px 15px;
}

.auth-buttons .btn-login:hover {
    background-color: var(--secondary-color);
    color: var(--dark-bg);
}

.auth-buttons .btn-register {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: var(--light-bg);
    padding: 8px 15px;
}

.auth-buttons .btn-register:hover {
    background-color: #c62828;
    border-color: #c62828;
}

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

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

.logo img {
    height: 40px; /* Adjust as needed */
}

.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.main-nav .nav-list {
    display: flex;
    gap: 30px;
}

.main-nav .nav-link {
    color: var(--light-text-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

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

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

.search-bar-dropdown {
    background-color: #333;
    padding: 15px 0;
    display: none; /* Hidden by default */
    border-top: 1px solid #444;
}

.search-bar-dropdown.active {
    display: block;
}

.search-bar-dropdown .container {
    display: flex;
    gap: 10px;
}

.search-bar-dropdown input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #222;
    color: var(--light-text-color);
    font-size: 1em;
}

.search-bar-dropdown input::placeholder {
    color: #bbb;
}

.search-bar-dropdown .btn-search {
    background-color: var(--primary-color);
    color: var(--light-bg);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
}

.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--light-text-color);
    transition: all 0.3s ease;
}

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

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

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

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.mobile-nav {
    text-align: center;
    width: 80%; /* Limit mobile nav width */
    max-width: 300px;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-item a {
    color: var(--light-text-color);
    font-size: 1.5em;
    font-weight: 500;
    padding: 10px 0;
    display: block;
}

.btn-mobile-auth {
    background-color: var(--primary-color);
    color: var(--light-bg);
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.2em;
    margin-top: 10px;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.language-selector-mobile {
    position: relative;
    margin-top: 20px;
}

.language-selector-mobile .current-lang-mobile {
    font-size: 1.5em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.language-selector-mobile .lang-dropdown-mobile {
    position: static; /* Override absolute positioning for mobile */
    background-color: transparent;
    box-shadow: none;
    margin-top: 10px;
    display: none;
}

.language-selector-mobile.active .lang-dropdown-mobile {
    display: block;
}

.language-selector-mobile .lang-dropdown-mobile li a {
    font-size: 1.2em;
    padding: 8px 0;
}

/* Marquee Section */
.marquee-section {
    background-color: var(--secondary-color);
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 2px solid #e6a200;
}

.marquee-container {
    display: flex;
    align-items: center;
    position: relative;
    height: 30px; /* Adjust height as needed */
}

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

.marquee-icon-emoji {
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}

.marquee-wrapper {
    flex-grow: 1;
    overflow: hidden;
}

.marquee-content {
    display: inline-block;
    animation: marquee-animation 30s linear infinite; /* Adjust duration based on content length */
    padding-left: 100%; /* Start off-screen */
}

.marquee-item {
    color: var(--dark-bg);
    margin-right: 50px;
    font-weight: 500;
    font-size: 0.95em;
}

.marquee-item:hover {
    color: var(--primary-color);
}

@keyframes marquee-animation {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); } /* Move completely off-screen to the left */
}

/* Footer Styles */
.main-footer {
    background-color: var(--dark-bg);
    color: var(--light-text-color);
    padding-top: 50px;
    font-size: 0.9em;
}

.footer-top {
    border-bottom: 1px solid #333;
    padding-bottom: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-col h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.2em;
    text-transform: uppercase;
}

.footer-col p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #ccc;
}

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

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

.footer-col ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

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

.footer-logo img {
    height: 50px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    color: var(--light-text-color);
    font-size: 1.2em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: var(--light-bg);
}

.payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 25px;
}

.payment-icons img {
    height: 30px;
    filter: grayscale(100%) brightness(150%);
    transition: filter 0.3s ease;
}

.payment-icons img:hover {
    filter: grayscale(0%) brightness(100%);
}

.app-downloads {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.app-downloads img {
    height: 40px;
    width: auto;
}

.footer-bottom {
    background-color: #111;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #222;
    margin-top: 30px;
}

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

.age-restriction img {
    height: 30px;
    vertical-align: middle;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--light-bg);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-nav {
        display: none; /* Hide desktop nav on smaller screens */
    }

    .mobile-menu-toggle {
        display: flex; /* Show mobile toggle */
    }

    .header-wrapper {
        justify-content: space-between;
    }

    .header-actions {
        gap: 15px;
    }

    .top-bar-content {
        justify-content: center;
    }

    .auth-buttons {
        display: none; /* Hide auth buttons in top bar, move to mobile menu */
    }

    .language-selector {
        order: -1; /* Move language selector to the left */
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col {
        padding: 20px 0;
        border-bottom: 1px solid #333;
    }

    .footer-col:last-child {
        border-bottom: none;
    }

    .footer-logo {
        display: flex;
        justify-content: center;
    }

    .social-links, .payment-icons, .app-downloads {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .logo img {
        height: 35px;
    }

    .marquee-section {
        font-size: 0.9em;
    }

    .marquee-icon {
        margin-right: 10px;
    }

    .marquee-item {
        margin-right: 30px;
    }
}

@media (max-width: 480px) {
    .header-main {
        padding: 10px 0;
    }

    .logo img {
        height: 30px;
    }

    .mobile-nav-item a {
        font-size: 1.2em;
    }

    .btn-mobile-auth {
        padding: 10px 20px;
        font-size: 1em;
    }

    .language-selector-mobile .current-lang-mobile {
        font-size: 1.2em;
    }

    .language-selector-mobile .lang-dropdown-mobile li a {
        font-size: 1em;
    }

    .footer-col h3 {
        font-size: 1.1em;
    }

    .footer-col p {
        font-size: 0.85em;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
