﻿/* Import Futuristic Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* Link Button Style */
.link-btn {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
}

    .link-btn:hover {
        background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
        border-color: rgba(16, 185, 129, 1) !important;
        box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5) !important;
    }

/* Fade in animation for buttons */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* AI Color Variables */
:root {
    --ai-purple: #A855F7;
    --ai-pink: #EC4899;
    --ai-blue: #3B82F6;
    --ai-cyan: #06B6D4;
    --ai-green: #10B981;
    --ai-orange: #F59E0B;
    --magic-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --neural-gradient: linear-gradient(135deg, #A855F7 0%, #EC4899 50%, #F59E0B 100%);
    --cosmic-gradient: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #EC4899 100%);
    --neon-gradient: linear-gradient(135deg, #06B6D4 0%, #10B981 50%, #F59E0B 100%);
}

/* Animated Background */
body {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    background: #0a0a0f;
    position: relative;
    overflow-x: hidden;
}

/* Magical Particle Background */
.chatbot-page {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Floating Particle Effects */
.chatbot-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.15) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 50%), radial-gradient(circle at 40% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* Main Container */
.chat-container {
    max-width: 1400px;
    margin: 40px auto;
    border: 2px solid transparent;
    background: linear-gradient(#0f0f1e, #0f0f1e) padding-box, var(--magic-gradient) border-box;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(168, 85, 247, 0.3), 0 0 120px rgba(59, 130, 246, 0.2), inset 0 0 80px rgba(168, 85, 247, 0.05);
    position: relative;
    backdrop-filter: blur(20px);
    animation: containerGlow 3s ease-in-out infinite;
}

@keyframes containerGlow {
    0%, 100% {
        box-shadow: 0 0 60px rgba(168, 85, 247, 0.3), 0 0 120px rgba(59, 130, 246, 0.2), inset 0 0 80px rgba(168, 85, 247, 0.05);
    }

    50% {
        box-shadow: 0 0 80px rgba(236, 72, 153, 0.4), 0 0 140px rgba(168, 85, 247, 0.3), inset 0 0 100px rgba(236, 72, 153, 0.08);
    }
}

/* Magical Header */
.chat-header {
    background: var(--neural-gradient);
    background-size: 200% 200%;
    animation: gradientFlow 5s ease infinite;
    color: white;
    padding: 30px 40px;
    font-size: 28px;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(168, 85, 247, 0.4);
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Holographic Effect on Header */
.chat-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient( 45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70% );
    animation: holographicSweep 3s linear infinite;
}

@keyframes holographicSweep {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.chat-header-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ai-icon {
    font-size: 3rem;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Chat Messages Area */
.chat-messages {
    height: 600px;
    overflow-y: auto;
    padding: 40px;
    background: rgba(15, 15, 30, 0.6);
    backdrop-filter: blur(10px);
    position: relative;
}

    /* Neural Network Background Pattern */
    .chat-messages::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: radial-gradient(circle at 10% 20%, rgba(168, 85, 247, 0.03) 1px, transparent 1px), radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
        background-size: 50px 50px;
        pointer-events: none;
        opacity: 0.5;
    }

/* Message Bubbles */
.message {
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    animation: messageSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    justify-content: flex-end;
}

/* Bot Message - Magical Glass Effect */
.message.bot .message-bubble {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #e0e0ff;
    padding: 20px 28px;
    border-radius: 25px 25px 25px 5px;
    max-width: 75%;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.2), inset 0 0 20px rgba(168, 85, 247, 0.05);
    position: relative;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.6;
}

    /* Sparkle Animation on Bot Messages */
    .message.bot .message-bubble::after {
        content: '✨';
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 18px;
        animation: sparkle 2s ease-in-out infinite;
    }

@keyframes sparkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

/* User Message - Gradient Bubble */
.message.user .message-bubble {
    background: var(--cosmic-gradient);
    background-size: 200% 200%;
    animation: gradientFlow 8s ease infinite;
    color: white;
    padding: 20px 28px;
    border-radius: 25px 25px 5px 25px;
    max-width: 75%;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4), inset 0 2px 10px rgba(255, 255, 255, 0.2);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.6;
}

/* Message Time Stamp */
.message-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

/* Quick Reply Buttons */
.quick-reply-btn {
    background: rgba(168, 85, 247, 0.15);
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 30px;
    padding: 12px 24px;
    margin: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #d4b3ff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

    .quick-reply-btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 70%);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
        border-radius: 50%;
    }

    .quick-reply-btn:hover::before {
        width: 300px;
        height: 300px;
    }

    .quick-reply-btn:hover {
        background: rgba(168, 85, 247, 0.3);
        border-color: rgba(168, 85, 247, 0.8);
        color: white;
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4);
    }

