/* @🍮 */
        #chat-room-screen {
            background-size: cover;
            background-position: center;
        }

        #chat-room-screen .content {
            display: flex;
            flex-direction: column;
            padding: 10px;
            padding-bottom: 10px;
            transition: padding-bottom 0.3s ease;
        }

        #chat-room-screen.multi-select-active .content {
            padding-bottom: 70px;
        }

        .message-area {
            flex-grow: 1;
            overflow-y: auto;
            padding: 0 10px;
            scroll-behavior: smooth;
        }

        .message-wrapper {
            display: flex;
            margin-bottom: 12px;
            align-items: flex-start;
            transition: background-color 0.2s;
            flex-direction: column;
        }

        .message-wrapper.group-message {
            margin-bottom: 18px;
        }

        .message-wrapper.sent {
            align-items: flex-end;
        }

        .message-wrapper.received {
            align-items: flex-start;
        }

        .message-wrapper.system-notification {
            align-items: center;
        }

        .message-bubble-row {
            display: flex;
            width: 100%;
            align-items: flex-start;
        }

        .message-wrapper.sent .message-bubble-row {
            flex-direction: row-reverse;
        }

        .message-wrapper.multi-select-selected {
            background-color: rgba(144, 202, 249, 0.2);
            border-radius: var(--border-radius);
        }

        .message-info {
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
        }

        .group-nickname {
            position: absolute;
            top: -15px;
            font-size: 11px;
            color: #888;
            white-space: nowrap;
            width: 70px;
            text-align: center;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .message-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            object-fit: cover;
        }

        .message-time {
            font-size: 9px;
            color: #aaa;
            margin-top: 3px;
        }

        .message-bubble {
            max-width: 260px;
            padding: 8px 12px;
            border-radius: var(--border-radius);
            word-wrap: break-word;
            line-height: 1.4;
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
            margin: 0 8px;
            cursor: pointer;
            font-size: 15px;
        }

        .message-bubble.sent {
            border-bottom-right-radius: 5px;
        }

        .message-bubble.received {
            border-bottom-left-radius: 5px;
        }

        .system-notification-bubble {
            background-color: rgba(200, 200, 200, 0.5);
            color: #666;
            font-size: 12px;
            padding: 4px 10px;
            border-radius: 10px;
            text-align: center;
        }

        .image-bubble {
            max-width: 120px;
            border-radius: var(--border-radius);
            margin: 0 8px;
            padding: 4px;
            background-color: rgba(255, 255, 255, 0.5);
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            cursor: pointer;
        }

        .image-bubble img {
            width: 100%;
            height: auto;
            display: block;
            border-radius: calc(var(--border-radius) - 4px);
        }

        /* @🍮 专属表情包隐形斗篷，干干净净不要包裹 */
        .sticker-bubble {
            max-width: 120px;
            margin: 0 8px;
            padding: 0;
            background-color: transparent;
            box-shadow: none;
            cursor: pointer;
        }

        .sticker-bubble img {
            width: 100%;
            height: auto;
            display: block;
        }


        .message-wrapper.sent .image-bubble {
            border-bottom-right-radius: 5px;
        }

        .message-wrapper.received .image-bubble {
            border-bottom-left-radius: 5px;
        }

        .voice-bubble {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            border-radius: var(--border-radius);
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
            margin: 0 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 90px;
            max-width: 200px;
        }

        .message-wrapper.sent .voice-bubble {
            border-bottom-right-radius: 5px;
            flex-direction: row-reverse;
        }

        .message-wrapper.received .voice-bubble {
            border-bottom-left-radius: 5px;
        }

        .voice-bubble .play-icon {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
        }

        .voice-bubble .duration {
            font-size: 13px;
            margin: 0 8px;
            white-space: nowrap;
        }

        .message-wrapper.sent .play-icon {
            transform: scaleX(-1);
        }

        .voice-transcript {
            font-size: 14px;
            color: #555;
            background-color: rgba(255, 255, 255, 0.7);
            padding: 8px 12px;
            margin-top: 5px;
            margin-left: 54px;
            margin-right: 54px;
            border-radius: 10px;
            line-height: 1.6;
            max-width: calc(100% - 108px);
            display: none;
            /* animation removed to prevent flicker */
        }

        .voice-transcript.active {
            display: block;
        }

        .message-wrapper.sent .voice-transcript {
            align-self: flex-end;
            margin-right: 54px;
            margin-left: auto;
        }

        .message-wrapper.received .voice-transcript {
            align-self: flex-start;
            margin-left: 54px;
            margin-right: auto;
        }

        .pv-card {
            width: 230px;
            aspect-ratio: 1 / 1;
            background-color: #f0f0f0;
            border-radius: var(--border-radius);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            position: relative;
            cursor: pointer;
            margin: 0 8px;
        }

        .message-wrapper.sent .pv-card {
            border-bottom-right-radius: 5px;
        }

        .message-wrapper.received .pv-card {
            border-bottom-left-radius: 5px;
        }

        .pv-card-image-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            transition: opacity 0.5s ease-in-out;
            z-index: 2;
        }

        .pv-card-image-overlay.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .pv-card-content {
            padding: 15px;
            height: 100%;
            overflow-y: auto;
            color: var(--text-color);
            line-height: 1.6;
            font-size: 15px;
            background-color: white;
            position: relative;
            z-index: 1;
        }

        .pv-card-footer {
            background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
            color: white;
            padding: 20px 10px 8px;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 5px;
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            z-index: 3;
            pointer-events: none;
            transition: opacity 0.5s ease-in-out;
        }

        .pv-card-footer.hidden {
            opacity: 0;
        }

        .pv-card-footer svg {
            width: 14px;
            height: 14px;
            fill: white;
            flex-shrink: 0;
        }

        .transfer-card {
            width: 240px;
            background-color: #f39b38; /* 纯正微信橙色 */
            border-radius: 8px;
            margin: 0 8px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            color: #fff;
            box-shadow: 0 1px 3px rgba(0,0,0,0.15);
        }
        .message-wrapper.sent .transfer-card {
            border-bottom-right-radius: 5px;
        }
        .message-wrapper.received .transfer-card {
            border-bottom-left-radius: 5px;
        }
        .transfer-card-body {
            display: flex;
            align-items: center;
            padding: 12px 15px;
            gap: 12px;
        }
        .transfer-icon {
            width: 36px;
            height: 36px;
            background: rgba(255,255,255,0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .transfer-icon svg {
            width: 20px;
            height: 20px;
            fill: #fff;
        }
        .transfer-info {
            flex-grow: 1;
            overflow: hidden;
        }
        .transfer-amount {
            font-size: 16px;
            font-weight: 500;
            margin: 0 0 2px 0;
        }
        .transfer-remark, .transfer-status-text {
            font-size: 12px;
            opacity: 0.85;
            margin: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .transfer-card-footer {
            background-color: #fff;
            color: #aaa;
            font-size: 10px;
            padding: 4px 15px;
        }
        .transfer-card.clickable-transfer {
            cursor: pointer;
        }
        
        .gift-card {
            width: 230px;
            background-color: #fff;
            border: 2px solid #333;
            border-radius: var(--border-radius);
            box-shadow: 4px 4px 0px #ddd;
            padding: 10px;
            display: flex;
            align-items: center;
            cursor: pointer;
            margin: 0 8px;
            position: relative;
            overflow: hidden;
        }

        .message-wrapper.sent .gift-card {
            border-bottom-right-radius: 5px;
        }

        .message-wrapper.received .gift-card {
            border-bottom-left-radius: 5px;
        }

        .gift-card-icon {
            width: 50px;
            height: 50px;
            margin-right: 15px;
            flex-shrink: 0;
        }

        .gift-card-text {
            font-size: 16px;
            font-weight: bold;
            color: #333;
            font-family: 'Comic Sans MS', 'Chalkduster', 'Handwriting', cursive;
        }

        .gift-card-description {
            font-size: 14px;
            color: #555;
            background-color: rgba(240, 240, 240, 0.9);
            padding: 8px 12px;
            margin-top: 5px;
            margin-left: 54px;
            margin-right: 54px;
            border-radius: 10px;
            line-height: 1.6;
            max-width: calc(100% - 108px);
            display: none;
            /* animation removed to prevent flicker */
        }

        .gift-card-description.active {
            display: block;
        }

        .message-wrapper.sent .gift-card-description {
            align-self: flex-end;
            margin-right: 54px;
            margin-left: auto;
        }

        .message-wrapper.received .gift-card-description {
            align-self: flex-start;
            margin-left: 54px;
            margin-right: auto;
        }

        .gift-card-received-stamp {
            position: absolute;
            top: 5px;
            right: 5px;
            font-size: 14px;
            font-weight: bold;
            color: var(--primary-color);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 2px 6px;
            transform: rotate(15deg);
            opacity: 0;
            transition: opacity 0.3s ease;
            font-family: 'Comic Sans MS', 'Chalkduster', 'Handwriting', cursive;
        }

        .gift-card.received .gift-card-received-stamp {
            opacity: 1;
        }

        .typing-indicator {
            text-align: center;
            color: #aaa;
            font-style: italic;
            font-size: 14px;
            padding: 10px 0;
            display: none;
        }

        #sticker-bar {
            flex-shrink: 0;
            padding: 0 10px 5px;
            display: flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(10px);
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            -ms-overflow-style: none;
            gap: 2px;
        }
        #sticker-bar::-webkit-scrollbar {
            display: none;
        }

        .sticker-bar-btn {
            background: none;
            border: none;
            padding: 5px;
            cursor: pointer;
            flex-shrink: 0;
        }

        .sticker-bar-btn svg {
            width: 28px;
            height: 28px;
            fill: #888;
        }

        #sticker-modal {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 35%;
            max-height: 250px;
            background: #f7f7f7;
            border-top-left-radius: 20px;
            border-top-right-radius: 20px;
            box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
            z-index: 25;
            display: none;
            flex-direction: column;
        }

        #sticker-modal.visible {
            display: flex;
            animation: slideUp 0.3s ease-out;
        }

        #sticker-modal .header {
            padding: 10px 15px;
            font-weight: bold;
            color: var(--text-color);
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .sticker-grid {
            flex-grow: 1;
            overflow-y: auto;
            padding: 15px;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
            gap: 15px;
        }

        .sticker-item {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
        }

        .sticker-item img {
            width: 60px;
            height: 60px;
            object-fit: contain;
        }

        .sticker-item span {
            font-size: 12px;
            color: #666;
            margin-top: 5px;
            text-align: center;
        }

        #add-sticker-modal .modal-window {
            max-width: 360px;
        }

        #sticker-preview {
            width: 100px;
            height: 100px;
            border: 2px dashed #ddd;
            border-radius: 10px;
            margin: 0 auto 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #aaa;
            background-color: #f9f9f9;
        }

        #sticker-preview img {
            max-width: 100%;
            max-height: 100%;
        }

        .chat-input-wrapper {
            flex-shrink: 0;
        }

        .message-input-area {
            display: flex;
            align-items: center;
            padding: 10px;
            padding-bottom: calc(10px + env(safe-area-inset-bottom));
            border-top: 1px solid #eee;
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(10px);
            flex-shrink: 0;
            gap: 10px;
            border-bottom-left-radius: var(--phone-corner-radius);
            border-bottom-right-radius: var(--phone-corner-radius);
            overflow: hidden;
        }

        .message-input-area input {
            flex-grow: 1;
            border: none;
            padding: 12px;
            border-radius: 18px;
            background-color: #f0f0f0;
        }

        .message-input-area input:focus {
            outline: none;
        }

        .message-input-area .icon-btn {
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            cursor: pointer;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.2s;
        }

        .message-input-area .icon-btn:disabled {
            background-color: #cccccc;
            cursor: not-allowed;
        }

        .message-input-area .icon-btn svg {
            width: 20px;
            height: 20px;
            fill: currentColor;
        }

        .message-input-area .icon-btn.send-btn {
            font-size: 18px;
        }

        #multi-select-bar {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            display: none;
            justify-content: space-between;
            align-items: center;
            padding: 10px 20px;
            padding-bottom: calc(10px + env(safe-area-inset-bottom));
            border-top: 1px solid #eee;
            z-index: 20;
            border-bottom-left-radius: var(--phone-corner-radius);
            border-bottom-right-radius: var(--phone-corner-radius);
            animation: slideUp 0.3s ease-out;
        }

        #multi-select-bar.visible {
            display: flex;
        }

