/* 全局样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --header-bg: #fff;
    --footer-bg: #2c3e50;
    --footer-text: #ecf0f1;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.05);
    --transition-speed: 0.3s;
}

.dark-theme {
    --primary-color: #4dabf7;
    --secondary-color: #6c757d;
    --text-color: #e9ecef;
    --bg-color: #212529;
    --card-bg: #343a40;
    --header-bg: #343a40;
    --footer-bg: #212529;
    --footer-text: #f8f9fa;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.2);
}

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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

/* 页面加载动画 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.page-loader.fade-out {
    opacity: 0;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 滚动进度条 */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1000;
}

.scroll-progress {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.1s ease;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.back-to-top:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

/* 头部样式 */
header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 5px var(--shadow-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 15px 0;
    box-shadow: 0 5px 15px var(--shadow-color);
}

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

header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

header h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

header h1:hover::after {
    width: 100%;
}

.nav-container {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a:hover::after {
    width: 100%;
}

.theme-toggle-container {
    margin-left: 20px;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(30deg);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--card-bg);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px var(--shadow-color);
        z-index: 99;
    }
    
    .nav-container.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
    }
    
    nav ul li {
        margin: 10px 0;
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 10px 0;
    }
    
    .theme-toggle-container {
        margin: 20px 0 0;
        align-self: flex-start;
    }
    
    .close-menu {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        color: var(--text-color);
        font-size: 1.5rem;
        cursor: pointer;
    }
}

/* 主要内容区域 */
main {
    padding: 40px 0;
    position: relative;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

section {
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

section h2 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 2rem;
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

section:hover h2::after {
    width: 100px;
}

.section-subtitle {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 30px;
    font-weight: 500;
}

.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--shadow-color);
    padding: 30px;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    text-align: center;
    padding: 30px;
    border-radius: 8px;
    background-color: var(--card-bg);
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    transition: all 0.5s ease;
}

.feature-item:hover .feature-icon {
    transform: rotateY(180deg);
}

.feature-icon::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    opacity: 0.1;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon::after {
    width: 70px;
    height: 70px;
}

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

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

.text-center {
    text-align: center;
}

.mt-30 {
    margin-top: 30px;
}

.mb-30 {
    margin-bottom: 30px;
}

/* 英雄区域 */
.hero {
    background-color: var(--primary-color);
    color: white;
    padding: 120px 0;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.8) 0%, rgba(41, 128, 185, 0.8) 100%);
    z-index: 0;
    transform: skewY(-3deg);
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 30px;
    animation: fadeInUp 1s ease 0.3s;
    animation-fill-mode: both;
}

.hero-buttons {
    margin-top: 30px;
    animation: fadeInUp 1s ease 0.6s;
    animation-fill-mode: both;
}

.hero-buttons .btn {
    margin: 0 10px;
}

.typed-container {
    height: 40px;
    margin-bottom: 20px;
}

.typed-text {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 300;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 关于我们 */
.about {
    background-color: var(--card-bg);
    padding: 80px 0;
    border-radius: 8px;
    box-shadow: 0 5px 25px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.about::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background-color: var(--primary-color);
    opacity: 0.1;
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    position: relative;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* 联系我们 */
.contact {
    background-color: var(--card-bg);
    padding: 80px 0;
    border-radius: 8px;
    box-shadow: 0 5px 25px var(--shadow-color);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: var(--text-color);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.form-control:focus::placeholder {
    opacity: 0.4;
    transform: translateY(-5px);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.contact-info {
    margin-top: 50px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    color: white;
    font-size: 1.2rem;
}

.contact-info-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
}

/* 页脚 */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 50px 0 30px;
    text-align: center;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), #9b59b6, #e74c3c);
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    width: 100%;
    margin-bottom: 40px;
    text-align: left;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 10px;
}

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

.footer-section p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

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

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--footer-text);
    transition: all 0.3s ease;
}

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

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

footer p {
    margin-bottom: 10px;
}

.icp {
    margin: 15px 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.icp a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 15px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
    background-color: rgba(52, 152, 219, 0.1);
}

.icp a:hover {
    text-decoration: none;
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.site-info {
    margin-top: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    letter-spacing: 1px;
}

/* 动画效果 */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-down"] {
    transform: translateY(-50px);
}

[data-aos="fade-right"] {
    transform: translateX(-50px);
}

[data-aos="fade-left"] {
    transform: translateX(50px);
}

[data-aos].aos-animate {
    transform: translateY(0) translateX(0);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 80px 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        margin: 10px auto;
        max-width: 200px;
    }
    
    section h2 {
        font-size: 1.8rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .back-to-top {
        right: 15px;
        bottom: 15px;
        width: 40px;
        height: 40px;
    }
}