* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    width: 100%;
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

main {
    padding: 40px;
}

/* 上传区域 */
.upload-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
    width: 100%;
    max-width: 500px;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-5px);
}

.upload-area.dragover {
    border-color: #764ba2;
    background: #e8ebff;
    transform: scale(1.02);
}

.upload-icon {
    width: 80px;
    height: 80px;
    color: #667eea;
    margin-bottom: 20px;
    stroke-width: 2;
}

.upload-text {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.upload-hint {
    color: #666;
    font-size: 1rem;
}

/* 预览区域 */
.preview-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
}

.preview-box {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
}

.preview-box h3 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.3rem;
}

.image-wrapper {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    max-height: 500px;
    overflow: hidden;
}

.image-wrapper img,
.image-wrapper canvas {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: 5px;
}

.arrow {
    font-size: 3rem;
    color: #667eea;
    font-weight: bold;
}

.specs {
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: left;
}

.specs p {
    margin: 8px 0;
    color: #555;
    font-size: 0.95rem;
}

.specs span {
    font-weight: 600;
    color: #667eea;
}

/* 按钮 */
.actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #f8f9ff;
    transform: translateY(-3px);
}

/* 页脚信息 */
footer {
    background: #f8f9ff;
    padding: 30px 40px;
    border-top: 1px solid #e0e0e0;
}

.info h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.info ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.info li {
    color: #555;
    padding: 8px 0;
    font-size: 0.95rem;
}

.info li::before {
    content: "✓ ";
    color: #667eea;
    font-weight: bold;
    margin-right: 8px;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .preview-container {
        grid-template-columns: 1fr;
    }
    
    .arrow {
        transform: rotate(90deg);
        margin: 20px 0;
    }
}

@media (max-width: 640px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    main {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-icon {
        width: 60px;
        height: 60px;
    }
    
    .upload-text {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .info ul {
        grid-template-columns: 1fr;
    }
}
