* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background-color: #ffffff;
    color: #0d0d0d;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 250px; /* Large padding to prevent content hiding behind fixed footer */
    display: flex;
    flex-direction: column;
}

.messages-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Chat Header */
.chat-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.logo-area {
    margin-bottom: 12px;
}

.main-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #000;
}

.welcome-text {
    text-align: center;
    margin-bottom: 40px;
}

.description {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* Suggestions */
.suggestion-grid {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
    margin-bottom: 12px; /* Space above file previews */
    flex-wrap: wrap;
    max-width: 800px;
}

.suggestion-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 13px;
    color: #4d4d4d;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.suggestion-card:hover {
    background: #f9f9f9;
    border-color: #000;
    transform: translateY(-1px);
}

/* Input Container */
.input-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.02);
}

.input-wrapper {
    width: 100%;
    max-width: 780px;
    background: #f4f4f4;
    border-radius: 32px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 8px 0;
    resize: none;
    max-height: 200px;
    color: #0d0d0d;
    line-height: 1.5;
}

.action-btn, .send-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #2f2f2f;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn {
    background: #000;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.send-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

#stop-icon.hidden, #send-icon.hidden {
    display: none;
}

/* Message Bubbles */
.message {
    margin-bottom: 32px;
    max-width: 85%;
    line-height: 1.6;
    margin-top: 20px;
}

.user-message {
    width: fit-content;
    max-width: 70%;
    margin-left: auto;
    background: #f4f4f4;
    padding: 6px 16px; /* Tighter padding for a smaller bubble */
    border-radius: 32px; /* Matches the input box */
    color: #000;
    border: 1px solid #e5e5e5;
    font-size: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.bot-message {
    width: 100%;
}

/* Markdown Rendering Tweaks (keep it simple but clean) */
.content h1, .content h2, .content h3 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.content h1 { font-size: 2em; }
.content h2 { 
    font-size: 1.5em; 
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3em;
}
.content h3 { font-size: 1.25em; }

.content p {
    margin-bottom: 16px;
}

.content ul, .content ol {
    margin-bottom: 16px;
    padding-left: 2em;
}

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

.content hr {
    height: 1px;
    background-color: #e5e5e5;
    border: none;
    margin: 24px 0;
}

.content strong {
    font-weight: 600;
}

.content table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
}
.content th, .content td {
    border: 1px solid #e5e5e5;
    padding: 8px 12px;
    text-align: left;
}
.content th {
    background-color: #f9f9f9;
}

.file-previews {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    max-width: 780px;
    width: 100%;
    flex-wrap: nowrap; /* Force single line */
    overflow-x: auto;  /* Horizontal scroll */
    padding-bottom: 8px;
    scrollbar-width: thin; /* Clean scrollbar for Firefox */
}

/* Custom scrollbar for Chrome/Safari */
.file-previews::-webkit-scrollbar {
    height: 4px;
}
.file-previews::-webkit-scrollbar-thumb {
    background: #e5e5e5;
    border-radius: 10px;
}



.file-chip {
    background: #f4f4f4;
    border: 1px solid #e5e5e5;
    padding: 4px 10px; /* Reduced padding */
    border-radius: 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 180px; /* Limit width */
    white-space: nowrap; /* Prevent text wrapping */
    flex-shrink: 0;
}

.file-chip span:first-child {
    overflow: hidden;
    text-overflow: ellipsis; /* Add ... for long names */
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #444;
    border-radius: 50%;
    animation: typing-bounce 1s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(0,0,0,0.15); /* Soft glow */
    opacity: 0.6;
}

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

@keyframes typing-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-8px); opacity: 1; }
}


