/* 📸 PULSAR PHOTO COMPRESSOR - UI STYLES */

.photo-upload-section {
    background: linear-gradient(135deg, rgba(139, 69, 255, 0.05), rgba(255, 51, 102, 0.05));
    border: 2px dashed rgba(139, 69, 255, 0.3);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.photo-upload-section:hover {
    border-color: rgba(139, 69, 255, 0.6);
    background: linear-gradient(135deg, rgba(139, 69, 255, 0.1), rgba(255, 51, 102, 0.1));
    transform: translateY(-2px);
}

.photo-upload-section.dragover {
    border-color: #8B45FF;
    background: linear-gradient(135deg, rgba(139, 69, 255, 0.15), rgba(255, 51, 102, 0.15));
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.upload-text h3 {
    color: #8B45FF;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.upload-text p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.upload-limits {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Preview Container */
.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.photo-preview {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.photo-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.preview-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-size {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-remove {
    background: rgba(255, 51, 102, 0.8);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: #FF3366;
    transform: scale(1.1) rotate(90deg);
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.loading::before {
    content: '⚙️';
    font-size: 24px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error State */
.error {
    padding: 30px;
    text-align: center;
    color: #FF3366;
}

.error-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error p {
    margin: 0;
    font-size: 0.95rem;
}

/* Compression Progress */
.compression-progress {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #8B45FF, #FF3366);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(139, 69, 255, 0.4);
    z-index: 9999;
    animation: slideInRight 0.3s ease;
    min-width: 300px;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.compression-progress h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    transition: width 0.3s ease;
    animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-top: 10px;
    opacity: 0.9;
}

/* Success Message */
.compression-success {
    background: linear-gradient(135deg, #00D084, #00A86B);
    animation: successPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.compression-success::before {
    content: '✓';
    display: inline-block;
    margin-right: 10px;
    font-size: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .photo-upload-section {
        padding: 30px 20px;
    }

    .preview-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .photo-preview img {
        height: 150px;
    }

    .compression-progress {
        left: 20px;
        right: 20px;
        bottom: 20px;
        min-width: unset;
    }

    .upload-icon {
        font-size: 36px;
    }

    .upload-text h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .preview-container {
        grid-template-columns: 1fr;
    }

    .photo-preview img {
        height: 200px;
    }

    .compression-progress {
        padding: 15px 20px;
    }

    .progress-stats {
        flex-direction: column;
        gap: 5px;
    }
}

/* Dark Theme Adjustments */
[data-theme="dark"] .photo-upload-section {
    background: linear-gradient(135deg, rgba(139, 69, 255, 0.1), rgba(255, 51, 102, 0.1));
}

[data-theme="dark"] .upload-limits {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .photo-preview {
    background: rgba(0, 0, 0, 0.5);
}
