/* ===== SEMPI AI助理 深色主题 ===== */
/* 主色 #E1C17B（金）  副色 #41B0F6（蓝） */

.chat-app-wrap {
    background: #16182A;
    color: #C5C9DC;
    font-family: 'Rubik', 'IBM Plex Sans', 'Microsoft YaHei', sans-serif;
    padding: 30px 0 50px;
}
.chat-app-wrap .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}
.chat-app-wrap .chat-card {
    background: #1E2235;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
    overflow: hidden;
    display: flex;
    min-height: 720px;
}

/* ===== 左侧面板 ===== */
.chat-side-panel {
    width: 300px;
    flex-shrink: 0;
    background: #1A1D2E;
    border-right: 1px solid #2A2E45;
    display: flex;
    flex-direction: column;
}
.chat-side-panel .chat-search {
    padding: 14px;
    border-bottom: 1px solid #2A2E45;
}
.chat-side-panel .chat-search input {
    width: 100%;
    background: #232741;
    border: 1px solid #2E3350;
    color: #C5C9DC;
    padding: 9px 12px;
    border-radius: 8px;
    outline: none;
    font-size: 13px;
}
.chat-side-panel .chat-search input::placeholder { color: #6E7492; }

.chat-side-panel .chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    max-height: 660px;
}
.chat-side-panel .chat-list::-webkit-scrollbar { width: 5px; }
.chat-side-panel .chat-list::-webkit-scrollbar-thumb {
    background: #2E3350;
    border-radius: 3px;
}

.chat-side-panel .chat-list h6 {
    color: #6E7492;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 12px 16px 6px;
    margin: 0;
    text-transform: uppercase;
    font-weight: 600;
}
.chat-side-panel .chat-list h6 i {
    float: right;
    color: #E1C17B;
    cursor: pointer;
    font-style: normal;
}
.chat-side-panel .chat-list h6 .badge-mini {
    display: inline-block;
    background: #41B0F6;
    color: #16182A;
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 8px;
    margin-left: 6px;
    font-weight: 700;
    letter-spacing: 0;
}

