/* 编辑器内容样式 - 用于CKEditor和网站详情页 */

/* 基础样式重置 */
.editor-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    font-size: 16px;
}

/* 标题样式 */
.editor-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 1rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #3498db;
    line-height: 1.3;
}

.editor-content h2 {
    font-size: 1.8rem;
    font-weight: 650;
    color: #34495e;
    margin: 1.0rem 0 1.2rem 0;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #e74c3c;
    line-height: 1.3;
}

.editor-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 1rem 0 1rem 0;
    padding-left: 0.5rem;
    border-left: 3px solid #2ecc71;
    line-height: 1.2;
}

.editor-content h4 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #34495e;
    margin: 1.2rem 0 0.8rem 0;
    line-height: 1.2;
}

.editor-content h5 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #7f8c8d;
    margin: 1rem 0 0.6rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editor-content h6 {
    font-size: 1rem;
    font-weight: 500;
    color: #95a5a6;
    margin: 0.8rem 0 0.5rem 0;
    font-style: italic;
}

/* 段落样式 */
.editor-content p {
    margin: 0.5rem 0;
    text-align: justify;
    word-break: break-word;
}

.editor-content p:first-child {
    margin-top: 0;
}

.editor-content p:last-child {
    margin-bottom: 0;
}

/* 链接样式 */
.editor-content a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    padding: 0 2px;
}

.editor-content a:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
    background-color: rgba(52, 152, 219, 0.1);
}

.editor-content a:visited {
    color: #8e44ad;
}

/* 图片样式 */
.editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 1.5rem auto;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.editor-content img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 列表样式 */
.editor-content ul,
.editor-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.editor-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.editor-content ul li {
    list-style-type: disc;
}

.editor-content ol li {
    list-style-type: decimal;
}

/* 引用样式 */
.editor-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 5px solid #3498db;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
    position: relative;
}

.editor-content blockquote::before {
    content: "";
    font-size: 3rem;
    color: #3498db;
    position: absolute;
    top: -0.5rem;
    left: 0.5rem;
    opacity: 0.3;
}

/* 代码样式 */
.editor-content code {
    background: #f1f2f6;
    color: #e74c3c;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    border: 1px solid #ddd;
}

.editor-content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.editor-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
    font-size: 0.9rem;
}

/* 表格样式 */
.editor-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.editor-content th,
.editor-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.editor-content th {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.editor-content tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* 分割线样式 */
.editor-content hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, transparent, #3498db, transparent);
    margin: 2rem 0;
    border-radius: 2px;
}

/* 强调样式 */
.editor-content strong,
.editor-content b {
    font-weight: 700;
    color: #2c3e50;
}

.editor-content em,
.editor-content i {
    font-style: italic;
    color: #7f8c8d;
}

.editor-content u {
    text-decoration: underline;
    text-decoration-color: #3498db;
    text-decoration-thickness: 2px;
}

/* 删除线样式 */
.editor-content s,
.editor-content del {
    text-decoration: line-through;
    color: #95a5a6;
    opacity: 0.7;
}

/* 标记样式 */
.editor-content mark {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .editor-content {
        font-size: 14px;
    }
    
    .editor-content h1 {
        font-size: 1.8rem;
    }
    
    .editor-content h2 {
        font-size: 1.5rem;
    }
    
    .editor-content h3 {
        font-size: 1.3rem;
    }
    
    .editor-content img {
        margin: 1rem auto;
    }
    
    .editor-content table {
        font-size: 0.9rem;
    }
    
    .editor-content th,
    .editor-content td {
        padding: 0.8rem 0.5rem;
    }
}

/* 打印样式 */
@media print {
    .editor-content {
        color: black;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .editor-content h1,
    .editor-content h2,
    .editor-content h3 {
        page-break-after: avoid;
    }
    
    .editor-content img {
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    .editor-content a {
        color: black;
        text-decoration: underline;
    }
}