/* Basic Reset & Box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base Body Styles */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container for Centering Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.visible { display: block !important; }

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

.btn-primary {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    border: 1px solid #6c757d;
}
.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-login {
    background-color: #f7931a; /* Orange */
    color: #fff;
    border: none;
    margin-right: 10px;
}
.btn-login:hover {
    background-color: #e08116;
}

.btn-register {
    background-color: #28a745; /* Green */
    color: #fff;
    border: none;
}
.btn-register:hover {
    background-color: #218838;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

/* Links */
a {
    color: #007bff;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Header Specific Styles (example, will be more specific in header_html) */
.main-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.header-top-bar {
    background-color: #333;
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
}
.header-top-bar .top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.language-selector select {
    background-color: #444;
    color: #fff;
    border: 1px solid #555;
    padding: 5px 10px;
    border-radius: 3px;
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23fff' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 25px;
}
.header-main-nav {
    padding: 15px 0;
}
.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    max-height: 50px;
    vertical-align: middle;
}
.main-navigation .nav-list {
    list-style: none;
    display: flex;
}
.main-navigation .nav-item {
    position: relative;
    margin-left: 25px;
}
.main-navigation .nav-link {
    color: #333;
    font-weight: bold;
    padding: 10px 0;
    display: block;
    transition: color 0.3s ease;
}
.main-navigation .nav-link:hover,
.main-navigation .nav-link.active {
    color: #007bff;
    text-decoration: none;
}
.main-navigation .dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    list-style: none;
    min-width: 180px;
    z-index: 1000;
    border-radius: 4px;
    padding: 10px 0;
    margin-top: 5px;
}
.main-navigation .nav-item.has-dropdown:hover .dropdown-menu {
    display: block;
}
.main-navigation .dropdown-menu li a {
    color: #333;
    padding: 8px 15px;
    display: block;
}
.main-navigation .dropdown-menu li a:hover {
    background-color: #f0f0f0;
    text-decoration: none;
}
.search-and-mobile-toggle {
    display: flex;
    align-items: center;
}
.search-toggle, .mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
    margin-left: 15px;
}
.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
}
.mobile-menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 9999;
    display: none; /* Hidden by default */
    justify-content: flex-end; /* Push menu to right */
}
.mobile-menu-overlay.active {
    display: flex;
}
.mobile-menu-content {
    background-color: #fff;
    width: 300px;
    max-width: 80%;
    height: 100%;
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
}
.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}
.close-mobile-menu {
    background: none;
    border: none;
    font-size: 24px;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    color: #333;
}
.mobile-navigation ul {
    list-style: none;
    padding-top: 40px;
}
.mobile-navigation li a {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 18px;
    font-weight: bold;
}
.mobile-navigation li:last-child a {
    border-bottom: none;
}
.mobile-auth-buttons {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mobile-auth-buttons .btn {
    width: 100%;
}

/* Footer Specific Styles */
.main-footer {
    background-color: #222;
    color: #eee;
    padding: 40px 0;
    font-size: 14px;
    margin-top: 50px;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #444;
    padding-bottom: 30px;
}
.footer-widget h3 {
    color: #f7931a; /* Orange */
    margin-bottom: 15px;
    font-size: 18px;
}
.footer-widget p {
    margin-bottom: 10px;
}
.footer-widget ul {
    list-style: none;
}
.footer-widget ul li a {
    color: #ccc;
    display: block;
    padding: 5px 0;
}
.footer-widget ul li a:hover {
    color: #fff;
    text-decoration: underline;
}
.footer-widget .social-media a {
    display: inline-block;
    margin-right: 10px;
}
.footer-widget .social-media img {
    filter: invert(1); /* Make icons white for dark background */
}
.footer-widget .payment-icons img {
    margin-right: 10px;
    margin-bottom: 10px;
    background-color: #fff;
    padding: 3px;
    border-radius: 3px;
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444; /* Redundant with above, but fine */
}
.footer-bottom .copyright {
    margin-bottom: 10px;
    color: #aaa;
}
.footer-bottom .disclaimer {
    color: #888;
    font-size: 12px;
    margin-bottom: 5px;
}
.footer-bottom .disclaimer-long {
    color: #777;
    font-size: 11px;
    line-height: 1.4;
}

/* Marquee Specific Styles */
.marquee-section {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 0;
    overflow: hidden;
}
.marquee-container {
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    max-width: 100%;
}
.marquee-icon {
    flex-shrink: 0;
    margin-right: 10px;
    font-size: 20px;
    color: #dc3545; /* Red for alert */
}
.marquee-wrapper {
    overflow: hidden;
    flex-grow: 1;
}
.marquee-content {
    display: inline-block;
    animation: marquee-animation 30s linear infinite; /* Adjust duration as needed */
    padding-right: 100%; /* Ensure content can scroll out completely */
}
.marquee-content:hover {
    animation-play-state: paused;
}
.marquee-text {
    color: #343a40;
    font-weight: 500;
    margin-right: 20px;
    text-decoration: none;
    transition: color 0.2s ease;
}
.marquee-text:hover {
    color: #007bff;
    text-decoration: underline;
}
.marquee-separator {
    color: #6c757d;
    margin: 0 15px;
}

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

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation {
        display: none; /* Hide desktop nav */
    }
    .mobile-menu-toggle {
        display: block; /* Show mobile toggle */
    }
    .header-main-nav .nav-wrapper {
        justify-content: space-between;
    }
    .search-and-mobile-toggle {
        order: 3; /* Move to end */
    }
    .logo {
        order: 1; /* Keep logo first */
    }
    .header-top-bar .top-bar-content {
        flex-direction: column;
        gap: 10px;
    }
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    .footer-widget {
        text-align: center;
    }
    .footer-widget ul {
        padding: 0;
    }
    .footer-widget ul li a {
        display: inline-block; /* For better mobile spacing */
        margin: 0 5px;
    }
    .footer-widget .social-media,
    .footer-widget .payment-icons {
        text-align: center;
        margin-top: 15px;
    }
}
@media (max-width: 576px) {
    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    .marquee-icon {
        font-size: 18px;
    }
    .marquee-text {
        font-size: 14px;
    }
    .footer-widgets {
        gap: 20px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
