/* Flashcards de Dermatologia - Ana Clara - Estilos Customizados */

/* Animações suaves */
* {
    transition: all 0.2s ease-in-out;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Efeitos hover para cards */
.hover\:shadow-xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

/* Animação para flashcards */
.flashcard-content {
    perspective: 1000px;
}

.flashcard-front, 
.flashcard-back {
    cursor: pointer;
    transition: opacity 0.3s ease-in-out;
}

.flashcard-front:hover,
.flashcard-back:hover {
    opacity: 0.9;
}

/* Efeitos para botões */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    transform: none !important;
    cursor: not-allowed;
}

/* Animação para options do quiz */
.quiz-option {
    transition: all 0.2s ease;
}

.quiz-option:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Pulse animation para estatísticas */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Gradients personalizados */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards com bordas animadas */
.card-hover {
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.card-hover:hover::before {
    left: 100%;
}

/* Progress bar animada */
.progress-bar {
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Responsividade melhorada */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .text-4xl {
        font-size: 2.5rem;
    }
    
    .text-3xl {
        font-size: 2rem;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .md\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .flex.justify-center {
        flex-direction: row;
    }
}

/* Dark mode support */
.dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-accent: #94a3b8;
    --border-color: #475569;
}

.dark body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
}

.dark .bg-white {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

.dark .bg-gray-50 {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

.dark .text-gray-800 {
    color: var(--text-primary) !important;
}

.dark .text-gray-600 {
    color: var(--text-secondary) !important;
}

.dark .text-gray-500 {
    color: var(--text-accent) !important;
}

.dark .text-indigo-800 {
    color: #c7d2fe !important;
}

.dark .border-gray-200 {
    border-color: var(--border-color) !important;
}

.dark .border-gray-300 {
    border-color: var(--border-color) !important;
}

.dark .bg-gradient-to-br {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
}

/* Dark mode para elementos específicos */
.dark .bg-yellow-50 {
    background-color: rgba(234, 179, 8, 0.1) !important;
}

.dark .border-yellow-200 {
    border-color: rgba(234, 179, 8, 0.3) !important;
}

.dark .text-yellow-800 {
    color: #fcd34d !important;
}

.dark .text-yellow-600 {
    color: #f59e0b !important;
}

/* Scrollbar dark mode */
.dark ::-webkit-scrollbar-track {
    background: #334155;
}

.dark ::-webkit-scrollbar-thumb {
    background: #64748b;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Cards com melhor contraste no dark mode */
.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dark .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Gradients especiais para dark mode */
.dark .bg-gradient-to-r {
    background: linear-gradient(90deg, #7c3aed 0%, #ec4899 100%) !important;
}

/* Botões no dark mode */
.dark button:focus {
    outline: 2px solid #60a5fa;
}

/* Animações especiais para feedback */
.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

.error-animation {
    animation: errorShake 0.6s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

/* Indicadores visuais */
.studied-indicator {
    position: relative;
}

.studied-indicator::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.wrong-indicator {
    position: relative;
}

.wrong-indicator::after {
    content: '!';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Melhorias de acessibilidade */
button:focus,
select:focus,
.quiz-option:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
}

/* Animação de entrada para elementos */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Efeito de typewriter para textos importantes */
.typewriter {
    overflow: hidden;
    border-right: .15em solid orange;
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: orange; }
}