/**
 * Custom CSS Styles
 * 
 * Additional styles for the educational platform
 */

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

.pulse-animation {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Exercise Components */
.exercise-card {
    transition: all 0.3s ease;
}

.exercise-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.option-button {
    transition: all 0.3s ease;
}

.option-button:hover {
    transform: scale(1.02);
}

.option-button input:checked + div {
    border-color: #3B82F6;
    background-color: #EFF6FF;
}

/* Score Badge */
.score-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Matching Exercise Styles */
.match-drop-zone {
    transition: all 0.3s ease;
}

.match-drop-zone.drag-over {
    border-color: #3B82F6;
    background-color: #EFF6FF;
}

.match-card {
    transition: all 0.3s ease;
}

.match-card.dragging {
    opacity: 0.5;
}

.match-card.matched {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Fill Blanks Styles */
.blank-input {
    transition: all 0.3s ease;
}

.blank-input:focus {
    transform: scale(1.05);
}

.blank-input.correct {
    border-color: #10B981;
    background-color: #D1FAE5;
}

.blank-input.incorrect {
    border-color: #EF4444;
    background-color: #FEE2E2;
}

/* Ordering Exercise Styles */
.ordering-item {
    transition: all 0.3s ease;
}

.ordering-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.ordering-item.drag-over {
    border-color: #3B82F6;
    background-color: #EFF6FF;
}

/* Progress Bar */
.progress-bar {
    transition: width 0.5s ease;
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .exercise-card {
        padding: 1rem;
    }
    
    .option-button {
        padding: 0.75rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #F3F4F6;
}

::-webkit-scrollbar-thumb {
    background: #9CA3AF;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #F3F4F6;
    border-top: 3px solid #3B82F6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease-out;
    z-index: 1000;
}

.toast.success {
    border-left: 4px solid #10B981;
}

.toast.error {
    border-left: 4px solid #EF4444;
}

.toast.info {
    border-left: 4px solid #3B82F6;
}
