/* Custom Styles for Brute Force Simulator */
/* Créé par : MABIALA EULOGE JUNIOR */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Input focus effects */
input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Password strength bar animations */
#strengthBar {
    background: linear-gradient(90deg, #ef4444, #f97316, #eab308, #22c55e, #3b82f6);
    background-size: 200% 100%;
    animation: gradientShift 2s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Card hover effects */
.bg-white\/10 {
    transition: all 0.3s ease;
}

.bg-white\/10:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Attack simulation cards */
.bg-red-500\/20, .bg-orange-500\/20, .bg-purple-500\/20 {
    transition: all 0.3s ease;
}

.bg-red-500\/20:hover, .bg-orange-500\/20:hover, .bg-purple-500\/20:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Toast notifications */
.toast {
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.success {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

.toast.warning {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
}

.toast.error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse animation for important elements */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Typing animation for password input */
.typing {
    border-right: 2px solid #3b82f6;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: #3b82f6; }
}

/* Chart container styling */
#attackChart {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    #toastContainer {
        right: 1rem;
        left: 1rem;
    }
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for keyboard navigation */
button:focus, input:focus, select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-white\/10 {
        background: rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.5);
    }
    
    .text-gray-300 {
        color: #ffffff;
    }
    
    .text-gray-400 {
        color: #e5e7eb;
    }
}

/* Print styles */
@media print {
    .bg-gradient-to-br {
        background: white !important;
    }
    
    .text-white {
        color: black !important;
    }
    
    .text-gray-300, .text-gray-400 {
        color: #333 !important;
    }
    
    #toastContainer {
        display: none;
    }
}

/* Data Breach Simulation Styles */
.data-breach-card {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.2) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
}

.data-breach-card:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.25) 100%);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.2);
}

.data-item {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #ef4444;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.data-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #dc2626;
}

.data-item.sensitive {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #dc2626;
}

.data-item.sensitive:hover {
    background: rgba(239, 68, 68, 0.15);
}

.breach-animation {
    animation: breachPulse 2s ease-in-out infinite;
}

@keyframes breachPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

.scanning-animation {
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.3), transparent);
    background-size: 200% 100%;
    animation: scanning 1.5s ease-in-out infinite;
}

@keyframes scanning {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Améliorations pour la section statistique */
.statistics-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.metric-card {
    transition: all 0.3s ease;
    position: relative;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.metric-value {
    transition: all 0.3s ease;
}

.metric-value.animate {
    animation: numberPulse 0.5s ease;
}

@keyframes numberPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Améliorations pour le graphique */
.chart-container {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 10px;
}

.chart-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%);
    pointer-events: none;
}

/* Animations pour les métriques de performance */
.performance-metric {
    transition: all 0.3s ease;
    position: relative;
}

.performance-metric:hover {
    transform: scale(1.05);
}

.performance-metric::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.performance-metric:hover::after {
    width: 100%;
}

/* Styles pour les statuts API */
.api-status {
    transition: all 0.3s ease;
    border-radius: 6px;
}

.api-status.available {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.api-status.unavailable {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.api-status:hover {
    transform: translateX(5px);
}

/* Styles pour la section contact */
.contact-link {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #9ca3af;
}

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

.contact-link:hover::before {
    left: 100%;
}

.github-link {
    background: rgba(36, 41, 46, 0.3);
    border: 1px solid rgba(36, 41, 46, 0.5);
}

.github-link:hover {
    background: rgba(36, 41, 46, 0.5);
    border-color: #24292e;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(36, 41, 46, 0.3);
}

.linkedin-link {
    background: rgba(0, 119, 181, 0.3);
    border: 1px solid rgba(0, 119, 181, 0.5);
}

.linkedin-link:hover {
    background: rgba(0, 119, 181, 0.5);
    border-color: #0077b5;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

.outlook-link {
    background: rgba(0, 114, 198, 0.3);
    border: 1px solid rgba(0, 114, 198, 0.5);
}

.outlook-link:hover {
    background: rgba(0, 114, 198, 0.5);
    border-color: #0072c6;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 114, 198, 0.3);
}

/* Animation pour les icônes de contact */
.contact-link i {
    transition: transform 0.3s ease;
}

.contact-link:hover i {
    transform: scale(1.1);
}

/* Responsive pour la section contact */
@media (max-width: 640px) {
    .contact-link {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
    
    .contact-link i {
        font-size: 1.25rem;
    }
    
    .contact-link span {
        display: none;
    }
} 