/* General Body & Reset */
:root {
    --primary-color: #ffd700; /* Gold */
    --secondary-color: #cc0000; /* Red */
    --dark-bg: #1a1a1a;
    --light-text: #f0f0f0;
    --dark-text: #333;
    --header-height: 80px;
    --top-bar-height: 40px;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: #f4f4f4;
    scroll-behavior: smooth;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

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

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

.btn-login:hover {
    background-color: #e6c200;
}

.btn-register {
    background-color: var(--secondary-color);
    color: var(--light-text);
}

.btn-register:hover {
    background-color: #b30000;
}

/* Header */
.site-header {
    background-color: var(--dark-bg);
    color: var(--light-text);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header-top-bar {
    background-color: #0d0d0d;
    padding: 10px 0;
    font-size: 0.9em;
}

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

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    margin-right: 5px;
    color: var(--primary-color);
}

.top-bar-links a, .language-selector {
    color: var(--light-text);
    margin-left: 15px;
    display: inline-flex;
    align-items: center;
}

.language-selector select {
    background: transparent;
    border: none;
    color: var(--light-text);
    margin-left: 5px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 15px; /* Space for custom arrow if needed */
}

.language-selector select option {
    background-color: var(--dark-bg);
    color: var(--light-text);
}

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

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

.logo img {
    height: 50px; /* Adjust as needed */
    width: auto;
    vertical-align: middle;
}

.main-navigation .menu {
    display: flex;
    gap: 25px;
}

.main-navigation .menu-item a {
    color: var(--light-text);
    font-weight: bold;
    padding: 10px 0;
    display: block;
    position: relative;
}

.main-navigation .menu-item a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.main-navigation .menu-item-has-children {
    position: relative;
}

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    background-color: var(--dark-bg);
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 10;
    top: 100%;
    left: 0;
    padding: 10px 0;
    border-top: 3px solid var(--primary-color);
}

.main-navigation .menu-item-has-children:hover > .sub-menu {
    display: block;
}

.main-navigation .sub-menu li a {
    padding: 8px 20px;
    white-space: nowrap;
    font-weight: normal;
    color: var(--light-text);
}

.main-navigation .sub-menu li a:hover {
    background-color: #2a2a2a;
    color: var(--primary-color);
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px 10px;
}

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

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input[type="search"] {
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #444;
    background-color: #333;
    color: var(--light-text);
    width: 180px;
    transition: width 0.3s ease, border-color 0.3s ease;
}

.search-box input[type="search"]::placeholder {
    color: #bbb;
}

.search-box input[type="search"]:focus {
    width: 220px;
    border-color: var(--primary-color);
    outline: none;
}

.search-box button {
    background: none;
    border: none;
    color: var(--primary-color);
    position: absolute;
    right: 10px;
    cursor: pointer;
    font-size: 1em;
    padding: 0;
}

/* Marquee Section */
.marquee-section {
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 10px 0;
    overflow: hidden;
}

.marquee-container {
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
}

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

.marquee-wrapper {
    display: inline-block;
    white-space: nowrap;
    animation: marquee-scroll 20s linear infinite;
    padding-right: 50px; /* Ensure content doesn't abruptly end */
}

.marquee-content {
    display: inline-block;
}

.marquee-content a {
    color: var(--light-text);
    text-decoration: none;
    margin-right: 50px; /* Space between repeating content */
}

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

@keyframes marquee-scroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

/* Footer */
.site-footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 40px 0 20px;
    font-size: 0.9em;
}

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

.footer-widget {
    flex: 1;
    min-width: 220px;
    margin-bottom: 20px;
}

.footer-widget h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1em;
}

.footer-widget p {
    margin-bottom: 15px;
    color: #ccc;
}

.footer-widget ul {
    padding: 0;
}

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

.footer-widget ul li a {
    color: #ccc;
    text-decoration: none;
}

.footer-widget ul li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.social-links a {
    color: var(--light-text);
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

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

.payment-icons img, .licensing-icons img {
    height: 30px;
    margin-right: 10px;
    margin-bottom: 10px;
    filter: grayscale(100%) brightness(150%); /* Make icons blend with dark theme */
    transition: filter 0.3s ease;
}

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

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

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

.disclaimer {
    font-size: 0.8em;
    line-height: 1.4;
    color: #888;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation .menu {
        gap: 15px;
    }
    .header-actions {
        gap: 10px;
    }
    .footer-widget {
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .header-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-navigation {
        width: 100%;
        order: 3; /* Move navigation below logo and actions */
        margin-top: 15px;
    }

    .menu-toggle {
        display: block;
        align-self: flex-end;
        margin-bottom: 10px;
        position: absolute;
        right: 15px;
        top: calc(var(--top-bar-height) + 25px); /* Align with main header content */
    }

    .main-navigation .menu {
        flex-direction: column;
        width: 100%;
        background-color: #2a2a2a;
        position: absolute;
        left: 0;
        top: calc(var(--header-height) + var(--top-bar-height)); /* Adjust based on actual header height */
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        display: none; /* Hidden by default for mobile */
        padding: 10px 0;
        z-index: 9;
    }

    .main-navigation .menu.active {
        display: flex; /* Show when active */
    }

    .main-navigation .menu-item {
        width: 100%;
        border-bottom: 1px solid #3a3a3a;
    }

    .main-navigation .menu-item:last-child {
        border-bottom: none;
    }

    .main-navigation .menu-item a {
        padding: 12px 20px;
    }

    .main-navigation .sub-menu {
        position: static;
        display: block;
        background-color: #3a3a3a;
        box-shadow: none;
        border-top: none;
        padding: 0;
        margin-left: 20px;
    }

    .main-navigation .sub-menu li a {
        padding: 8px 30px;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        order: 2;
    }

    .search-box {
        flex-grow: 1;
        margin-right: 10px;
    }

    .search-box input[type="search"] {
        width: 100%;
        max-width: none;
    }

    .top-bar-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .contact-info, .top-bar-links {
        margin-bottom: 10px;
    }
    .contact-info span {
        margin-right: 10px;
    }
    .top-bar-links a {
        margin-left: 0;
        margin-right: 15px;
    }

    .footer-widgets {
        flex-direction: column;
        align-items: center;
    }
    .footer-widget {
        width: 100%;
        text-align: center;
    }
    .social-links {
        justify-content: center;
        display: flex;
    }
    .payment-icons, .licensing-icons {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    .search-box {
        width: 100%;
        margin-right: 0;
    }
    .btn-login, .btn-register {
        width: 100%;
    }
    .top-bar-content {
        align-items: center;
        text-align: center;
    }
    .contact-info span, .top-bar-links a {
        display: block;
        margin-bottom: 5px;
    }
    .language-selector {
        margin-left: 0;
        margin-top: 5px;
    }
}

/* Marquee specific styles */
.marquee-icon-emoji {
    display: inline-block; /* Ensure emoji is visible */
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
