/* ── 上传区域 ── */
.upload-zone {
    border: 2px dashed #d0d5dd;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafbfc;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #2563eb;
    background: #f0f4ff;
}

.upload-icon {
    font-size: 2.5rem;
    color: #b0b8c4;
    margin-bottom: 0.8rem;
    line-height: 1;
}

.upload-zone:hover .upload-icon,
.upload-zone.drag-over .upload-icon {
    color: #2563eb;
}

.upload-text {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.upload-hint {
    font-size: 0.82rem;
    color: #999;
}

/* ── 源图信息 ── */
.source-info {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    background: #f8f9fb;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.source-preview {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.source-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.source-detail {
    flex: 1;
    min-width: 0;
}

.source-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.4rem;
    word-break: break-all;
}

.source-meta {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.source-meta span {
    background: #f0f0f0;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
}

/* ── 格式选择 ── */
.format-select {
    margin-bottom: 1.5rem;
}

.format-options {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.format-option {
    cursor: pointer;
    display: block;
}

.format-option input {
    display: none;
}

.format-tag {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    transition: all 0.2s;
    background: #fafafa;
}

.format-option input:checked + .format-tag {
    border-color: #2563eb;
    color: #2563eb;
    background: #f0f4ff;
}

.format-tag:hover {
    border-color: #2563eb;
}

/* ── 转换结果 ── */
.convert-result {
    margin-top: 1.5rem;
    background: #f8f9fb;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    overflow: hidden;
}

.result-header {
    padding: 0.8rem 1.2rem;
    background: #ecfdf5;
    color: #059669;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.result-compare {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.2rem;
}

.result-col {
    text-align: center;
}

.result-label {
    font-size: 0.82rem;
    color: #999;
    margin-bottom: 0.3rem;
}

.result-val {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    font-family: 'Fira Code', monospace;
}

.result-arrow {
    font-size: 1.2rem;
    color: #ccc;
}

.result-preview-wrap {
    padding: 0 1.2rem 1.2rem;
    text-align: center;
}

.result-preview-wrap img {
    max-width: 100%;
    max-height: 360px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

/* ── 格式对比表格 ── */
.format-table-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.format-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.format-table th {
    background: #f5f7fa;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
}

.format-table td {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

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

/* ── Mobile ── */
@media (max-width: 640px) {
    .upload-zone {
        padding: 2rem 1rem;
    }

    .source-info {
        flex-direction: column;
        text-align: center;
    }

    .source-meta {
        justify-content: center;
    }

    .format-options {
        justify-content: center;
    }

    .result-compare {
        gap: 1rem;
    }

    .format-table {
        font-size: 0.82rem;
    }

    .format-table th,
    .format-table td {
        padding: 0.6rem 0.5rem;
    }
}