/* === Animations & Transitions === */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Utility animation classes */
.fade-in {
    animation: fadeIn 0.4s ease;
}

.slide-up {
    animation: slideUp 0.4s ease both;
}

/* Stagger animation for cards */
.prediction-card:nth-child(1) { animation-delay: 0.05s; }
.prediction-card:nth-child(2) { animation-delay: 0.1s; }
.prediction-card:nth-child(3) { animation-delay: 0.15s; }
.prediction-card:nth-child(4) { animation-delay: 0.2s; }
.prediction-card:nth-child(5) { animation-delay: 0.25s; }
.prediction-card:nth-child(6) { animation-delay: 0.3s; }
.prediction-card:nth-child(7) { animation-delay: 0.35s; }
.prediction-card:nth-child(8) { animation-delay: 0.4s; }
.prediction-card:nth-child(9) { animation-delay: 0.45s; }

/* Glass card hover */
.glass-card {
    transition: border-color 0.3s ease;
}

/* Table row transitions */
tbody tr {
    transition: background 0.15s ease;
}

/* Smooth section transitions */
.tab-content {
    transition: opacity 0.3s ease;
}

/* Button transitions */
.btn-primary {
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

/* Input focus transitions */
input, select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Dasha expand transition */
.dasha-antar-list {
    transition: max-height 0.3s ease;
}

/* Toast animation */
.toast {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Star twinkle on background */
.stars-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 70%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 90%, rgba(255,255,255,0.5) 0%, transparent 100%);
    animation: twinkle 4s ease infinite alternate;
}
