/* Custom Styles for Moss CDN */

/* Smooth transitions */
* {
    transition: all 0.2s ease-in-out;
}

/* Drop zone styles */
.drop-zone-active {
    border-color: #3B82F6 !important;
    background-color: #EFF6FF;
}

/* Image card hover effects */
.image-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Folder card styles */
.folder-card {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.folder-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Toast animations */
.toast {
    animation: slideInRight 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid #10B981;
}

.toast.error {
    border-left: 4px solid #EF4444;
}

.toast.info {
    border-left: 4px solid #3B82F6;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Image preview modal */
.image-preview-modal {
    backdrop-filter: blur(5px);
}

/* Responsive image grid */
@media (max-width: 640px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1025px) {
    .image-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* File upload progress */
.upload-progress {
    background: linear-gradient(90deg, #3B82F6 0%, #1D4ED8 100%);
    height: 4px;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Copy button styles */
.copy-btn {
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background-color: #1D4ED8;
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Folder icon animation */
.folder-icon {
    transition: transform 0.2s ease;
}

.folder-card:hover .folder-icon {
    transform: scale(1.1);
}

/* Stats card hover effect */
.stats-card {
    transition: all 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* URL display styles */
.url-display {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    color: #1E40AF;
    word-break: break-all;
}

/* Empty state styles */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6B7280;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Drag and drop visual feedback */
.drag-over {
    background-color: #EFF6FF;
    border-color: #3B82F6;
    transform: scale(1.02);
}

/* Image aspect ratio preservation */
.image-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    overflow: hidden;
    border-radius: 8px;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tooltip styles */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1F2937;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Confirmation Modal */
#confirmModal {
    animation: fadeIn 0.2s ease-out;
}

#confirmModal > div {
    animation: slideInUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#confirmModal.hidden {
    animation: fadeOut 0.2s ease-out;
}

#confirmModal.hidden > div {
    animation: slideOutDown 0.2s ease-out;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}
