/* --- OVERALL LAYOUT --- */
#ld-chatbot-container, #ld-chatbot-container * { box-sizing: border-box; }
#ld-chatbot-container { display: flex !important; width: 100% !important; max-width: 1200px !important; height: 75vh; min-height: 550px; margin: 20px auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; border: 1px solid #7F4F24; border-radius: 10px; overflow: hidden; background: #1a1a1a; box-shadow: 0 5px 30px rgba(0,0,0,0.2); position: relative; }

/* --- SIDEBAR --- */
#ld-chat-sidebar { width: 260px !important; flex-shrink: 0 !important; background-color: #110101; border-right: 1px solid #7F4F24; display: flex !important; flex-direction: column; position: relative; z-index: 2; }
#ld-sidebar-header { padding: 10px; border-bottom: 1px solid #7F4F24; }
#ld-new-chat-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px 10px; background-color: transparent; border: 1px solid #a1ab29; color: #a1ab29; font-weight: bold; border-radius: 6px; cursor: pointer; transition: all 0.2s ease-in-out; }
#ld-new-chat-btn:hover { background-color: #a1ab29; color: #110101; }
#ld-chat-history-list { flex-grow: 1; overflow-y: auto; padding: 10px; }
.ld-history-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; margin-bottom: 5px; font-size: 14px; border-radius: 6px; cursor: pointer; transition: background-color 0.2s; color: #f0f0f0; word-break: break-word; border: 1px solid #a1ab29; }
.ld-history-item:hover { background-color: #2a2a2a; }
.ld-history-item.active { background-color: #7F4F24; }
.ld-delete-chat-btn { background: none; border: none; color: #999; cursor: pointer; font-size: 18px; padding: 5px; opacity: 0; transition: opacity 0.2s, color 0.2s; }
.ld-history-item:hover .ld-delete-chat-btn { opacity: 1; }
.ld-delete-chat-btn:hover { color: #ff6b6b; }

/* --- MAIN CHAT AREA --- */
#ld-chat-main { flex-grow: 1 !important; width: calc(100% - 260px) !important; position: relative; z-index: 1; display: flex !important; flex-direction: column; }
#ld-chatbox { width: 100%; height: 100%; background-color: #1a1a1a; display: flex; flex-direction: column; }
#ld-chatbox-header { background-color: #110101; color: #f0f0f0; padding: 15px 20px; font-weight: bold; border-bottom: 1px solid #7F4F24; flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; }
.ld-header-logo { display: flex; align-items: center; max-width: 20%; }
.ld-header-logo img { height: 40px; width: auto; }
#ld-chat-title { font-family: 'Poppins'; font-size: 28px; vertical-align: middle; margin: 0px auto; white-space: nowrap; width: 250px; }
#ld-chatbox-body { flex: 1; padding: 24px; overflow-y: auto; color: #f0f0f0; background-color: #1a1a1a; }

/* --- WELCOME SCREEN & ICONS --- */
.ld-welcome-message { text-align: center; padding: 20px; }
.ld-welcome-message p { font-size: 18px; margin-bottom: 30px; }
.sm-home-screen { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; max-width: 500px; margin: 0 auto; }
.sm-platform-btn { background: #2a2a2a; border: 1px solid #7F4F24; border-radius: 8px; padding: 20px 10px; cursor: pointer; font-size: 14px; transition: all 0.3s; color: #f0f0f0; display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: bold; }
.sm-platform-btn:hover { background: #7F4F24; border-color: #d3e637; transform: translateY(-3px); }
.sm-platform-btn svg { width: 32px; height: 32px; fill: #d3e637; }

/* --- MESSAGES & TYPING --- */
.ld-message { margin-bottom: 15px; max-width: 85%; padding: 12px 18px; border-radius: 18px; line-height: 1.5; word-wrap: break-word; }
.ld-user-message { background-color: #d3e637; color: #110101; margin-left: auto; border-bottom-right-radius: 4px; }
.ld-bot-message { background-color: #2a2a2a; color: #f0f0f0; margin-right: auto; border-bottom-left-radius: 4px; border: 1px solid #7F4F24; }
.ld-typing-indicator span { height: 8px; width: 8px; background-color: #7F4F24; border-radius: 50%; display: inline-block; margin: 0 2px; opacity: 0.6; animation: ld-bounce 1s infinite; }
.ld-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.ld-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ld-bounce { 0%, 100% { transform: translateY(0); opacity: 0.6; } 50% { transform: translateY(-5px); opacity: 1; } }

/* --- FOOTER & INPUT --- */
#ld-chatbox-footer { display: flex; padding: 16px; border-top: 1px solid #7F4F24; flex-shrink: 0; }
#ld-user-input { flex: 1; padding: 12px 18px; border: 1px solid #7F4F24; border-radius: 6px; margin-right: 10px; outline: none; background-color: #110101; color: #f0f0f0; transition: border-color 0.3s; }
#ld-user-input:focus { border-color: #d3e637; }
#ld-user-input:disabled { background-color: #2a2a2a; cursor: not-allowed; }
#ld-send-btn { background-color: #d3e637; color: #110101; border: none; border-radius: 6px; padding: 0 20px; cursor: pointer; transition: all 0.3s; font-weight: bold; }
#ld-send-btn:hover { background-color: #c4d633; }
#ld-send-btn:disabled { background-color: #555; cursor: not-allowed; }

/* --- MISC --- */
.ld-loading { padding: 10px 15px; color: #999; text-align: center; }
#ld-chatbox-body::-webkit-scrollbar, #ld-chat-history-list::-webkit-scrollbar { width: 8px; }
#ld-chatbox-body::-webkit-scrollbar-track, #ld-chat-history-list::-webkit-scrollbar-track { background: #110101; }
#ld-chatbox-body::-webkit-scrollbar-thumb, #ld-chat-history-list::-webkit-scrollbar-thumb { background-color: #7F4F24; border-radius: 4px; }