* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(160deg, #0a1628 0%, #1a2f4a 40%, #0f3460 100%);
    min-height: 100vh;
    color: #e6edf3;
    -webkit-font-smoothing: antialiased;
    /* 反查看源代码防护：禁止文本选择 */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}
/* 输入框/文本框允许选择 */
input, textarea {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}
a { color: #64b5f6; text-decoration: none; }
a:hover { color: #90caf9; }

/* ===== 登录/注册卡片 ===== */
.card {
    max-width: 420px;
    margin: 6vh auto;
    background: rgba(16, 24, 38, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(100, 181, 246, 0.15);
    border-radius: 20px;
    padding: 40px 32px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.card.wide { max-width: 480px; }
.card h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #e6edf3, #64b5f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.card .sub {
    text-align: center;
    color: #7a8fa8;
    font-size: 13px;
    margin-bottom: 28px;
    letter-spacing: 0.5px;
}
.lock-icon {
    text-align: center;
    font-size: 36px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 12px rgba(100, 181, 246, 0.3));
}

/* Tab 切换 */
.tab-switch {
    display: flex;
    background: rgba(13, 20, 30, 0.6);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 22px;
    border: 1px solid rgba(100, 181, 246, 0.1);
}
.tab-switch button {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #7a8fa8;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .25s ease;
    letter-spacing: 0.5px;
}
.tab-switch button.active {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #fff;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.35);
}
.tab-switch button:not(.active):hover { color: #b0c4de; }

.field { margin-bottom: 18px; }
.field label {
    display: block;
    font-size: 12px;
    color: #7a8fa8;
    margin-bottom: 7px;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.field input {
    width: 100%;
    padding: 13px 15px;
    border-radius: 10px;
    border: 1px solid rgba(100, 181, 246, 0.15);
    background: rgba(13, 20, 30, 0.5);
    color: #e6edf3;
    font-size: 15px;
    outline: none;
    transition: border-color .25s, box-shadow .25s;
}
.field input::placeholder { color: #4a5f78; }
.field input:focus {
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.12);
}
.code-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.code-row input { flex: 1; letter-spacing: 2px; }
.code-row .btn { flex-shrink: 0; }

/* 按钮 */
.btn {
    display: inline-block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s, box-shadow .25s, opacity .2s;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.3);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(26, 115, 232, 0.4); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.small {
    width: auto;
    padding: 10px 18px;
    font-size: 13px;
    white-space: nowrap;
    letter-spacing: 0;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(26, 115, 232, 0.25);
}
.btn.ghost {
    background: rgba(13, 20, 30, 0.4);
    border: 1px solid rgba(100, 181, 246, 0.2);
    color: #9fb2c8;
    box-shadow: none;
}
.btn.ghost:hover { border-color: rgba(100, 181, 246, 0.4); color: #b0c4de; }

.foot {
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: #6a7f98;
    line-height: 1.6;
}
.foot a { font-weight: 500; }
.msg-tip {
    min-height: 20px;
    font-size: 13px;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.5;
}
.msg-tip.ok { color: #4ade80; }
.msg-tip.err { color: #f87171; }

/* 聊天界面 */
.chat-wrap { display: flex; height: 100vh; height: 100dvh; }
.sidebar {
    width: 290px;
    background: rgba(13, 20, 28, 0.95);
    border-right: 1px solid rgba(94, 179, 246, 0.18);
    display: flex;
    flex-direction: column;
}
.sidebar .brand {
    padding: 20px 18px;
    font-size: 17px;
    font-weight: bold;
    letter-spacing: 2px;
    border-bottom: 1px solid #1f2b3a;
}
.sidebar .list { flex: 1; overflow-y: auto; padding: 10px; }
.sidebar .list-title { font-size: 12px; color: #64748b; padding: 8px 8px 4px; }
.user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    position: relative;
    color: inherit;
    text-decoration: none;
}
.user-item:hover { background: #16222f; }
.user-item.active { background: #1a2c40; }
.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c5364, #1a73e8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: bold;
    flex-shrink: 0;
}
.user-item .info { overflow: hidden; }
.user-item .info .name { font-size: 14px; font-weight: bold; }
.user-item .info .desc { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #475569; flex-shrink: 0;
}
.dot.on { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.badge {
    position: absolute;
    right: 10px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #e33e2b;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.main .topbar {
    padding: 14px 22px;
    border-bottom: 1px solid rgba(94, 179, 246, 0.18);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(13, 20, 28, 0.6);
}
.main .topbar .title { font-size: 16px; font-weight: bold; }
.main .topbar .meta { font-size: 12px; color: #64748b; margin-top: 3px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.msgs {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.empty-tip {
    margin: auto;
    text-align: center;
    color: #475569;
    font-size: 14px;
}
.bubble-row { display: flex; margin-bottom: 6px; width: 100%; }
.bubble-row.mine { justify-content: flex-end; }
.bubble {
    max-width: 72%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    white-space: normal;
    min-width: 0;
    width: fit-content;
}
.bubble-row.mine .bubble {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    border-bottom-right-radius: 3px;
}
.bubble-row.theirs .bubble {
    background: #1f2b3a;
    border-bottom-left-radius: 3px;
}
.bubble .t { display: block; font-size: 11px; opacity: .65; margin-top: 4px; }
.input-bar {
    display: flex;
    gap: 12px;
    padding: 16px 22px;
    border-top: 1px solid rgba(94, 179, 246, 0.18);
    background: rgba(13, 20, 28, 0.6);
}
.input-bar textarea {
    flex: 1;
    resize: none;
    height: 46px;
    max-height: 130px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #2d3d52;
    background: #0d141c;
    color: #e6edf3;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}
.input-bar textarea:focus { border-color: #5eb3f6; }
.input-bar .send-btn { width: 110px; }
.input-bar .attach-btn {
    width: 46px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid #2d3d52;
    background: #0d141c;
    color: #9fb2c8;
    font-size: 19px;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.input-bar .attach-btn:hover { border-color: #5eb3f6; color: #5eb3f6; }
.input-bar .attach-btn:disabled { opacity: .45; cursor: not-allowed; }

/* 媒体消息 */
.bubble.has-media {
    padding: 4px;
    background: transparent !important;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.bubble.has-media .t {
    padding: 2px 4px 0;
    margin-top: 2px;
}
.bubble .msg-img {
    max-width: 220px;
    width: auto;
    height: auto;
    min-width: 80px;
    max-height: 260px;
    border-radius: 10px;
    display: block;
    cursor: zoom-in;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
.bubble .msg-video {
    max-width: 220px;
    min-width: 140px;
    max-height: 260px;
    border-radius: 10px;
    display: block;
    background: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 图片灯箱 */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .88);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: zoom-out;
}
.lightbox img {
    max-width: 92vw;
    max-height: 78vh;
    border-radius: 8px;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
.lightbox .lb-name {
    color: #cbd5e1;
    font-size: 13px;
    max-width: 90vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 好友/会话相关 */
.side-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 2px;
}
.side-actions .btn { flex: 1; }
.req-badge {
    background: #e33e2b;
    color: #fff;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}
.user-item .badge { pointer-events: none; }
.list-title-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 4px; }

/* 下拉菜单 */
.menu-wrap { position: relative; }
.menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #16222f;
    border: 1px solid #2d3d52;
    border-radius: 8px;
    min-width: 190px;
    z-index: 60;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.menu.open { display: block; }
.menu a {
    display: block;
    padding: 10px 14px;
    color: #cbd5e1;
    font-size: 13px;
    cursor: pointer;
}
.menu a:hover { background: #1a2c40; }
.menu a.active { color: #5eb3f6; }

/* 上传进度条 */
.upload-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 22px;
    border-top: 1px solid rgba(94, 179, 246, 0.18);
    background: rgba(13, 20, 28, 0.6);
}
.up-track {
    flex: 1;
    height: 6px;
    background: #0d141c;
    border-radius: 3px;
    overflow: hidden;
}
.up-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #1a73e8, #5eb3f6);
    transition: width .2s;
}
.up-text { font-size: 12px; color: #9fb2c8; white-space: nowrap; }

/* 弹窗 */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal {
    width: min(420px, 92vw);
    background: #141d28;
    border: 1px solid #2d3d52;
    border-radius: 12px;
    max-height: 80vh;
    overflow-y: auto;
}
.modal-head {
    padding: 14px 18px;
    font-weight: bold;
    border-bottom: 1px solid #1f2b3a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 1px;
}
.modal-close {
    background: none;
    border: none;
    color: #8b9bb0;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.modal-body { padding: 14px 18px; }
.modal-body .list-title { padding: 12px 0 6px; }
.friend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid #1c2735;
}
.friend-row:last-child { border-bottom: none; }
.friend-row .name { font-size: 14px; }
.friend-row .ops { display: flex; gap: 6px; }
.btn.mini {
    width: auto;
    padding: 5px 12px;
    font-size: 12px;
    letter-spacing: 0;
}
.modal-tip { font-size: 12px; color: #64748b; text-align: center; padding: 8px 0; }

/* 移动端专用控件 */
.mobile-only { display: none; }
.back-btn {
    display: none;
    background: none;
    border: none;
    color: #5eb3f6;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 10px 2px 0;
    text-decoration: none;
}

@media (max-width: 720px) {
    /* 登录/注册卡片 */
    .card {
        margin: 5vh 16px;
        padding: 28px 20px;
    }

    /* 聊天框架：移动端单列切换 */
    .chat-wrap { position: relative; }

    /* 用户端：手机上默认显示联系人列表，点击联系人后切换到聊天视图 */
    .chat-wrap.user-chat .main { display: none; }
    .chat-wrap.user-chat.mobile-open .sidebar { display: none; }
    .chat-wrap.user-chat.mobile-open .main { display: flex; }
    .chat-wrap.user-chat.mobile-open .back-btn { display: inline-block; }

    /* 管理员端：默认显示用户列表，点击用户后切换到聊天视图 */
    .chat-wrap.admin-panel .main { display: none; }
    .chat-wrap.admin-panel.mobile-open .sidebar { display: none; }
    .chat-wrap.admin-panel.mobile-open .main { display: flex; }
    .chat-wrap.admin-panel.mobile-open .back-btn { display: inline-block; }

    /* 通用收紧 */
    .sidebar { width: 100%; }
    .user-item .info .desc { font-size: 11px; }
    .bubble { max-width: 82%; }
    .msgs { padding: 14px; }
    .main .topbar { padding: 12px 14px; }
    .main .topbar .title { font-size: 15px; }
    .main .topbar .meta { font-size: 11px; }
    .input-bar { padding: 10px 12px; gap: 8px; }
    .input-bar textarea { height: 42px; }
    .input-bar .attach-btn { width: 40px; font-size: 17px; }
    .input-bar .send-btn { width: 84px; padding: 10px; letter-spacing: 0; }
    .bubble .msg-img, .bubble .msg-video { max-height: 240px; }
    .mobile-only { display: inline-block; }
}

/* ===== 微信浅色风格（聊天界面） ===== */
.chat-wrap { background: #ededed; color: #1a1a1a; }
.sidebar {
    background: #f7f7f7;
    border-right: 1px solid #e0e0e0;
    color: #1a1a1a;
}
.sidebar .brand { color: #1a1a1a; border-bottom: 1px solid #e0e0e0; }
.sidebar .list-title { color: #8a8a8a; }
.user-item { color: #1a1a1a; }
.user-item:hover { background: #e8e8e8; }
.user-item.active { background: #d9d9d9; }
.user-item .info .name { color: #1a1a1a; }
.user-item .info .desc { color: #8a8a8a; }
.main .topbar { background: #f7f7f7; border-bottom: 1px solid #e0e0e0; }
.main .topbar .title { color: #1a1a1a; }
.main .topbar .meta { color: #8a8a8a; }
.back-btn { color: #1a1a1a; }
.msgs { background: #ededed; }
.empty-tip { color: #b0b0b0; }
.bubble { color: #1a1a1a; }
.bubble-row.mine .bubble { background: #95ec69; color: #1a1a1a; }
.bubble-row.theirs .bubble { background: #ffffff; color: #1a1a1a; }
.bubble .t { color: #9a9a9a; }
.input-bar { background: #f7f7f7; border-top: 1px solid #e0e0e0; }
.input-bar textarea { background: #ffffff; border: 1px solid #d5d5d5; color: #1a1a1a; }
.input-bar textarea:focus { border-color: #07c160; }
.input-bar .attach-btn { background: #ffffff; border: 1px solid #d5d5d5; color: #8a8a8a; }
.input-bar .attach-btn:hover { border-color: #07c160; color: #07c160; }
.send-btn { background: #07c160; letter-spacing: 0; }
.send-btn:hover { opacity: .9; }
.btn.ghost { background: transparent; border: 1px solid #d5d5d5; color: #1a1a1a; }
.btn.ghost:hover { border-color: #07c160; color: #07c160; }
.avatar { color: #fff; }
img.avatar { display: block; object-fit: cover; }
.avatar-wrap { flex-shrink: 0; margin: 0 8px; align-self: flex-end; }
.bubble-row .avatar { object-fit: cover; }
.self-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin: 8px 10px 0;
    border-radius: 8px;
    cursor: pointer;
    border-top: 1px solid #e0e0e0;
}
.self-card:hover { background: #e8e8e8; }
.self-card .info { overflow: hidden; }
.self-card .info .name { font-size: 14px; font-weight: bold; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.self-card .info .desc { font-size: 12px; color: #8a8a8a; }
.profile-avatar { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 18px; }
.profile-avatar .avatar { width: 72px; height: 72px; font-size: 28px; object-fit: cover; }
.sub-name { font-size: 12px; color: #8a8a8a; margin-left: 6px; }
.modal-mask { background: rgba(0, 0, 0, .35); }
.modal { background: #ffffff; border: 1px solid #e0e0e0; color: #1a1a1a; }
.modal-head { border-bottom: 1px solid #f0f0f0; color: #1a1a1a; }
.modal-close { color: #8a8a8a; }
.friend-row { border-bottom: 1px solid #f0f0f0; }
.friend-row .name { color: #1a1a1a; }
.modal-tip { color: #8a8a8a; }
.modal .field label { color: #1a1a1a; }
.modal .field input { background: #ffffff; border: 1px solid #d5d5d5; color: #1a1a1a; }
.modal .field input:focus { border-color: #07c160; }
.modal .field input:disabled { background: #f0f0f0; color: #8a8a8a; }
.code-row input { background: #ffffff; border: 1px solid #d5d5d5; color: #1a1a1a; }
.code-row input:focus { border-color: #07c160; }
.sys-tip {
    text-align: center;
    color: #8a8a8a;
    font-size: 12px;
    margin: 8px 0;
    padding: 2px 0;
    user-select: none;
}
.msg-menu {
    position: fixed;
    z-index: 999;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
    min-width: 110px;
    padding: 4px 0;
}
.msg-menu-item {
    padding: 10px 16px;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
    white-space: nowrap;
}
.msg-menu-item:hover { background: #f0f0f0; }
.msg-menu-item.danger { color: #e74c3c; }
.msg-menu-item.danger:hover { background: #fdf0ef; }
.upload-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 0;
}
.upload-progress-bar {
    flex: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}
.upload-progress-fill {
    height: 100%;
    width: 0;
    background: #07c160;
    border-radius: 2px;
    transition: width .2s ease;
}
.upload-progress-text {
    font-size: 12px;
    color: #8a8a8a;
    white-space: nowrap;
}

/* ===== 输入栏新组件（微信风格） ===== */
.input-bar { position: relative; }
.ib-round {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid #d5d5d5;
    background: #ffffff;
    color: #8a8a8a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, color .2s;
    position: relative;
    padding: 0;
}
.ib-round .ib-svg { width: 48px; height: 48px; display: block; }
.ib-round:hover, .ib-round.active { border-color: #07c160; color: #07c160; }
.ib-round:disabled { opacity: .4; cursor: not-allowed; }
.ib-input {
    flex: 1;
    height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #d5d5d5;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    min-width: 0;
}
.ib-input:focus { border-color: #07c160; }
.ib-input::placeholder { color: transparent; }

/* 语音录制面板 */
.voice-panel {
    position: fixed;
    bottom: 72px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 24px;
    background: #ffffff;
    border: 1px solid #d5d5d5;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
    z-index: 100;
    min-width: 180px;
}
.vp-wave { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
.vp-bar {
    width: 4px;
    background: #07c160;
    border-radius: 2px;
    animation: vp-pulse 0.8s ease-in-out infinite alternate;
}
.vp-bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.vp-bar:nth-child(2) { height: 16px; animation-delay: .15s; }
.vp-bar:nth-child(3) { height: 24px; animation-delay: .3s; }
.vp-bar:nth-child(4) { height: 14px; animation-delay: .45s; }
.vp-bar:nth-child(5) { height: 20px; animation-delay: .6s; }
@keyframes vp-pulse {
    from { transform: scaleY(.4); }
    to { transform: scaleY(1); }
}
.vp-text { font-size: 13px; color: #1a1a1a; min-width: 48px; text-align: center; }

/* 语音取消区（滑到此处取消） */
.vp-cancel-zone {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 34px;
    background: rgba(0, 0, 0, .72);
    border-radius: 14px;
    color: #fff;
    z-index: 150;
    pointer-events: none;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.vp-cancel-ico { font-size: 24px; line-height: 1; }
.vp-cancel-txt { font-size: 13px; opacity: .9; }
.ib-round.slide-cancel { border-color: #e74c3c; color: #e74c3c; }

/* emoji 面板 */
.emoji-panel {
    position: fixed;
    bottom: 72px;
    right: 12px;
    width: min(320px, 85vw);
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #d5d5d5;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
    display: grid;
    grid-template-columns: repeat(auto-fill, 36px);
    gap: 4px;
    align-content: start;
    z-index: 100;
}
.emoji-cell {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    border-radius: 6px;
    transition: background .15s;
    user-select: none;
    -webkit-user-select: none;
}
.emoji-cell:hover { background: #f0f0f0; }

/* 加号面板（网格卡片式） */
.plus-panel {
    position: fixed;
    bottom: 72px;
    right: 12px;
    width: min(360px, 88vw);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 8px;
    background: #ffffff;
    border: 1px solid #d5d5d5;
    border-radius: 12px;
    padding: 18px 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
    z-index: 100;
}
.plus-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    background: none;
    color: #576b95;
    font-size: 13px;
    cursor: pointer;
    transition: transform .12s;
    white-space: nowrap;
}
.plus-card:hover { transform: scale(1.04); }
.pc-ico {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f8fa;
    border-radius: 14px;
    color: #2c2c2c;
}
.plus-card:hover .pc-ico { background: #eef1f5; }

/* 拍摄面板（长按录视频 / 快速点拍照） */
.shoot-panel {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.shoot-preview {
    width: min(480px, 90vw);
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.shoot-preview video { width: 100%; height: 100%; object-fit: cover; }
.shoot-controls { display: flex; flex-direction: row; gap: 24px; align-items: center; }
.shoot-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: transparent;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    touch-action: none;
}
.shoot-shutter-inner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    transition: all .2s;
}
.shoot-btn.recording .shoot-shutter-inner {
    background: #e74c3c;
    transform: scale(.8);
    border-radius: 6px;
}
.shoot-hint { color: #fff; font-size: 13px; text-align: center; }

/* 语音消息气泡 */
.msg-audio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #f7f7f7;
    border-radius: 8px;
    min-width: 80px;
}
.msg-audio-play {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #07c160;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s;
}
.msg-audio-play:hover { background: #05a34f; }
.msg-audio-dur { font-size: 12px; color: #8a8a8a; min-width: 32px; }
.msg-audio audio { display: none; }

/* 移动端新组件适配 */
@media (max-width: 720px) {
    .ib-round { width: 40px; height: 40px; }
    .ib-round .ib-svg { width: 40px; height: 40px; }
    .ib-input { height: 38px; font-size: 13px; }
    .voice-panel, .emoji-panel, .plus-panel { bottom: 58px; }
    .emoji-panel { width: min(280px, 85vw); max-height: 180px; right: 8px; }
    .plus-panel { right: 8px; }
    .plus-panel { width: min(320px, 90vw); }
    .pc-ico { width: 48px; height: 48px; }
    .shoot-preview { width: 95vw; }
}
