/* SVG预览页面样式 */
.svg-preview-page {
    max-width: 1400px;
    margin: 40px auto 60px;
    padding: 0 20px;
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.header-icon {
    width: 56px;
    height: 56px;
    color: #2c3e50;
    margin-bottom: 16px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.page-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* 工作区 */
.work-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

/* 编辑器容器 */
.editor-container,
.preview-container {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.editor-header,
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f8f8;
    border-bottom: 1px solid #e8e8e8;
}

.editor-header h3,
.preview-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-header h3 svg,
.preview-header h3 svg {
    width: 20px;
    height: 20px;
}

.editor-actions,
.preview-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-action:hover {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

.btn-action i {
    font-size: 12px;
}

/* 上传区域 */
.upload-zone {
    margin: 16px 20px;
    padding: 24px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #2c3e50;
    background: #f0f0f0;
}

.upload-content i {
    font-size: 32px;
    color: #999;
    margin-bottom: 12px;
}

.upload-content p {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px 0;
}

.link-btn {
    background: none;
    border: none;
    color: #2c3e50;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
}

.link-btn:hover {
    color: #1a252f;
}

.upload-hint {
    font-size: 12px;
    color: #999;
}

/* 编辑器 */
.svg-editor {
    flex: 1;
    width: 100%;
    padding: 20px;
    border: none;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    outline: none;
    background: #fafafa;
    color: #2c3e50;
    min-height: 400px;
}

.svg-editor::placeholder {
    color: #999;
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    background: #f8f8f8;
    border-top: 1px solid #e8e8e8;
    font-size: 13px;
    color: #666;
}

.char-count {
    font-family: 'Courier New', monospace;
}

.status-text {
    font-weight: 500;
}

/* 预览区域 */
.preview-area {
    flex: 1;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    overflow: auto;
}

.preview-area.bg-white {
    background: #fff;
}

.preview-area.bg-transparent {
    background:
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.preview-area.bg-dark {
    background: #2c3e50;
}

.preview-area.bg-grid {
    background-image:
        linear-gradient(#e8e8e8 1px, transparent 1px),
        linear-gradient(90deg, #e8e8e8 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: #fff;
}

.preview-placeholder {
    text-align: center;
    color: #999;
}

.preview-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.preview-placeholder p {
    font-size: 14px;
    margin: 0;
}

.preview-error {
    text-align: center;
    color: #f44336;
}

.preview-error i {
    font-size: 48px;
    margin-bottom: 16px;
}

.preview-error p {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.preview-error span {
    font-size: 13px;
    color: #666;
}

.preview-info {
    display: flex;
    gap: 24px;
    padding: 12px 20px;
    background: #f8f8f8;
    border-top: 1px solid #e8e8e8;
    font-size: 13px;
}

.info-item {
    display: flex;
    gap: 8px;
}

.info-item label {
    color: #666;
    font-weight: 500;
}

.info-item span {
    color: #2c3e50;
    font-family: 'Courier New', monospace;
}

/* 信息部分 */
.info-section {
    margin-bottom: 40px;
}

.info-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
}

.info-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 24px 0 12px 0;
}

.info-content {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 32px;
}

.info-content p {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
    margin: 0 0 16px 0;
}

.info-content ul {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.info-content li {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
}

.info-content li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: #2c3e50;
    font-weight: bold;
}

.info-content ol {
    padding-left: 24px;
    margin: 16px 0;
}

.info-content ol li {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 8px;
}

.info-content ol li::before {
    display: none;
}

/* 使用场景 */
.use-cases {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 16px 0;
}

.case-item {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.case-badge {
    width: 56px;
    height: 56px;
    background: #2c3e50;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
}

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

.case-item strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 4px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .work-area {
        grid-template-columns: 1fr;
    }

    .use-cases {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 24px;
    }

    .info-section h2 {
        font-size: 22px;
    }

    .editor-actions,
    .preview-actions {
        gap: 4px;
    }

    .btn-action {
        padding: 6px 8px;
        font-size: 12px;
    }

    .btn-action span {
        display: none;
    }

    .upload-zone {
        padding: 16px;
    }

    .info-content {
        padding: 20px;
    }
}
