/* Custom CSS for AI Training Website */

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

.animate-fade-in-up {
    opacity: 0;
    animation: fade-in-up 0.6s ease-out forwards;
}

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

.animate-pulse-soft {
    animation: pulse-soft 2s ease-in-out infinite;
}

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

/* Toast notifications */
.toast {
    position: fixed;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background-color: #10b981;
    color: white;
}

.toast-error {
    background-color: #ef4444;
    color: white;
}

.toast-info {
    background-color: #3b82f6;
    color: white;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Better button transitions */
button, a {
    transition: all 0.2s ease;
}

/* Card hover effects */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

/* Alpine.js collapse transition */
[x-cloak] {
    display: none !important;
}

/* Print styles */
@media print {
    nav, footer, .fixed {
        display: none !important;
    }

    body {
        background: white !important;
    }

    main {
        padding: 0 !important;
    }
}

/* Mobile improvements */
@media (max-width: 640px) {
    .text-5xl {
        font-size: 2.5rem;
    }

    .text-7xl {
        font-size: 3rem;
    }
}

/* Prose styling for AI-generated content */
.prose h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.prose h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.prose p {
    margin-bottom: 0.75rem;
    line-height: 1.625;
}

.prose ul {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.25rem;
}

/* Code block styling */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Chat bubble styling */
.chat-bubble {
    position: relative;
}

.chat-bubble-user::after {
    content: '';
    position: absolute;
    right: -6px;
    bottom: 8px;
    width: 12px;
    height: 12px;
    background: #4f46e5;
    border-radius: 0 0 12px 0;
}

.chat-bubble-ai::after {
    content: '';
    position: absolute;
    left: -6px;
    bottom: 8px;
    width: 12px;
    height: 12px;
    background: #f3f4f6;
    border-radius: 0 0 0 12px;
}
