@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Comfortaa', cursive;
    background: white;
    min-height: 100vh;
    display: flex;
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
}

#chat-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: hsl(15, 25%, 92%);
}

#messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

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

.message.user {
    flex-direction: row-reverse;
}

.message-content {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 20px;
    line-height: 1.6;
    word-wrap: break-word;
}

.message.user .message-content {
    background: hsl(20, 80%, 50%);
    color: white;
    border-bottom-right-radius: 5px;
}

.message.assistant .message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 5px;
}

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

#message-input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    resize: none;
    max-height: 150px;
    transition: border-color 0.3s;
}

#message-input:focus {
    outline: none;
    border-color: hsl(20, 80%, 50%);
}

#send-button {
    padding: 15px 30px;
    background: hsl(20, 80%, 50%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#send-button:hover:not(:disabled) {
    background: hsl(20, 85%, 45%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 87, 26, 0.3);
}

#send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    border-bottom-left-radius: 5px;
    width: fit-content;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: hsl(228, 45%, 55%);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

.typing-indicator 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;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: hsl(228, 45%, 55%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(228, 45%, 45%);
}

.topic-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 0;
}

.topic-suggestion-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid hsl(20, 80%, 50%);
    color: hsl(20, 80%, 50%);
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.topic-suggestion-btn:hover {
    background: hsl(20, 80%, 50%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(217, 87, 26, 0.3);
}

.topic-suggestion-btn:active {
    transform: translateY(0);
}

/* Markdown content styling */
.message-content p {
    margin-bottom: 1.2em;
}

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

.message-content ul,
.message-content ol {
    margin-bottom: 1.2em;
    padding-left: 2.5em;
}

.message-content li {
    margin-bottom: 0.5em;
}

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