/* ============================================
   天龙SF发布网 - 主样式表
   ============================================ */

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

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 头部样式 ========== */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

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

.logo h1 {
    font-size: 24px;
    margin-bottom: 5px;
    font-weight: 600;
}

.logo span {
    font-size: 14px;
    opacity: 0.9;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 20px;
}

/* 导航菜单 */
nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
}

nav a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* ========== 主要内容 ========== */
main {
    padding: 40px 0;
}

/* 英雄区域 */
.hero {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.hero h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.hero p {
    font-size: 18px;
    color: #666;
    max-width: 800px;
    margin: 0 auto 20px;
}

.keyword-highlight {
    color: #2a5298;
    font-weight: 700;
}

/* 关键词标签 */
.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.keyword-tag {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    color: #2a5298;
    padding: 5px 15px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid #ddd;
}

.keyword-tag:hover {
    background: #2a5298;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42,82,152,0.3);
}

/* 章节标题 */
.section-title {
    font-size: 24px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 3px solid #2a5298;
    color: #333;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: #ff6b6b;
}

/* AI内容区域 */
.ai-content {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    white-space: pre-line;
    font-size: 16px;
    line-height: 1.8;
}

.ai-content h2 {
    color: #2a5298;
    margin: 25px 0 15px;
    font-size: 22px;
}

.ai-content h3 {
    color: #444;
    margin: 20px 0 10px;
    font-size: 18px;
}

.ai-content p {
    margin: 15px 0;
}

.ai-content ul, .ai-content ol {
    margin: 15px 0 15px 30px;
}

.ai-content li {
    margin: 5px 0;
}

/* 评分样式 */
.rating {
    display: inline-block;
    background: #ffd700;
    color: #333;
    padding: 5px 20px;
    border-radius: 25px;
    font-weight: bold;
    margin: 10px 0;
    box-shadow: 0 2px 10px rgba(255,215,0,0.3);
}

/* ========== 相关推荐 ========== */
.related-sites {
    background: #fff;
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #eee;
}

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

.related-card {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(42,82,152,0.15);
    border-color: #2a5298;
}

.related-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-card h3 {
    color: #2a5298;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.related-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.related-header {
    text-align: center;
    margin-bottom: 30px;
}

.related-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.related-subtitle {
    color: #666;
    font-size: 16px;
}

/* ========== 文章内容样式 ========== */
.article-content {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    margin: 20px 0;
    font-size: 16px;
    line-height: 1.8;
}

.article-content h2 {
    color: #2a5298;
    font-size: 24px;
    margin: 30px 0 15px;
    border-left: 4px solid #ff6b6b;
    padding-left: 15px;
}

.article-content h3 {
    color: #444;
    font-size: 20px;
    margin: 25px 0 10px;
}

.article-content h4 {
    color: #666;
    font-size: 18px;
    margin: 20px 0 10px;
}

.article-content p {
    margin: 15px 0;
}

.article-content ul, 
.article-content ol {
    margin: 15px 0 15px 30px;
}

.article-content li {
    margin: 8px 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article-content th {
    background: #2a5298;
    color: #fff;
    padding: 12px;
    font-weight: 500;
}

.article-content td {
    padding: 10px;
    border: 1px solid #ddd;
}

.article-content tr:nth-child(even) {
    background: #f9f9f9;
}

.article-content blockquote {
    background: #f8f9fa;
    border-left: 4px solid #2a5298;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

.article-content code {
    background: #f4f4f4;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 14px;
}

.article-content pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: monospace;
    font-size: 14px;
    margin: 15px 0;
}

/* 元信息样式 */
.meta-info {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 14px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.meta-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-info i {
    color: #2a5298;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.tag-cloud .tag {
    background: #f0f0f0;
    color: #666;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s;
}

.tag-cloud .tag:hover {
    background: #2a5298;
    color: #fff;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a, .pagination span {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #2a5298;
    color: #fff;
    border-color: #2a5298;
}

.pagination .current {
    background: #2a5298;
    color: #fff;
    border-color: #2a5298;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 15px 0;
    color: #999;
    font-size: 14px;
}

.breadcrumb a {
    color: #2a5298;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 5px;
    color: #ccc;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2a5298;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(42,82,152,0.3);
    z-index: 1000;
}

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

.back-to-top:hover {
    background: #1e3c72;
    transform: translateY(-5px);
}

/* 加载动画 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ========== 页脚 ========== */
footer {
    background: #1a1a1a;
    color: #fff;
    padding: 50px 0 30px;
    margin-top: 60px;
}

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

.footer-content p {
    margin-bottom: 15px;
    opacity: 0.9;
    font-size: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s;
    font-size: 14px;
}

.footer-links a:hover {
    opacity: 1;
    color: #ff6b6b;
}

.copyright {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    opacity: 0.6;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-links a {
    color: #fff;
    font-size: 20px;
    opacity: 0.8;
    transition: all 0.3s;
}

.social-links a:hover {
    opacity: 1;
    transform: translateY(-3px);
    color: #ff6b6b;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        justify-content: center;
        gap: 10px;
    }
    
    nav a {
        font-size: 14px;
        padding: 5px 8px;
    }
    
    .hero {
        padding: 30px 20px;
    }
    
    .hero h2 {
        font-size: 22px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .meta-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .keyword-tags {
        gap: 5px;
    }
    
    .keyword-tag {
        padding: 3px 10px;
        font-size: 12px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .footer-links {
        gap: 15px;
    }
    
    .footer-links a {
        font-size: 12px;
    }
}

/* ========== 打印样式 ========== */
@media print {
    header, footer, .related-sites, .back-to-top {
        display: none;
    }
    
    body {
        background: #fff;
    }
    
    .article-content {
        box-shadow: none;
        padding: 0;
    }
}

/* ========== 工具类 ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }

.p-20 { padding: 20px; }
.p-40 { padding: 40px; }

.hidden { display: none; }
.visible { display: block; }

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

.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

/* ========== 颜色变量 ========== */
:root {
    --primary-color: #2a5298;
    --secondary-color: #ff6b6b;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --white: #fff;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}