ArchSantara / static /css /chatbot.css
fii00's picture
Update static/css/chatbot.css
d577665 verified
/* --- Color Palette & Fonts from Landing Page --- */
:root {
--dark-bg: #0d1118;
--dark-bg-translucent: rgba(13, 17, 24, 0.8);
--accent: #A11312;
--accent-glow: rgba(161, 19, 18, 0.7);
--light: #F8E6DE;
--light-translucent: rgba(248, 230, 222, 0.7);
--border-color: rgba(248, 230, 222, 0.1);
--bot-msg-bg: rgba(248, 230, 222, 0.05);
--user-msg-bg: rgba(13, 17, 24, 0.5);
}
html {
box-sizing: border-box;
height: 100%;
}
*,
*:before,
*:after {
margin: 0;
padding: 0;
box-sizing: inherit;
}
body {
font-family: 'Inter', sans-serif;
background-color: var(--dark-bg);
color: var(--light);
height: 100%;
overflow: hidden;
display: flex;
}
.font-orbitron {
font-family: 'Orbitron', sans-serif;
}
/* --- Main Layout --- */
#chat-container {
display: flex;
width: 100%;
height: 100%;
transition: margin-left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
/* --- Sidebar --- */
#sidebar {
width: 300px;
flex-shrink: 0;
background-color: #0b0e14;
color: var(--light);
padding: 24px;
display: flex;
flex-direction: column;
transition: margin-left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
overflow-y: auto;
z-index: 10;
border-right: 1px solid var(--border-color);
}
#sidebar.collapsed {
margin-left: -300px;
}
.sidebar-header h5 {
font-family: 'Orbitron', sans-serif;
font-size: 28px;
margin-bottom: 8px;
padding-bottom: 8px;
border-bottom: 2px solid var(--accent);
color: white;
}
.sidebar-header p {
font-size: 14px;
line-height: 1.5;
}
.example-questions {
margin-top: 24px;
}
.example-questions h6 {
font-weight: 600;
font-size: 16px;
margin-bottom: 12px;
color: white;
}
.example-questions ul {
list-style: none;
padding: 0;
}
.example-questions li {
padding: 12px 16px;
margin-bottom: 8px;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
transition: background-color 0.2s ease, color 0.2s ease;
display: flex;
align-items: center;
border: 1px solid transparent;
}
.example-questions li:hover {
background-color: rgba(248, 230, 222, 0.05);
border-color: var(--border-color);
color: white;
}
.example-questions li .material-symbols-rounded {
margin-right: 12px;
font-size: 20px;
opacity: 0.8;
color: var(--accent);
}
/* --- Messenger Area --- */
.msger {
flex-grow: 1;
display: flex;
flex-direction: column;
background-color: var(--dark-bg);
position: relative;
overflow: hidden;
}
.msger::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background-image: url('bg.png'); /* Using the same background as landing page */
background-size: cover;
background-position: center;
background-attachment: fixed;
opacity: 0.05;
z-index: 0;
}
/* --- Header --- */
.msger-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 24px;
border-bottom: 2px solid var(--accent);
background-color: rgba(11, 14, 20, 0.7);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
position: relative;
z-index: 2;
}
.msger-header-title {
flex-grow: 1;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
}
.msger-header-title img {
height: 48px;
width: auto;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: var(--light-translucent);
padding: 8px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s ease, color 0.2s ease;
}
.icon-button:hover {
color: white;
background-color: rgba(248, 230, 222, 0.1);
}
.icon-button .material-symbols-rounded {
font-size: 24px;
}
/* --- Toggle Sidebar Button Animation --- */
#toggleSidebarButton {
width: 44px;
height: 44px;
}
#toggleSidebarButton svg {
height: 2.5em;
transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
#toggleSidebarButton .line {
fill: none;
stroke: var(--light);
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 3;
transition:
stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
#toggleSidebarButton .line-top-bottom {
stroke-dasharray: 12 63;
}
#toggleSidebarButton.open svg {
transform: rotate(-45deg);
}
#toggleSidebarButton.open svg .line-top-bottom {
stroke-dasharray: 20 300;
stroke-dashoffset: -32.42;
}
/* --- Chat Area --- */
.msger-chat {
flex: 1;
overflow-y: auto;
padding: 24px;
position: relative;
z-index: 1;
scroll-behavior: smooth;
}
.msger-chat::-webkit-scrollbar {
width: 8px;
}
.msger-chat::-webkit-scrollbar-track {
background: transparent;
border-radius: 4px;
}
.msger-chat::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.2);
border-radius: 4px;
transition: background-color 0.3s;
}
.msger-chat::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
}
.msger-chat {
scrollbar-width: 12px;
scrollbar-color: rgba(124, 124, 124, 0.132) transparent;
}
.msg {
display: flex;
align-items: flex-end;
margin-bottom: 20px;
}
.msg-img {
width: 40px;
height: 40px;
margin-right: 12px;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
border-radius: 50%;
border: 2px solid var(--border-color);
}
.msg-bubble {
max-width: 75%;
padding: 14px 18px;
border-radius: 18px;
}
.msg-info {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
.msg-info-name {
font-weight: 600;
font-size: 14px;
}
.msg-info-time {
font-size: 12px;
}
.msg-text {
line-height: 1.6;
font-size: 15px;
word-wrap: break-word;
}
.msg-text p, .msg-text ul, .msg-text ol { margin-bottom: 8px; }
.msg-text ul, .msg-text ol { padding-left: 20px; }
.msg-text strong { color: white; font-weight: 600; }
.left-msg .msg-bubble {
background: var(--bot-msg-bg);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--border-color);
border-bottom-left-radius: 4px;
color: var(--light);
}
.left-msg .msg-info-name { color: var(--accent); }
.left-msg .msg-info-time { color: var(--light-translucent); }
.right-msg { flex-direction: row-reverse; }
.right-msg .msg-img { margin: 0 0 0 12px; }
.right-msg .msg-bubble {
background: var(--user-msg-bg);
border: 1px solid var(--border-color);
color: var(--light);
border-bottom-right-radius: 4px;
}
.right-msg .msg-info-name { color: var(--light); }
.right-msg .msg-info-time { color: var(--light-translucent); }
.msg-actions {
display: flex;
gap: 8px;
margin-top: 12px;
}
.msg-actions .action-btn {
background: none;
border: none;
cursor: pointer;
color: var(--light-translucent);
padding: 4px;
transition: color 0.2s ease;
}
.msg-actions .action-btn:hover { color: white; }
/* --- Input Area --- */
.msger-inputarea {
padding: 16px 24px;
border-top: 1px solid var(--border-color);
background: var(--dark-bg-translucent);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
position: relative;
z-index: 2;
}
.input-wrapper {
position: relative;
display: flex;
align-items: center;
gap: 12px;
}
#textInput {
flex-grow: 1;
height: 48px;
padding: 12px 80px 12px 20px;
border: 1px solid var(--border-color);
border-radius: 12px;
background-color: rgba(13, 17, 24, 0.7);
font-size: 15px;
font-family: 'Inter', sans-serif;
color: var(--light);
resize: none;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
max-height: 200px;
overflow-y: auto;
}
#textInput::-webkit-scrollbar { display: none; }
#textInput::placeholder { color: var(--light-translucent); }
#textInput:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-glow);
}
.input-actions {
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
display: flex;
gap: 4px;
}
/* --- Typing Indicator --- */
.typing-indicator span {
width: 8px; height: 8px; margin: 0 2px;
background-color: var(--light-translucent);
border-radius: 50%; display: inline-block;
animation: typing 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing {
0%, 80%, 100% { transform: scale(0); }
40% { transform: scale(1.0); }
}
/* --- Modal --- */
.modal {
display: none; position: fixed; z-index: 1000;
left: 0; top: 0; width: 100%; height: 100%;
background-color: rgba(0,0,0,0.7);
justify-content: center; align-items: center;
}
.modal-content {
background-color: var(--dark-bg);
border: 1px solid var(--border-color);
padding: 24px; width: 90%; max-width: 400px;
border-radius: 12px; text-align: center;
box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.modal-content h3 {
font-family: 'Orbitron', sans-serif;
font-size: 22px; margin-bottom: 12px; color: white;
}
.modal-content p { color: var(--light-translucent); margin-bottom: 24px; }
.modal-actions { display: flex; justify-content: center; gap: 16px; }
.modal-btn {
border: none; padding: 10px 24px; border-radius: 8px;
cursor: pointer; font-weight: 600; transition: all 0.2s ease;
}
#confirmDelete { background-color: var(--accent); color: white; }
#confirmDelete:hover { background-color: #c0392b; }
#cancelDelete { background-color: rgba(248, 230, 222, 0.1); color: var(--light); }
#cancelDelete:hover { background-color: rgba(248, 230, 222, 0.2); }
/* --- Mic Alert --- */
.mic-alert {
display: none;
position: fixed;
top: 50%;
left: 50%;
z-index: 1001;
width: 220px;
height: 220px;
background: rgba(13, 17, 24, 0.9);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-radius: 50%;
text-align: center;
border: 2px solid var(--accent-glow);
box-shadow: 0 0 40px var(--accent-glow);
flex-direction: column;
justify-content: center;
align-items: center;
transition: opacity 0.3s ease, transform 0.3s ease;
opacity: 0;
transform: translate(-50%, -50%) scale(0.9);
}
.mic-alert.visible {
display: flex;
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
.mic-icon-container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 80px;
height: 80px;
background-color: var(--accent);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 0 20px var(--accent-glow);
}
.mic-icon-container .material-symbols-rounded {
font-size: 48px;
color: white;
}
#visualizer {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 200px;
height: 200px;
}
#micStatus {
position: absolute;
bottom: 20px;
font-weight: 500;
color: var(--light);
font-size: 14px;
}
/* --- Responsive Design --- */
@media (max-width: 768px) {
#sidebar {
position: fixed; top: 0; left: 0; height: 100%;
z-index: 200; margin-left: -300px;
}
#sidebar.open { margin-left: 0; }
.sidebar-overlay {
display: none; position: fixed; top: 0; left: 0;
width: 100%; height: 100%;
background: rgba(0,0,0,0.5); z-index: 199;
}
.sidebar-overlay.active { display: block; }
.msg-bubble { max-width: 85%; }
.msger-inputarea { padding: 12px; }
}
/* --- CSS untuk Modal CAPTCHA --- */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
display: none; /* Defaultnya tersembunyi */
justify-content: center;
align-items: center;
z-index: 1000;
}
.modal-content {
background: #252831; /* Sesuaikan dengan warna tema Anda */
padding: 25px;
border-radius: 10px;
text-align: center;
max-width: 400px;
width: 90%;
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
color: #fafbfc;
}
.modal-content h4 {
margin-top: 0;
margin-bottom: 15px;
font-size: 1.2rem;
}
.modal-content p {
margin-bottom: 20px;
font-size: 0.9rem;
line-height: 1.5;
}
#recaptcha-widget-container {
display: flex;
justify-content: center;
margin-bottom: 15px;
}
.modal-content small {
color: #888;
font-size: 0.8rem;
}
.example-question.disabled {
cursor: not-allowed;
opacity: 0.6;
}