/* Custom Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(168, 85, 247, 0.8);
    }
}

@keyframes bounce-in {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

.animate-slide-in {
    animation: slide-in-right 0.6s ease-out forwards;
}

/* Custom Slider Styles */
.slider-container {
    position: relative;
    padding: 1.5rem 0;
}

.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 10px;
    background: linear-gradient(to right, 
        #ef4444 0%, 
        #f59e0b 25%, 
        #eab308 50%, 
        #84cc16 75%, 
        #22c55e 100%);
    outline: none;
    opacity: 0.9;
    transition: opacity 0.3s;
    cursor: pointer;
}

.custom-slider:hover {
    opacity: 1;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 4px solid #8b5cf6;
    transition: all 0.3s ease;
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.custom-slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 4px solid #8b5cf6;
    transition: all 0.3s ease;
}

.custom-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* Score Scale Labels */
.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #d1d5db;
}

/* Question Card Animation */
.question-card {
    animation: fade-in 0.5s ease-out forwards;
    opacity: 0;
}

.question-card:nth-child(1) { animation-delay: 0.1s; }
.question-card:nth-child(2) { animation-delay: 0.2s; }
.question-card:nth-child(3) { animation-delay: 0.3s; }
.question-card:nth-child(4) { animation-delay: 0.4s; }
.question-card:nth-child(5) { animation-delay: 0.5s; }
.question-card:nth-child(6) { animation-delay: 0.6s; }
.question-card:nth-child(7) { animation-delay: 0.7s; }
.question-card:nth-child(8) { animation-delay: 0.8s; }
.question-card:nth-child(9) { animation-delay: 0.9s; }
.question-card:nth-child(10) { animation-delay: 1s; }

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.badge-low {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-high {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Score Value Display */
.score-display {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    animation: bounce-in 0.5s ease-out;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    white-space: nowrap;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Revision Card Hover Effects */
.revision-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.revision-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Chart Container */
canvas {
    max-height: 300px;
}

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .no-print {
        display: none;
    }
    
    .print-section {
        page-break-inside: avoid;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2 0%, #667eea 100%);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .score-display {
        font-size: 1.25rem;
        padding: 0.4rem 1rem;
    }
    
    .custom-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    
    .custom-slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
}

/* Loading Animation */
.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Success Animation */
.success-checkmark {
    animation: bounce-in 0.6s ease-out;
}

/* Particle Effect */
.particle {
    position: fixed;
    pointer-events: none;
    animation: float-up 3s ease-out forwards;
}

@keyframes float-up {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}