/* Typing Indicator - Neural Pulse */
.typing-indicator {
    display: none;
    padding: 20px;
    background: rgba(168, 85, 247, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    width: fit-content;
    margin: 10px;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

    .typing-indicator.active {
        display: block;
        animation: messageSlideIn 0.3s ease;
    }

    .typing-indicator span {
        height: 12px;
        width: 12px;
        background: var(--neural-gradient);
        border-radius: 50%;
        display: inline-block;
        margin: 0 4px;
        animation: neuralPulse 1.4s infinite;
        box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
    }

        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes neuralPulse {
    0%, 60%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-15px) scale(1.2);
        opacity: 1;
    }
}

/* Chat Input Container */
.chat-input-container {
    padding: 30px 40px;
    background: rgba(20, 20, 35, 0.8);
    backdrop-filter: blur(20px);
    border-top: 2px solid transparent;
    background-clip: padding-box;
    border-image: var(--magic-gradient) 1;
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Futuristic Input Field */
.chat-input {
    flex: 1;
    padding: 18px 28px;
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: 50px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

    .chat-input::placeholder {
        color: rgba(255, 255, 255, 0.4);
        font-style: italic;
    }

    .chat-input:focus {
        outline: none;
        border-color: rgba(168, 85, 247, 0.8);
        box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 30px rgba(168, 85, 247, 0.4), 0 0 60px rgba(59, 130, 246, 0.2);
        background: rgba(255, 255, 255, 0.08);
    }

/* Magical Send Button */
.chat-button {
    padding: 18px 40px;
    background: var(--neural-gradient);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4), inset 0 2px 10px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    animation: gradientFlow 5s ease infinite;
}

    /* Button Hover Glow Effect */
    .chat-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.3), transparent );
        transition: left 0.5s;
    }

    .chat-button:hover::before {
        left: 100%;
    }

    .chat-button:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 15px 50px rgba(168, 85, 247, 0.6), 0 0 80px rgba(236, 72, 153, 0.4), inset 0 2px 15px rgba(255, 255, 255, 0.3);
    }

    .chat-button:active {
        transform: translateY(-1px) scale(0.98);
    }

    .chat-button:disabled {
        background: rgba(100, 100, 100, 0.3);
        cursor: not-allowed;
        box-shadow: none;
        animation: none;
    }

/* Error Message */
.error-message {
    color: #ff6b9d;
    font-size: 13px;
    margin-top: 8px;
    padding: 12px 20px;
    background: rgba(255, 107, 157, 0.1);
    border-left: 3px solid #ff6b9d;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    font-weight: 600;
}

/* Custom Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 10px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--magic-gradient);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

    .chat-messages::-webkit-scrollbar-thumb:hover {
        background: var(--neural-gradient);
        box-shadow: 0 0 20px rgba(236, 72, 153, 0.7);
    }

/* Floating Stars Background */
@keyframes starFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

.chat-container::after {
    content: '✨ ⭐ 🌟 ✨ ⭐';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 2rem;
    opacity: 0.1;
    animation: starFloat 10s ease-in-out infinite;
    pointer-events: none;
    letter-spacing: 100px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        margin: 20px 15px;
        border-radius: 20px;
    }

    .chat-header {
        padding: 20px 25px;
        font-size: 22px;
    }

    .chat-messages {
        height: 500px;
        padding: 25px;
    }

    .message-bubble {
        max-width: 85% !important;
        padding: 16px 22px !important;
    }

    .chat-input-container {
        flex-direction: column;
        padding: 20px 25px;
    }

    .chat-button {
        width: 100%;
        padding: 16px 30px;
    }

    .ai-icon {
        font-size: 2.5rem;
    }
}

/* Magic Sparkle Effect on Hover */
.message.bot .message-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(168, 85, 247, 0.3), inset 0 0 30px rgba(168, 85, 247, 0.1);
}

/* Accessibility */
*:focus {
    outline: 2px solid rgba(168, 85, 247, 0.6);
    outline-offset: 3px;
}

/* Smooth Animations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
