/* Chatbot Page Styles */
.chatbot-page {
    background: #1a1a2e;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.chat-header {
    background: #0f0f1e;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 16px;
    padding: 10px 20px;
    border: 2px solid #5b7fff;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.back-btn:hover {
    background: #5b7fff;
    transform: translateX(-5px);
}

.chat-header h1 {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    text-align: center;
    flex: 1;
}

.header-spacer {
    width: 120px;
}

/* Chat Container */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    overflow: hidden;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #5b7fff;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #4a67e6;
}

/* Message Styles */
.message {
    display: flex;
    gap: 15px;
    max-width: 80%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #5b7fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.message-avatar img {
    width: 35px;
    height: 35px;
}

.user-message .message-avatar {
    background: #ff4444;
}

.user-message .message-avatar::before {
    content: '\f007';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 24px;
}

.user-message .message-avatar img {
    display: none;
}

.message-content {
    background: #2d2d44;
    padding: 15px 20px;
    border-radius: 15px;
    color: white;
    line-height: 1.6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.bot-message .message-content {
    border-bottom-left-radius: 5px;
}

.user-message .message-content {
    background: #5b7fff;
    border-bottom-right-radius: 5px;
}

.message-content p {
    margin: 0;
    word-wrap: break-word;
}

/* Typing Indicator */
.typing-indicator {
    padding: 0 20px;
}

.typing-dots {
    display: flex;
    gap: 5px;
    padding: 5px 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #5b7fff;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chat Input */
.chat-input-container {
    padding: 20px;
    background: #0f0f1e;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

#chatInput {
    flex: 1;
    padding: 15px 20px;
    background: #2d2d44;
    border: 2px solid transparent;
    border-radius: 25px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#chatInput:focus {
    border-color: #5b7fff;
    background: #3d3d54;
}

#chatInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.send-btn {
    width: 50px;
    height: 50px;
    background: #5b7fff;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-btn:hover {
    background: #4a67e6;
    transform: scale(1.1);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: scale(1);
}

/* Responsive Design */
@media (max-width: 992px) {
    .chat-header h1 {
        font-size: 20px;
    }
    
    .header-spacer {
        width: 100px;
    }
}

@media (max-width: 768px) {
    .chat-header {
        padding: 15px 0;
    }
    
    .chat-header h1 {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .header-spacer {
        width: 70px;
    }

    .back-btn {
        padding: 8px 12px;
        font-size: 13px;
        gap: 6px;
    }
    
    .back-btn i {
        font-size: 14px;
    }

    .chat-container {
        padding: 15px;
    }
    
    .chat-messages {
        padding: 15px;
        gap: 15px;
    }

    .message {
        max-width: 85%;
    }

    .message-avatar {
        width: 35px;
        height: 35px;
    }

    .message-avatar img {
        width: 24px;
        height: 24px;
    }

    .message-content {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .chat-input-container {
        padding: 15px;
    }

    #chatInput {
        font-size: 14px;
        padding: 12px 16px;
    }

    .send-btn {
        width: 42px;
        height: 42px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .chat-header h1 {
        font-size: 14px;
    }
    
    .header-spacer {
        width: 60px;
    }
    
    .back-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .message-avatar {
        width: 30px;
        height: 30px;
    }
    
    .message-avatar img {
        width: 20px;
        height: 20px;
    }
    
    .message-content {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    #chatInput {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .send-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

