/* Custom styles for MindSpark ChatHub */

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

/* Custom scrollbar for chat container */
#chatContainer::-webkit-scrollbar {
    width: 8px;
}

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

#chatContainer::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #f43f5e, #e11d48);
    border-radius: 4px;
}

#chatContainer::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #e11d48, #be123c);
}

/* Message animations */
.chat-message {
    animation: messageSlideIn 0.3s ease-out;
}

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

/* Typing indicator animation */
.typing-indicator span {
    animation: typing 1.4s infinite ease-in-out;
    display: inline-block;
    margin: 0 1px;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom focus styles */
textarea:focus, button:focus {
    outline: none;
    ring: 2px;
    ring-color: rgba(244, 63, 94, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #chatContainer {
        height: 400px;
    }
    
    .message-input-area textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* Hover effects for interactive elements */
.quick-question:hover, .study-topic > div:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

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

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

/* Custom border radius utilities */
.rounded-2xl {
    border-radius: 1rem;
}

.rounded-3xl {
    border-radius: 1.5rem;
}

/* Smooth transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Enhanced shadow for depth */
.shadow-deep {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}