* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 80px 1.5rem 2rem;
    margin: 0;
}
.navbar {
    height: 80px !important;
}
.container-main {
    max-width: 1200px;
    width: 100%;
    background: #ffffff;
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: 0 5px 15px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
	margin-top: 20px;
}



 h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: #333;
    text-align: center;
	margin-bottom:20px;
}

.header h1 i {
    color: #0D6EFD;
    margin-right: 10px;
}

.subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.tool-intro {
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.2rem;
    background: #f0f7ff;
    border-radius: 10px;
    border-left: 4px solid #0D6EFD;
}

.tool-intro p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.tool-intro strong {
    color: #0b1a33;
}

.main-layout {
    display: flex;
    gap: 2rem;
    align-items: stretch;
}

/* ===== 左侧控制面板 ===== */
.control-panel {
    flex: 0 0 320px;
    background: #f8f9fa;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e9edf4;
}

.panel-title {
    font-weight: 600;
    color: #0b1a33;
    font-size: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #0D6EFD;
    padding-bottom: 0.4rem;
    display: inline-block;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #dce2ec;
    border-radius: 1rem;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    background: #ffffff;
    margin-bottom: 1rem;
}

.upload-area:hover {
    border-color: #0D6EFD;
    background: #f0f4ff;
}

.upload-area i {
    font-size: 2.5rem;
    color: #0D6EFD;
    display: block;
    margin-bottom: 0.5rem;
}

.upload-area span {
    color: #6c757d;
    font-size: 0.9rem;
}

.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-area.has-image {
    border-color: #0D6EFD;
    background: #f0f4ff;
}

.upload-area .file-name {
    display: block;
    font-weight: 500;
    color: #0b1a33;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    word-break: break-all;
}

/* 信息组 */
.info-group {
    background: #ffffff;
    border-radius: 0.8rem;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
}

.info-item:not(:last-child) {
    border-bottom: 1px solid #f1f4f9;
}

.info-label {
    color: #64748b;
    font-size: 0.85rem;
}

.info-value {
    color: #0b1a33;
    font-weight: 500;
    font-size: 0.85rem;
}

.divider {
    border-top: 1px solid #e2e8f0;
    margin: 1rem 0;
}

/* 控制组 */
.control-group {
    margin-bottom: 0.8rem;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.control-row label {
    font-size: 0.85rem;
    color: #475569;
    min-width: 80px;
}

.control-input {
    flex: 1;
    padding: 0.5rem 0.8rem;
    border: 1px solid #dce2ec;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    outline: none;
    background: #ffffff;
    color: #0b1a33;
    width: 100%;
}

.control-input:focus {
    border-color: #0D6EFD;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.control-input:disabled {
    background: #f1f4f9;
    color: #94a3b8;
}

.control-select {
    flex: 1;
    padding: 0.5rem 0.8rem;
    border: 1px solid #dce2ec;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    outline: none;
    background: #ffffff;
    color: #0b1a33;
    cursor: pointer;
}

.control-select:focus {
    border-color: #0D6EFD;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0D6EFD;
    cursor: pointer;
}

/* 按钮 */
.btn-primary {
    width: 100%;
    padding: 0.7rem;
    background: #0D6EFD;
    color: white;
    border: none;
    border-radius: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
    background: #0b5ed7;
    transform: scale(1.01);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== 右侧预览面板 ===== */
.preview-panel {
    flex: 1;
    background: #f8f9fa;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e9edf4;
    display: flex;
    flex-direction: column;
}

.preview-container {
    flex: 1;
    background: #ffffff;
    border-radius: 1rem;
    border: 2px solid #e2e8f0;
    min-height: 350px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.preview-container canvas {
    max-width: 100%;
    max-height: 100%;
    display: none;
    object-fit: contain;
}

.preview-container .placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
}

.preview-container .placeholder i {
    font-size: 3.5rem;
    color: #cbd5e1;
}

.preview-container .placeholder span {
    font-size: 0.95rem;
}

.preview-container.has-image canvas {
    display: block;
}

.preview-container.has-image .placeholder {
    display: none;
}

/* 预览信息 */
.preview-info {
    background: #ffffff;
    border-radius: 0.8rem;
    padding: 0.8rem 1rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.info-grid .info-item {
    border-bottom: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.2rem 0;
}

.info-grid .info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #94a3b8;
}

.info-grid .info-value {
    font-size: 0.95rem;
    font-weight: 600;
}

/* 保存按钮 */
.btn-save {
    padding: 0.7rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-save:hover:not(:disabled) {
    background: #059669;
    transform: scale(1.01);
}

.btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* 按钮组 */
.btn-group {
    display: flex;
    gap: 0.6rem;
    width: 100%;
}

.btn-primary {
    flex: 2;
    padding: 0.7rem;
    background: #0D6EFD;
    color: white;
    border: none;
    border-radius: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
    background: #0b5ed7;
    transform: scale(1.01);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 恢复原始尺寸按钮 */
.btn-reset {
    flex: 1;
    padding: 0.7rem;
    background: #e9edf4;
    color: #475569;
    border: 1px solid #dce2ec;
    border-radius: 0.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-reset:hover:not(:disabled) {
    background: #dce2ec;
    border-color: #0D6EFD;
    color: #0D6EFD;
    transform: scale(1.01);
}

.btn-reset:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 响应式调整 */
@media (max-width: 500px) {
    .btn-group {
        flex-direction: column;
    }
    .btn-primary,
    .btn-reset {
        flex: 1;
        width: 100%;
    }
}








