/* 自定义编辑器样式 */
#editor {
    min-height: 400px;
}

.ql-toolbar {
    border-radius: 8px 8px 0 0;
    background: white;
}

.ql-container {
    border-radius: 0 0 8px 8px;
    font-size: 16px;
    line-height: 1.6;
}

.ql-editor {
    min-height: 500px;
    padding: 20px;
}

/* 模板卡片样式 */
.template-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.template-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.template-card.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.template-preview {
    height: 120px;
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

/* SVG组件样式 */
.svg-component {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.svg-component:hover {
    border-color: #8b5cf6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.svg-preview {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

/* 预览区域样式 */
#preview {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

#preview h1, #preview h2, #preview h3 {
    font-weight: bold;
    margin: 16px 0 8px 0;
}

#preview h1 { font-size: 24px; }
#preview h2 { font-size: 20px; }
#preview h3 { font-size: 16px; }

#preview p {
    margin: 8px 0;
}

#preview img {
    max-width: 100%;
    height: auto;
    margin: 8px 0;
}

/* AI检测结果样式 */
.ai-check-result {
    border-left: 4px solid #10b981;
    padding: 8px;
    margin: 4px 0;
    background: #f0fdf4;
}

.ai-check-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.ai-check-error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

/* 相关文章样式 */
.related-article {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px;
    margin: 4px 0;
    cursor: pointer;
    transition: all 0.2s;
}

.related-article:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.related-article-title {
    font-weight: 500;
    color: #111827;
    font-size: 14px;
    margin-bottom: 4px;
}

.related-article-meta {
    color: #6b7280;
    font-size: 12px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .w-64 {
        width: 200px;
    }
    
    .w-80 {
        width: 240px;
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .flex {
        flex-direction: column;
    }
    
    .w-64, .w-80 {
        width: 100%;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

/* 自定义滚动条 */
.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}