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

:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --accent-color: #FF8C00;
    --light-bg: #FFF8F0;
    --dark-text: #2C1810;
    --border-color: #DEB887;
    --message-user: #E3F2FD;
    --message-bot: #F3E5F5;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FFF8F0 0%, #FFE4B5 100%);
    color: var(--dark-text);
    min-height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem;
    box-shadow: var(--shadow);
    border-bottom: 3px solid var(--accent-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    padding: 2rem;
    flex: 1;
}

/* Chat Wrapper */
.chat-wrapper {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 2px solid var(--border-color);
}

/* Chat Container */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #FEFAF5;
    min-height: 400px;
    max-height: 500px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Chat Messages */
.chat-message {
    display: flex;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: var(--message-user);
    border-left: 4px solid var(--accent-color);
}

.bot-message .message-avatar {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.message-avatar {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-content {
    background: var(--message-bot);
    padding: 1rem;
    border-radius: 10px;
    max-width: 70%;
    word-wrap: break-word;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--secondary-color);
}

.message-content p {
    margin: 0.5rem 0;
    line-height: 1.5;
}

.message-content p:first-child {
    margin-top: 0;
}

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

/* Message Metadata (RAG Info) */
.message-metadata {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.8rem;
    color: #666;
    opacity: 0.85;
}

/* Loading Animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary-color);
    animation: bounce 1.4s infinite;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

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

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

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Suggestions */
.suggestions {
    padding: 1.5rem;
    background: #FFF8F0;
    border-top: 1px solid var(--border-color);
    display: hidden;
}

.suggestions.hidden {
    display: none;
}

.suggestions-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.suggestion-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    color: var(--dark-text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Input Area */
.input-area {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid var(--border-color);
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
}

#messageInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

#messageInput:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(210, 105, 30, 0.1);
}

#messageInput::placeholder {
    color: #999;
}

.send-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

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

/* Sidebar */
.info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--secondary-color);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-card li:last-child {
    border-bottom: none;
}

.info-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.info-link:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    border-top: 3px solid var(--accent-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .info-sidebar {
        display: none;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo-section h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1.5rem;
    }

    .main-content {
        padding: 1rem;
    }

    .chat-container {
        min-height: 300px;
        max-height: 400px;
    }

    .message-content {
        max-width: 95%;
    }

    .suggestion-buttons {
        flex-direction: column;
    }

    .suggestion-btn {
        width: 100%;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .logo-section h1 {
        font-size: 1.75rem;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .send-btn {
        width: 100%;
    }
}