/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #9b59b6;
    --secondary: #8e44ad;
    --accent: #bb8fce;
    --dark: #7d3c98;
    --bg-light: #f8f4fb;
    --bg-white: #ffffff;
    --text-dark: #2d2d2d;
    --text: #4a4a4a;
    --text-light: #8a8a8a;
    --border: #e8d5f0;
    --shadow: 0 4px 12px rgba(155, 89, 182, 0.15);
    --shadow-lg: 0 8px 24px rgba(155, 89, 182, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* 顶部导航栏 */
.main-header {
    background: var(--bg-white);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.header-brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.brand-logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.brand-tag {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    background: var(--bg-light);
    padding: 4px 10px;
    border-radius: 12px;
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-item {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s;
}

/* 主横幅 */
.hero-banner {
    background: linear-gradient(135deg, #f8f4fb 0%, #ede4f5 100%);
    padding: 100px 0;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    animation: fadeInLeft 0.6s ease-out;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 25px;
    font-weight: 500;
}

.hero-description {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text);
}

.hero-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeInRight 0.6s ease-out;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

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

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

/* 主容器 */
.main-wrapper {
    padding: 0;
}

/* 介绍区块 */
.intro-block {
    padding: 80px 0;
    background: var(--bg-white);
}

.block-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary);
}

.block-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-dark);
}

.block-content {
    font-size: 17px;
    line-height: 1.9;
    color: var(--text-dark);
}

.block-content p {
    margin-bottom: 25px;
}

.block-content p:last-child {
    margin-bottom: 0;
}

/* 瀑布流布局 */
.masonry-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-light);
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    grid-auto-rows: 10px;
}

.masonry-item {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border);
}

.masonry-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.masonry-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.masonry-item:nth-child(1) {
    grid-row: span 35;
}

.masonry-item:nth-child(2) {
    grid-row: span 30;
}

.masonry-item:nth-child(3) {
    grid-row: span 32;
}

.masonry-item:nth-child(4) {
    grid-row: span 28;
}

.masonry-item:nth-child(5) {
    grid-row: span 33;
}

.masonry-item:nth-child(6) {
    grid-row: span 30;
}

.masonry-item:nth-child(7) {
    grid-row: span 29;
}

.masonry-item:nth-child(8) {
    grid-row: span 31;
}

.item-image {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

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

.item-content {
    padding: 25px;
}

.item-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.item-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 15px;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.meta-tag {
    font-size: 13px;
    color: var(--primary);
    background: var(--bg-light);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.meta-time {
    font-size: 13px;
    color: var(--text-light);
}

/* 功能区块 */
.features-block {
    padding: 80px 0;
    background: var(--bg-white);
}

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

.feature-card {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.feature-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-heading {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.feature-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-light);
}

/* 页面标题 */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 80px 0;
    text-align: center;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 15px;
}

.page-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
}

/* 内容区块 */
.content-block {
    padding: 60px 0;
    background: var(--bg-white);
}

.content-text {
    max-width: 900px;
    margin: 0 auto;
}

.content-text h1 {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.content-image {
    margin: 30px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.content-image img {
    width: 100%;
    height: auto;
    display: block;
}

.content-text p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.content-text p:last-child {
    margin-bottom: 0;
}

/* 关于布局 */
.about-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: start;
}

.about-text h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.about-text p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.about-image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* 页脚 */
.main-footer {
    background: var(--text-dark);
    color: var(--bg-white);
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--accent);
}

.footer-text {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

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

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .about-layout {
        grid-template-columns: 1fr;
    }

    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-list {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        padding: 30px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s;
        z-index: 99;
    }

    .nav-list.active {
        left: 0;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-item {
        display: block;
        padding: 15px 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-title {
        font-size: 36px;
    }

    .section-title {
        font-size: 32px;
    }

    .masonry-grid {
        grid-template-columns: 1fr;
    }

    .masonry-item {
        grid-row: span auto !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .page-title {
        font-size: 32px;
    }

    .block-title,
    .section-title {
        font-size: 28px;
    }

    .content-text h1 {
        font-size: 32px;
    }
}
