/* shared_css */

/* --- Base Styles & Resets --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

:root {
    --primary-color: #E74C3C; /* Red */
    --secondary-color: #F39C12; /* Gold/Orange */
    --accent-color: #2ECC71; /* Green for success */
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --bg-color-dark: #2C3E50; /* Dark Blue */
    --bg-color-light: #F8F9FA; /* Light Gray */
    --border-color: #DDDDDD;
    --header-height: 80px;
    --mobile-header-height: 60px;
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--bg-color-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

button, input[type="submit"] {
    cursor: pointer;
    border: none;
    outline: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-color-light);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    transform: translateY(-2px);
}

/* --- Marquee Section --- */
.marquee-section {
    background-color: var(--bg-color-dark);
    color: var(--text-color-light);
    padding: 10px 0;
    overflow: hidden;
    position: relative;
    font-size: 0.9em;
}

.marquee-container {
    display: flex;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.marquee-icon {
    flex-shrink: 0;
    margin-right: 15px;
}

.marquee-icon-emoji {
    font-size: 1.5em;
    line-height: 1;
    color: var(--secondary-color);
}

.marquee-wrapper {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    height: 25px; /* Adjust height based on content */
}

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

.marquee-item {
    color: var(--text-color-light);
    margin-right: 50px;
    display: inline-block;
    padding: 0 5px;
    transition: color 0.3s ease;
}

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

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

/* Pause marquee on hover */
.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

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

.header-top-bar {
    background-color: #1a252f; /* Slightly darker than main header */
    color: #b0b0b0;
    padding: 8px 0;
    font-size: 0.85em;
}

.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(--secondary-color);
}

.social-links a {
    color: #b0b0b0;
    margin-left: 15px;
    font-size: 1.1em;
}

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

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

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo-link {
    display: flex;
    align-items: center;
}

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

.main-navigation .nav-list {
    display: flex;
    align-items: center;
}

.main-navigation .nav-item {
    position: relative;
    margin: 0 15px;
}

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

.main-navigation .nav-link.active,
.main-navigation .nav-link:hover {
    color: var(--secondary-color);
}

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

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

.nav-item.has-dropdown > .nav-link i {
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.nav-item.has-dropdown:hover > .nav-link i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-color-dark);
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-top: 3px solid var(--primary-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 10;
    border-radius: 0 0 5px 5px;
}

.nav-item.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    color: var(--text-color-light);
    padding: 12px 20px;
    display: block;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--secondary-color);
}

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

.language-selector {
    position: relative;
    cursor: pointer;
}

.lang-button {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--text-color-light);
    padding: 8px 12px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.lang-button:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.lang-button .flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 2px;
}

.lang-button i {
    font-size: 0.7em;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-color-dark);
    min-width: 120px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-top: 3px solid var(--primary-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 10;
    border-radius: 0 0 5px 5px;
}

.language-selector:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.lang-dropdown li a:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--secondary-color);
}

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

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

/* Mobile Menu Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    display: flex;
    justify-content: flex-end;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu-content {
    width: 300px;
    max-width: 80%;
    background-color: var(--bg-color-dark);
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    position: relative;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.close-menu-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-color-light);
    font-size: 2em;
    cursor: pointer;
}

.mobile-navigation .mobile-nav-list {
    margin-top: 40px;
}

.mobile-nav-item {
    margin-bottom: 10px;
}

.mobile-nav-link {
    color: var(--text-color-light);
    padding: 12px 15px;
    display: block;
    font-size: 1.1em;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-link:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--secondary-color);
}

.mobile-nav-item.has-mobile-dropdown .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-item.has-mobile-dropdown .dropdown-toggle i {
    transition: transform 0.3s ease;
}

.mobile-nav-item.has-mobile-dropdown.active .dropdown-toggle i {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    background-color: rgba(0,0,0,0.2);
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-nav-item.has-mobile-dropdown.active .mobile-dropdown-menu {
    max-height: 300px; /* Adjust as needed for content */
}

.mobile-dropdown-menu li a {
    padding: 10px 15px;
    color: #ccc;
    display: block;
    font-size: 0.95em;
    border-bottom: none;
}

.mobile-dropdown-menu li a:hover {
    color: var(--secondary-color);
    background-color: transparent;
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

.btn-primary-mobile, .btn-secondary-mobile {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
}

.btn-primary-mobile {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.btn-secondary-mobile {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.mobile-social-links {
    margin-top: 30px;
    text-align: center;
}

.mobile-social-links a {
    color: var(--text-color-light);
    margin: 0 10px;
    font-size: 1.5em;
}

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


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

.footer-widgets {
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.footer-widget {
    margin-bottom: 20px;
}

.footer-logo {
    max-height: 60px;
    margin-bottom: 15px;
}

.about-text {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #b0b0b0;
}

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

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

.widget-title {
    color: var(--secondary-color);
    font-size: 1.2em;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

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

.footer-links li a {
    color: #b0b0b0;
    transition: color 0.3s ease;
    display: block;
}

.footer-links li a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.footer-bottom-bar {
    padding: 25px 0;
    background-color: #1a252f;
}

.bottom-bar-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.payment-methods, .licensing-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.payment-logo, .licensing-logo {
    height: 30px; /* Adjust as needed */
    width: auto;
    filter: grayscale(100%) brightness(150%);
    transition: filter 0.3s ease;
}

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

.copyright-text {
    color: #b0b0b0;
    flex-basis: 100%; /* Take full width on smaller screens */
    margin-top: 20px;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--text-color-light);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    .main-navigation, .auth-buttons, .language-selector {
        display: none; /* Hide desktop nav and auth buttons */
    }

    .menu-toggle {
        display: block; /* Show hamburger menu */
    }

    .nav-container {
        height: var(--mobile-header-height);
    }

    .site-logo {
        height: 40px;
    }

    .header-top-bar {
        display: none; /* Hide top bar on smaller screens */
    }

    .header-actions {
        gap: 10px;
    }

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

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

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

    .footer-widget {
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 20px;
    }

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

    .footer-widget .widget-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-social-links {
        justify-content: center;
        display: flex;
        margin-top: 15px;
    }

    .bottom-bar-content {
        flex-direction: column;
        gap: 15px;
    }

    .payment-methods, .licensing-info {
        width: 100%;
        justify-content: center;
    }

    .copyright-text {
        margin-top: 10px;
    }
}

@media (max-width: 576px) {
    .marquee-container {
        padding: 0 10px;
    }
    .marquee-item {
        margin-right: 30px;
    }
    .mobile-menu-content {
        width: 100%;
        max-width: 100%;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
