* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Times New Roman', Times, serif;
    border-radius:10px ;
   
}

body {
    background: linear-gradient(135deg, #000000 45%, #283A5A 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.chat-container {
    width: 100%;
    max-width: 800px;
    height: 80vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.chat-container:hover {
    
    box-shadow: 10px 12px 40px #2f4771;
}
.chat-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    color: white;
    border-bottom: 1px solid rgba(4, 32, 42, 0.1);
}

.chat-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.chat-header p {
    font-size: 1.5rem;
    opacity: 0.8;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 15px;
    border-radius: 18px;
    animation: fadeIn 0.3s ease-out;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.message:hover {
    transform: translateY(-2px);
    box-shadow: 10px 12px 20px #2f4771 ;

}

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%,#283A5A 45%);
    color: white;
    border-bottom-right-radius: 5px;
    transform-origin: bottom right;
}

.bot-message {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-bottom-left-radius: 5px;
    transform-origin: bottom left;
}

.message-content {
    word-wrap: break-word;
    line-height: 1.5;
}

.message-content p {
    margin-bottom: 10px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content h1,
.message-content h2,
.message-content h3 {
    margin: 15px 0 10px 0;
    font-weight: 600;
}

.message-content h1 {
    font-size: 1.5rem;
}

.message-content h2 {
    font-size: 1.3rem;
}

.message-content h3 {
    font-size: 1.1rem;
}

.message-content ul,
.message-content ol {
    padding-left: 20px;
    margin: 10px 0;
}

.message-content li {
    margin-bottom: 5px;
}

.message-content strong {
    font-weight: 600;
}

.message-content em {
    font-style: italic;
}

.message-content code {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.message-content pre {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
}

.message-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.message-timestamp {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 8px;
    text-align: right;
}

.chat-input-container {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#chat-form {
    display: flex;
    gap: 10px;
}

#user-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: background 0.3s;
}

#user-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#user-input:focus {
    background: rgba(255, 255, 255, 0.25);
}

#send-button {
    background: linear-gradient(135deg, #667eea 0%, #283A5A 100%);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

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

#send-button:active {
    transform: scale(0.95);
}

#send-button svg {
    color: white;
}

/* Typing indicator */
.typing-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 0;
}

.typing-dots span {
    height: 8px;
    width: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .chat-container {
        height: 90vh;
        border-radius: 15px;
    }
    
    .chat-header h1 {
        font-size: 1.5rem;
    }
    
    .message {
        max-width: 90%;
    }
    
    #user-input {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    #send-button {
        width: 45px;
        height: 45px;
    }
}