/* Custom CSS for Social Media Publisher */

/* Upload Animations */
.upload-spinner {
    width: 64px;
    height: 64px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #ff0050;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.publish-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #ff0050;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Drag and Drop States */
#upload-area {
    transition: all 0.3s ease;
}

#upload-area.drag-over {
    background-color: #fef2f2;
    border-color: #ff0050;
    transform: scale(1.02);
}

#upload-area.drag-over .text-gray-400 {
    color: #ff0050;
}

/* Platform Tab Animations */
.platform-tab {
    transition: all 0.2s ease;
    position: relative;
}

.platform-tab:not(.opacity-50):hover {
    transform: translateY(-2px);
}

.platform-tab.disabled,
.platform-tab:disabled {
    pointer-events: none;
    cursor: not-allowed;
}

.platform-tab.disabled:hover,
.platform-tab:disabled:hover {
    transform: none;
}

/* Modal Animations */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

.modal-exit {
    animation: modalExit 0.2s ease-in;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalExit {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
}

/* Publishing Status Animations */
.publish-status[data-status="pending"] .status-text {
    color: #6b7280;
}

.publish-status[data-status="publishing"] .status-text {
    color: #3b82f6;
    font-weight: 500;
}

.publish-status[data-status="success"] .status-text {
    color: #10b981;
    font-weight: 500;
}

.publish-status[data-status="error"] .status-text {
    color: #ef4444;
    font-weight: 500;
}

.publish-status[data-status="simulated"] .status-text {
    color: #f59e0b;
    font-weight: 500;
}

/* Success Animation */
.success-checkmark {
    animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(45deg);
        opacity: 1;
    }
}

/* Toast Notifications */
.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 16px;
    border-left: 4px solid;
    animation: toastSlide 0.3s ease-out;
    transition: all 0.3s ease;
    max-width: 350px;
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.info {
    border-left-color: #3b82f6;
}

.toast.warning {
    border-left-color: #f59e0b;
}

@keyframes toastSlide {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.removing {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Video Grid Animations */
.video-card {
    transition: all 0.2s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Progress Bar Animation */
#progress-bar {
    transition: width 0.3s ease;
}

/* Button Hover Effects */
.btn-gradient {
    background: linear-gradient(45deg, #ff0050, #E4405F);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(45deg, #E4405F, #ff0050);
    box-shadow: 0 8px 20px rgba(255, 0, 80, 0.3);
}

/* Platform Icons Animation */
.platform-icon {
    transition: all 0.2s ease;
}

.platform-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Loading States */
.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Confetti Animation for Success */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff0050;
    animation: confetti-fall 3s linear infinite;
}

.confetti:nth-child(2n) {
    background: #E4405F;
    animation-delay: 0.5s;
}

.confetti:nth-child(3n) {
    background: #FF0000;
    animation-delay: 1s;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotateZ(720deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .platform-tab {
        font-size: 0.875rem;
    }
    
    .platform-tab .hidden {
        display: none;
    }
    
    #upload-area {
        padding: 2rem 1rem;
    }
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Video Preview Animation */
.video-preview-enter {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus States */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 0, 80, 0.1);
}

/* Disabled State */
.disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* Success Celebration */
.celebration {
    position: relative;
    overflow: hidden;
}

.celebration::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Custom Checkboxes */
.platform-checkbox:checked + .checkbox-custom {
    background-color: currentColor;
    border-color: currentColor;
}

.platform-checkbox:checked + .checkbox-custom .checkmark {
    opacity: 1;
    color: white;
}

.platform-checkbox:disabled + .checkbox-custom {
    opacity: 0.5;
    cursor: not-allowed;
}

.platform-checkbox:disabled ~ * {
    opacity: 0.5;
}

label:has(.platform-checkbox:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}

label:has(.platform-checkbox:disabled) .platform-description {
    color: #9ca3af;
}

label:has(.platform-checkbox:disabled):hover {
    background-color: inherit !important;
}

/* TikTok checkbox color */
#platform-tiktok:checked + .checkbox-custom {
    background-color: #ff0050;
    border-color: #ff0050;
}

#platform-tiktok + .checkbox-custom:hover {
    border-color: #ff0050;
}

/* Instagram checkbox color */
#platform-instagram:checked + .checkbox-custom {
    background-color: #E4405F;
    border-color: #E4405F;
}

#platform-instagram + .checkbox-custom:hover {
    border-color: #E4405F;
}

/* YouTube checkbox color */
#platform-youtube:checked + .checkbox-custom {
    background-color: #FF0000;
    border-color: #FF0000;
}

#platform-youtube + .checkbox-custom:hover {
    border-color: #FF0000;
}

/* X checkbox color */
#platform-x:checked + .checkbox-custom {
    background-color: #000000;
    border-color: #000000;
}

#platform-x + .checkbox-custom:hover {
    border-color: #000000;
}

/* LinkedIn checkbox color */
#platform-linkedin:checked + .checkbox-custom {
    background-color: #0077B5;
    border-color: #0077B5;
}

#platform-linkedin + .checkbox-custom:hover {
    border-color: #0077B5;
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* File Input Custom Styling */
.file-input-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

/* Platform Status Indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-indicator.connected {
    background: #10b981;
    animation: pulse-green 2s infinite;
}

.status-indicator.disconnected {
    background: #ef4444;
}

.status-indicator.coming-soon {
    background: #f59e0b;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}
