/* Custom animations and overrides */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #6366f1, #a855f7);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #4f46e5, #9333ea);
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    
    /* Standard property (future-proof) */
    line-clamp: 2;

    /* WebKit fallback (current reality) */
    -webkit-line-clamp: 2;

    overflow: hidden;
}

/* Progress bar animation */
.progress-fill {
    transition: width 1s ease-in-out;
}

/* Card hover effects */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
}

/* Button animations */
.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after, .btn-secondary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn-primary:hover::after, .btn-secondary:hover::after {
    width: 300px;
    height: 300px;
}

/* Input focus effects */
.input-field:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}