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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #e0e0e0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: #888;
    font-size: 1.1rem;
}

.upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.upload-box {
    background: rgba(255,255,255,0.05);
    border: 2px dashed #444;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-box:hover {
    border-color: #00d4ff;
    background: rgba(0,212,255,0.05);
}

.upload-box.has-file {
    border-style: solid;
    border-color: #00d4ff;
}

.upload-box h3 {
    margin-bottom: 8px;
    color: #fff;
}

.upload-box p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.upload-box input[type="file"] {
    display: none;
}

.upload-box .upload-label {
    display: inline-block;
    padding: 8px 20px;
    background: #00d4ff;
    color: #000;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.preview {
    margin-top: 15px;
    max-height: 200px;
    overflow: hidden;
    border-radius: 8px;
}

.preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

.options {
    text-align: center;
    margin-bottom: 25px;
}

.options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #ccc;
}

.options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #00d4ff;
}

.swap-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 30px;
    padding: 14px 30px;
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.swap-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.swap-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.progress {
    text-align: center;
    margin-bottom: 30px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#progress-text {
    color: #888;
}

.result-section {
    text-align: center;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
}

.result-section h2 {
    margin-bottom: 20px;
    color: #fff;
}

.result-section img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.download-btn, .new-swap-btn {
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.download-btn {
    background: #00d4ff;
    color: #000;
    border: none;
}

.new-swap-btn {
    background: transparent;
    color: #fff;
    border: 2px solid #444;
}

.new-swap-btn:hover {
    border-color: #00d4ff;
}

.error {
    background: rgba(255,0,0,0.1);
    border: 1px solid rgba(255,0,0,0.3);
    color: #ff6b6b;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

@media (max-width: 600px) {
    .upload-section {
        grid-template-columns: 1fr;
    }
    header h1 {
        font-size: 1.8rem;
    }
}
