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

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

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

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

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

main {
    padding: 30px;
}

/* Upload Section */
.upload-section {
    margin-bottom: 40px;
}

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

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

.upload-area.dragover {
    border-color: #764ba2;
    background: #e8ebff;
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.upload-area h2 {
    color: #333;
    margin-bottom: 10px;
}

.upload-area p {
    color: #666;
    margin-bottom: 20px;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

/* Preview Area */
.preview-area {
    margin-top: 30px;
    text-align: center;
}

.preview-area h3 {
    margin-bottom: 20px;
    color: #333;
}

.preview-area img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

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

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(17, 153, 142, 0.4);
}

/* Processing Section */
.processing-section {
    text-align: center;
    padding: 60px 30px;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-section h3 {
    color: #333;
    margin-bottom: 10px;
}

.processing-section p {
    color: #666;
}

/* Result Section */
.result-section {
    text-align: center;
}

.result-section h3 {
    color: #11998e;
    margin-bottom: 30px;
    font-size: 2em;
}

.result-preview {
    margin-bottom: 30px;
}

.result-image-container h4 {
    margin-bottom: 15px;
    color: #333;
}

.result-image-container img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.download-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Instructions Section */
.instructions-section {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
}

.instructions-section h3 {
    color: #333;
    margin-bottom: 20px;
}

.instructions-section ol {
    margin-left: 25px;
    color: #555;
    line-height: 1.8;
}

.instructions-section ol li {
    margin-bottom: 10px;
}

.example-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e0e0e0;
}

.example-section h4 {
    color: #667eea;
    margin-bottom: 15px;
}

.example-placeholder {
    background: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 30px;
    margin-top: 15px;
}

.example-placeholder p {
    margin: 10px 0;
    font-size: 1.1em;
    color: #555;
}

/* Footer */
footer {
    background: #f8f9ff;
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

.back-home {
    display: inline-block;
    margin-top: 10px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.back-home:hover {
    text-decoration: underline;
}

/* Hidden class */
.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 0.95em;
    }
    
    main {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .action-buttons,
    .download-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
