/* Custom styles for Medical Quiz App */

/* Team specific colors and themes */
.team-dove {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 50%, #E3F2FD 100%);
    border-color: #2196F3;
}

.team-shark {
    background: linear-gradient(135deg, #E8F5E8 0%, #C8E6C9 50%, #E8F5E8 100%);
    border-color: #4CAF50;
}

.team-deer {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFCC02 50%, #FFF3E0 100%);
    border-color: #FF9800;
}

.team-elephant {
    background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 50%, #F3E5F5 100%);
    border-color: #9C27B0;
}

.team-squirrel {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 50%, #FFEBEE 100%);
    border-color: #F44336;
}

/* Enhanced animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0%, 20%, 53%, 80%, to {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
        transform: translateZ(0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translate3d(0, -30px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

/* Question categories styling */
.category-fever { background-color: #FFEBEE; color: #C62828; }
.category-cough { background-color: #E8F5E8; color: #2E7D32; }
.category-diarrhea { background-color: #FFF3E0; color: #F57C00; }
.category-headache { background-color: #F3E5F5; color: #7B1FA2; }
.category-vomiting { background-color: #E3F2FD; color: #1565C0; }

/* Responsive improvements */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #teamGrid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quiz-container {
        padding: 1rem;
    }
    
    .answer-option {
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    header .flex {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .text-3xl {
        font-size: 1.25rem;
    }
    
    .text-4xl {
        font-size: 1.5rem;
    }
    
    .answer-option {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Score animation enhancements */
.score-increase {
    animation: scoreIncrease 0.6s ease-out;
}

@keyframes scoreIncrease {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: #10B981; }
    100% { transform: scale(1); }
}

/* Progress bar */
.progress-bar {
    background: linear-gradient(90deg, #3B82F6 0%, #8B5CF6 100%);
    height: 4px;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Enhanced modal styles */
.modal-overlay {
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.6);
}

/* Difficulty badges */
.difficulty-easy {
    background-color: #DCFCE7;
    color: #166534;
}

.difficulty-medium {
    background-color: #FEF3C7;
    color: #92400E;
}

.difficulty-hard {
    background-color: #FEE2E2;
    color: #991B1B;
}

/* Interactive elements */
.interactive-hover {
    transition: all 0.2s ease;
}

.interactive-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Success states */
.success-flash {
    animation: successFlash 0.5s ease;
}

@keyframes successFlash {
    0% { background-color: transparent; }
    50% { background-color: #10B981; color: white; }
    100% { background-color: transparent; }
}

/* Error states */
.error-shake {
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* Focus states for accessibility */
.answer-option:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

button:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}