/* --- @🍮 引用功能专属样式 --- */
#reply-preview-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--primary-color);
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #555;
    /* animation removed to prevent flicker */
    flex-shrink: 0;
}
.reply-preview-content {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}
.reply-preview-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #888;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.message-reply-box {
    font-size: 12px;
    color: #666;
    background-color: rgba(240, 240, 240, 0.8);
    backdrop-filter: blur(5px);
    padding: 6px 10px;
    border-radius: 4px;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* @🍮 永远紧贴气泡，间距只有2px，再也不会被头像撑开了 */
    margin: 2px 8px 0 8px;
}

/* @🍮 独立的外部翻译框样式，拥有自己的容器，但排版完美对齐 */
.bilingual-trans-outer {
    font-size: 12px;
    color: #666;
    background-color: rgba(240, 240, 240, 0.8);
    backdrop-filter: blur(5px);
    padding: 6px 10px;
    border-radius: 4px;
    max-width: 250px;
    margin: 2px 8px 0 8px; /* @🍮 2px间距，和气泡紧紧贴贴 */
    word-wrap: break-word;
    white-space: pre-wrap;
    /* animation removed to prevent flicker */
    cursor: pointer;
}
.bilingual-trans-inner {
    display: block;
    margin-top: 4px;
    font-size: 0.95em;
    opacity: 0.85;
    /* animation removed to prevent flicker */
}

