/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --text-color: #333;
    --text-light: #7f8c8d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 导航栏 */
.navbar {
    background: white;
    padding: 1rem 0;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h1 {
    color: #333;
    font-size: 1.6rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #333;
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-link:hover {
    background-color: #f0f0f0;
    color: #6f51db;
}

.nav-link.active {
    background-color: #6f51db;
    color: white;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: 0.3s;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #6b7280 0%, #5a6c7d 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 主容器 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.articles-section {
    margin-bottom: 3rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.5rem;
    color: #333;
    border-bottom: 3px solid #6b7280;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* 文章网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* 文章卡片 */
.article-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.article-card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #6b7280 0%, #5a6c7d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.article-card-content {
    padding: 1.5rem;
}

.article-card-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.article-card-excerpt {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.article-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #999;
}

.article-card-tag {
    background: #6b7280;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* 新文章卡片样式（匹配目标样式） */
.article-image {
    width: 100%;
    height: 180px;
    -o-object-fit: cover;
       object-fit: cover;
    display: block;
}

.article-content {
    padding: 20px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.article-detail-meta {
    justify-content: flex-start;
}

.article-detail-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 2rem;
}

.article-tag {
    background-color: var(--light-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.article-title {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #333;
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* 文章详情页 */
.article-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.article-detail {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
}

.article-header h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #333;
}

.article-content {
    line-height: 1.8;
    color: #555;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.article-content h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: #444;
}

.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 个人中心页 */
.profile-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.profile-container {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.profile-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #eee;
}

.profile-avatar {
    margin-bottom: 1rem;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6b7280 0%, #5a6c7d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 3rem;
    color: white;
    font-weight: bold;
}

.profile-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.profile-header p {
    color: #666;
    font-size: 1.1rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 10px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 1.5rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #666;
}

.profile-about,
.profile-contact {
    margin-bottom: 2rem;
}

.profile-about h3,
.profile-contact h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
    border-left: 4px solid #6b7280;
    padding-left: 1rem;
}

.about-content p {
    line-height: 1.8;
    color: #555;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-label {
    font-weight: bold;
    color: #333;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}
.beian {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--light-color);
}

.beian a {
    margin: 0 10px;
    color: var(--light-color);
}

.beian a:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.1);
        padding: 2rem 0;
        gap: 1rem;
    }

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

    .nav-menu .nav-link {
        color: #333;
        display: block;
        padding: 1rem;
    }

    .nav-menu .nav-link:hover {
        background-color: #f0f0f0;
        color: #6f51db;
    }

    .nav-menu .nav-link.active {
        background-color: #6f51db;
        color: white;
    }

    .nav-toggle {
        display: flex;
    }

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

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    .hero-content h2 {
        font-size: 1.3rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

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

    .article-detail {
        padding: 2rem 1.5rem;
    }

    .article-header h1 {
        font-size: 1.3rem;
    }

    .profile-container {
        padding: 2rem 1.5rem;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .nav-container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }

    .hero-content h2 {
        font-size: 1.1rem;
    }

    .main-container,
    .article-main,
    .profile-main {
        padding: 2rem 1rem;
    }

    .article-detail,
    .profile-container {
        padding: 1.5rem 1rem;
    }

    .article-header h1 {
        font-size: 1.1rem;
    }
}

