* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background: #fff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 720px;
    text-align: center;
}

header h1 {
    font-size: 22px;
    color: #111;
    margin-bottom: 6px;
}

header p {
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
}

.upload-section {
    border: 2px dashed #007bff;
    border-radius: 8px;
    padding: 40px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    background: #fafbfc;
}

.upload-section:hover {
    background: #f0f7ff;
}

.upload-content span {
    color: #007bff;
    font-weight: bold;
}

.workspace {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
}

.image-box {
    flex: 1;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 12px;
}

.image-box h3 {
    font-size: 13px;
    color: #444;
    margin-bottom: 8px;
}

.image-box img {
    max-width: 100%;
    height: 220px;
    object-fit: contain;
    background-image: linear-gradient(45deg, #e5e5e5 25%, transparent 25%), linear-gradient(-45deg, #e5e5e5 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e5e5e5 75%), linear-gradient(-45deg, transparent 75%, #e5e5e5 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    border-radius: 4px;
}

.actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.btn.primary {
    background-color: #28a745;
    color: white;
}

.btn.primary:hover {
    background-color: #218838;
}

.btn.secondary {
    background-color: #6c757d;
    color: white;
}

.btn.secondary:hover {
    background-color: #5a6268;
}

.loader {
    margin-top: 30px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: #007bff;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px auto;
}

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

.hidden {
    display: none !important;
}