/* public/css/board.css */
:root {
    --bg-color: #f8fafc;
    --text-color: #334155;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-hover-shadow: rgba(0,0,0,0.12);
    --slot-bg: #ffffff;
    --slot-empty-bg: #f1f5f9;
    --slot-empty-text: #94a3b8;
    --slot-player-text: #1e293b;
    --header-bg: linear-gradient(135deg, #0f172a, #1e293b);
    --header-text: white;
}

body.dark-mode {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --card-bg: #1e293b;
    --card-border: #334155;
    --card-hover-shadow: rgba(0,0,0,0.4);
    --slot-bg: #0f172a;
    --slot-empty-bg: #1e293b;
    --slot-empty-text: #64748b;
    --slot-player-text: #f8fafc;
    --header-bg: linear-gradient(135deg, #020617, #0f172a);
    --header-text: #f8fafc;
}

body { font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif; background-color: var(--bg-color); color: var(--text-color); margin: 0; padding: 15px 20px; display: flex; flex-direction: column; min-height: 100vh; box-sizing: border-box; transition: background-color 0.3s, color 0.3s; }
header { display: flex; justify-content: space-between; align-items: center; background: var(--header-bg); color: var(--header-text); padding: 18px 25px; border-radius: 16px; margin-bottom: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); flex-wrap: wrap; gap: 15px; }
header h2 { margin: 0; font-size: 1.4rem; letter-spacing: 1px; font-weight: 800; }

.user-profile-container { position: relative; display: inline-block; }
.user-greeting { font-size: 14px; font-weight: bold; background: rgba(255, 255, 255, 0.1); padding: 10px 18px; border-radius: 30px; cursor: pointer; user-select: none; border: 1px solid rgba(255, 255, 255, 0.2); transition: all 0.3s ease; backdrop-filter: blur(5px); }
.user-greeting:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.dropdown-menu { display: none; position: absolute; top: 130%; right: 0; background-color: var(--card-bg); min-width: 220px; box-shadow: 0 15px 40px rgba(0,0,0,0.25); border-radius: 12px; padding: 15px; z-index: 1000; color: var(--text-color); border: 1px solid var(--card-border); }
.dropdown-menu.show { display: block; animation: fadeInDown 0.25s ease-out forwards; }
.dropdown-menu h4 { margin: 0 0 12px 0; color: var(--text-color); font-size: 1rem; text-align: center; }
.reset-btn { width: 100%; padding: 12px; background: var(--slot-empty-bg); color: var(--text-color); border: 1px solid var(--card-border); border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: bold; transition: all 0.2s; }
.reset-btn:hover { filter: brightness(0.9); transform: scale(1.02); }

.status-bar { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: bold; background: rgba(0,0,0,0.3); padding: 8px 16px; border-radius: 20px; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.1); }
.dot { width: 10px; height: 10px; background-color: #10b981; border-radius: 50%; display: inline-block; box-shadow: 0 0 10px #10b981; }

.board-container { display: flex; flex-wrap: wrap; gap: 18px; align-content: flex-start; flex: 1; padding-bottom: 20px; }
.team-card { background: var(--card-bg); border-radius: 16px; width: calc(25% - 14px); min-width: 280px; box-shadow: 0 8px 25px rgba(0,0,0,0.06); display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; transition: transform 0.3s, box-shadow 0.3s; border: 1px solid var(--card-border); }
.team-card:hover { transform: translateY(-6px); box-shadow: 0 15px 35px var(--card-hover-shadow); }
.team-header { background: linear-gradient(135deg, #4f46e5, #3b82f6); color: white; padding: 14px 18px; font-weight: bold; font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.pwd-badge { background: rgba(255,255,255,0.25); padding: 4px 10px; border-radius: 20px; font-size: 0.85rem; font-weight: bold; border: 1px solid rgba(255,255,255,0.4); backdrop-filter: blur(4px); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.slots-list { padding: 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.slot-item { display: flex; align-items: center; background: var(--slot-bg); border: 1px solid var(--card-border); border-radius: 8px; padding: 8px 14px; min-height: 42px; transition: all 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.slot-item:hover { transform: translateX(2px); border-color: #94a3b8; }
.slot-item.is-empty { background: var(--slot-empty-bg); border: 1px dashed var(--card-border); box-shadow: none; }
.slot-item.is-me { background: #ecfdf5; border: 2px solid #10b981; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15); transform: scale(1.02); z-index: 1; }
body.dark-mode .slot-item.is-me { background: #022c22; border: 2px solid #10b981; }
.slot-num { font-weight: bold; width: 32px; color: #94a3b8; font-size: 1rem; }
.slot-req-tag { font-size: 0.75rem; background: var(--slot-empty-bg); color: var(--text-color); padding: 3px 8px; border-radius: 12px; margin-right: 10px; white-space: nowrap; font-weight: bold; border: 1px solid var(--card-border); }
.slot-player { flex: 1; font-weight: bold; color: var(--slot-player-text); display: flex; justify-content: space-between; align-items: center; font-size: 1rem; }
.slot-player.empty-text { color: var(--slot-empty-text); font-weight: normal; font-style: italic; font-size: 0.95rem; }
.slot-item.is-me .slot-player { color: #059669; }
body.dark-mode .slot-item.is-me .slot-player { color: #34d399; }
.me-badge { background: linear-gradient(135deg, #10b981, #059669); color: white; font-size: 0.75rem; padding: 3px 8px; border-radius: 12px; font-weight: bold; box-shadow: 0 3px 8px rgba(16,185,129,0.4); letter-spacing: 0.5px; }

@keyframes fadeInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================================
   以下為原本寫在 board.html 內的懸浮聊天室相關 CSS，已全部合併至此
   ========================================================= */

.lang-switch { display: flex; gap: 8px; margin-right: 15px; }
.lang-btn { background: var(--slot-empty-bg); border: 1px solid var(--card-border); color: var(--text-color); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: bold; transition: 0.2s; }
.lang-btn.active, .lang-btn:hover { background: #3b82f6; color: white; border-color: #3b82f6; }
body.dark-mode .lang-btn { background: #334155; color: #cbd5e1; border-color: #475569; }
body.dark-mode .lang-btn.active, body.dark-mode .lang-btn:hover { background: #3b82f6; color: white; border-color: #3b82f6; }

.chat-toggle-btn { position: fixed; bottom: 20px; right: 20px; background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 8px 20px rgba(59,130,246,0.4); z-index: 9998; font-size: 26px; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.chat-toggle-btn:hover { transform: scale(1.1) translateY(-5px); box-shadow: 0 12px 25px rgba(59,130,246,0.5); }
.unread-badge { background: #ef4444; color: white; font-size: 12px; padding: 2px 6px; border-radius: 12px; position: absolute; top: -5px; right: -5px; font-weight: bold; box-shadow: 0 2px 6px rgba(239,68,68,0.5); display: none; border: 2px solid #fff; }

.floating-chat-wrapper { position: fixed; bottom: 90px; right: 20px; width: 340px; height: 520px; min-width: 280px; min-height: 400px; max-width: 90vw; max-height: 85vh; border-radius: 16px; box-shadow: 0 15px 40px rgba(0,0,0,0.2); z-index: 9999; transition: transform 0.3s, opacity 0.3s; transform-origin: bottom right; overflow: hidden; border: 1px solid rgba(255,255,255,0.4); background: #f8fafc; resize: both; }
.floating-chat-wrapper.closed { transform: scale(0.5); opacity: 0; pointer-events: none; }

.chat-app-container { position: absolute; top: 0; bottom: 0; left: 0; right: 0; display: flex; flex-direction: column; background-color: #f8fafc; overflow: hidden; transition: background-color 0.3s; }
.chat-header { flex: 0 0 auto; background: linear-gradient(135deg, #0f172a, #1e293b); color: white; padding: 14px 24px; font-weight: bold; font-size: 15px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 20px rgba(0,0,0,0.15); z-index: 10; }
.chat-body { flex: 1 1 auto; min-height: 0; padding: 20px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 4px; position: relative; scroll-behavior: smooth; background-color: #f4f7f9; background-image: radial-gradient(#cbd5e1 1px, transparent 1px); background-size: 24px 24px; transition: background-color 0.3s; }
.chat-footer { flex: 0 0 auto; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); padding: 15px 20px; border-top: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 -10px 30px rgba(0,0,0,0.03); z-index: 10; position: relative; transition: background-color 0.3s; }

.loading-msg { text-align: center; color: #3b82f6; font-size: 12px; padding: 10px 0; margin-bottom: 15px; cursor: pointer; font-weight: bold; background: #ffffff; border-radius: 20px; transition: 0.2s; display: none; flex-shrink: 0; border: 1px solid #e2e8f0; box-shadow: 0 2px 5px rgba(0,0,0,0.02); width: fit-content; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.loading-msg:hover { background: #f8fafc; box-shadow: 0 4px 8px rgba(0,0,0,0.05); }

.chat-footer input[type="text"] { flex: 1; padding: 12px 20px; border: 1px solid #cbd5e1; background: #f1f5f9; border-radius: 24px; font-size: 14px; outline: none; transition: all 0.3s; min-width: 0; width: 100%; box-sizing: border-box; }
.chat-footer input[type="text"]:focus { background: #ffffff; border-color: #3b82f6; box-shadow: 0 0 0 4px rgba(59,130,246,0.15); }

.icon-btn { background: none; border: none; font-size: 20px; cursor: pointer; padding: 8px; border-radius: 50%; transition: 0.2s; display: flex; align-items: center; justify-content: center; color: #64748b; }
.icon-btn:hover { background: #f1f5f9; color: #3b82f6; transform: scale(1.1); }
.send-btn { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; border: none; padding: 12px 22px; border-radius: 24px; cursor: pointer; font-weight: bold; font-size: 14px; transition: 0.2s; white-space: nowrap; box-shadow: 0 4px 10px rgba(59,130,246,0.3); }
.send-btn:hover { background: linear-gradient(135deg, #2563eb, #1d4ed8); transform: translateY(-1px); box-shadow: 0 6px 15px rgba(59,130,246,0.4); }

.pin-btn { background: linear-gradient(135deg, #fde047, #facc15); color: #1e293b; border: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: bold; display: flex; align-items: center; gap: 4px; transition: 0.2s; box-shadow: 0 2px 8px rgba(250,204,21,0.3); }
.pin-btn:hover { transform: scale(1.05); }
.close-chat-btn { background: none; border: none; color: #cbd5e1; cursor: pointer; font-size: 16px; margin-left: 8px; transition: 0.2s; }
.close-chat-btn:hover { color: #ef4444; transform: scale(1.2); }

.jump-bottom-btn { position: absolute; bottom: 125px; right: 20px; background: rgba(59,130,246,0.95); color: white; border: none; border-radius: 22px; min-width: 44px; height: 44px; padding: 0 12px; cursor: pointer; display: none; justify-content: center; align-items: center; box-shadow: 0 8px 20px rgba(59,130,246,0.4); z-index: 100; font-size: 16px; font-weight: bold; transition: 0.2s; backdrop-filter: blur(4px); gap: 4px; }
.jump-bottom-btn:hover { background: #2563eb; transform: scale(1.05) translateY(-2px); }
.jump-unread-badge { background: #ef4444; color: white; border-radius: 12px; padding: 2px 8px; font-size: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }

.chat-status-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; display: inline-block; box-shadow: 0 0 10px rgba(239,68,68,0.6); transition: 0.3s; }
.chat-status-text { font-size: 12px; margin-right: 12px; color: #cbd5e1; font-weight: 600; letter-spacing: 0.5px; }

.sys-msg { text-align: center; color: #64748b; font-size: 12px; margin: 12px auto; padding: 6px 16px; background: rgba(255,255,255,0.7); border: 1px solid rgba(0,0,0,0.05); border-radius: 20px; width: fit-content; max-width: 90%; word-break: break-word; font-weight: bold; flex-shrink: 0; box-shadow: 0 2px 5px rgba(0,0,0,0.02); backdrop-filter: blur(4px); animation: popIn 0.3s ease-out; transition: background-color 0.3s, color 0.3s; }

.msg-row { display: flex; flex-direction: column; margin-bottom: 12px; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; width: 100%; box-sizing: border-box; transition: background-color 0.3s; position: relative; }
.msg-row:hover { z-index: 50; }
.msg-row.other { align-items: flex-start; }
.msg-row.me { align-items: flex-end; }

.sender-name-label { font-size: 12px; color: #64748b; margin-bottom: 4px; padding: 0 8px; font-weight: 700; display: flex; align-items: center; gap: 4px; transition: color 0.3s; }
.msg-bubble-group { display: flex; align-items: flex-end; gap: 6px; max-width: 85%; position: relative; }
.msg-time { font-size: 11px; color: #94a3b8; font-weight: 600; user-select: none; margin-bottom: 4px; white-space: nowrap; transition: color 0.3s; }

.msg-item { padding: 12px 16px; border-radius: 20px; font-size: 14.5px; word-wrap: break-word; word-break: break-word; overflow-wrap: anywhere; line-height: 1.5; box-shadow: 0 4px 15px rgba(0,0,0,0.05); position: relative; transition: background-color 0.3s, color 0.3s; }
.msg-item.from-dc { border-left: 4px solid #5865F2; }
.msg-item.from-qq { border-left: 4px solid #12B7F5; }
.msg-item.from-system { border-left: 4px solid #f59e0b; }

.msg-row.other .msg-item { background: #ffffff; color: #1e293b; border-bottom-left-radius: 4px; border: 1px solid #e2e8f0; }
.msg-row.me .msg-item { background: linear-gradient(135deg, #10b981, #059669); color: white; border-bottom-right-radius: 4px; box-shadow: 0 5px 15px rgba(16,185,129,0.25); border: none; }

.msg-img { max-width: 100%; border-radius: 12px; margin-top: 6px; cursor: zoom-in; border: 1px solid rgba(0,0,0,0.1); box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: transform 0.2s; }
.msg-img:hover { transform: scale(1.02); }

.reaction-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.reaction-badge { background: rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.1); border-radius: 12px; padding: 2px 8px; font-size: 11px; cursor: pointer; display: flex; align-items: center; gap: 4px; transition: 0.2s; user-select: none; }
.reaction-badge:hover { background: rgba(0,0,0,0.1); }
.reaction-badge.active { background: rgba(59, 130, 246, 0.15); border-color: #3b82f6; }

.msg-actions { overflow: visible !important; display: flex; gap: 10px; font-size: 12px; opacity: 0; transition: opacity 0.2s, transform 0.2s; position: absolute; bottom: calc(100% + 4px); top: auto; left: 0; background: rgba(255,255,255,0.98); backdrop-filter: blur(5px); padding: 6px 12px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); border: 1px solid #e2e8f0; z-index: 20; }
.msg-actions::before { content: ''; position: absolute; bottom: -10px; top: auto; left: 0; right: 0; height: 10px; background: transparent; }
.msg-row.other .msg-actions { left: auto; right: 0; }

.msg-item:hover .msg-actions { opacity: 1; }
.msg-row.me .msg-item:hover .msg-actions { background: rgba(255,255,255,0.95); }
.action-btn { background: none; border: none; color: #475569; cursor: pointer; padding: 2px; font-weight: bold; transition: 0.2s; }
.action-btn:hover { color: #3b82f6; transform: scale(1.1); }
.action-btn.retract-btn:hover { color: #ef4444; }
.action-btn.fav-btn:hover { color: #f59e0b; }

.emoji-reaction-picker { display: none; position: absolute; bottom: calc(100% + 10px); left: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(5px); padding: 10px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); gap: 6px; z-index: 100; border: 1px solid #e2e8f0; width: 230px; flex-wrap: wrap; justify-content: center; align-items: center; }
.emoji-reaction-picker.show { display: flex; }
.reaction-option { cursor: pointer; font-size: 18px; transition: 0.2s; padding: 4px; display: inline-flex; justify-content: center; align-items: center; border-radius: 8px; }
.reaction-option:hover { transform: scale(1.3); background: rgba(0,0,0,0.05); }
.msg-row.other .emoji-reaction-picker { left: auto; right: 0; }

.reply-target-box { transition: 0.2s; }
.reply-target-box:hover { opacity: 1; filter: brightness(0.9); }

.reply-preview { display: none; width: 100%; background: #e2e8f0; padding: 8px 16px; font-size: 12.5px; color: #475569; position: relative; border-radius: 12px 12px 0 0; margin-bottom: -15px; z-index: 5; box-sizing: border-box; border: 1px solid #cbd5e1; border-bottom: none; transition: background-color 0.3s; }
.reply-close { position: absolute; right: 12px; top: 8px; cursor: pointer; color: #94a3b8; font-weight: bold; font-size: 14px; transition: 0.2s; }
.reply-close:hover { color: #ef4444; transform: scale(1.2); }

#imageViewerOverlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); backdrop-filter: blur(8px); z-index: 10000; justify-content: center; align-items: center; cursor: zoom-out; }
#fullImageViewer { max-width: 95%; max-height: 95%; border-radius: 12px; box-shadow: 0 15px 40px rgba(0,0,0,0.5); object-fit: contain; }

.emoji-picker { display: none; position: absolute; bottom: 120px; left: 20px; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); border: 1px solid #cbd5e1; border-radius: 16px; padding: 12px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); width: 260px; grid-template-columns: repeat(6, 1fr); gap: 8px; z-index: 100; animation: popIn 0.2s ease-out; }
.emoji-picker.show { display: grid; }
.emoji-item { cursor: pointer; font-size: 22px; text-align: center; padding: 6px; border-radius: 10px; transition: 0.2s; display: flex; justify-content: center; align-items: center; }
.emoji-item:hover { background: #f1f5f9; transform: scale(1.15); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.sticker-panel { display: none; position: absolute; bottom: 120px; left: 20px; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); border: 1px solid #cbd5e1; border-radius: 16px; padding: 12px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); width: 290px; height: 320px; z-index: 100; flex-direction: column; animation: popIn 0.2s ease-out; }
.sticker-panel.show { display: flex; }
.sticker-tabs { display: flex; gap: 8px; margin-bottom: 10px; border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; }
.sticker-tab { padding: 4px 12px; cursor: pointer; border-radius: 12px; font-size: 13px; font-weight: bold; color: #64748b; transition: 0.2s; user-select: none; }
.sticker-tab:hover { background: #f1f5f9; }
.sticker-tab.active { background: #3b82f6; color: white; }
.sticker-search-container { width: 100%; display: none; gap: 6px; margin-bottom: 10px; }
.sticker-search-container.show { display: flex; }
.btn-back-category { display: none; background: #94a3b8; color: white; border: none; border-radius: 8px; padding: 0 10px; cursor: pointer; font-size: 16px; font-weight: bold; transition: 0.2s; }
.btn-back-category:hover { background: #64748b; transform: scale(1.05); }
.sticker-search { flex: 1; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; outline: none; background: #f8fafc; transition: 0.3s; box-sizing: border-box; }
.sticker-search:focus { border-color: #3b82f6; background: #ffffff; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.btn-sticker-search { background: #3b82f6; color: white; border: none; border-radius: 8px; padding: 0 12px; cursor: pointer; font-size: 14px; font-weight: bold; transition: 0.2s; }
.btn-sticker-search:hover { background: #2563eb; transform: scale(1.05); }
.sticker-content { flex: 1; overflow-y: auto; display: grid; gap: 8px; align-content: start; }
.sticker-item { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: pointer; transition: 0.2s; border: 1px solid rgba(0,0,0,0.05); background-color: rgba(0,0,0,0.02); }
.sticker-item:hover { transform: scale(1.05); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.no-stickers { grid-column: 1 / -1; text-align: center; font-size: 13px; color: #94a3b8; padding-top: 20px; line-height: 1.6; font-weight: bold; }
.gif-category-card { position: relative; height: 75px; border-radius: 8px; overflow: hidden; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; background-size: cover; background-position: center; border: 1px solid rgba(0,0,0,0.1); }
.gif-category-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.45); transition: 0.2s; }
.gif-category-card:hover::before { background: rgba(0,0,0,0.25); }
.gif-category-card:hover { transform: scale(1.03); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.gif-category-card span { position: relative; color: white; font-weight: bold; font-size: 14px; text-shadow: 0 2px 4px rgba(0,0,0,0.8); z-index: 1; letter-spacing: 0.5px; }

.img-preview-container { display: none; position: absolute; bottom: 130px; left: 20px; background: white; padding: 10px; border-radius: 16px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); border: 1px solid #cbd5e1; z-index: 101; animation: popIn 0.2s ease-out; }
.img-preview-container img { max-width: 180px; max-height: 180px; border-radius: 8px; }
.preview-close { position: absolute; top: -10px; right: -10px; background: #ef4444; color: white; border: none; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: bold; box-shadow: 0 4px 10px rgba(239,68,68,0.4); transition: 0.2s; }
.preview-close:hover { background: #dc2626; transform: scale(1.15); }

.screenshot-hint-container { font-size: 12.5px; color: #ef4444; font-weight: bold; width: 100%; text-align: left; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; background: #fef2f2; border-radius: 10px; padding: 8px 12px; border: 1px solid #fecaca; box-sizing: border-box; transition: all 0.3s; }
.screenshot-hint-container.collapsed { padding: 4px 8px; background: transparent; border-color: transparent; margin-bottom: 0; justify-content: flex-end; }
.screenshot-hint-container.collapsed .hint-text { display: none; }
.screenshot-hint-container kbd { background: white; border: 1px solid #f87171; border-radius: 6px; padding: 2px 6px; font-family: monospace; color: #b91c1c; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.hint-toggle { cursor: pointer; opacity: 0.6; padding: 0 4px; font-size: 14px; user-select: none; transition: 0.2s; }
.hint-toggle:hover { opacity: 1; transform: scale(1.1); }

.mention-menu { display: none; position: absolute; bottom: 100%; left: 20px; background: rgba(255,255,255,0.98); backdrop-filter: blur(10px); border: 1px solid #cbd5e1; border-radius: 12px; box-shadow: 0 15px 35px rgba(0,0,0,0.15); max-height: 220px; overflow-y: auto; z-index: 200; min-width: 160px; flex-direction: column; margin-bottom: 10px; animation: popIn 0.2s ease-out; overflow-x: hidden; }
.mention-item { padding: 10px 14px; font-size: 13.5px; cursor: pointer; color: #1e293b; font-weight: bold; border-bottom: 1px solid #f1f5f9; transition: background 0.1s; }
.mention-item:hover, .mention-item.active { background: #eff6ff; color: #3b82f6; }
.mention-highlight { color: #b45309; font-weight: bold; background: #fef08a; padding: 2px 6px; border-radius: 6px; display: inline-block; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; border: 2px solid transparent; background-clip: padding-box; }

@keyframes popIn { 0% { opacity: 0; transform: translateY(15px) scale(0.97); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes flashHighlight { 0%, 100% { background-color: transparent; } 50% { background-color: rgba(250, 204, 21, 0.4); } }
.highlight-flash { animation: flashHighlight 2s ease-out; border-radius: 8px; }

.toast-notification { position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(15, 23, 42, 0.85); color: #fff; padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: bold; box-shadow: 0 4px 15px rgba(0,0,0,0.25); z-index: 20000; opacity: 0; pointer-events: none; transition: opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); backdrop-filter: blur(6px); white-space: nowrap; }
.toast-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }

body.dark-mode .floating-chat-wrapper, body.dark-mode .chat-app-container { background: #0f172a; border-color: #334155; }
body.dark-mode .chat-body { background-color: #0f172a; background-image: radial-gradient(#334155 1px, transparent 1px); }
body.dark-mode .chat-footer { background: rgba(30, 41, 59, 0.95); border-top-color: #334155; }
body.dark-mode .chat-footer input[type="text"] { background: #1e293b; color: #f8fafc; border-color: #475569; }
body.dark-mode .chat-footer input[type="text"]:focus { background: #0f172a; border-color: #3b82f6; }
body.dark-mode .msg-row.other .msg-item { background: #1e293b; color: #f8fafc; border-color: #334155; }
body.dark-mode .sender-name-label { color: #cbd5e1; }
body.dark-mode .msg-time { color: #64748b; }
body.dark-mode .sys-msg { background: rgba(30, 41, 59, 0.8); color: #cbd5e1; border-color: #475569; }
body.dark-mode .icon-btn { color: #cbd5e1; }
body.dark-mode .icon-btn:hover { background: #334155; color: #60a5fa; }
body.dark-mode .emoji-picker, body.dark-mode .sticker-panel { background: rgba(30, 41, 59, 0.95); border-color: #475569; }
body.dark-mode .emoji-item:hover { background: #334155; }
body.dark-mode .sticker-tabs { border-color: #334155; }
body.dark-mode .sticker-tab { color: #94a3b8; }
body.dark-mode .sticker-tab:hover { background: #1e293b; }
body.dark-mode .sticker-tab.active { background: #3b82f6; color: white; }
body.dark-mode .sticker-search { background: #1e293b; color: #f8fafc; border-color: #475569; }
body.dark-mode .sticker-search:focus { background: #0f172a; border-color: #3b82f6; }
body.dark-mode .btn-back-category { background: #475569; }
body.dark-mode .btn-back-category:hover { background: #334155; }
body.dark-mode .mention-menu { background: rgba(30, 41, 59, 0.98); border-color: #475569; }
body.dark-mode .mention-item { color: #f8fafc; border-bottom-color: #334155; }
body.dark-mode .mention-item:hover, body.dark-mode .mention-item.active { background: #3b82f6; color: white; }
body.dark-mode .reply-preview { background: #1e293b; border-color: #334155; color: #94a3b8; }
body.dark-mode .reply-target-box { background: rgba(255,255,255,0.1) !important; color: #f1f5f9; }
body.dark-mode .reply-target-box:hover { filter: brightness(1.2); }
body.dark-mode .toast-notification { background: rgba(248, 250, 252, 0.9); color: #0f172a; }
body.dark-mode .reaction-badge { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
body.dark-mode .reaction-badge.active { background: rgba(59, 130, 246, 0.3); border-color: #60a5fa; }
body.dark-mode .emoji-reaction-picker { background: rgba(30, 41, 59, 0.95); border-color: #475569; }

@media (max-width: 600px) {
    .floating-chat-wrapper { bottom: 0; right: 0; width: 100% !important; height: 100dvh !important; border-radius: 0; border: none; resize: none; }
    .chat-toggle-btn { bottom: 15px; right: 15px; }
}