
/* Keyframes */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Sidebar slides in */
.sidebar { animation: fadeInLeft 0.6s ease; }

/* Navbar fades down */
.navbar { animation: fadeInUp 0.8s ease; }

/* Hero section zooms */
.hero { animation: zoomIn 0.9s ease; }

/* Cards (stats, dashboard) staggered animation */
.stats .card {
    animation: fadeInUp 0.7s ease forwards;
    opacity: 0;
}
.stats .card:nth-child(1) { animation-delay: 0.2s; }
.stats .card:nth-child(2) { animation-delay: 0.4s; }
.stats .card:nth-child(3) { animation-delay: 0.6s; }
.stats .card:nth-child(4) { animation-delay: 0.8s; }

/* Description slides in */
.description { animation: fadeInRight 1s ease; }

/* Subject cards on courses page */
.subject-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}
.subject-card:nth-child(1) { animation-delay: 0.2s; }
.subject-card:nth-child(2) { animation-delay: 0.4s; }
.subject-card:nth-child(3) { animation-delay: 0.6s; }
.subject-card:nth-child(4) { animation-delay: 0.8s; }

/* Hover effects */
button, .add-btn, .profile-btn {
    transition: transform 0.2s ease, background 0.3s ease;
}
button:hover, .add-btn:hover, .profile-btn:hover {
    transform: scale(1.01);
}

.card, .subject-card, .content-area {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover, .subject-card:hover, .content-area:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Flash message animation */
.flash-message {
    margin: 10px 0;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    animation: fadeInUp 0.6s ease, fadeOut 4s ease forwards;
}

/* Success & Error colors */
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Fade-out keyframes */
@keyframes fadeOut {
    0% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); display: none; }
}


