/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

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

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

/* Header Styles */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

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

.top-bar-links a {
    margin-left: 20px;
    color: #666;
}

.language-selector select {
    border: none;
    background: transparent;
    font-size: 0.9em;
    color: #666;
    cursor: pointer;
    margin-left: 10px;
}

.main-navigation {
    padding: 15px 0;
    display: flex;
    align-items: center;
}

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

.logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 30px;
    position: relative;
}

.nav-link {
    color: #333;
    font-weight: 500;
    padding: 10px 0;
    display: block;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #007bff;
    text-decoration: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    min-width: 180px;
    z-index: 1000;
    border-radius: 4px;
    padding: 10px 0;
    left: 0;
    top: 100%;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    color: #333;
    padding: 10px 20px;
    display: block;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: #f2f2f2;
    color: #007bff;
    text-decoration: none;
}

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

.btn {
    padding: 8px 15px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid transparent;
    font-size: 0.9em;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #007bff;
    border-color: #007bff;
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: #e2e6ea;
    color: #0056b3;
    border-color: #0056b3;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    margin-left: 20px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.menu-toggle span:last-child {
    margin-bottom: 0;
}

/* Footer Styles */
.main-footer {
    background-color: #222;
    color: #bbb;
    padding: 50px 0 20px;
    font-size: 0.9em;
}

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

.footer-widget {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding-right: 20px;
}

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

.footer-widget h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: #007bff;
    margin-top: 10px;
}

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

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

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

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

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

.social-links a {
    color: #bbb;
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #007bff;
}

.newsletter-form {
    display: flex;
    margin-top: 20px;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.newsletter-form button {
    padding: 10px 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #0056b3;
}

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

.copyright, .icp-info {
    margin-bottom: 5px;
}

.copyright a, .icp-info a {
    color: #007bff;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .nav-menu {
        display: none; /* Hide on smaller screens, toggle with JS */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #fff;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-item {
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    .nav-link {
        padding: 15px 20px;
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-top: 1px solid #eee;
        padding-left: 20px;
    }
    .header-actions {
        margin-left: auto;
    }
    .menu-toggle {
        display: block;
    }
    .main-navigation .container {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .top-bar-links {
        margin-top: 10px;
    }
    .top-bar-links a {
        margin-left: 0;
        margin-right: 15px;
    }
    .language-selector {
        margin-left: 0;
        margin-top: 5px;
    }
    .footer-widgets {
        flex-direction: column;
    }
    .footer-widget {
        padding-right: 0;
        min-width: unset;
        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;
  }
}
