/* ============= CHATBOT ============= */

.chat-container {
    display: flex; gap: 20px;
    max-width: 1600px; margin: 20px auto;
    padding: 0 20px; min-height: calc(100vh - 120px);
}
.sidebar {
    width: 300px;
    background: rgba(26,255,0,0.05);
    border-right: 1px dotted #48ff00;
    border-radius: 8px 0 0 8px;
    padding: 20px;
    height: calc(100vh - 140px);
    overflow-y: auto;
    position: sticky;
    top: 80px;
}
.sidebar h3 {
    color: #48ff00; font-size: 24px; text-align: center;
    margin-bottom: 20px; letter-spacing: 3px; font-family: "Handjet", sans-serif;
}
.new-chat-btn {
    width: 100%; background: transparent; border: 1px dotted #48ff00;
    color: #48ff00; font-family: "Handjet", sans-serif; font-size: 18px;
    padding: 10px; margin-bottom: 20px; cursor: pointer;
    transition: all 0.3s ease; letter-spacing: 2px;
}
.new-chat-btn:hover { border-color: #aa00ff; color: #aa00ff; transform: scale(1.02); }
.conversation-list { list-style: none; padding: 0; margin: 0; }
.conversation-item {
    padding: 12px; margin-bottom: 8px;
    border-left: 1px dotted #48ff00; cursor: pointer;
    transition: all 0.3s ease; position: relative;
}
.conversation-item:hover { border-left-color: #aa00ff; background: rgba(170,0,255,0.1); transform: translateX(5px); }
.conversation-item.active { border-left-color: #aa00ff; background: rgba(170,0,255,0.2); color: #aa00ff; }
.conversation-title {
    display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-size: 16px; letter-spacing: 1px; font-family: "Handjet", sans-serif;
}
.conversation-date { font-size: 10px; color: #666; display: block; margin-top: 4px; font-family: "Handjet", sans-serif; }
.delete-conv {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; cursor: pointer; color: #ff3c3c;
    font-size: 14px; opacity: 0; transition: opacity 0.3s ease;
}
.delete-conv::after { content: "✕"; }
.conversation-item:hover .delete-conv { opacity: 1; }

.main-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px dotted #48ff00; padding-bottom: 10px; margin-bottom: 20px;
}
#chat-title {
    margin: 0; font-size: 36px; text-align: left; font-family: "Handjet", sans-serif;
}
#chat-title:hover { transform: none; color: #48ff00; }
.admin-badge {
    background: #aa00ff; color: #000; padding: 5px 15px;
    border-radius: 20px; font-size: 14px; letter-spacing: 2px;
    animation: glow 2s infinite; font-family: "Handjet", sans-serif;
}

#chat {
    flex: 1; min-height: 500px; max-height: calc(100vh - 280px);
    overflow-y: auto; margin-bottom: 20px;
    display: flex; flex-direction: column; gap: 10px; padding-right: 10px;
}
.user {
    color: #48ff00; font-size: 20px; letter-spacing: 2px;
    border-left: 2px dotted #48ff00; padding: 8px 12px;
    background: rgba(72,255,0,0.05); border-radius: 0 8px 8px 0;
    font-family: "Handjet", sans-serif;
}
.bot {
    color: #cc88ff; font-size: 20px; letter-spacing: 2px;
    border-left: 2px dotted #aa00ff; padding: 8px 12px;
    background: rgba(170,0,255,0.05); border-radius: 0 8px 8px 0;
    font-family: "Handjet", sans-serif;
}
.bot ul { padding-left: 20px; margin: 6px 0; list-style-type: none; }
.bot li { font-size: 20px; letter-spacing: 2px; color: #cc88ff; margin: 4px 0; font-family: "Handjet", sans-serif; }
.bot li::before { content: "▸ "; color: #aa00ff; }
.bot strong { color: #fff; font-weight: 700; }
.bot em { color: #aa00ff; font-style: italic; }

#input-container {
    width: 100%; margin: 0; display: flex; gap: 10px;
    border-top: 1px dotted #1a3300; padding-top: 16px;
}
#input-container input {
    flex: 1; background: transparent; border: 1px dotted #48ff00; color: #48ff00;
    font-family: "Handjet", sans-serif; font-size: 20px; padding: 12px 16px;
    outline: none; transition: all 0.3s ease; border-radius: 4px;
}
#input-container input:focus { border-color: #aa00ff; box-shadow: 0 0 10px rgba(170,0,255,0.3); }
#input-container input::placeholder { color: #1a5500; font-family: "Handjet", sans-serif; }
#input-container button {
    background: transparent; border: 1px dotted #48ff00; color: #48ff00;
    font-family: "Handjet", sans-serif; font-size: 18px; letter-spacing: 3px;
    padding: 8px 24px; cursor: pointer; transition: all 0.3s ease; border-radius: 4px;
}
#input-container button:hover { color: #aa00ff; border: 1px dotted #aa00ff; transform: scale(1.02); }

.loading-spinner { animation: pulse 1s infinite; display: inline-block; }

.code-block { background: #0d0d0d; border: 1px dotted #48ff00; border-radius: 4px; margin: 10px 0; overflow-x: auto; }
.code-lang { background: #48ff00; color: #000; font-family: "Handjet", sans-serif; font-size: 13px; letter-spacing: 2px; padding: 2px 10px; display: inline-block; }
.code-block pre { margin: 0; padding: 12px 16px; overflow-x: auto; }
.code-block code { font-family: monospace; font-size: 14px; color: #48ff00; white-space: pre; }
.inline-code { font-family: monospace; font-size: 15px; color: #000; background: #48ff00; padding: 1px 6px; border-radius: 3px; }

#model-selector { margin-top: 8px; }
#model-select {
    background: transparent; border: 1px dotted #48ff00; color: #48ff00;
    font-family: "Handjet", sans-serif; font-size: 15px; letter-spacing: 1px;
    padding: 6px 12px; cursor: pointer; outline: none; width: 100%;
}
#model-select option { background: #000; color: #48ff00; }

#chat-selector { margin-top: 8px; }
#chat-select {
    background: transparent; border: 1px dotted #48ff00; color: #48ff00;
    font-family: "Handjet", sans-serif; font-size: 15px; letter-spacing: 1px;
    padding: 6px 12px; cursor: pointer; outline: none; width: 100%;
}
#chat-select option { background: #000; color: #48ff00; }