* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #000000, #1a1a1a);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
}

.chat-container {
    width: 400px;
    height: 600px;
    background: #0a0a0a;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(123, 49, 214, 0.1);
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #7b31d6, #9b59b6);
    color: #ffffff;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-messages::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    animation: fadeIn 0.3s ease-in;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.message.user {
    background: linear-gradient(135deg, #7b31d6, #9b59b6);
    color: #ffffff;
    align-self: flex-end;
    margin-left: auto;
}

.message.bot {
    background: #1a1a1a;
    color: #ffffff;
    border: 1px solid #333;
    align-self: flex-start;
}

.typing-indicator {
    align-self: flex-start;
    background: #1a1a1a;
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid #333;
    color: #7b31d6;
    display: none;
}

.chat-link {
    color: #7b31d6;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.chat-link:hover {
    color: #9b59b6;
}

.message.user .chat-link {
    color: #ffffff;
    text-decoration: underline;
}

.message.user .chat-link:hover {
    color: #f0f0f0;
}

.typing-dots {
    display: inline-flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #7b31d6;
    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;
}

.chat-input {
    padding: 20px;
    background: #1a1a1a;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
}

.input-field {
    flex: 1;
    padding: 12px 16px;
    min-height: 44px;
    max-height: 120px;
    background: #000;
    border: 1px solid #333;
    border-radius: 25px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    resize: none;
    overflow-y: auto;
    font-family: inherit;
    line-height: 1.4;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.input-field::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.input-field:focus {
    border-color: #7b31d6;
}

.input-field::placeholder {
    color: #666;
}

.send-button {
    padding: 12px 20px;
    height: 44px; /* Fixed height */
    min-height: 44px; /* Ensure minimum height */
    align-self: flex-end; /* Align to bottom of container */
    background: linear-gradient(135deg, #7b31d6, #9b59b6);
    color: #ffffff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-button:hover {
    transform: scale(1.05);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

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

.welcome-message {
    text-align: center;
    color: #888;
    font-style: italic;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .chat-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .chat-input {
        padding: 20px;
    }
    
    .input-field {
        font-size: 16px;
        padding: 14px 18px;
        min-height: 48px;
    }
    
    .send-button {
        height: 48px;
        min-height: 48px;
        padding: 14px 22px;
        font-size: 16px;
    }
    
    .message {
        font-size: 16px;
        padding: 14px 18px;
        max-width: 85%;
    }
    
    .chat-header {
        padding: 25px 20px;
        font-size: 20px;
    }
}