:root {
    --bg-dark: #0f1115;
    --bg-sidebar: #161b22;
    --bg-input: #21262d;
    --border-color: #30363d;
    --accent: #58a6ff;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --message-bot: #161b22;
    --message-user: #1f6feb;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.logo h2 {
    font-weight: 600;
    letter-spacing: -0.5px;
}

.badge {
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.context-panel h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
}

.form-group input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 6px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--accent);
}

.form-group small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.status-panel {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.dot {
    height: 8px;
    width: 8px;
    background-color: #238636;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

/* Chat Interface */
.chat-interface {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-behavior: smooth;
}

.message {
    display: flex;
    gap: 1rem;
    max-width: 800px;
}

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

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.message.user .avatar {
    background: var(--accent);
}

.content {
    background: var(--message-bot);
    padding: 1rem 1.25rem;
    border-radius: 0px 12px 12px 12px;
    border: 1px solid var(--border-color);
    line-height: 1.6;
    font-size: 0.95rem;
    white-space: pre-wrap;
}

.message.user .content {
    background: var(--message-user);
    color: white;
    border: none;
    border-radius: 12px 0px 12px 12px;
}

/* Input Area */
.input-area {
    padding: 1.5rem 2rem;
    background: var(--bg-dark);
}

.input-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: flex-end;
    padding: 0.5rem;
    transition: box-shadow 0.2s;
}

.input-container:focus-within {
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.3);
    border-color: var(--accent);
}

textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.75rem;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    max-height: 200px;
}

button {
    background: var(--accent);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    transition: transform 0.1s;
}

button:active {
    transform: scale(0.95);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message {
    animation: fadeIn 0.3s ease-out;
}
