/* Basic Reset & Global Styles */
:root {
    --primary-color: #e44d26; /* Example: orange/red */
    --secondary-color: #333;
    --accent-color: #007bff;
    --text-color: #555;
    --bg-color-light: #f8f9fa;
    --bg-color-dark: #212529;
    --border-color: #dee2e6;
    --font-family: 'Arial', sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color-light);
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

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

.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, border-color 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #c0392b; /* Darker primary */
    border-color: #c0392b;
}

.btn-outline-light {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
}

.btn-outline-light:hover {
    background-color: #fff;
    color: var(--bg-color-dark);
}

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

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-block {
    width: 100%;
}

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

.header-top {
    background-color: #1a1a1a;
    padding: 8px 0;
    font-size: 0.9em;
    border-bottom: 1px solid #333;
}

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

.header-top-left, .header-top-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-top a {
    color: #ccc;
    text-decoration: none;
}

.header-top a:hover {
    color: #fff;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-switcher img {
    vertical-align: middle;
}

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

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

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

.main-nav .nav-list {
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.main-nav .nav-item {
    position: relative;
}

.main-nav .nav-link {
    color: #fff;
    font-weight: bold;
    padding: 10px 0;
    display: block;
    position: relative;
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    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%;
}

.main-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-color-dark);
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    padding: 10px 0;
    border: 1px solid #333;
}

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

.main-nav .dropdown-item {
    display: block;
    padding: 8px 20px;
    color: #fff;
    white-space: nowrap;
}

.main-nav .dropdown-item:hover {
    background-color: var(--primary-color);
    color: #fff;
}

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

.search-toggle, .mobile-menu-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2em;
    cursor: pointer;
    display: none; /* Hidden on desktop */
}

/* Mobile Menu */
.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: none; /* Hidden by default */
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.mobile-menu-content {
    background-color: var(--bg-color-dark);
    width: 300px;
    max-width: 80%;
    height: 100%;
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    position: relative;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
}

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

.mobile-menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2em;
    color: #fff;
    cursor: pointer;
}

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

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

.mobile-nav-link {
    display: block;
    padding: 12px 15px;
    color: #fff;
    font-weight: bold;
    border-bottom: 1px solid #333;
}

.mobile-nav-link:hover {
    background-color: var(--primary-color);
    color: #fff;
}

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

.mobile-submenu {
    display: none; /* Hidden by default */
    background-color: #2a2a2a;
    padding-left: 20px;
}

.mobile-submenu li a {
    display: block;
    padding: 10px 15px;
    color: #ccc;
}

.mobile-submenu li a:hover {
    background-color: #3a3a3a;
    color: #fff;
}

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


/* Marquee Styles */
.marquee-section {
    background-color: #f0f0f0;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.marquee-container {
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #fff;
    border-radius: 5px;
    padding: 5px 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.marquee-icon {
    flex-shrink: 0;
    margin-right: 10px;
    font-size: 1.2em;
}

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

.marquee-content {
    display: inline-block;
    animation: marquee-animation 15s linear infinite; /* Adjust duration as needed */
}

.marquee-text {
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 30px; /* Space between repeated text */
}

.marquee-separator {
    color: #ccc;
    margin: 0 10px;
}

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

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

.footer-widgets {
    padding-bottom: 30px;
    border-bottom: 1px solid #333;
}

.footer-widgets .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px; /* Counteract container padding */
}

.footer-widgets .col-md-4,
.footer-widgets .col-md-3,
.footer-widgets .col-md-2,
.footer-widgets .col-sm-6 {
    padding: 0 15px;
    margin-bottom: 30px;
}

.footer-widget .widget-title {
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 20px;
    position: relative;
}

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

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

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

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

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

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

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

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

.licenses img, .payment-methods img {
    margin-right: 10px;
    margin-bottom: 10px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.licenses img:hover, .payment-methods img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.footer-bottom {
    background-color: #1a1a1a;
    padding: 20px 0;
    text-align: center;
}

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

.copyright {
    margin: 0;
    color: #999;
}

.back-to-top {
    background-color: var(--primary-color);
    color: #fff;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    text-align: center;
    position: fixed; /* Or absolute if preferred within footer */
    bottom: 20px;
    right: 20px;
    display: none; /* Hidden by default, shown with JS */
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.back-to-top:hover {
    background-color: #c0392b;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-nav {
        display: none; /* Hide desktop nav on smaller screens */
    }
    .header-top-right .btn {
        display: none; /* Hide top right buttons on smaller screens, they move to mobile menu */
    }
    .mobile-menu-toggle {
        display: block; /* Show mobile menu toggle */
    }
    .header-main .container {
        justify-content: space-between;
    }
    .header-top-left {
        justify-content: center;
        width: 100%;
    }
    .header-top-right {
        display: none;
    }
    .marquee-content {
        animation-duration: 25s; /* Longer duration for smaller screens */
    }
}

@media (max-width: 768px) {
    .footer-widgets .col-md-4,
    .footer-widgets .col-md-3,
    .footer-widgets .col-md-2,
    .footer-widgets .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }
    .footer-widget .widget-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .social-links, .licenses, .payment-methods {
        text-align: center;
        margin-top: 15px;
    }
    .footer-bottom .container {
        flex-direction: column;
        gap: 10px;
    }
    .back-to-top {
        bottom: 10px;
        right: 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;
  }
}