/* @🍮 顶部标题独立布局类 */
.app-header .title-container.title-layout-left {
    position: static;
    transform: none;
    align-items: flex-start;
    flex-grow: 1;
    margin-left: 10px;
}
.app-header .title-container.title-layout-right {
    position: static;
    transform: none;
    align-items: flex-end;
    flex-grow: 1;
    margin-right: 10px;
}

/* @🍮 消息时间戳独立类 */
.timestamp-side {
    font-size: 9px;
    color: #aaa;
    margin: 0 1px 2px 1px;
    align-self: flex-end;
}
.timestamp-bottom {
    font-size: 9px;
    color: #aaa;
    margin-top: 4px;
    padding: 0 6px;
}

/* @🍮 隐藏头像/信息区的独立类 */
.avatar-hidden {
    visibility: hidden;
}
.info-hidden {
    display: none !important;
}


/* @🍮 纯净状态控制类 */
.hidden { display: none !important; }
#chat-room-header-select { display: none; }
#chat-room-header-select.visible { display: flex; }
#reply-preview-box { display: none; }
#reply-preview-box.visible { display: flex; }
.chat-input-wrapper.hidden { display: none; }
.typing-indicator { display: none; }
.typing-indicator.visible { display: block; }
#chat-room-subtitle.hidden { display: none; }
#send-message-btn { display: none !important; }
.message-content-col { display: flex; flex-direction: column; }
.message-content-col.sent { align-items: flex-end; }
.message-content-col.received { align-items: flex-start; }
.bilingual-trans-inner { display: none; }
.bilingual-trans-inner.visible { display: block; }
.bilingual-trans-outer { display: none; }
.bilingual-trans-outer.visible { display: block; }

