/* Main Wrapper */
#cc-face-swap-wrapper {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1f2937;
    margin: 20px 0;
}

.cc-fs-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    /* Soft primary shadow */
    padding: 40px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Header */
.cc-fs-header {
    text-align: center;
    margin-bottom: 40px;
}

.cc-fs-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #111827 0%, #4b5563 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.cc-fs-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Upload Section - PREMIUM GRID */
.cc-fs-upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .cc-fs-upload-section {
        grid-template-columns: 1fr;
    }
}

.cc-fs-upload-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
    font-size: 0.95rem;
}

/* Upload Zone - Dashed Premium Look */
.cc-fs-upload-zone {
    border: 2px dashed #e5e7eb;
    border-radius: 16px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.cc-fs-upload-zone:hover,
.cc-fs-upload-zone.dragover {
    border-color: #6366f1;
    /* Indigo 500 */
    background: #eff6ff;
    /* Blue 50 */
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.1);
}

.cc-fs-upload-content {
    text-align: center;
    padding: 20px;
    pointer-events: none;
    /* Let the zone handle clicks */
}

.cc-fs-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: 0.3s;
}

.cc-fs-upload-zone:hover .cc-fs-icon {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.cc-fs-browse-btn {
    margin-top: 15px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #374151;
    pointer-events: auto;
    /* Active button */
    cursor: pointer;
    transition: 0.2s;
}

.cc-fs-browse-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Preview Image within Zone */
.cc-fs-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: #000;
}

.cc-fs-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* or contain based on preference */
}

.cc-fs-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    backdrop-filter: blur(4px);
}

.cc-fs-remove-btn:hover {
    background: rgba(220, 38, 38, 0.8);
    /* Red */
}

/* Primary Action Button */
#cc-fs-generate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    /* Indigo Grads */
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#cc-fs-generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
}

#cc-fs-generate-btn:disabled,
.cc-fs-btn-disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Result Section */
#cc-fs-result {
    margin-top: 40px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#cc-fs-result h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #111827;
}

.cc-fs-result-wrapper {
    background: #000;
    /* Dark bg for contrast */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    /* Remove gap */
}

#cc-fs-generated-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.cc-fs-download-link {
    display: inline-block;
    margin-top: 20px;
    margin-right: 10px;
    padding: 12px 24px;
    background: #10b981;
    /* Emerald */
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.2s;
}

.cc-fs-download-link:hover {
    background: #059669;
}

#cc-fs-reset-btn {
    padding: 12px 24px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
}

#cc-fs-reset-btn:hover {
    background: #e5e7eb;
}

/* Loader */
.cc-fs-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error */
#cc-fs-error {
    margin-top: 20px;
    padding: 15px;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 8px;
    border: 1px solid #fecaca;
    font-size: 0.95rem;
}