307 lines
8.9 KiB
CSS
307 lines
8.9 KiB
CSS
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
body {
|
|
background: #1a1a2e;
|
|
color: #e0e0e0;
|
|
font-family: 'Segoe UI', sans-serif;
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
header {
|
|
width: 100%;
|
|
padding: 12px 20px;
|
|
background: #16213e;
|
|
border-bottom: 1px solid #0f3460;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
flex-shrink: 0;
|
|
z-index: 10;
|
|
}
|
|
|
|
header h1 { font-size: 1.1rem; color: #e94560; }
|
|
|
|
#sidebarToggle {
|
|
background: none;
|
|
border: 1px solid #0f3460;
|
|
border-radius: 8px;
|
|
color: #888;
|
|
padding: 4px 10px;
|
|
cursor: pointer;
|
|
font-size: 1rem;
|
|
transition: all 0.2s;
|
|
}
|
|
#sidebarToggle:hover { border-color: #e94560; color: #e94560; }
|
|
|
|
.header-title {
|
|
flex: 1;
|
|
font-size: 0.9rem;
|
|
color: #ccc;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.app-body { display: flex; flex: 1; overflow: hidden; }
|
|
|
|
.sidebar {
|
|
width: 260px;
|
|
background: #16213e;
|
|
border-right: 1px solid #0f3460;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-shrink: 0;
|
|
transition: width 0.25s ease, opacity 0.25s ease;
|
|
overflow: hidden;
|
|
}
|
|
.sidebar.collapsed { width: 0; opacity: 0; pointer-events: none; }
|
|
|
|
.sidebar-header {
|
|
padding: 12px 14px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
border-bottom: 1px solid #0f3460;
|
|
}
|
|
.sidebar-header span {
|
|
font-size: 0.8rem;
|
|
color: #888;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
#newChatBtn {
|
|
background: #e94560;
|
|
border: none;
|
|
border-radius: 8px;
|
|
color: white;
|
|
padding: 5px 12px;
|
|
font-size: 0.8rem;
|
|
cursor: pointer;
|
|
}
|
|
#newChatBtn:hover { background: #c73652; }
|
|
|
|
.session-list { flex: 1; overflow-y: auto; padding: 8px 0; }
|
|
.session-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 9px 14px;
|
|
cursor: pointer;
|
|
border-left: 3px solid transparent;
|
|
}
|
|
.session-item:hover { background: #1a1a2e; }
|
|
.session-item.active { background: #1a1a2e; border-left-color: #e94560; }
|
|
.session-item .s-title { flex: 1; font-size: 0.82rem; color: #ccc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.session-item .s-meta { font-size: 0.7rem; color: #555; }
|
|
.session-item .s-del { background: none; border: none; color: #555; cursor: pointer; opacity: 0; }
|
|
.session-item:hover .s-del { opacity: 1; }
|
|
.session-item .s-del:hover { color: #e94560; }
|
|
|
|
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
|
|
|
|
.persona-bar {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 8px 16px;
|
|
overflow-x: auto;
|
|
border-bottom: 1px solid #0f3460;
|
|
}
|
|
|
|
.persona-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 2px;
|
|
padding: 6px 12px;
|
|
background: #16213e;
|
|
border: 1px solid #0f3460;
|
|
border-radius: 10px;
|
|
cursor: pointer;
|
|
position: relative;
|
|
flex-shrink: 0;
|
|
}
|
|
.persona-card:hover { border-color: #e94560; }
|
|
.persona-card.active { border-color: #e94560; background: #1f1535; }
|
|
.persona-card .emoji { font-size: 1.2rem; }
|
|
.persona-card .pname { font-size: 0.7rem; color: #ccc; }
|
|
.persona-card .del-btn {
|
|
position: absolute; top: -5px; right: -5px;
|
|
width: 14px; height: 14px;
|
|
background: #e94560; border: none; border-radius: 50%;
|
|
color: white; font-size: 0.55rem; cursor: pointer;
|
|
display: none;
|
|
}
|
|
.persona-card .edit-btn {
|
|
position: absolute; top: -5px; left: -5px;
|
|
width: 16px; height: 16px;
|
|
background: #0f3460; border: 1px solid #e94560; border-radius: 50%;
|
|
color: white; font-size: 0.55rem; cursor: pointer;
|
|
display: none; align-items: center; justify-content: center;
|
|
}
|
|
.persona-card:hover .del-btn { display: flex; align-items: center; justify-content: center; }
|
|
.persona-card:hover .edit-btn { display: flex; }
|
|
|
|
.persona-add, .card-import-btn {
|
|
display: flex; flex-direction: column; align-items: center;
|
|
padding: 6px 12px;
|
|
background: transparent;
|
|
border: 1px dashed #0f3460; border-radius: 10px;
|
|
cursor: pointer; color: #555; font-size: 0.7rem;
|
|
flex-shrink: 0;
|
|
}
|
|
.persona-add:hover, .card-import-btn:hover { border-color: #e94560; color: #e94560; }
|
|
|
|
.messages {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
padding: 16px;
|
|
}
|
|
|
|
.message { display: flex; flex-direction: column; max-width: 75%; animation: fadeIn 0.2s ease; }
|
|
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
|
|
.message.user { align-self: flex-end; }
|
|
.message.assistant { align-self: flex-start; }
|
|
|
|
.bubble {
|
|
padding: 10px 14px;
|
|
border-radius: 16px;
|
|
line-height: 1.5;
|
|
font-size: 0.95rem;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
.bubble.typing-active::after { content: '▋'; animation: blink 0.7s infinite; color: #e94560; }
|
|
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
|
|
|
|
.message.user .bubble { background: #0f3460; border-bottom-right-radius: 4px; }
|
|
.message.assistant .bubble { background: #16213e; border: 1px solid #0f3460; border-bottom-left-radius: 4px; }
|
|
|
|
.label { font-size: 0.7rem; color: #888; margin-bottom: 4px; padding: 0 4px; }
|
|
.message.user .label { text-align: right; }
|
|
|
|
.image-prompt-block {
|
|
margin-top: 8px; padding: 8px 12px;
|
|
background: #1a1a2e;
|
|
border: 1px dashed #e94560;
|
|
border-radius: 8px;
|
|
font-size: 0.8rem; color: #e94560;
|
|
}
|
|
.image-prompt-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
|
.image-prompt-block .prompt-text { display: block; color: #aaa; margin-top: 4px; font-style: italic; white-space: pre-wrap; }
|
|
|
|
.copy-prompt-btn, .gen-image-btn {
|
|
background: #0f3460;
|
|
border: 1px solid #e94560;
|
|
border-radius: 6px;
|
|
color: #e94560;
|
|
font-size: 0.7rem;
|
|
padding: 2px 8px;
|
|
cursor: pointer;
|
|
}
|
|
.copy-prompt-btn:hover, .gen-image-btn:hover { background: #e94560; color: white; }
|
|
|
|
.translate-btn {
|
|
align-self: flex-end;
|
|
background: #0f3460;
|
|
border: 1px solid #4a90d9;
|
|
border-radius: 6px;
|
|
color: #4a90d9;
|
|
font-size: 0.7rem;
|
|
padding: 2px 8px;
|
|
cursor: pointer;
|
|
margin-top: 4px;
|
|
}
|
|
.translate-btn:hover { background: #4a90d9; color: white; }
|
|
.translate-btn:disabled { opacity: 0.5; cursor: default; }
|
|
|
|
.chat-image { margin-top: 8px; max-width: 100%; border-radius: 8px; border: 1px solid #0f3460; }
|
|
.image-error { margin-top: 6px; font-size: 0.75rem; color: #888; }
|
|
|
|
.typing {
|
|
align-self: flex-start;
|
|
display: flex; gap: 4px;
|
|
padding: 12px 16px;
|
|
background: #16213e;
|
|
border: 1px solid #0f3460;
|
|
border-radius: 16px;
|
|
}
|
|
.typing span { width: 6px; height: 6px; background: #888; border-radius: 50%; animation: bounce 1.2s infinite; }
|
|
.typing span:nth-child(2) { animation-delay: 0.2s; }
|
|
.typing span:nth-child(3) { animation-delay: 0.4s; }
|
|
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
|
|
|
|
.input-area {
|
|
display: flex; gap: 10px;
|
|
padding: 12px 16px;
|
|
border-top: 1px solid #0f3460;
|
|
}
|
|
|
|
textarea {
|
|
flex: 1;
|
|
background: #16213e;
|
|
border: 1px solid #0f3460;
|
|
border-radius: 12px;
|
|
color: #e0e0e0;
|
|
font-size: 0.95rem;
|
|
padding: 10px 14px;
|
|
resize: none; outline: none;
|
|
font-family: inherit;
|
|
max-height: 120px;
|
|
}
|
|
textarea:focus { border-color: #e94560; }
|
|
|
|
#sendBtn {
|
|
background: #e94560; border: none;
|
|
border-radius: 12px; color: white;
|
|
padding: 0 20px; cursor: pointer;
|
|
}
|
|
#sendBtn:disabled { background: #555; cursor: not-allowed; }
|
|
|
|
#clearBtn {
|
|
background: transparent;
|
|
border: 1px solid #0f3460;
|
|
border-radius: 12px; color: #888;
|
|
padding: 0 14px; cursor: pointer;
|
|
}
|
|
#clearBtn:hover { border-color: #e94560; color: #e94560; }
|
|
|
|
.modal-overlay {
|
|
display: none; position: fixed; inset: 0;
|
|
background: rgba(0,0,0,0.7);
|
|
z-index: 100; align-items: center; justify-content: center;
|
|
}
|
|
.modal-overlay.open { display: flex; }
|
|
|
|
.modal {
|
|
background: #16213e; border: 1px solid #0f3460;
|
|
border-radius: 16px; padding: 24px;
|
|
width: 100%; max-width: 440px;
|
|
display: flex; flex-direction: column; gap: 12px;
|
|
}
|
|
.modal h2 { font-size: 1.1rem; color: #e94560; }
|
|
.modal label { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: #888; }
|
|
.modal input, .modal textarea {
|
|
background: #1a1a2e; border: 1px solid #0f3460;
|
|
border-radius: 8px; color: #e0e0e0;
|
|
padding: 8px 10px; outline: none; font-family: inherit;
|
|
}
|
|
.modal-buttons { display: flex; gap: 8px; justify-content: flex-end; }
|
|
.modal-buttons button { padding: 8px 18px; border-radius: 8px; border: none; cursor: pointer; }
|
|
#modalCancel, #cardModalCancel { background: #0f3460; color: #aaa; }
|
|
#modalSave, #cardModalImport { background: #e94560; color: white; }
|
|
|
|
.empty-state {
|
|
flex: 1; display: flex;
|
|
align-items: center; justify-content: center;
|
|
color: #444; flex-direction: column; gap: 8px;
|
|
}
|
|
.empty-state .big { font-size: 2.5rem; }
|
|
.hidden { display: none !important; }
|