/* CSS Reset and Base Styles */
.brp-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.brp-container {
    --primary: #6c63ff;
    --primary-dark: #5a52d5;
    --secondary: #ff6584;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --success: #28a745;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.brp-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.brp-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.brp-subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Upload Area Styles */
.brp-upload-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    transition: var(--transition);
}

.brp-upload-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.brp-upload-area {
    border: 3px dashed #d1d8e0;
    border-radius: var(--border-radius);
    padding: 60px 20px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
}

.brp-upload-area:hover, .brp-upload-area.dragover {
    border-color: var(--primary);
    background-color: rgba(108, 99, 255, 0.05);
}

.brp-upload-icon {
    font-size: 60px;
    color: var(--primary);
    margin-bottom: 15px;
}

.brp-upload-text {
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.brp-upload-hint {
    color: var(--gray);
    margin-bottom: 20px;
}

.brp-browse-btn {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.brp-browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.brp-file-input {
    display: none;
}

/* Preview Section */
.brp-preview-section {
    display: none;
    margin-bottom: 30px;
}

.brp-preview-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

.brp-preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .brp-preview-container {
        grid-template-columns: 1fr;
    }
}

.brp-preview-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.brp-preview-card:hover {
    transform: translateY(-5px);
}

.brp-preview-header {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.brp-preview-image {
    width: 100%;
    height: 300px;
    object-fit: contain;
    padding: 20px;
    background-color: #f8f9fa;
}

/* Loading Spinner */
.brp-loading-container {
    display: none;
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.brp-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--primary);
    border-radius: 50%;
    animation: brp-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes brp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.brp-loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
}

.brp-progress-bar {
    width: 80%;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin: 20px auto;
    overflow: hidden;
}

.brp-progress {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
}

/* Results Section */
.brp-results-section {
    display: none;
    margin-bottom: 30px;
}

.brp-results-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

.brp-results-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .brp-results-container {
        grid-template-columns: 1fr;
    }
}

.brp-result-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.brp-result-card:hover {
    transform: translateY(-5px);
}

.brp-result-header {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.brp-result-image {
    width: 100%;
    height: 300px;
    object-fit: contain;
    padding: 20px;
    background-color: #f8f9fa;
}

.brp-download-btn {
    display: block;
    width: 100%;
    background: linear-gradient(to right, var(--secondary), #ff4d6d);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
}

.brp-download-btn:hover {
    background: linear-gradient(to right, #ff4d6d, var(--secondary));
}

/* Error Message */
.brp-error-message {
    display: none;
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid #f44336;
}

/* Footer */
.brp-footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--gray);
    font-size: 0.9rem;
}