* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121212;
    color: #f5f5f5;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #333;
}

header h1 {
    color: #bb86fc;
    margin-bottom: 8px;
}

header p {
    color: #a0a0a0;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

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

.message {
    max-width: 80%;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 18px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

/* .message-content {
    font-size: 15px;
    line-height: 1.6;
} */

.message-content {
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap; /* Preserves formatting like line breaks */
}

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

.message-content br {
    display: block;
    margin: 8px 0;
    content: "";
}

.user-message {
    align-self: flex-end;
    background-color: #5851db;
    color: white;
    border-bottom-right-radius: 4px;
}

.bot-message {
    align-self: flex-start;
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-bottom-left-radius: 4px;
}

/* Style for bullet points */
.bot-message ul {
    padding-left: 20px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.bot-message li {
    margin-bottom: 4px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    align-self: flex-start;
    background-color: #2d2d2d;
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 12px;
    border-bottom-left-radius: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #a0a0a0;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing-animation 1.4s infinite;
}

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

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

@keyframes typing-animation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.input-area {
    display: flex;
    padding: 16px;
    background-color: #252525;
    border-top: 1px solid #333;
}

input {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 24px;
    background-color: #3a3a3a;
    color: #f5f5f5;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

input:focus {
    background-color: #424242;
    box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.3);
}

button {
    margin-left: 12px;
    padding: 0 20px;
    border: none;
    border-radius: 24px;
    background-color: #bb86fc;
    color: #121212;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background-color: #9969f8;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.timestamp {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    text-align: right;
}

.bot-message .timestamp {
    text-align: left;
}

/* Responsive design */
@media (max-width: 768px) {
    .message {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 10px 0;
    }
    
    .message {
        max-width: 95%;
    }
}

/* Scrollbar styling */
.chat-box::-webkit-scrollbar {
    width: 6px;
}

.chat-box::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.chat-box::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 10px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
    background: #555;
}