/* 基础样式设置 */
:root {
    --primary-color: #8e44ad;
    --secondary-color: #9b59b6;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --text-white: #fff;
    --bg-color: #fff;
    --bg-alt: #f5f5f5;
    --border-color: #eee;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

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

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.section {
    padding: 80px 0;
}

.bg-alt {
    background-color: var(--bg-alt);
}

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

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
}

.section-header h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* 头部样式 */
#header {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.logo h1 {
    font-size: 2.2rem;
    margin: 0;
    font-weight: 700;
}

.logo .slogan {
    font-size: 0.9rem;
    opacity: 0.8;
}

#main-nav ul {
    display: flex;
    gap: 20px;
}

#main-nav ul li a {
    color: var(--text-white);
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: var(--transition);
}

#main-nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 英雄区域样式 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    padding: 120px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 卡片样式 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-content {
    padding: 20px;
}

.card-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.card-content p {
    color: var(--text-light);
}

/* 文章列表样式 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.article-item {
    background-color: var(--bg-color);
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.article-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.article-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 社区部分样式 */
.community-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.community-item {
    background-color: var(--bg-color);
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.community-item:hover {
    transform: translateY(-5px);
}

.community-item .icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
}

.community-item .icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* 关于我们部分样式 */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}

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

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

/* 页脚样式 */
#footer {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-logo p {
    opacity: 0.8;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.footer-links-column h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    position: relative;
}

.footer-links-column h4:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

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

.footer-links-column ul li a {
    color: var(--text-white);
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links-column ul li a:hover {
    opacity: 1;
    padding-left: 5px;
}

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

.footer-bottom p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-bottom a {
    color: var(--text-white);
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #header .container {
        flex-direction: column;
        gap: 20px;
    }
    
    #main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .card-container {
        grid-template-columns: 1fr;
    }
    
    .community-content {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 50px 0;
    }
}