/* Watermark Remover Pro - Frontend Styles */

:root {
    --wrp-primary: #4F46E5;
    --wrp-secondary: #10B981;
    --wrp-gray-50: #F9FAFB;
    --wrp-gray-100: #F3F4F6;
    --wrp-gray-200: #E5E7EB;
    --wrp-gray-300: #D1D5DB;
    --wrp-gray-400: #9CA3AF;
    --wrp-gray-500: #6B7280;
    --wrp-gray-600: #4B5563;
    --wrp-gray-700: #374151;
    --wrp-gray-800: #1F2937;
    --wrp-gray-900: #111827;
}

.wrp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

.wrp-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--wrp-gray-900);
    margin-bottom: 12px;
    line-height: 1.2;
}

.wrp-subtitle {
    font-size: 1.125rem;
    color: var(--wrp-gray-600);
    margin: 0;
}

.wrp-mode-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.wrp-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 2px solid var(--wrp-gray-200);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wrp-gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wrp-tab-btn:hover {
    border-color: var(--wrp-primary);
    color: var(--wrp-primary);
    transform: translateY(-2px);
}

.wrp-tab-btn.active {
    background: var(--wrp-primary);
    border-color: var(--wrp-primary);
    color: white;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

.wrp-tab-icon {
    width: 20px;
    height: 20px;
}

.wrp-mode-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.1);
}

.wrp-upload-area {
    margin-bottom: 30px;
}

.wrp-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    border: 3px dashed var(--wrp-gray-300);
    border-radius: 16px;
    background: var(--wrp-gray-50);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 40px;
}

.wrp-upload-label:hover {
    border-color: var(--wrp-primary);
    background: rgba(79, 70, 229, 0.05);
}

.wrp-upload-icon {
    width: 64px;
    height: 64px;
    color: var(--wrp-primary);
    margin-bottom: 16px;
}

.wrp-upload-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--wrp-gray-900);
    margin-bottom: 8px;
}

.wrp-upload-subtext {
    font-size: 0.875rem;
    color: var(--wrp-gray-500);
}

.wrp-preview-area {
    text-align: center;
}

.wrp-image-preview {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wrp-image-preview img {
    max-width: 100%;
    height: auto;
    display: block;
}

.wrp-process-btn {
    background: var(--wrp-primary);
    color: white;
    border: none;
    padding: 16px 48px;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
}

.wrp-process-btn:hover:not(:disabled) {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.wrp-process-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wrp-result-area {
    text-align: center;
}

.wrp-result-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.wrp-result-item {
    flex: 1;
    min-width: 300px;
}

.wrp-result-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wrp-gray-700);
    margin-bottom: 12px;
}

.wrp-result-item img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wrp-result-arrow {
    font-size: 2rem;
    color: var(--wrp-primary);
    font-weight: bold;
}

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

.wrp-download-btn {
    background: var(--wrp-secondary);
    color: white;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.wrp-download-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.wrp-reset-btn {
    background: white;
    color: var(--wrp-gray-700);
    border: 2px solid var(--wrp-gray-300);
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wrp-reset-btn:hover {
    border-color: var(--wrp-gray-400);
    background: var(--wrp-gray-50);
}

.wrp-manual-selector {
    text-align: center;
}

.wrp-instruction {
    background: rgba(79, 70, 229, 0.1);
    color: var(--wrp-primary);
    padding: 12px 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.wrp-canvas-wrapper {
    display: inline-block;
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: crosshair;
}

#wrp-manual-canvas,
#wrp-bulk-manual-canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

.wrp-bulk-preview {
    margin-bottom: 30px;
}

.wrp-bulk-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.wrp-bulk-image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wrp-bulk-image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.wrp-bulk-image-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
}

.wrp-bulk-image-remove:hover {
    background: rgb(220, 38, 38);
    transform: scale(1.1);
}

.wrp-bulk-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.wrp-bulk-result-item {
    background: var(--wrp-gray-50);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.wrp-bulk-result-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 12px;
}

.wrp-bulk-result-status {
    font-weight: 600;
    margin-bottom: 8px;
}

.wrp-bulk-result-status.success {
    color: var(--wrp-secondary);
}

.wrp-bulk-result-status.error {
    color: #EF4444;
}

.wrp-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.wrp-spinner {
    width: 64px;
    height: 64px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: wrp-spin 1s linear infinite;
}

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

.wrp-loading-text {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wrp-container {
        padding: 20px 16px;
    }
    
    .wrp-title {
        font-size: 2rem;
    }
    
    .wrp-subtitle {
        font-size: 1rem;
    }
    
    .wrp-mode-content {
        padding: 24px 16px;
    }
    
    .wrp-result-images {
        flex-direction: column;
        gap: 16px;
    }
    
    .wrp-result-arrow {
        transform: rotate(90deg);
    }
    
    .wrp-result-item {
        min-width: 100%;
    }
    
    .wrp-mode-tabs {
        gap: 8px;
    }
    
    .wrp-tab-btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
}

/* Drag and drop active state */
.wrp-upload-label.dragging {
    border-color: var(--wrp-primary);
    background: rgba(79, 70, 229, 0.1);
    transform: scale(1.02);
}

/* Selection rectangle for manual mode */
.wrp-selection-rect {
    position: absolute;
    border: 2px dashed var(--wrp-primary);
    background: rgba(79, 70, 229, 0.2);
    pointer-events: none;
}
