/* Additional Smooth Animations */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Fade in animations for content */
main {
    animation: fadeIn 0.6s ease-in;
}

/* Staggered animations for category sections */
.category-section {
    animation: fadeInUp 0.6s ease-out backwards;
}

.category-section:nth-child(1) { animation-delay: 0.1s; }
.category-section:nth-child(2) { animation-delay: 0.2s; }
.category-section:nth-child(3) { animation-delay: 0.3s; }
.category-section:nth-child(4) { animation-delay: 0.4s; }
.category-section:nth-child(5) { animation-delay: 0.5s; }

/* News slideshow animations */
.news-slide {
    animation: fadeIn 0.8s ease-in;
}

.news-indicator {
    transition: all 0.3s ease;
}

.news-indicator:hover {
    transform: scale(1.2);
}

/* Profile picture animations */
.profile-picture-header {
    transition: all 0.3s ease;
}

.profile-picture-header:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Notification animations */
.notification {
    animation: slideInDown 0.4s ease-out, fadeOut 0.4s ease-in 2.6s forwards;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Quick amount buttons hover effect */
.donate-quick-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.donate-quick-btn:hover {
    transform: translateY(-2px) scale(1.05);
}

.donate-quick-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Form input focus animations */
input:focus, textarea:focus, select:focus {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb, 107, 114, 128), 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb, 107, 114, 128), 0.1);
    }
}

/* Loading spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Smooth transitions for all interactive elements */
a, button, input, select, textarea {
    transition: all 0.2s ease;
}

/* Smooth theme transition - exclude transform and animation properties */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

/* Exclude certain properties from transition to avoid conflicts */
.room-card, .room-card-inner, .donate-panel, .create-conversation-form, .news-slide {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

/* Modal/overlay animations */
.modal-overlay {
    animation: fadeIn 0.3s ease;
}

.modal-content {
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Smooth page transitions */
.page-transition {
    animation: fadeIn 0.4s ease-in;
}

/* Hover effects for cards */
.card, .room-card, .donate-leaderboard-item, .donate-recent-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover, .donate-leaderboard-item:hover, .donate-recent-item:hover {
    transform: translateY(-4px);
}

.room-card:hover {
    /* No transform - keep size constant */
}

/* Smooth text transitions */
h1, h2, h3, h4, h5, h6 {
    transition: color 0.3s ease;
}

/* Smooth border transitions */
* {
    transition: border-color 0.3s ease;
}
