/* 文章样式CSS文件 - 完整版本 */
/* 使用与主站一致的淡绿色主题 */

:root {
    --bg-color: #f0f8f0;
    --bg-secondary: #e8f5e8;
    --text-primary: #2c3e2c;
    --text-secondary: #5a6c5a;
    --accent-color: #27ae60;
    --accent-hover: #219653;
}

/* ==================== 文章列表样式 ==================== */
.articles-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 35px;
    margin-top: 50px;
}

.article-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(248, 252, 248, 0.9) 100%);
    padding: 35px;
    border-radius: 16px;
    border: 1px solid rgba(39, 174, 96, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    cursor: pointer;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(39, 174, 96, 0.1), transparent);
    transition: left 0.6s ease;
}

.article-card:hover::before {
    left: 100%;
}

.article-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 
        0 20px 50px rgba(39, 174, 96, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.article-date {
    background: rgba(39, 174, 96, 0.1);
    color: var(--accent-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-category {
    background: rgba(155, 89, 182, 0.1);
    color: #8e44ad;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.article-card:hover .article-title {
    color: var(--accent-color);
}

.article-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.article-tag {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid rgba(44, 62, 44, 0.1);
    transition: all 0.3s ease;
}

.article-card:hover .article-tag {
    background: rgba(39, 174, 96, 0.1);
    border-color: var(--accent-color);
}

.read-more-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    padding: 12px 22px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    border: none;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.4);
}

/* ==================== 单个文章页面样式 ==================== */
.article-page {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 50%, var(--bg-color) 100%);
    min-height: 100vh;
    padding: 120px 0 80px;
    position: relative;
}

.article-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(39, 174, 96, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(39, 174, 96, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.article-header {
    text-align: center;
    margin-bottom: 70px;
    animation: fadeInDown 0.8s ease;
}

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

.article-page-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
    line-height: 1.3;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-page-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.article-page-date,
.article-page-category {
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.article-page-date {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.15), rgba(39, 174, 96, 0.05));
    color: var(--accent-color);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.article-page-category {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.15), rgba(155, 89, 182, 0.05));
    color: #8e44ad;
    border: 1px solid rgba(155, 89, 182, 0.2);
}

.article-page-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.article-page-tag {
    background: rgba(39, 174, 96, 0.08);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid rgba(39, 174, 96, 0.2);
    font-weight: 500;
    transition: all 0.3s ease;
}

.article-page-tag:hover {
    background: rgba(39, 174, 96, 0.15);
    border-color: var(--accent-color);
}

.article-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 252, 248, 0.95) 100%);
    border-radius: 20px;
    padding: 60px;
    border: 2px solid rgba(39, 174, 96, 0.1);
    backdrop-filter: blur(10px);
    line-height: 2;
    color: var(--text-primary);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    animation: fadeInUp 0.8s ease 0.2s both;
}

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

/* ==================== 文章内容样式 ==================== */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text-primary);
    margin-top: 50px;
    margin-bottom: 25px;
    font-weight: 700;
    line-height: 1.4;
}

.article-content h1 {
    font-size: 2.8rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 15px;
    margin-top: 60px;
}

.article-content h2 {
    font-size: 2.2rem;
    color: var(--accent-color);
    position: relative;
    padding-left: 20px;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 80%;
    background: linear-gradient(180deg, var(--accent-color), rgba(39, 174, 96, 0.5));
    border-radius: 2px;
}

.article-content h3 {
    font-size: 1.8rem;
    color: #8e44ad;
    margin-top: 40px;
}

.article-content h4 {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: justify;
    letter-spacing: 0.3px;
}

.article-content strong {
    color: var(--accent-color);
    font-weight: 700;
}

.article-content em {
    color: #8e44ad;
    font-style: italic;
}

/* 列表样式 */
.article-content ul,
.article-content ol {
    margin-bottom: 25px;
    padding-left: 40px;
}

.article-content li {
    margin-bottom: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.article-content ul li::marker {
    color: var(--accent-color);
    font-weight: bold;
}

.article-content ol li::marker {
    color: var(--accent-color);
    font-weight: bold;
}

/* 引用块样式 */
.article-content blockquote {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(39, 174, 96, 0.05) 100%);
    border-left: 5px solid var(--accent-color);
    margin: 35px 0;
    padding: 25px 30px;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-secondary);
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.article-content blockquote::before {
    content: '"';
    font-size: 3rem;
    color: rgba(39, 174, 96, 0.2);
    position: absolute;
    top: -10px;
    left: 10px;
}

/* 代码样式 */
.article-content code {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(39, 174, 96, 0.05));
    color: #d63384;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.article-content pre {
    background: linear-gradient(135deg, rgba(44, 62, 44, 0.95) 0%, rgba(44, 62, 44, 0.9) 100%);
    border-radius: 12px;
    padding: 25px;
    overflow-x: auto;
    margin: 30px 0;
    border: 1px solid rgba(39, 174, 96, 0.2);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.article-content pre code {
    background: none;
    padding: 0;
    color: #90EE90;
    border: none;
    font-family: 'Monaco', 'Courier New', monospace;
}

/* 图片样式 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    margin: 35px 0;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(39, 174, 96, 0.2);
    transition: all 0.4s ease;
}

.article-content img:hover {
    transform: scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(39, 174, 96, 0.3);
}

/* 表格样式 */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 35px 0;
    border: 1px solid rgba(39, 174, 96, 0.2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.article-content th {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.2) 0%, rgba(39, 174, 96, 0.1) 100%);
    color: var(--text-primary);
    padding: 18px 15px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid rgba(39, 174, 96, 0.3);
}

.article-content td {
    padding: 15px;
    border-bottom: 1px solid rgba(39, 174, 96, 0.1);
    color: var(--text-secondary);
}

.article-content tr:nth-child(even) {
    background: rgba(39, 174, 96, 0.08);
}

.article-content tr:hover {
    background: rgba(39, 174, 96, 0.15);
}

/* 返回按钮 */
.article-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(39, 174, 96, 0.05));
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 40px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    border: 1.5px solid rgba(39, 174, 96, 0.3);
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.article-back-btn:hover {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.2), rgba(39, 174, 96, 0.1));
    border-color: var(--accent-color);
    transform: translateX(-5px) translateY(-2px);
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.2);
    color: var(--accent-color);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .articles-section {
        padding: 80px 0;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .article-card {
        padding: 25px;
    }
    
    .article-page {
        padding: 100px 0 60px;
    }
    
    .article-container {
        padding: 0 15px;
    }
    
    .article-page-title {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
    
    .article-header {
        margin-bottom: 50px;
    }
    
    .article-content {
        padding: 35px 20px;
        border-radius: 15px;
    }
    
    .article-content h1 {
        font-size: 2rem;
        margin-top: 40px;
    }
    
    .article-content h2 {
        font-size: 1.6rem;
        margin-top: 35px;
    }
    
    .article-content h3 {
        font-size: 1.3rem;
        margin-top: 30px;
    }
    
    .article-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .article-page-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .article-page-tags {
        gap: 8px;
    }
    
    .read-more-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .articles-section {
        padding: 60px 0;
    }
    
    .article-page-title {
        font-size: 1.8rem;
    }
    
    .article-content {
        padding: 25px 15px;
    }
    
    .article-content h1 {
        font-size: 1.6rem;
    }
    
    .article-content h2 {
        font-size: 1.3rem;
        padding-left: 15px;
    }
    
    .article-meta {
        gap: 10px;
    }
}
