/**
 * 文章内容显示样式
 * 适用于TinyMCE编辑器生成的内容
 */

/* 文章内容容器 */
.content {
    font-family: "微软雅黑", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

/* 段落样式 */
.content p {
    margin: 0 0 16px 0;
    text-align: justify;
    text-justify: inter-ideograph;
}

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

/* 标题样式 */
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
    font-weight: bold;
    margin: 24px 0 16px 0;
    color: #2c3e50;
    line-height: 1.4;
}

.content h1 {
    font-size: 28px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.content h2 {
    font-size: 24px;
    border-bottom: 1px solid #bdc3c7;
    padding-bottom: 6px;
}

.content h3 {
    font-size: 20px;
    color: #34495e;
}

.content h4 {
    font-size: 18px;
    color: #34495e;
}

.content h5 {
    font-size: 16px;
    color: #34495e;
}

.content h6 {
    font-size: 14px;
    color: #7f8c8d;
}

/* 图片样式 */
.content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.content img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 链接样式 */
.content a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.content a:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
}

/* 列表样式 */
.content ul,
.content ol {
    margin: 16px 0;
    padding-left: 30px;
}

.content li {
    margin: 8px 0;
    line-height: 1.6;
}

.content ul li {
    list-style-type: disc;
}

.content ol li {
    list-style-type: decimal;
}

.content ul ul,
.content ol ol,
.content ul ol,
.content ol ul {
    margin: 8px 0;
}

/* 引用样式 */
.content blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #555;
    position: relative;
}

.content blockquote::before {
    content: '"';
    font-size: 48px;
    color: #3498db;
    position: absolute;
    left: 10px;
    top: -5px;
    font-family: Georgia, serif;
}

.content blockquote p {
    margin: 0;
    padding-left: 30px;
}

/* 代码样式 */
.content code {
    background: #f1f2f6;
    color: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "Courier New", "Monaco", "Menlo", monospace;
    font-size: 14px;
    border: 1px solid #ddd;
}

.content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #34495e;
    position: relative;
}

.content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* 表格样式 */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content table th,
.content table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.content table th {
    background: #3498db;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.content table tr:hover {
    background: #f8f9fa;
}

.content table tr:last-child td {
    border-bottom: none;
}

/* 水平分割线 */
.content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #bdc3c7, transparent);
    margin: 30px 0;
}

/* 强调文本 */
.content strong,
.content b {
    font-weight: bold;
    color: #2c3e50;
}

.content em,
.content i {
    font-style: italic;
    color: #34495e;
}

.content u {
    text-decoration: underline;
    text-decoration-color: #3498db;
}

.content s,
.content del {
    text-decoration: line-through;
    color: #7f8c8d;
}

/* 上标和下标 */
.content sup,
.content sub {
    font-size: 12px;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.content sup {
    top: -0.5em;
}

.content sub {
    bottom: -0.25em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .content h1 {
        font-size: 24px;
    }
    
    .content h2 {
        font-size: 20px;
    }
    
    .content h3 {
        font-size: 18px;
    }
    
    .content h4 {
        font-size: 16px;
    }
    
    .content ul,
    .content ol {
        padding-left: 20px;
    }
    
    .content blockquote {
        padding: 12px 16px;
        margin: 16px 0;
    }
    
    .content pre {
        padding: 16px;
        font-size: 13px;
    }
    
    .content table {
        font-size: 14px;
    }
    
    .content table th,
    .content table td {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .content {
        font-size: 14px;
    }
    
    .content h1 {
        font-size: 20px;
    }
    
    .content h2 {
        font-size: 18px;
    }
    
    .content h3 {
        font-size: 16px;
    }
    
    .content table {
        font-size: 12px;
    }
    
    .content table th,
    .content table td {
        padding: 6px 8px;
    }
    
    .content blockquote::before {
        font-size: 36px;
    }
    
    .content blockquote p {
        padding-left: 20px;
    }
}

/* 打印样式 */
@media print {
    .content {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    .content a {
        color: #000;
        text-decoration: underline;
    }
    
    .content img {
        max-width: 100%;
        box-shadow: none;
    }
    
    .content blockquote {
        border: 1px solid #ccc;
        background: #f9f9f9;
    }
    
    .content pre {
        background: #f5f5f5;
        color: #000;
        border: 1px solid #ccc;
    }
}
