 header {
     display: flex;
     align-items: center;
     gap: 10px;
 }

 #app-version {
     font-size: 0.9em;
     color: #f3c9c9;
 }

 .chat-container {
     display: flex;
     flex-direction: column;
     height: 100vh;
     overflow: hidden;
 }

 .history-pane {
     width: 100%;
     background: #e0e0e0;
     /* border-right: 1px solid #ddd; */
     padding: 15px;
     overflow-y: auto;
     /* box-shadow: 2px 0 6px rgba(0, 0, 0, 0.05); */
     height: 100vh;
     padding-bottom: 82px;
 }

 .history-pane h3 {
     margin-top: 0;
     font-size: 1.2em;
     font-weight: 600;
     color: #333;
     width: 100%;
     margin-bottom: 10px;
     border-bottom: 1px solid #80808066;
     padding-bottom: 21px;
 }

 .history-pane ul {
     list-style: none;
     padding: 0;
     margin: 0;
 }


 #clear-input {
     position: absolute !important;
     right: 61px;
     top: 50%;
     transform: translateY(-50%);
     border: none;
     background: transparent;
     cursor: pointer;
     font-size: 16px;
     /* border: 0.2px solid grey; */
     color: red !important;
     border-radius: 7px;
     padding: 1px 0px;
 }

 .history-pane li {
     padding: 10px;
     margin-bottom: 8px;
     cursor: pointer;
     border-radius: 12px;
     background: linear-gradient(90deg, #fbc913a3, #fbdb1400);
     transition: all 0.2s ease;
     box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
 }

 .history-pane li:hover {
     box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
     transform: translateY(-2px);
     font-weight: bold;
 }

 .main-chat {
     flex: 1;
     display: flex;
     flex-direction: column;
     overflow: hidden;
     height: 100%;
     background-image: url('repeat.avif');
     background-repeat: repeat;
     background-size: 350px;
     height: 100vh;
     /* background: orange; */
 }


 @media (max-width: 768px) {
     .history-pane {
         display: none !important;
     }

     #input-area {
         left: -25px !important;
     }

     .hide-mobile, .speed-dial {
         display: none !important;
     }

     #clear-input {
         right: 4px;
         display: none;
     }
 }


 @media (max-width: 668px) {


     .hide-mobile {
         display: none !important;
     }
 }


 input[type="radio"].selected-mode+label {
     background-color: orange;
     color: white;
     border-radius: 4px;
     padding: 2px 6px;
 }

 .loading-dots span {
     display: inline-block;
     width: 8px;
     height: 8px;
     margin: 0 2px;
     background-color: #555;
     border-radius: 50%;
     opacity: 0.3;
     animation: blink 1.4s infinite;
 }

 .loading-dots span:nth-child(1) {
     animation-delay: 0s;
 }

 .loading-dots span:nth-child(2) {
     animation-delay: 0.2s;
 }

 .loading-dots span:nth-child(3) {
     animation-delay: 0.4s;
 }

 @keyframes blink {

     0%,
     80%,
     100% {
         opacity: 0.3;
     }

     40% {
         opacity: 1;
     }
 }

 .timestamp {
     font-size: 0.75em;
     color: #e1cbcb;
     /* margin-top: 4px; */
 }

 .message.bot {
     position: relative;
     padding-bottom: 18px;
 }

 .message.bot .timestamp {
     color: #ccc;
     position: absolute;
     right: 24px;
     bottom: 4px;
     font-size: 0.7em;
     margin-top: 0;
 }

 .copy-btn {
     position: absolute;
     top: -10px;
     right: 24px;
     font-size: 0.65em;
     border: none;
     border-radius: 0px 0px 2px 2px;
     padding: 2px 6px;
     background: #c4c4c4;
     cursor: pointer;
     color: cadetblue;
 }

 .copy-btn:hover {
     background-color: rgba(255, 255, 255, 0.3);
 }

 body.dark-mode {
     background-color: #1e1e1e;
     color: #f0f0f0;
 }

 body.dark-mode header {
     background-color: #333;
     color: #fff;
 }

 body.dark-mode #input-area {
     background-color: #2a2a2a;
 }

 body.dark-mode .message.user {
     color: #fff;
 }

 body.dark-mode .message.bot {
     color: black;
 }

 body.dark-mode #chat-box {
     background-image: url('repeat-dark.png');
     background-repeat: repeat;
     background-size: 350px;
     /* background-color: #2a2a2a; */
 }

 body.dark-mode .history-pane {
     background: #2a2a2a !important;
     color: black;
 }

 body.dark-mode .judul-pane {
     color: #FCA310;
 }


 header {
     background: linear-gradient(90deg, #336699, #009933);
     color: white;
     padding: 10px 20px;
     font-size: 1.5rem;
     font-weight: 600;
     box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
     user-select: none;
     display: flex;
     justify-content: space-between;
     align-items: center;
 }

 header #language-select {
     border-radius: 8px;
     padding: 4px 8px;
     font-size: 0.875rem;
     color: #333;
     border: none;
     outline: none;
 }

 #chat-box {
     flex: 1;
     overflow-y: auto;
     padding: 20px;
     display: flex;
     flex-direction: column;
     gap: 8px;
     -webkit-overflow-scrolling: touch;
     /* smooth scroll di iOS */
     padding-bottom: 80px;
     /* tinggi input area */
 }

 #chat-box::-webkit-scrollbar {
     width: 8px;
 }

 #chat-box::-webkit-scrollbar-track {
     background: #c3cfe2;
     border-radius: 10px;
 }

 #chat-box::-webkit-scrollbar-thumb {
     background: #336699;
     border-radius: 10px;
 }

 .message {
     max-width: 75%;
     padding: 8px 18px;
     border-radius: 25px;
     font-size: 15px;
     line-height: 1.4;
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
     word-wrap: break-word;
     white-space: pre-wrap;
     transition: background-color 0.3s ease;
 }

 .user {
     background: #336699;
     color: white;
     align-self: flex-end;
     border-bottom-right-radius: 4px;
 }

 .user:hover {
     background: orange;
 }

 .bot {
     background: #ffffff;
     color: #333;
     align-self: flex-start;
     border-bottom-left-radius: 4px;
     box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
 }

 #input-area {
     position: fixed;
     bottom: 0;
     left: 0;
     right: 0;
     display: flex;
     align-items: center;
     padding: 8px 20px;
     border-top: 1px solid #d1d9ff;
     background: white;
     box-shadow: 0 -4px 10px rgba(102, 126, 234, 0.1);
     gap: 12px;
     z-index: 100;
 }

 #user-input {
     flex: 1;
     padding: 14px 20px;
     border: 1.8px solid #c3cfe2;
     border-radius: 30px;
     font-size: 16px;
     outline: none;
     margin-left: 5px;
     transition: border-color 0.3s ease;
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
     box-shadow: inset 0 2px 5px rgba(102, 126, 234, 0.1);
 }

 #user-input:focus {
     border-color: #336699;
     box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
 }

 #send-btn {
     background: linear-gradient(135deg, #336699, #009933);
     border: none;
     color: white;
     padding: 14px 24px;
     font-size: 16px;
     border-radius: 30px;
     cursor: pointer;
     box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
     display: flex;
     align-items: center;
     gap: 8px;
     transition: background 0.3s ease, box-shadow 0.3s ease;
     user-select: none;
     position: relative;
     z-index: 1;
 }

 #send-btn:hover {
     background: #009933;
     box-shadow: 0 6px 16px rgba(216, 132, 90, 0.7);
 }



 #emoji-icon {
     width: 24px;
     height: 24px;
     cursor: pointer;
     fill: #336699;
     transition: fill 0.3s ease;
     flex-shrink: 0;
 }

 #emoji-icon:hover {
     fill: #009933;
 }

 .speed-dial {
     position: relative;
     display: flex;
     flex-direction: column-reverse;
     align-items: center;
     margin-right: 8px;
     z-index: 10;
 }

 .speed-dial .menu {
     display: flex;
     margin-left: 8px;
     flex-direction: column;
     margin-bottom: 10px;
     gap: 10px;
     opacity: 0;
     pointer-events: none;
     transform: translateY(10px);
     transition: opacity 0.3s ease, transform 0.3s ease;
     position: absolute;
     bottom: 60px;
     left: 50%;
     transform-origin: bottom center;
     transform: translateX(-50%) translateY(10px);
 }

 .speed-dial.open .menu {
     opacity: 1;
     pointer-events: auto;
     transform: translateX(-50%) translateY(0);
 }

 .speed-dial .menu button {
     width: 36px;
     height: 36px;
     border-radius: 10px;
     border: none;
     background: #336699;
     color: white;
     font-size: 18px;
     cursor: pointer;
     box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
     display: flex;
     align-items: center;
     justify-content: center;
     transition: background-color 0.3s ease;
     user-select: none;
     position: relative;
     padding-right: 50px;
     box-sizing: content-box;
 }

 .speed-dial .menu button:hover {
     background: orange;
 }

 .speed-dial .menu button span.label {
     position: absolute;
     left: 42px;
     top: 50%;
     transform: translateY(-50%);
     background: linear-gradient(135deg, #336699, #009933);
     padding: 2px 6px;
     font-size: 12px;
     border-radius: 8px;
     white-space: nowrap;
     margin-left: 6px;
     opacity: 1;
     pointer-events: auto;
     color: white;
     transition: opacity 0.3s ease;
 }

 .speed-dial .menu button:hover span.label {
     opacity: 1;
 }

 .speed-dial .main-btn {
     width: 44px;
     height: 44px;
     border-radius: 50%;
     border: none;
     color: white;
     font-size: 28px;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: transform 0.3s ease, background-color 0.3s ease;
     user-select: none;
 }

 .bg-utama {
     background: linear-gradient(135deg, #336699, #009933) !important;
     border-color: transparent !important;
 }

 .radius-utama {
     border-radius: 40px !important;
 }

 .select-apa {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     font-size: 17px;
     border: 1px solid;
     border-radius: 10px;
     padding: 0px 20px;
     ;
     background: wheat;
 }



 .speed-dial.open .main-btn {
     transform: rotate(45deg);
 }

 .input-wrapper {
     position: relative;
     display: flex;
     align-items: center;
     width: 100%;
 }

 .input-wrapper input {
     flex: 1;
     padding-right: 60px;
 }

 .input-wrapper #char-counter {
     position: absolute;
     right: 10px;
     font-size: 0.8em;
     color: gray;
     pointer-events: none;
 }

 .typing-indicator {
     font-size: 0.8em;
     color: gray;
     margin-top: 4px;
 }

 .message {
     opacity: 0;
     transform: translateY(20px);
     transition: opacity 0.3s ease, transform 0.3s ease;
 }

 .message.show {
     opacity: 1;
     transform: translateY(0);
 }

 .hover-black:hover {
     color: black !important;
 }

 .speed-dial .menu button {
     transform: scale(0);
     opacity: 0;
     transition: transform 0.3s ease, opacity 0.3s ease;
 }

 .speed-dial.open .menu button {
     transform: scale(1);
     opacity: 1;
 }

 .speed-dial.open .menu button:nth-child(1) {
     transition-delay: 0s;
 }

 .speed-dial.open .menu button:nth-child(2) {
     transition-delay: 0.05s;
 }

 .speed-dial.open .menu button:nth-child(3) {
     transition-delay: 0.1s;
 }

 .speed-dial.open .menu button:nth-child(4) {
     transition-delay: 0.15s;
 }

 .speed-dial.open .menu button:nth-child(5) {
     transition-delay: 0.2s;
 }
