:root {
    /* Your Custom Palette */
    --bg-color: #000000;
    --sidebar-bg: #0a0a0a;
    --cyan: #06CCFF; /* Corrected from your input */
    --yellow: #e9bf2a;
    --text-color: #ffffff;
    --text-dim: #888888;
    --border-color: #333333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: transform 0.3s ease;
}

.brand {
    font-size: 24px;
    font-weight: bold;
    color: var(--cyan);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(6, 204, 255, 0.5);
}

.new-chat-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 12px;
    text-align: left;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 600;
}

.new-chat-btn:hover {
    border-color: var(--yellow);
    color: var(--yellow);
}

.history {
    margin-top: 30px;
    flex: 1;
}

.history-label {
    color: var(--text-dim);
    font-size: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.history-item {
    padding: 10px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item:hover {
    background-color: #111;
    color: var(--cyan);
}

/* --- MAIN CHAT --- */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h2 {
    font-size: 18px;
    font-weight: normal;
}

.status {
    color: var(--cyan);
    font-size: 12px;
    text-shadow: 0 0 5px var(--cyan);
}

/* --- MESSAGES --- */
.chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.message {
    display: flex;
    margin-bottom: 25px;
    gap: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.ai-avatar {
    background: linear-gradient(135deg, var(--cyan), #0088cc);
    color: #000;
    box-shadow: 0 0 10px rgba(6, 204, 255, 0.3);
}

.user-avatar {
    background: var(--yellow);
    color: #000;
}

.message-content {
    flex: 1;
    line-height: 1.6;
    font-size: 15px;
    max-width: 800px;
}

/* Code Block Styling */
pre {
    background: #111;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
    margin: 10px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #ddd;
}
code {
    font-family: 'JetBrains Mono', monospace;
}
p { margin-bottom: 10px; }

/* --- INPUT AREA --- */
.input-area {
    padding: 20px;
    background-color: var(--bg-color); /* Opaque to cover scrolling text */
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#user-input {
    flex: 1;
    background: #111;
    border: 1px solid var(--border-color);
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    resize: none;
    outline: none;
    transition: border 0.3s;
}

#user-input:focus {
    border-color: var(--cyan);
}

.send-btn {
    background: var(--yellow);
    color: #000;
    border: none;
    padding: 0 25px;
    height: 50px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 191, 42, 0.3);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
}