/* AntiMicroX Custom Styles */

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

/* Animation classes */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Custom button styles */
.btn-primary {
    @apply bg-primary hover:bg-secondary text-white font-bold py-3 px-6 rounded-lg transition duration-300 transform hover:scale-105;
}

.btn-secondary {
    @apply border-2 border-primary text-primary hover:bg-primary hover:text-white font-bold py-3 px-6 rounded-lg transition duration-300;
}

.btn-accent {
    @apply bg-accent hover:bg-yellow-500 text-white font-bold py-3 px-6 rounded-lg transition duration-300 transform hover:scale-105;
}

/* Custom card styles */
.card {
    @apply bg-white rounded-xl shadow-lg p-6 hover:shadow-xl transition duration-300;
}

.card-hover {
    @apply bg-white rounded-xl shadow-lg p-6 hover:shadow-xl transition duration-300 hover:-translate-y-1;
}

/* Custom input styles */
.input-primary {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent transition duration-300;
}

.input-error {
    @apply border-red-500 focus:ring-red-500;
}

/* Custom text styles */
.text-gradient {
    background: linear-gradient(135deg, #3B82F6, #1E40AF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Custom spacing */
.section-padding {
    @apply py-20;
}

.container-padding {
    @apply px-4 sm:px-6 lg:px-8;
}

/* Custom grid layouts */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-auto-fill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #3B82F6;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #1E40AF;
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3B82F6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom focus styles */
.focus-ring {
    @apply focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2;
}

/* Custom badge styles */
.badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.badge-primary {
    @apply bg-blue-100 text-blue-800;
}

.badge-success {
    @apply bg-green-100 text-green-800;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-800;
}

.badge-error {
    @apply bg-red-100 text-red-800;
}

/* Custom alert styles */
.alert {
    @apply p-4 rounded-lg border-l-4;
}

.alert-info {
    @apply bg-blue-50 border-blue-400 text-blue-700;
}

.alert-success {
    @apply bg-green-50 border-green-400 text-green-700;
}

.alert-warning {
    @apply bg-yellow-50 border-yellow-400 text-yellow-700;
}

.alert-error {
    @apply bg-red-50 border-red-400 text-red-700;
}

/* Custom progress bar */
.progress-bar {
    @apply w-full bg-gray-200 rounded-full h-2.5;
}

.progress-fill {
    @apply bg-primary h-2.5 rounded-full transition-all duration-300 ease-out;
}

/* Custom tooltip */
.tooltip {
    @apply relative inline-block;
}

.tooltip .tooltip-text {
    @apply invisible absolute z-10 inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 transition-opacity duration-300;
}

.tooltip:hover .tooltip-text {
    @apply visible opacity-100;
}

/* Custom modal */
.modal {
    @apply fixed inset-0 z-50 overflow-y-auto;
}

.modal-backdrop {
    @apply fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity;
}

.modal-content {
    @apply relative bg-white rounded-lg shadow-xl max-w-lg mx-auto mt-20 p-6;
}

/* Custom tabs */
.tab-list {
    @apply flex space-x-1 rounded-xl bg-gray-100 p-1;
}

.tab-button {
    @apply w-full rounded-lg py-2.5 text-sm font-medium leading-5 text-gray-700 transition-all duration-200;
}

.tab-button.active {
    @apply bg-white text-primary shadow;
}

.tab-button:hover {
    @apply text-gray-900;
}

/* Custom accordion */
.accordion-item {
    @apply border-b border-gray-200;
}

.accordion-header {
    @apply flex justify-between items-center w-full py-4 text-left font-medium text-gray-900 hover:text-primary transition-colors duration-200;
}

.accordion-content {
    @apply overflow-hidden transition-all duration-300 ease-in-out;
}

.accordion-content.collapsed {
    @apply max-h-0;
}

.accordion-content.expanded {
    @apply max-h-96;
}

/* Custom rating stars */
.rating {
    @apply flex items-center space-x-1;
}

.rating-star {
    @apply text-gray-300 transition-colors duration-200;
}

.rating-star.active {
    @apply text-yellow-400;
}

.rating-star.hover {
    @apply text-yellow-300;
}

/* Custom pagination */
.pagination {
    @apply flex items-center justify-center space-x-2;
}

.pagination-item {
    @apply px-3 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-md hover:bg-gray-50 hover:text-gray-700 transition-colors duration-200;
}

.pagination-item.active {
    @apply text-white bg-primary border-primary;
}

.pagination-item.disabled {
    @apply text-gray-300 bg-gray-100 cursor-not-allowed;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .mobile-hidden {
        display: none;
    }
    
    .mobile-full {
        width: 100%;
    }
    
    .mobile-text-center {
        text-align: center;
    }
}

@media (min-width: 641px) {
    .desktop-hidden {
        display: none;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        @apply bg-gray-900 text-white;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .high-contrast {
        @apply border-2 border-black;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .no-motion {
        animation: none !important;
        transition: none !important;
    }
}