.chat-side-panel .chat-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.chat-side-panel .chat-list ul li {
    padding: 9px 16px;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9BA1BA;
    font-size: 13px;
}
.chat-side-panel .chat-list ul li:hover { background: #232741; }
.chat-side-panel .chat-list ul li.active { background: #2A2E45; }

.chat-side-panel .chat-list ul li .hash {
    color: #E1C17B;
    font-weight: 600;
}

.chat-side-panel .chat-list ul li .avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #E1C17B;
    color: #16182A;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}
.chat-side-panel .chat-list ul li .avatar.accent { background: #E1C17B; color: #16182A; }
.chat-side-panel .chat-list ul li .avatar.blue { background: #41B0F6; color: #16182A; }
.chat-side-panel .chat-list ul li .avatar img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.chat-side-panel .chat-list ul li .avatar .status {
    position: absolute;
    bottom: 0; right: 0;
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid #1A1D2E;
}
.chat-side-panel .chat-list ul li .avatar .status.online { background: #41B0F6; }
.chat-side-panel .chat-list ul li .avatar .status.offline { background: #6E7492; }

.chat-side-panel .chat-list ul li .meta {
    flex: 1;
    min-width: 0;
}
.chat-side-panel .chat-list ul li .meta .name {
    color: #E3E6F0;
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-side-panel .chat-list ul li .meta .desc {
    color: #7A8299;
    font-size: 11px;
    margin: 2px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 右侧主聊天区 ===== */
.chat-main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1E2235;
    min-width: 0;
}

.chat-main-panel .chat-header {
    padding: 14px 20px;
    border-bottom: 1px solid #2A2E45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.chat-main-panel .chat-header .who {
    display: flex;
    align-items: center;
    gap: 12px;
}
.chat-main-panel .chat-header .who .avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: #E1C17B;
    color: #16182A;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-main-panel .chat-header .who h6 {
    color: #E3E6F0;
    font-size: 14px;
    margin: 0;
    font-weight: 600;
}
.chat-main-panel .chat-header .who span {
    color: #41B0F6;
    font-size: 11px;
}
.chat-main-panel .chat-header .icons i {
    color: #7A8299;
    font-size: 16px;
    margin-left: 14px;
    cursor: pointer;
    font-style: normal;
    transition: color .2s;
}
.chat-main-panel .chat-header .icons i:hover { color: #E1C17B; }

/* 消息区 */
.chat-main-panel .chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px;
    background:
        radial-gradient(circle at 20% 10%, rgba(225,193,123,0.06), transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(65,176,246,0.05), transparent 40%),
        #1E2235;
    min-height: 500px;
    max-height: 620px;
}
.chat-main-panel .chat-body::-webkit-scrollbar { width: 6px; }
.chat-main-panel .chat-body::-webkit-scrollbar-thumb {
    background: #2E3350;
    border-radius: 3px;
}

/* ===== 欢迎屏 ===== */
.chat-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 30px;
    text-align: center;
    min-height: 620px;
    position: relative;
    overflow: hidden;
}
.chat-welcome::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(225,193,123,0.05) 0, transparent 25%),
        radial-gradient(circle at 85% 75%, rgba(65,176,246,0.05) 0, transparent 25%);
    pointer-events: none;
}
.chat-welcome .welcome-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(225, 193, 123, 0.10);
    border: 1px solid rgba(225, 193, 123, 0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    box-shadow: 0 0 40px rgba(225, 193, 123, 0.15);
    position: relative;
    z-index: 1;
}
.chat-welcome .welcome-icon i {
    font-size: 42px;
    color: #E1C17B;
    font-style: normal;
}
.chat-welcome h4 {
    color: #E3E6F0;
    font-size: 22px;
    margin: 0 0 10px;
    font-weight: 600;
    letter-spacing: .5px;
    position: relative;
    z-index: 1;
}
.chat-welcome h4 strong {
    color: #E1C17B;
    font-weight: 700;
}
.chat-welcome .welcome-sub {
    color: #7A8299;
    font-size: 13px;
    margin-bottom: 24px;
    max-width: 520px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.chat-welcome .recent-title {
    color: #7A8299;
    font-size: 11px;
    margin: 18px 0 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.chat-welcome .quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 720px;
    position: relative;
    z-index: 1;
}
.chat-welcome .quick-btns .qbtn {
    background: #232741;
    border: 1px solid #2E3350;
    color: #C5C9DC;
    font-size: 13px;
    padding: 9px 20px;
    border-radius: 22px;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.chat-welcome .quick-btns .qbtn:hover {
    background: rgba(225,193,123,0.12);
    border-color: #E1C17B;
    color: #E1C17B;
    transform: translateY(-1px);
}

.chat-welcome .recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    display: inline-block;
    position: relative;
    z-index: 1;
}
.chat-welcome .recent-list li {
    color: #9BA1BA;
    font-size: 13px;
    padding: 6px 0;
    cursor: pointer;
    transition: color .2s;
}
.chat-welcome .recent-list li i {
    color: #41B0F6;
    margin-right: 10px;
    font-style: normal;
}
.chat-welcome .recent-list li:hover { color: #E1C17B; }

.chat-welcome .welcome-tip {
    margin-top: 24px;
    color: #6E7492;
    font-size: 12px;
    position: relative;
    z-index: 1;
}
.chat-welcome .welcome-tip i {
    color: #E1C17B;
    font-style: normal;
    margin-right: 6px;
}

/* ===== 消息气泡 ===== */
.msg-row {
    display: flex;
    margin-bottom: 16px;
    align-items: flex-start;
    gap: 10px;
    animation: fadeInMsg .3s ease;
}
@keyframes fadeInMsg {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.msg-row.me { flex-direction: row-reverse; }

.msg-row .msg-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #E1C17B;
    color: #16182A;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.msg-row.me .msg-avatar { background: #41B0F6; color: #16182A; }
.msg-row .msg-avatar img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.msg-row .msg-bubble {
    max-width: 72%;
    background: #232741;
    border: 1px solid #2E3350;
    border-radius: 12px 12px 12px 4px;
    padding: 12px 16px;
    color: #C5C9DC;
    font-size: 13px;
    line-height: 1.7;
}
.msg-row.me .msg-bubble {
    background: rgba(65,176,246,0.10);
    border-color: rgba(65,176,246,0.35);
    border-radius: 12px 12px 4px 12px;
    color: #E3E6F0;
}
.msg-row .msg-bubble strong { color: #E1C17B; }
.msg-row.me .msg-bubble strong { color: #41B0F6; }
.msg-row .msg-bubble p { margin: 0 0 6px; }
.msg-row .msg-bubble p:last-child { margin-bottom: 0; }
.msg-row .msg-bubble ul { margin: 4px 0 6px; padding-left: 18px; }
.msg-row .msg-bubble ul li { margin-bottom: 3px; }
.msg-row .msg-bubble .tag {
    display: inline-block;
    background: rgba(225,193,123,0.15);
    color: #E1C17B;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 4px;
}
.msg-row .msg-bubble .tag.blue {
    background: rgba(65,176,246,0.15);
    color: #41B0F6;
}
.msg-row .msg-time {
    display: block;
    color: #6E7492;
    font-size: 10px;
    margin-top: 6px;
    text-align: right;
}

.chat-date-divider {
    text-align: center;
    margin: 18px 0;
}
.chat-date-divider span {
    background: #232741;
    color: #7A8299;
    font-size: 10px;
    padding: 4px 14px;
    border-radius: 10px;
    border: 1px solid #2E3350;
}

/* 正在输入动画 */
.msg-typing .msg-bubble {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 18px;
}
.msg-typing .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #E1C17B;
    animation: typing 1.2s infinite;
}
.msg-typing .dot:nth-child(2) { animation-delay: .2s; }
.msg-typing .dot:nth-child(3) { animation-delay: .4s; }
@keyframes typing {
    0%, 60%, 100% { opacity: .3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

/* ===== 输入区 ===== */
.chat-main-panel .chat-footer {
    padding: 14px 20px;
    border-top: 1px solid #2A2E45;
    background: #1A1D2E;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.chat-main-panel .chat-footer i {
    color: #7A8299;
    font-size: 18px;
    cursor: pointer;
    font-style: normal;
    transition: color .2s;
}
.chat-main-panel .chat-footer i:hover { color: #E1C17B; }
.chat-main-panel .chat-footer input {
    flex: 1;
    background: #232741;
    border: 1px solid #2E3350;
    color: #E3E6F0;
    padding: 10px 14px;
    border-radius: 8px;
    outline: none;
    font-size: 13px;
}
.chat-main-panel .chat-footer input::placeholder { color: #6E7492; }
.chat-main-panel .chat-footer input:focus { border-color: #E1C17B; }
.chat-main-panel .chat-footer .send-btn {
    background: #E1C17B;
    border: none;
    color: #16182A;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .2s;
    font-family: inherit;
}
.chat-main-panel .chat-footer .send-btn:hover { background: #D4B36A; }

/* ===== 响应式 ===== */
@media (max-width: 991px) {
    .chat-app-wrap .chat-card { min-height: 600px; }
    .chat-side-panel { width: 240px; }
    .chat-welcome { min-height: 500px; padding: 30px 15px 20px; }
}
@media (max-width: 767px) {
    .chat-app-wrap .chat-card { flex-direction: column; min-height: 560px; }
    .chat-side-panel { width: 100%; max-height: 220px; }
    .chat-main-panel .chat-body { max-height: 420px; }
    .msg-row .msg-bubble { max-width: 85%; }
    .chat-welcome { min-height: 420px; }
    .chat-welcome .welcome-icon { width: 80px; height: 80px; }
    .chat-welcome .welcome-icon i { font-size: 34px; }
    .chat-welcome h4 { font-size: 18px; }
}
/* ===== 成员聊天模式：头像图片填充 ===== */
.chat-main-panel .chat-header .who .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* 成员模式下的气泡（对方）保持与 AI 气泡一致 */
.msg-row .msg-bubble { word-break: break-word; }

.chat-welcome .welcome-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #E1C17B;              /* 实心金色，与左侧 AI 头像一致 */
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    box-shadow: 0 0 30px rgba(225, 193, 123, 0.35);
    position: relative;
    z-index: 1;
}
.chat-welcome .welcome-icon span {
    font-size: 34px;
    font-weight: 800;
    color: #16182A;                   /* 深色字，与左侧 AI 头像一致 */
    letter-spacing: 1px;
    line-height: 1;
}