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/* Global & Glow in the Dark Theme */
|
| 2 |
+
body {
|
| 3 |
+
margin: 0;
|
| 4 |
+
padding: 0;
|
| 5 |
+
font-family: Arial, sans-serif;
|
| 6 |
+
background-color: #121212;
|
| 7 |
+
color: #e0e0e0;
|
| 8 |
+
display: flex;
|
| 9 |
+
flex-direction: column;
|
| 10 |
+
height: 100vh;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
/* Header dengan latar gelap dan animasi teks RGB */
|
| 14 |
+
header {
|
| 15 |
+
text-align: center;
|
| 16 |
+
padding: 10px;
|
| 17 |
+
background: #1f1f1f;
|
| 18 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
#header-title {
|
| 22 |
+
font-size: 24px;
|
| 23 |
+
margin: 0;
|
| 24 |
+
animation: rgbRotate 3s linear infinite;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
@keyframes rgbRotate {
|
| 28 |
+
0% { color: #ff0000; }
|
| 29 |
+
33% { color: #00ff00; }
|
| 30 |
+
66% { color: #0000ff; }
|
| 31 |
+
100% { color: #ff0000; }
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
/* Main area untuk chat */
|
| 35 |
+
main {
|
| 36 |
+
flex: 1;
|
| 37 |
+
overflow-y: auto;
|
| 38 |
+
padding: 10px;
|
| 39 |
+
background-color: #000;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
#chat-container {
|
| 43 |
+
display: flex;
|
| 44 |
+
flex-direction: column;
|
| 45 |
+
gap: 10px;
|
| 46 |
+
scroll-behavior: smooth; /* Auto-scroll smooth */
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
/* Style bubble chat */
|
| 50 |
+
.message {
|
| 51 |
+
max-width: 80%;
|
| 52 |
+
padding: 10px;
|
| 53 |
+
border-radius: 15px;
|
| 54 |
+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
| 55 |
+
white-space: pre-wrap; /* Menampilkan newline & whitespace dengan benar */
|
| 56 |
+
word-wrap: break-word;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.message.user {
|
| 60 |
+
align-self: flex-end;
|
| 61 |
+
background-color: #0a84ff;
|
| 62 |
+
color: #fff;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.message.bot {
|
| 66 |
+
align-self: flex-start;
|
| 67 |
+
background-color: #2ecc71;
|
| 68 |
+
color: #fff;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
/* Typing indicator (animasi titik) */
|
| 72 |
+
#typing-indicator {
|
| 73 |
+
display: flex;
|
| 74 |
+
align-items: center;
|
| 75 |
+
gap: 5px;
|
| 76 |
+
padding: 10px;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
#typing-indicator.hidden {
|
| 80 |
+
display: none;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
#typing-indicator .dot {
|
| 84 |
+
width: 8px;
|
| 85 |
+
height: 8px;
|
| 86 |
+
background-color: #fff;
|
| 87 |
+
border-radius: 50%;
|
| 88 |
+
animation: blink 1s infinite;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
#typing-indicator .dot:nth-child(2) {
|
| 92 |
+
animation-delay: 0.2s;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
#typing-indicator .dot:nth-child(3) {
|
| 96 |
+
animation-delay: 0.4s;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
@keyframes blink {
|
| 100 |
+
0%, 100% { opacity: 0.2; }
|
| 101 |
+
50% { opacity: 1; }
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
/* Footer & input field */
|
| 105 |
+
footer {
|
| 106 |
+
padding: 10px;
|
| 107 |
+
background: #1f1f1f;
|
| 108 |
+
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.5);
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
#chat-form {
|
| 112 |
+
display: flex;
|
| 113 |
+
gap: 10px;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
#chat-input {
|
| 117 |
+
flex: 1;
|
| 118 |
+
resize: none;
|
| 119 |
+
padding: 10px;
|
| 120 |
+
border-radius: 10px;
|
| 121 |
+
border: none;
|
| 122 |
+
outline: none;
|
| 123 |
+
font-size: 16px;
|
| 124 |
+
background-color: #333;
|
| 125 |
+
color: #fff;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
#send-button {
|
| 129 |
+
padding: 10px 20px;
|
| 130 |
+
border: none;
|
| 131 |
+
border-radius: 10px;
|
| 132 |
+
background-color: #e91e63;
|
| 133 |
+
color: #fff;
|
| 134 |
+
font-size: 16px;
|
| 135 |
+
cursor: pointer;
|
| 136 |
+
transition: background-color 0.3s ease;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
#send-button:hover {
|
| 140 |
+
background-color: #d81b60;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
#send-button:disabled {
|
| 144 |
+
background-color: #555;
|
| 145 |
+
cursor: not-allowed;
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
/* Responsif untuk mobile */
|
| 149 |
+
@media (max-width: 600px) {
|
| 150 |
+
#header-title {
|
| 151 |
+
font-size: 20px;
|
| 152 |
+
}
|
| 153 |
+
#chat-input {
|
| 154 |
+
font-size: 14px;
|
| 155 |
+
}
|
| 156 |
+
#send-button {
|
| 157 |
+
font-size: 14px;
|
| 158 |
+
}
|
| 159 |
+
}
|