/* @🍮 撤回消息样式 */
.recalled-content-box {
    margin-top: 8px;
    font-size: 13px;
    color: #888;
    background-color: rgba(240, 240, 240, 0.6);
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 100%;
    word-wrap: break-word;
    /* animation removed to prevent flicker */
}


/* @🍮 平行时空专属样式 */
.theater-message-area { flex-grow: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 15px; }
.theater-message-box { background-color: var(--white-color); border: 1px solid #eee; border-radius: 12px; padding: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); display: flex; flex-direction: column; gap: 10px; }
body.global-dark-mode .theater-message-box { background-color: rgba(40, 40, 40, 0.9); border-color: #333; color: #e0e0e0; }
.theater-message-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; }
body.global-dark-mode .theater-message-header { border-bottom-color: #444; }
.theater-message-sender { display: flex; align-items: center; gap: 10px; }
.theater-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid #eee; }
body.global-dark-mode .theater-avatar { border-color: #333; }
.theater-name { font-weight: 600; font-size: 14px; color: var(--text-color); }
.theater-message-index { font-size: 11px; color: #888; font-weight: bold; background: #f5f5f5; padding: 2px 8px; border-radius: 10px; }
body.global-dark-mode .theater-message-index { background: #333; }
.theater-message-content { font-size: 14px; line-height: 1.6; word-wrap: break-word; white-space: pre-wrap; color: var(--text-color); }


/* @🍮 平行时空小剧场多选样式 */
.theater-message-box.multi-select-selected {
    background-color: rgba(144, 202, 249, 0.2);
    border-color: var(--accent-color);
}
body.global-dark-mode .theater-message-box.multi-select-selected {
    background-color: rgba(144, 202, 249, 0.15);
    border-color: var(--accent-color);
}
#theater-screen.multi-select-active .theater-message-area {
    padding-bottom: 70px;
}


/* @🍮 防溢出魔法：无论输入框多长，都不会挤走旁边的发送键 */
#theater-screen .message-input-area input {
    min-width: 0; 
}

/* @🍮 档案馆列表卡片样式 */
.theater-archive-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.theater-archive-item:hover {
    background-color: #fdf6f8;
}
body.global-dark-mode .theater-archive-item {
    border-bottom-color: #333;
}
body.global-dark-mode .theater-archive-item:hover {
    background-color: #2a2a2a;
}
.theater-archive-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}
.theater-archive-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-grow: 1;
    overflow: hidden;
    gap: 4px;
}
.theater-archive-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.theater-archive-count {
    font-size: 12px;
    color: #888;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}
body.global-dark-mode .theater-archive-title { color: #e0e0e0; }
body.global-dark-mode .theater-archive-count { background: #333; color: #aaa; }


/* @🍮 聊天室专属美化 CSS 文件 */
/* 这个文件专门用来给你随心所欲地修改聊天室的样式！绝对不会影响外面！ */

/* ==========================================
   第一部分：聊天室外部框架 (头部、底部输入区)
   ========================================== */

/* 顶部栏大盒子 */
.cr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
/* 返回键、设置键、取消键 */
.cr-back-btn, .cr-settings-btn, .cr-cancel-btn {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cr-cancel-btn { font-size: 16px; width: auto; padding: 6px 12px; }
.cr-settings-btn img { width: 28px; height: 28px; }

/* 顶部标题区 */
.cr-title-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
/* 标题布局控制 */
.cr-title-box.title-layout-left { position: static; transform: none; align-items: flex-start; flex-grow: 1; margin-left: 10px; }
.cr-title-box.title-layout-right { position: static; transform: none; align-items: flex-end; flex-grow: 1; margin-right: 10px; }
/* 标题文字 */
.cr-title { font-size: 18px; font-weight: 600; color: var(--text-color); margin: 0; }
/* 在线状态小字 */
.cr-subtitle { font-size: 12px; color: #888; display: flex; align-items: center; margin-top: 2px; }

/* 聊天气泡显示的大区域 */
.cr-content {
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 10px;
    padding-bottom: 10px;
    transition: padding-bottom 0.3s ease;
}
#chat-room-screen.multi-select-active .cr-content { padding-bottom: 70px; }

/* 底部输入框总盒子 */
.cr-bottom-wrapper { flex-shrink: 0; }
.cr-bottom-wrapper.hidden { display: none; }

/* 输入框上方的功能栏 (表情/转账等) */
.cr-action-bar {
    padding: 0 10px 5px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 2px;
}
.cr-action-bar::-webkit-scrollbar { display: none; }
.cr-action-btn { background: none; border: none; padding: 5px; cursor: pointer; flex-shrink: 0; }
.cr-action-btn svg { width: 28px; height: 28px; fill: #888; }

/* 引用预览框 */
.cr-reply-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--primary-color);
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #555;
    flex-shrink: 0;
    display: none;
}
.cr-reply-preview.visible { display: flex; }
.cr-reply-content { flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 10px; }
.cr-reply-close { background: none; border: none; font-size: 20px; color: #888; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }

/* 打字输入区 */
.cr-input-box {
    display: flex;
    align-items: center;
    padding: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #eee;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    gap: 10px;
    border-bottom-left-radius: var(--phone-corner-radius);
    border-bottom-right-radius: var(--phone-corner-radius);
    overflow: hidden;
}
.cr-input { flex-grow: 1; border: none; padding: 12px; border-radius: 18px; background-color: #f0f0f0; position: relative; z-index: 10; }
.cr-input:focus { outline: none; }
.cr-input::placeholder { color: #aaa; }

/* 发送键 和 AI回复键 */
.cr-send-btn, .cr-ai-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.cr-send-btn { font-size: 18px; }
.cr-send-btn:disabled, .cr-ai-btn:disabled { background-color: #cccccc; cursor: not-allowed; }
.cr-send-btn svg, .cr-ai-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* 夜间模式适配 (框架部分) */
body.global-dark-mode .cr-header,
body.global-dark-mode .cr-input-box,
body.global-dark-mode .cr-action-bar { background-color: rgba(30, 30, 30, 0.8); }
body.global-dark-mode .cr-header { border-bottom-color: #333; }
body.global-dark-mode .cr-input { background-color: #333; color: #e0e0e0; }
body.global-dark-mode .cr-reply-preview { background-color: rgba(30, 30, 30, 0.85); border-color: #333; color: #ccc; }


/* ==========================================
   第二部分：聊天气泡与特殊卡片清单
   (这些类名已在底层的 style.css 中定义好，你可以在下面添加样式来覆盖它们！)
   ========================================== */

/* 1. 聊天气泡大外壳 */
/* .message-wrapper { } */
/* .message-bubble { } */
/* .message-bubble.sent { } */ /* 我方气泡 */
/* .message-bubble.received { } */ /* 对方气泡 */

/* 2. 特殊卡片 */
/* .transfer-card { } */ /* 转账卡片 */
/* .gift-card { } */ /* 礼物卡片 */
/* .voice-bubble { } */ /* 语音框 */
/* .pv-card { } */ /* 照片视频卡片 */
/* .image-bubble { } */ /* 图片气泡 */
/* .sticker-bubble { } */ /* 表情包透明气泡 */

/* 3. 系统提示与文字 */
/* .system-notification-bubble { } */ /* 灰色小字系统提示 */
/* .recalled-bubble { } */ /* 撤回提示 */
/* .recalled-content-box { } */ /* 撤回查看框 */
/* .voice-transcript { } */ /* 语音转文字框 */

/* 4. 双语与引用 */
/* .bilingual-trans-outer { } */ /* 双语外部翻译框 */
/* .bilingual-trans-inner { } */ /* 双语内部翻译框 */
/* .message-reply-box { } */ /* 气泡底部的引用框 */

/* 5. 正在输入中 */
/* 5. 正在输入中 */
/* .typing-indicator { } */

/* ==========================================
   @🍮 第三部分：底部输入区高级定制专属类
   ========================================== */
/* 【菜单模式】 */
.cr-layout-menu-active .cr-menu-btn { display: flex !important; }
.cr-layout-menu-active #sticker-bar { display: none !important; }
.cr-layout-menu-active.cr-menu-opened #sticker-bar { display: flex !important; }

/* 【表情外置模式】 */
.cr-layout-ext-sticker .cr-external-sticker-btn { display: flex !important; }
.cr-layout-ext-sticker #sticker-toggle-btn { display: none !important; }

/* 【重回内置模式】 */
.cr-layout-int-regen .cr-internal-regen-btn { display: flex !important; z-index: 20; }
.cr-layout-int-regen .cr-input { padding-right: 38px !important; }
.cr-layout-int-regen #regenerate-btn { display: none !important; }

/* 【隐形发送模式 (最右侧暗门)】 */
.cr-layout-invisible-ai { position: relative; }
.cr-layout-invisible-ai .cr-ai-btn { 
    position: absolute !important; 
    right: 10px; 
    top: 10px;
    width: 40px !important;
    opacity: 0 !important; 
    z-index: 100; 
}
.cr-layout-invisible-ai .cr-input {
    padding-right: 48px !important;
}

/* 【隐形菜单模式 (最左侧盲盒)】 */
.cr-layout-invisible-menu { position: relative; }
.cr-layout-invisible-menu .cr-menu-btn { 
    position: absolute !important; 
    display: flex !important;
    left: 10px; 
    top: 10px;
    width: 40px !important;
    opacity: 0 !important; 
    z-index: 100; 
}
.cr-layout-invisible-menu .cr-input {
    padding-left: 48px !important;
}


/* @🍮 拉黑专属样式 */
.blocked-badge {
    color: #ef5350;
    font-size: 10px;
    border: 1px solid #ef5350;
    padding: 0 4px;
    border-radius: 4px;
    margin-left: 5px;
    white-space: nowrap;
}

.blocked-warning {
    color: #ef5350;
    background: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    margin: 0 8px;
    align-self: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.fr-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 260px;
    margin: 0 8px;
    border-top: 4px solid var(--primary-color);
}
.fr-card-header {
    font-weight: bold;
    color: #333;
    font-size: 14px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}
.fr-card-count {
    color: var(--primary-color);
    font-size: 12px;
}
.fr-card-body {
    font-size: 13px;
    color: #555;
    background: #f9f9f9;
    padding: 8px;
    border-radius: 6px;
    line-height: 1.5;
    margin-bottom: 10px;
}
.fr-card-actions {
    display: flex;
    gap: 8px;
}
.fr-card-status {
    text-align: center;
    font-size: 12px;
    color: #888;
    font-weight: bold;
    padding: 5px 0;
}
body.global-dark-mode .fr-card { background: #2a2a2a; border-top-color: var(--primary-color); }
body.global-dark-mode .fr-card-header { color: #e0e0e0; }
body.global-dark-mode .fr-card-body { background: #333; color: #ccc; }

