:root {
    --primary-color: #000000;
    /* Light Blue */
    --primary-dark: #3B82F6;
    /* Blue for accents */
    --bg-color: #141212;
    /* Very light blue background */
    --text-color: #060607;
    /* Dark blue text */
    --user-msg-bg: #a8aaad;
    --bot-msg-bg: #f7ecec;
    --border-radius: 20px;
    --font-family: 'Nunito', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.chat-container {
    width: 100%;
    max-width: 600px;
    height: 100vh;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

@media (min-width: 640px) {
    .chat-container {
        height: 90vh;
        border-radius: var(--border-radius);
        overflow: hidden;
    }
}

.chat-header {
    background-color: var(--primary-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: white;
    padding: 2px;
}

.chat-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
}

.chat-header p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
    text-align: center;
}

.welcome-message {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.shortcuts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 300px;
}

.shortcut-btn {
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-dark);
    padding: 10px 15px;
    border-radius: 15px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.shortcut-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    line-height: 1.5;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.message p {
    margin-bottom: 8px;
}

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

.message ul,
.message ol {
    margin-left: 20px;
    margin-bottom: 8px;
}

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

.message pre {
    background-color: #2d2d2d;
    color: #ccc;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 8px;
}

.message code {
    font-family: monospace;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 4px;
}

.message pre code {
    background-color: transparent;
    padding: 0;
}

.user-message {
    align-self: flex-end;
    background-color: var(--user-msg-bg);
    border-bottom-right-radius: 5px;
}

.bot-message {
    align-self: flex-start;
    background-color: var(--bot-msg-bg);
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px;
    background-color: var(--bot-msg-bg);
    border-radius: var(--border-radius);
    border-bottom-left-radius: 5px;
    align-self: flex-start;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-dark);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

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

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.chat-input-container {
    display: flex;
    padding: 15px 20px;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    gap: 10px;
}

#message-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

#message-input:focus {
    border-color: var(--primary-color);
}

.send-btn {
    background-color: var(--primary-dark);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, background-color 0.2s;
}

.send-btn:hover {
    background-color: #2563EB;
    transform: scale(1.05);
}

.error-message {
    color: #ef4444;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 10px;
}