/* @🍮 */

:root { --text-image-bg: #ffffff; --text-image-color: #1f1f1f; --screen-width: 332px; --screen-height: 540px; --secondary-bg: #ffffff; --border-color: #e0e0e0; --text-primary: #1f1f1f; --text-secondary: #8a8a8a; --accent-color: #007bff; }
        html { height: 100%; height: 100dvh; overflow: hidden; background-color: #000; }
        /* 隐藏所有元素的滚动条，但依然可以正常滑动 */
        ::-webkit-scrollbar { display: none; width: 0; height: 0; }
        * { -ms-overflow-style: none; scrollbar-width: none; }
        body { height: 100%; height: 100dvh; overflow: hidden; margin: 0; padding: 20px; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-weight: normal; background-color: #dcdcdc; display: flex; justify-content: center; align-items: center; box-sizing: border-box; }
        #phone-frame { padding: 12px; background-color: #fff; border-radius: 50px; box-shadow: 0 20px 50px rgba(0,0,0,0.25), inset 0 2px 4px rgba(0,0,0,0.1); position: relative; }
        .notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 130px; height: 28px; background-color: #1f1f1f; border-radius: 0 0 15px 15px; z-index: 20; }
        #phone-screen { width: var(--screen-width); height: var(--screen-height); background-color: #000; border-radius: 40px; position: relative; overflow: hidden; display: flex; flex-direction: column; border: 2px solid #333; }
        #status-bar { position: absolute; top: 0; left: 0; width: 100%; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; color: white; z-index: 10; font-size: 14px; box-sizing: border-box; pointer-events: none; }
        #status-bar-time { font-weight: 600; }
        #status-bar-battery { font-size: 20px; }
        .screen { width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: flex; flex-direction: column; overflow: hidden; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; background-color: var(--secondary-bg); }
        .screen.active { opacity: 1; visibility: visible; z-index: 1; }
        .header { position: relative; z-index: 15; flex-shrink: 0; padding: 15px 20px; padding-top: 45px; background-color: rgba(247, 247, 247, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: 600; }
        .header .header-actions { display: flex; align-items: center; gap: 15px; }
        .header .back-btn, .header .action-btn { font-size: 24px; cursor: pointer; width: 30px; text-align: center; color: var(--accent-color); display: flex; align-items: center; justify-content: center; }
        .header .action-btn img { height: 26px; }
        .header .save-btn { font-size: 16px; color: var(--accent-color); font-weight: 600; cursor: pointer; }
        #home-screen { display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding: 20px; padding-top: 80px; padding-bottom: 50px; box-sizing: border-box; background-size: cover; background-position: center; }
        #clock-container { text-align: center; color: white; text-shadow: 0 3px 8px rgba(0,0,0,0.4); margin-bottom: 20px; flex-shrink: 0; }
        #main-time { font-size: 80px; font-weight: 200; }
        #main-date { font-size: 18px; font-weight: 500; }
        #app-grid { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; padding: 20px; }
        .app-row { display: flex; justify-content: center; gap: 25px; width: 100%; }
        .app-icon { display: flex; flex-direction: column; align-items: center; cursor: pointer; color: white; text-shadow: 0 1px 3px rgba(0,0,0,0.5); font-size: 14px; font-weight: 500; text-align: center; }
        .app-icon .icon-bg { width: 65px; height: 65px; border-radius: 18px; background-color: var(--secondary-bg); display: flex; justify-content: center; align-items: center; font-size: 32px; margin-bottom: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.15); transition: transform 0.2s ease; overflow: hidden; }
        .app-icon:active .icon-bg { transform: scale(0.9); }
        .app-icon .icon-bg img { width: 100%; height: 100%; object-fit: cover; }
        .app-icon .label { color: white; }
        .form-container, .list-container { padding: 20px; overflow-y: auto; flex-grow: 1; display:flex; flex-direction: column; }
        .form-group { margin-bottom: 20px; }
        .form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-secondary); }
        .form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 16px; box-sizing: border-box; }
        .form-group textarea { min-height: 80px; resize: vertical; }
        #world-book-content-input { height: calc(100% - 40px); }
        .form-button { width: 100%; padding: 15px; background-color: var(--accent-color); color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 10px; }
        .form-button-secondary { background-color: #f0f0f0; color: var(--text-primary); border: 1px solid var(--border-color); }
        #wallpaper-screen .form-container { align-items: center; }
        #wallpaper-preview { flex-shrink: 0; width: 180px; height: 320px; border: 2px dashed var(--border-color); background-color: #f0f2f5; margin-bottom: 20px; background-size: contain; background-repeat: no-repeat; background-position: center; border-radius: 10px; display: flex; justify-content: center; align-items: center; color: var(--text-secondary); }
        #wallpaper-upload-input { display: none; }
        #chat-list, #world-book-list, #statusbar-list { flex-grow: 1; overflow-y: auto; background-color: var(--secondary-bg); padding-top: 80px; margin-top: -80px; }
        .list-item { display: flex; flex-direction: column; padding: 12px 20px; cursor: pointer; border-bottom: 1px solid var(--border-color); }
        .list-item:hover { background-color: #f5f5f5; }
        .list-item .item-title { font-weight: 500; font-size: 16px; margin-bottom: 5px; }
        .list-item .item-content { font-size: 14px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .chat-list-item { display: flex; align-items: center; padding: 10px 15px; cursor: pointer; border-bottom: 1px solid var(--border-color); position: relative; }
        .chat-list-item:hover { background-color: #f5f5f5; }
        .chat-list-item .avatar { width: 45px; height: 45px; border-radius: 50%; margin-right: 12px; object-fit: cover; background-color: #ccc; }
        .chat-list-item .info { flex-grow: 1; overflow: hidden; }
        .chat-list-item .name-line { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
        .chat-list-item .name { font-weight: 500; color: var(--text-primary); }
        .chat-list-item .group-tag { font-size: 10px; color: var(--accent-color); background-color: #e7f3ff; padding: 2px 6px; border-radius: 4px; font-weight: bold; flex-shrink: 0; }
        .chat-list-item .last-msg { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
        #chat-interface-screen { background-size: cover; background-position: center; position: relative; }
        #chat-interface-screen .header .default-controls, #chat-interface-screen .header .selection-controls { display: contents; }
        #chat-interface-screen.selection-mode .default-controls { display: none; }
        #chat-interface-screen:not(.selection-mode) .selection-controls { display: none; }
        #selection-cancel-btn, #selection-delete-btn { font-size: 16px; color: var(--accent-color); cursor: pointer; padding: 5px; }
        #selection-delete-btn { color: #ff3b30; }
        #chat-messages { flex-grow: 1; overflow-y: auto; padding: 10px; padding-top: 80px; margin-top: -80px; display: flex; flex-direction: column; gap: 8px; }
        .message-wrapper { display: flex; flex-direction: column; max-width: 85%; }
        .message-wrapper.user { align-self: flex-end; align-items: flex-end; }
        .message-wrapper.ai { align-self: flex-start; align-items: flex-start; }
        .sender-name { font-size: 11px; color: #666; margin-bottom: 3px; }
        .message-wrapper.ai .sender-name { margin-left: 37px; /* Avatar width (32) + gap (5) */ }
        .message-bubble { display: flex; align-items: flex-start; gap: 5px; position: relative; width: -webkit-fit-content; width: -moz-fit-content; width: fit-content; max-width: 100%; }
        .message-bubble.selected::after { content: '✔'; position: absolute; left: -10px; top: 50%; transform: translateY(-50%); background-color: var(--accent-color); color: white; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }
        .message-bubble.user.selected::after { left: auto; right: -10px; }
        .avatar-group { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; width: 32px; }
        .message-bubble .avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
        .timestamp { font-size: 10px; color: #b0b0b0; }
        .message-bubble .content { padding: 8px 12px; word-break: break-word; line-height: 1.5; font-size: 15px; position: relative; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.6), 0 3px 6px rgba(0,0,0,0.15); border: 1px solid rgba(255, 255, 255, 0.2); transition: background-color 0.3s, color 0.3s; }
        .message-bubble.user { flex-direction: row-reverse; }
        #typing-indicator { align-self: flex-start; display: none; margin: 0 10px 10px; padding: 6px 12px; background-color: rgba(255,255,255,0.7); border-radius: 8px 20px 20px 20px; box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.6), 0 3px 6px rgba(0,0,0,0.15); border: 1px solid rgba(255, 255, 255, 0.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); width: -webkit-fit-content; width: -moz-fit-content; width: fit-content; }
        .typing-dot { display: inline-block; width: 6px; height: 6px; margin: 0 2px; background-color: var(--text-secondary); border-radius: 50%; animation: typing 1.4s infinite ease-in-out both; }
        .typing-dot:nth-child(1) { animation-delay: -0.32s; }
        .typing-dot:nth-child(2) { animation-delay: -0.16s; }
        @keyframes typing { 0%, 80%, 100% { transform: scale(0); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }
        #chat-input-area { flex-shrink: 0; padding: 8px; background-color: rgba(247, 247, 247, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 5px; }
        #chat-input-main-row { display: flex; align-items: flex-end; gap: 8px; width: 100%; }
        #chat-input { flex-grow: 1; border: none; padding: 10px 15px; border-radius: 20px; background-color: var(--secondary-bg); font-size: 16px; max-height: 100px; resize: none; }
        .action-button { border: none; color: white; border-radius: 20px; cursor: pointer; font-weight: 600; font-size: 14px; flex-shrink: 0; }
        #send-btn { background-color: var(--accent-color); height: 40px; padding: 0 15px;}
        .modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.4); display: none; justify-content: center; align-items: center; z-index: 100; }
        .modal.visible { display: flex; }
        .modal-content { width: 90%; max-height: 90%; background-color: white; border-radius: 15px; display: flex; flex-direction: column; }
        .modal-header { padding: 15px; font-weight: 600; border-bottom: 1px solid var(--border-color); text-align: center; }
        .modal-body { padding: 15px; overflow-y: auto; }
        .modal-footer { padding: 15px; border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; }
        .modal-footer button { width: 45%; padding: 12px; border-radius: 8px; border: 1px solid var(--accent-color); cursor: pointer; font-size: 16px; }
        .modal-footer .save { background-color: var(--accent-color); color: white; }
        .modal-footer .cancel { background-color: white; color: var(--accent-color); }
        .avatar-upload { display: flex; align-items: center; gap: 15px; }
        .avatar-upload img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background-color: #eee; }
        .avatar-upload button { padding: 8px 12px; border: 1px solid #ccc; background-color: #f0f0f0; border-radius: 5px; cursor: pointer; }
        .avatar-upload input[type="file"] { display: none; }
        .theme-selector label { display: inline-flex; align-items: center; margin-right: 15px; margin-bottom: 5px; cursor: pointer; }
        #reset-theme-btn { background: none; border: 1px solid #ccc; color: #555; font-size: 12px; padding: 2px 8px; border-radius: 5px; cursor: pointer; margin-left: 10px; }
        #group-members-settings { display: flex; overflow-x: auto; padding-bottom: 10px; gap: 15px; }
        .member-editor { text-align: center; cursor: pointer; }
        .member-editor img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; background-color: #eee; margin-bottom: 5px; }
        .member-editor .member-name { font-size: 12px; }
        #notification-bar { position: absolute; top: 40px; left: 5%; width: 90%; z-index: 500; background-color: rgba(250, 250, 250, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 16px; padding: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 12px; cursor: pointer; transform: translateY(-150%); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); visibility: hidden; }
        #notification-bar.visible { transform: translateY(0); visibility: visible; }
        #notification-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
        #notification-content .name { font-weight: 600; font-size: 15px; color: #000; }
        #notification-content .message { font-size: 14px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
        .sticker-image { max-width: 100px; max-height: 100px; display: block; object-fit: contain; }
        .message-bubble.is-sticker .content { padding: 0; background-color: transparent; box-shadow: none; border: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
        #chat-input-actions-top { display: flex; gap: 8px; padding: 0 5px; }
        .chat-action-icon-btn { font-size: 24px; padding: 0; width: 38px; height: 38px; line-height: 38px; text-align: center; border-radius: 50%; background-color: rgba(255, 255, 255, 0.5); color: var(--text-primary); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); border: 1px solid rgba(0,0,0,0.05); cursor: pointer; display:flex; justify-content:center; align-items:center; }
        #sticker-panel { position: absolute; bottom: 0; left: 0; width: 100%; height: 50%; background-color: rgba(242, 242, 247, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-top: 1px solid var(--border-color); border-radius: 20px 20px 0 0; z-index: 200; display: flex; flex-direction: column; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); visibility: hidden; }
        #sticker-panel.visible { transform: translateY(0); visibility: visible; }
        #sticker-panel-header { padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; border-bottom: 1px solid var(--border-color); }
        #sticker-panel-header .title { font-weight: 600; }
        #sticker-panel-header .panel-btn { font-size: 16px; padding: 5px 10px; cursor: pointer; color: var(--accent-color); }
        #sticker-grid { flex-grow: 1; overflow-y: auto; padding: 15px; display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 15px; }
        .sticker-item { position: relative; aspect-ratio: 1 / 1; background-color: white; border-radius: 10px; background-size: contain; background-repeat: no-repeat; background-position: center; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
        .sticker-item .delete-btn { display: none; position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; background-color: #ff3b30; color: white; border-radius: 50%; text-align: center; line-height: 20px; font-size: 14px; cursor: pointer; border: 2px solid white; }
        #input-actions-wrapper { position: static; display: flex; align-items: flex-end; gap: 8px; flex-shrink: 0; }
        #wait-reply-btn { position: static; bottom: auto; right: auto; width: auto; height: 40px; padding: 0 10px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background-color: rgba(255, 255, 255, 0.6); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: opacity 0.2s, transform 0.1s; cursor: pointer;}
        #wait-reply-btn:hover { opacity: 0.8; }
        #wait-reply-btn:active { transform: scale(0.9); }
        #wait-reply-btn img { height: 22px; display: block; margin: auto; }
        .chat-image { max-width: 100%; border-radius: 10px; display: block; }
        .message-bubble.has-image .content { padding: 5px; }
        #custom-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); display: none; align-items: center; justify-content: center; z-index: 1000; opacity: 0; transition: opacity 0.2s ease-in-out; }
        #custom-modal-overlay.visible { display: flex; opacity: 1; }
        #custom-modal { background-color: #fff; width: 280px; border-radius: 14px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); display: flex; flex-direction: column; transform: scale(0.95); transition: transform 0.2s ease-in-out; }
        #custom-modal-overlay.visible #custom-modal { transform: scale(1); }
        .custom-modal-header { padding: 16px; font-size: 17px; font-weight: 600; text-align: center; }
        .custom-modal-body { padding: 0 16px 16px; text-align: center; font-size: 14px; color: #333; }
        .custom-modal-body p { margin: 0; margin-bottom: 12px; line-height: 1.5; }
        .custom-modal-body input { width: 100%; padding: 8px; border-radius: 6px; border: 1px solid #ccc; font-size: 14px; box-sizing: border-box; }
        .custom-modal-footer { border-top: 1px solid #dbdbdb; display: flex; }
        .custom-modal-footer button { flex: 1; background: none; border: none; padding: 12px; font-size: 17px; cursor: pointer; color: var(--accent-color); }
        .custom-modal-footer button:first-child { border-right: 1px solid #dbdbdb; }
        .custom-modal-footer .confirm-btn { font-weight: 600; }
        .custom-modal-footer .confirm-btn.btn-danger { color: #ff3b30; }
        
        
        .setting-item { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 15px 0; border-top: 1px solid var(--border-color); margin-top: 20px; color: var(--text-primary); font-weight: 500; }
        .switch { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0; }
        .switch input { opacity: 0; width: 0; height: 0; }
        .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
        .slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
        input:checked + .slider { background-color: var(--accent-color); }
        input:checked + .slider:before { transform: translateX(22px); }
        body.hide-frame #phone-frame { padding: 0; border-radius: 0; box-shadow: none; background-color: transparent; }
        body.hide-frame .notch { display: none; }
        body.hide-frame #phone-screen { border: none; border-radius: 0; }
        body.fullscreen-mode { 
    padding: 0 !important; 
    margin: 0 !important; 
    background-color: #000 !important; 
}
        body.fullscreen-mode #phone-frame { 
    padding: 0 !important; 
    margin: 0 !important; 
    width: 100vw !important; 
    height: 100vh !important; 
    height: 100dvh !important; 
    border-radius: 0; 
    box-shadow: none; 
    background-color: transparent; 
    box-sizing: border-box; 
}
        body.fullscreen-mode .notch { display: none; }
        body.fullscreen-mode #phone-screen { width: 100%; height: 100%; border: none; border-radius: 0; background-color: transparent; }
        body.hide-status-bar #status-bar { display: none; }
        /* === 夜间模式样式 === */
        body.dark-mode { --text-image-bg: #000000; --text-image-color: #ffffff; --secondary-bg: #1c1c1e; --border-color: #38383a; --text-primary: #ffffff; --text-secondary: #aaaaaa; background-color: #000000; color: #ffffff; }
        body.dark-mode #phone-frame { background-color: #000000; box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 2px 4px rgba(255,255,255,0.05); }
        body.dark-mode #chat-interface-screen { background-color: #000000 !important; }
        body.dark-mode .header { background-color: rgba(0, 0, 0, 0.9) !important; }
        body.dark-mode #chat-input-area { background-color: rgba(0, 0, 0, 0.9) !important; border-top: 1px solid var(--border-color); }
        body.dark-mode .form-group input, body.dark-mode .form-group select, body.dark-mode .form-group textarea { background-color: #1c1c1e; color: #ffffff; border-color: #38383a; }
        body.dark-mode #chat-input { color: #ffffff; }
        body.dark-mode .list-item:hover, body.dark-mode .chat-list-item:hover, body.dark-mode .preset-item:hover { background-color: #2c2c2e; }
        body.dark-mode .modal-content { background-color: #1c1c1e; color: #ffffff; }
        body.dark-mode .modal-header, body.dark-mode .modal-footer { border-color: #38383a; color: #ffffff; }
        body.dark-mode .modal-footer .cancel { background-color: #1c1c1e; color: #ffffff; }
        body.dark-mode .wb-list-category-header { background-color: #1c1c1e !important; color: #ffffff !important; }
        body.dark-mode .form-button-secondary { background-color: #2c2c2e; color: #ffffff; border-color: #38383a; }
        body.dark-mode #sticker-panel, body.dark-mode #music-playlist-panel { background-color: rgba(0, 0, 0, 0.95); color: #ffffff; }
        body.dark-mode #sticker-panel-header, body.dark-mode .playlist-header { border-bottom: 1px solid var(--border-color); color: #ffffff; }
        body.dark-mode .music-player-window { background-color: rgba(28, 28, 30, 0.9); color: #ffffff; border: 1px solid var(--border-color); box-shadow: 0 8px 32px rgba(0,0,0,0.8); }
        body.dark-mode #music-player-song-title, body.dark-mode #music-player-artist, body.dark-mode .music-controls button, body.dark-mode #music-playlist-btn { color: #ffffff; }
        body.dark-mode .msg-context-menu { background: rgba(28, 28, 30, 0.95); border: 1px solid var(--border-color); }
        body.dark-mode .msg-context-menu-item { color: #ffffff; border-bottom: 1px solid var(--border-color); }
        body.dark-mode .msg-context-menu-item:active { background: rgba(255,255,255,0.05); }
        body.dark-mode .custom-modal-body, body.dark-mode .custom-modal-header { color: #ffffff; }
        body.dark-mode #custom-modal { background-color: #1c1c1e; }
        body.dark-mode .custom-modal-footer { border-color: #38383a; }
        body.dark-mode .custom-modal-footer button { border-color: #38383a; }
        body.dark-mode .chat-action-icon-btn { background-color: rgba(255, 255, 255, 0.1); color: #ffffff; border: 1px solid rgba(255,255,255,0.1); }
        body.dark-mode #wait-reply-btn { background-color: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255,255,255,0.1); color: #ffffff; }
        body.dark-mode .sticker-item { background-color: #2c2c2e; }
        body.dark-mode .multi-select-container { background: #1c1c1e; border-color: #38383a; color: #ffffff; }
        body.dark-mode .message-bubble.ai .content { background-color: #2c2c2e !important; color: #ffffff !important; box-shadow: 0 2px 4px rgba(0,0,0,0.5) !important; border: 1px solid rgba(255,255,255,0.05) !important; }
        body.dark-mode .message-bubble.user .content { background-color: #0a84ff !important; color: #ffffff !important; box-shadow: 0 2px 4px rgba(0,0,0,0.5) !important; border: 1px solid rgba(255,255,255,0.05) !important; }
        body.dark-mode .message-bubble.is-transfer.ai .content, body.dark-mode .message-bubble.is-transfer.user .content { background-color: transparent !important; box-shadow: none !important; border: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
        body.dark-mode #notification-content .name, body.dark-mode #notification-content .message, body.dark-mode .chat-list-item .name, body.dark-mode .list-item .item-title, body.dark-mode .preset-item .persona, body.dark-mode .music-controls button, body.dark-mode #music-time-counter, body.dark-mode #music-player-artist, body.dark-mode .custom-modal-body p, body.dark-mode .setting-item { color: #ffffff !important; }
        body.dark-mode .recalled-text, body.dark-mode .timestamp, body.dark-mode .sender-name { color: #aaaaaa; }
        body.dark-mode .recalled-content-box, body.dark-mode .voice-to-text-box, body.dark-mode #quote-preview-container { background-color: rgba(255,255,255,0.1); color: #ffffff; border-color: rgba(255,255,255,0.1); }
        body.dark-mode .quote-box-out { background-color: rgba(255,255,255,0.1); color: #aaaaaa; }

        
        
        /* === 语音消息样式 === */
        .voice-message-content { display: flex; align-items: center; gap: 5px; user-select: none; font-weight: 500; }
        .voice-to-text-box { display: none; background: rgba(0,0,0,0.05); border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--text-secondary); width: -webkit-fit-content; width: -moz-fit-content; width: fit-content; max-width: 80%; margin-top: 4px; word-break: break-word; border: 1px solid rgba(0,0,0,0.05); }
        .voice-to-text-box.show { display: block; }
        .message-wrapper.user .voice-to-text-box { align-self: flex-end; }
        .message-wrapper.ai .voice-to-text-box { align-self: flex-start; margin-left: 37px; }
        /* === 撤回功能样式 === */
        .recalled-wrapper.selected::before { content: '✔'; position: absolute; left: 10px; top: 6px; background-color: var(--accent-color); color: white; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; z-index: 10; }
        .recalled-text { text-align: center; font-size: 12px; color: var(--text-secondary); margin: 8px 0; cursor: pointer; user-select: none; }
        .recalled-content-box { display: none; background: rgba(0,0,0,0.05); border-radius: 8px; padding: 8px 12px; font-size: 12px; color: var(--text-secondary); width: -webkit-fit-content; width: -moz-fit-content; width: fit-content; max-width: 80%; margin: 0 auto 8px auto; word-break: break-all; border: 1px solid rgba(0,0,0,0.05); }
        .recalled-content-box.show { display: block; }
        
        /* 引用功能样式 */
        #quote-preview-container { display: none; padding: 6px 10px; background: rgba(0,0,0,0.05); border-radius: 8px; font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; position: relative; border-left: 3px solid var(--accent-color); flex-shrink: 0; }
        #quote-preview-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 20px; font-weight: 500;}
        #cancel-quote-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); cursor: pointer; font-size: 16px; font-weight: bold; color: var(--text-secondary); padding: 5px; }
        .quote-box-out { margin-top: 4px; padding: 4px 10px; background: rgba(0,0,0,0.04); border-left: none; border-radius: 6px; font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; width: -webkit-fit-content; width: -moz-fit-content; width: fit-content; }
        .message-wrapper.ai .quote-box-out { margin-left: 37px; }
        .message-wrapper.user .quote-box-out { margin-right: 37px; border-left: none; border-right: none; text-align: right; }
        .msg-context-menu { position: absolute; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); border: 1px solid rgba(0,0,0,0.05); z-index: 1000; display: flex; flex-direction: column; overflow: hidden; transform: scale(0.9); opacity: 0; transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-origin: top left; pointer-events: none; }
        .msg-context-menu.show { transform: scale(1); opacity: 1; pointer-events: auto; }
        .msg-context-menu-item { padding: 12px 24px; font-size: 15px; color: var(--text-primary); cursor: pointer; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(0,0,0,0.05); }
        .msg-context-menu-item:last-child { border-bottom: none; }
        .msg-context-menu-item:active { background: rgba(0,0,0,0.05); }
        /* === 气泡主题样式 === */
        .message-bubble.user .content { background-color: rgba(160, 233, 86, 0.75); color: #1a3d00; border-radius: 20px 8px 20px 20px; }
        .message-bubble.ai .content { background-color: rgba(255, 255, 255, 0.7); color: var(--text-primary); border-radius: 8px 20px 20px 20px; }
        #chat-messages[data-theme="pink_blue"] .message-bubble.user .content { background-color: #FADADD; color: #5D3A3A; }
        #chat-messages[data-theme="pink_blue"] .message-bubble.ai .content { background-color: #D6EAF8; color: #283747; }
        #chat-messages[data-theme="blue_white"] .message-bubble.user .content { background-color: #cce5ff; color: #004085; }
        #chat-messages[data-theme="blue_white"] .message-bubble.ai .content { background-color: #f8f9fa; color: #383d41; }
        #chat-messages[data-theme="purple_yellow"] .message-bubble.user .content { background-color: #E6E6FA; color: #4B0082; }
        #chat-messages[data-theme="purple_yellow"] .message-bubble.ai .content { background-color: #FFFACD; color: #5C4033; }
        #chat-messages[data-theme="black_white"] .message-bubble.user .content { background-color: #343a40; color: #f8f9fa; }
        #chat-messages[data-theme="black_white"] .message-bubble.ai .content { background-color: #f8f9fa; color: #343a40; }
        #chat-messages[data-theme="yellow_white"] .message-bubble.user .content { background-color: #FFEB3B; color: #5D4037; }
        #chat-messages[data-theme="yellow_white"] .message-bubble.ai .content { background-color: #f8f9fa; color: #383d41; }
        #chat-messages[data-theme="red_black"] .message-bubble.user .content { background-color: #C62828; color: #FFFFFF; }
        #chat-messages[data-theme="red_black"] .message-bubble.ai .content { background-color: #212121; color: #FFFFFF; }
        #chat-messages[data-theme="blue_yellow"] .message-bubble.user .content { background-color: #A0D2EB; color: #153243; }
        #chat-messages[data-theme="blue_yellow"] .message-bubble.ai .content { background-color: #FEF9E7; color: #5D4037; }
        #chat-messages[data-theme="pink_yellow"] .message-bubble.user .content { background-color: #F8BBD0; color: #5B2C6F; }
        #chat-messages[data-theme="pink_yellow"] .message-bubble.ai .content { background-color: #FEF9E7; color: #5D4037; }
        #chat-messages[data-theme="pink_purple"] .message-bubble.user .content { background-color: #F8BBD0; color: #5B2C6F; }
        #chat-messages[data-theme="pink_purple"] .message-bubble.ai .content { background-color: #E6E6FA; color: #4B0082; }
        #chat-messages[data-theme="gray_white"] .message-bubble.user .content { background-color: #e9ecef; color: #495057; }
        #chat-messages[data-theme="gray_white"] .message-bubble.ai .content { background-color: #f8f9fa; color: #383d41; }
        #chat-messages[data-theme="blue_green"] .message-bubble.user .content { background-color: #d1ecf1; color: #0c5460; }
        #chat-messages[data-theme="blue_green"] .message-bubble.ai .content { background-color: #d4edda; color: #155724; }
        #chat-messages[data-theme="pink_white"] .message-bubble.user .content { background-color: #fce4ec; color: #880e4f; }
        #chat-messages[data-theme="pink_white"] .message-bubble.ai .content { background-color: #f8f9fa; color: #383d41; }
        #chat-messages[data-theme="pink_black"] .message-bubble.user .content { background-color: #F8BBD0; color: #5B2C6F; }
        #chat-messages[data-theme="pink_black"] .message-bubble.ai .content { background-color: #343a40; color: #f8f9fa; }
        #chat-messages[data-theme="pink_green"] .message-bubble.user .content { background-color: #F8BBD0; color: #5B2C6F; }
        #chat-messages[data-theme="pink_green"] .message-bubble.ai .content { background-color: #C8E6C9; color: #1B5E20; }
        #chat-messages[data-theme="green_black"] .message-bubble.user .content { background-color: #d4edda; color: #155724; }
        #chat-messages[data-theme="green_black"] .message-bubble.ai .content { background-color: #343a40; color: #f8f9fa; }

        /* === 转账功能样式 (美化版!) === */
        #transfer-btn { font-weight: bold; }
        #transfer-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 1001; }
        #transfer-modal.visible { display: flex; }
        .transfer-content { background-color: #fff0f5; border-radius: 20px; width: 290px; padding: 20px; box-shadow: 0 5px 25px rgba(255, 105, 180, 0.3); text-align: center; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" opacity="0.05"><path d="M50,4 C35,4 28,15 28,24 C28,33 35,32 35,40 C35,48 28,49 28,57 C28,65 35,66 35,74 C35,82 28,83 28,91 C28,99 35,100 50,100 C65,100 72,99 72,91 C72,83 65,82 65,74 C65,66 72,65 72,57 C72,49 65,48 65,40 C65,32 72,33 72,24 C72,15 65,4 50,4 Z" fill="%23FF69B4"/></svg>'); background-repeat: no-repeat; background-position: top right; background-size: 80px; }
        .transfer-header { font-size: 20px; font-weight: bold; color: #a35c7b; margin-bottom: 20px; }
        .transfer-input-group { margin-bottom: 15px; text-align: left; }
        .transfer-input-group label { display: block; font-size: 14px; color: #ff85b3; margin-bottom: 5px; font-weight: 500; }
        .transfer-input-group input { width: 100%; padding: 12px; border-radius: 10px; border: 2px solid #ffcce0; background-color: #fff; font-size: 16px; box-sizing: border-box; }
        .transfer-input-group input:focus { border-color: #ff85b3; outline: none; }
        .transfer-actions { display: flex; justify-content: space-between; gap: 10px; }
        .transfer-actions button { flex: 1; padding: 12px; border: none; border-radius: 10px; font-size: 16px; font-weight: bold; cursor: pointer; transition: transform 0.2s; }
        .transfer-actions button:active { transform: scale(0.95); }
        #transfer-cancel-btn { background-color: #ffdde9; color: #a35c7b; }
        #transfer-confirm-btn { background-color: #ff85b3; color: white; }
        .message-bubble.is-transfer .content { padding: 0; background: transparent; box-shadow: none; border: none; backdrop-filter: none; -webkit-backdrop-filter: none; cursor: pointer; }
        .transfer-card { width: 200px; border-radius: 12px; padding: 12px; color: white; position: relative; overflow: hidden; }
        .transfer-card::before { content: '🐾'; position: absolute; right: 10px; top: 5px; font-size: 30px; opacity: 0.2; transform: rotate(15deg); }
        .message-bubble.user .transfer-card { background: radial-gradient(circle at top left, #ffc5d5, #ff85b3); }
        .message-bubble.ai .transfer-card { background: radial-gradient(circle at top left, #a1c4fd, #c2e9fb); }
        .transfer-card.accepted { opacity: 1; }
        .transfer-card.rejected { background: #e5e5e5 !important; color: #8a8a8a !important; filter: none !important; opacity: 1 !important; }
        .transfer-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
        .transfer-amount { font-size: 28px; font-weight: bold; margin-bottom: 4px; }
        .transfer-note { font-size: 13px; opacity: 0.9; border-top: 1px solid rgba(255,255,255,0.3); padding-top: 8px; margin-top: 8px; word-break: break-all; }
        
        /* === 一起听功能样式 === */
        @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
        #listen-together-btn img.rotating { animation: spin 2s linear infinite; }
        #listen-together-btn img.paused { animation-play-state: paused; }
        #music-player-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 50; display: none; justify-content: center; align-items: center; background-color: rgba(0,0,0,0.3); }
        #music-player-overlay.visible { display: flex; }
        .music-player-window { width: 90%; background-color: rgba(255, 255, 255, 0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 20px; box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); border: 1px solid rgba(255, 255, 255, 0.18); padding: 25px; display: flex; flex-direction: column; align-items: center; color: #1f1f1f; position: relative; }
        #music-playlist-btn { position: absolute; top: 15px; right: 15px; font-size: 24px; cursor: pointer; color: #333; }
        #music-time-counter { font-size: 12px; color: #555; margin-bottom: 20px; }
        #music-player-song-title { font-size: 20px; font-weight: 600; margin-bottom: 5px; text-align: center; }
        #music-player-artist { font-size: 14px; color: #666; margin-bottom: 25px; }
        .music-controls { display: flex; align-items: center; justify-content: center; gap: 20px; width: 100%; margin-bottom: 30px; }
        .music-controls button { background: none; border: none; font-size: 16px; font-weight: bold; cursor: pointer; color: #333; width: 44px; height: 44px; display: flex; justify-content: center; align-items: center; transition: transform 0.2s; }
        .music-controls button:active { transform: scale(0.9); }
        .music-controls .play-pause-btn { font-size: 24px; width: 60px; height: 60px; border-radius: 50%; background-color: rgba(0,0,0,0.05); }
        .music-bottom-actions { display: flex; justify-content: space-between; width: 100%; }
        .music-bottom-actions button { flex: 1; padding: 12px 0; border: none; border-radius: 10px; font-size: 15px; font-weight: 500; cursor: pointer; }
        #music-exit-btn { background-color: rgba(255, 100, 100, 0.7); color: white; margin-right: 5px; }
        #music-return-btn { background-color: rgba(0, 123, 255, 0.7); color: white; margin-left: 5px; }
        
        #music-playlist-panel { position: absolute; bottom: 0; left: 0; width: 100%; height: 70%; background-color: rgba(242, 242, 247, 0.9); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-top: 1px solid var(--border-color); border-radius: 20px 20px 0 0; z-index: 210; display: flex; flex-direction: column; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); visibility: hidden; }
        #music-playlist-panel.visible { transform: translateY(0); visibility: visible; }
        .playlist-header { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; border-bottom: 1px solid var(--border-color); font-weight: 600; }
        .playlist-header .panel-btn { font-size: 16px; cursor: pointer; color: var(--accent-color); }
        .playlist-body { flex-grow: 1; overflow-y: auto; padding: 10px 0; }
        .playlist-item { padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; border-bottom: 1px solid #eee; }
        .playlist-item.playing { background-color: rgba(0, 123, 255, 0.1); }
        .playlist-item-info .title { font-weight: 500; font-size: 15px; }
        .playlist-item-info .artist { font-size: 12px; color: #666; }
        .playlist-item .delete-track-btn { color: #ff3b30; font-size: 20px; padding: 5px; }
    
        .custom-select-trigger { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 16px; box-sizing: border-box; background-color: var(--secondary-bg); cursor: pointer; text-align: left; color: var(--text-primary); position: relative; }
        .custom-select-trigger::after { content: '▼'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--text-secondary); }
        .multi-select-container { display: none; max-height: 180px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: 8px; padding: 10px; background: var(--secondary-bg); box-sizing: border-box; margin-top: 5px; text-align: left; }
        .multi-select-container.show { display: block; }
        .wb-category-header { display: flex; align-items: center; cursor: pointer; font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
        .wb-category-header input[type="checkbox"] { width: auto !important; margin-right: 8px; margin-left: 0; cursor: pointer; transform: scale(1.1); }
        .wb-category-header span.cat-label { flex-grow: 1; text-align: left; }
        .wb-category-content { display: none; padding-left: 4px; flex-direction: column; gap: 8px; margin-bottom: 12px; }
        .wb-category-content.open { display: flex; }
        .wb-item { display: flex; align-items: center; font-size: 14px; color: var(--text-secondary); cursor: pointer; }
        .wb-item input[type="checkbox"] { width: auto !important; margin-right: 8px; margin-left: 0; cursor: pointer; transform: scale(1.1); }
        .toggle-icon { margin-left: auto; margin-right: 4px; font-size: 12px; transition: transform 0.2s; display: inline-block; width: 14px; text-align: center; color: var(--text-secondary); }

        .preset-item { display: flex; align-items: center; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer; position: relative; }
        .preset-item:hover { background-color: #f5f5f5; }
        .preset-item img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; margin-right: 15px; flex-shrink: 0; background-color: #eee; }
        .preset-item .info { flex-grow: 1; overflow: hidden; }
        .preset-item .persona { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .preset-item .delete-preset-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #ff3b30; font-size: 20px; padding: 5px; }

        /* 世界书多选样式 */
        #world-book-screen .header .default-controls, #world-book-screen .header .selection-controls { display: contents; }
        #world-book-screen.selection-mode .default-controls { display: none; }
        #world-book-screen:not(.selection-mode) .selection-controls { display: none; }
        #wb-selection-cancel-btn, #wb-selection-delete-btn { font-size: 16px; color: var(--accent-color); cursor: pointer; padding: 5px; }
        #wb-selection-delete-btn { color: #ff3b30; }
        .list-item.selected { background-color: rgba(0, 123, 255, 0.1); position: relative; }
        .list-item.selected::after { content: '✔'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--accent-color); font-weight: bold; font-size: 18px; }
        .wb-list-category-header { transition: background-color 0.2s; position: relative; }
        .wb-list-category-header.selected { background-color: rgba(0, 123, 255, 0.1) !important; }
        .wb-list-category-header.selected::after { content: '✔'; position: absolute; right: 40px; top: 50%; transform: translateY(-50%); color: var(--accent-color); font-weight: bold; font-size: 18px; }
        .message-bubble.is-text-image .content, body.dark-mode .message-bubble.is-text-image .content { padding: 0 !important; background: transparent !important; background-color: transparent !important; box-shadow: none !important; border: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; cursor: pointer; }

        /* 文字图 3D 翻转魔法 */
        .text-image-card { background-color: transparent; width: 220px; perspective: 1000px; cursor: pointer; border-radius: 10px; margin: 0; padding: 0; }
        .text-image-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1); transform-style: preserve-3d; }
        .text-image-card.flipped .text-image-inner { transform: rotateY(180deg); }
        .text-image-front, .text-image-back { width: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 10px; overflow: hidden; }
        .text-image-front img { display: block; width: 100%; border-radius: 10px; }
        .text-image-back { position: absolute; top: 0; left: 0; height: 100%; transform: rotateY(180deg); background-color: var(--text-image-bg); color: var(--text-image-color); padding: 12px; box-sizing: border-box; overflow-y: auto; font-size: 14px; white-space: pre-wrap; word-break: break-word; border: 1px solid var(--border-color); box-shadow: inset 0 0 10px rgba(0,0,0,0.05); }

        /* === 好友申请卡片样式 === */
        .friend-request-card { width: 220px; border-radius: 12px; padding: 12px; background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%); color: #333; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 1px solid #ddd; position: relative; overflow: hidden; }
        body.dark-mode .friend-request-card { background: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 100%); color: #fff; border-color: #38383a; }
        .friend-request-card .title { font-weight: 600; font-size: 15px; border-bottom: 1px solid #ddd; padding-bottom: 6px; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
        body.dark-mode .friend-request-card .title { border-color: #38383a; }
        .friend-request-card .msg { font-size: 14px; margin-bottom: 12px; word-break: break-all; }
        .req-actions { display: flex; gap: 10px; }
        .req-actions button { flex: 1; padding: 6px 0; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 13px; }
        .req-btn-reject { background: #ff3b30; color: white; }
        .req-btn-accept { background: var(--accent-color); color: white; }
        .req-status { text-align: center; font-size: 12px; opacity: 0.7; padding: 4px 0; }

/* === 底部导航栏 === */
.bottom-nav { position: absolute; bottom: 0; left: 0; width: 100%; height: 60px; background-color: rgba(250, 250, 250, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; align-items: center; z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav .nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-secondary); cursor: pointer; width: 25%; height: 100%; transition: color 0.2s; }
.bottom-nav .nav-item.active { color: var(--accent-color); }
.bottom-nav .nav-item svg { margin-bottom: 3px; }
.bottom-nav .nav-item span { font-size: 10px; font-weight: 500; }
body.dark-mode .bottom-nav { background-color: rgba(28, 28, 30, 0.95); border-color: #38383a; }

/* 角色列表及弹窗样式 */
.role-list-item { display: flex; align-items: center; padding: 12px 20px; cursor: pointer; border-bottom: 1px solid var(--border-color); }
.role-list-item:hover { background-color: #f5f5f5; }
.role-list-item .avatar { width: 45px; height: 45px; border-radius: 50%; margin-right: 15px; object-fit: cover; background-color: #ccc; }
.role-list-item .name { font-size: 16px; font-weight: 500; color: var(--text-primary); flex-grow: 1; }
body.dark-mode .role-list-item:hover { background-color: #2c2c2e; }
body.dark-mode .role-list-item .name { color: #ffffff; }
body.dark-mode #role-info-token-box { background: rgba(255,255,255,0.05) !important; }


/* === 朋友圈(动态)功能样式 === */
#moments-container { overflow-y: auto; padding-bottom: 60px; background-color: var(--secondary-bg); position: relative; }
.moments-header-bg { width: 100%; height: 200px; background-color: #ccc; background-size: cover; background-position: center; position: relative; cursor: pointer; }
.moments-user-info { position: absolute; right: 20px; bottom: -20px; display: flex; align-items: flex-end; gap: 10px; }
.moments-user-name { color: white; font-size: 18px; font-weight: bold; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); margin-bottom: 5px; cursor: pointer; }
.moments-user-avatar { width: 60px; height: 60px; border-radius: 10px; border: 2px solid white; object-fit: cover; cursor: pointer; background: #eee; box-shadow: 0 2px 4px rgba(0,0,0,0.2);}
.moments-top-actions { position: absolute; top: 15px; right: 15px; display: flex; gap: 10px; z-index: 10; }
.moments-btn { width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,0.5); color: white; display: flex; justify-content: center; align-items: center; cursor: pointer; backdrop-filter: blur(5px); }
#moments-list { padding: 30px 15px 20px 15px; display: flex; flex-direction: column; gap: 20px; min-height: 300px;}
.moment-card { position: relative; overflow: hidden; border-bottom: 1px solid var(--border-color); padding-bottom: 15px;}
.moment-card-inner { display: flex; gap: 10px; width: 100%; transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1); z-index: 2; background: var(--secondary-bg); position: relative;}
.moment-avatar { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #eee;}
.moment-content-area { flex-grow: 1; }
.moment-name { font-weight: 600; color: #576b95; font-size: 15px; margin-bottom: 5px; }
.moment-text { font-size: 15px; color: var(--text-primary); line-height: 1.5; word-break: break-all; margin-bottom: 8px; white-space: pre-wrap;}
.moment-image-wrapper { margin-bottom: 8px; }
.moment-image { max-width: 80%; border-radius: 5px; display: block; cursor: pointer;}
.moment-footer { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-secondary); position: relative; margin-top: 8px;}
.moment-time { }
.moment-action-btn { background: #f0f0f0; padding: 2px 8px; border-radius: 4px; font-weight: bold; color: #576b95; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 4px;}
.moment-comments { background: rgba(0,0,0,0.03); border-radius: 4px; padding: 8px; margin-top: 10px; font-size: 13px; }
.moment-comment-item { margin-bottom: 4px; line-height: 1.4; color: var(--text-primary); word-break: break-all;}
.moment-comment-item span.c-name { color: #576b95; font-weight: 600; cursor: pointer; }
.swipe-delete-btn { position: absolute; right: 0; top: 10px; bottom: 25px; height: auto; width: 65px; border-radius: 8px; background: #ff3b30; color: white; display: flex; justify-content: center; align-items: center; font-weight: bold; z-index: 1; font-size: 14px;}
body.dark-mode .moments-user-name { color: #fff; }
body.dark-mode .moment-name, body.dark-mode .moment-comment-item span.c-name, body.dark-mode .moment-action-btn { color: #7d90a9; }
body.dark-mode .moment-action-btn { background: #2c2c2e; }
body.dark-mode .moment-comments { background: rgba(255,255,255,0.05); }

svg.rotating { animation: spin 1s linear infinite; }
/* === 我的界面 === */
#mine-container { background-color: #f5f6fa !important; }
body.dark-mode #mine-container { background-color: #000 !important; }
.mine-header-card { display: flex; align-items: center; background: #fff; padding: 20px; border-radius: 16px; margin-bottom: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
body.dark-mode .mine-header-card { background: #1c1c1e; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.mine-header-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-right: 15px; cursor: pointer; background: #eee; }
.mine-info { display: flex; flex-direction: column; gap: 6px; flex-grow: 1; cursor: pointer; }
.mine-name { font-size: 20px; font-weight: bold; color: var(--text-primary); }
.mine-signature { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.mine-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 10px; background: #fff; padding: 25px 10px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
body.dark-mode .mine-grid { background: #1c1c1e; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.mine-grid-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; gap: 8px; }
.mine-grid-icon { width: 44px; height: 44px; border-radius: 14px; background-color: #f8f9fa; display: flex; justify-content: center; align-items: center; color: var(--accent-color); transition: transform 0.1s; }
body.dark-mode .mine-grid-icon { background-color: #2c2c2e; color: #0a84ff; }
.mine-grid-item:active .mine-grid-icon { transform: scale(0.9); }
.mine-grid-item span { font-size: 12px; color: var(--text-primary); font-weight: 500; }


/* === 状态栏功能样式 === */
.statusbar-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 15px;
    background: var(--secondary-bg);
    cursor: pointer;
    transition: background 0.2s;
}
.statusbar-list-item:hover {
    background: #f5f5f5;
}
body.dark-mode .statusbar-list-item:hover {
    background: #2c2c2e;
}
.statusbar-list-item .info {
    flex-grow: 1;
}
.statusbar-list-item .name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.statusbar-list-item .preview {
    font-size: 12px;
    color: var(--text-secondary);
}
.statusbar-list-item .delete-btn {
    color: #ff3b30;
    font-size: 20px;
    padding: 5px 10px;
    cursor: pointer;
}

#statusbar-list-screen, #custom-prompt-list-screen {
    background-color: #f5f6fa !important;
}

body.dark-mode #statusbar-list-screen, body.dark-mode #custom-prompt-list-screen {
    background-color: #000 !important;
}

#statusbar-editor-screen {
    background-color: #f5f6fa !important;
}

body.dark-mode #statusbar-editor-screen {
    background-color: #000 !important;
}




#statusbar-list {
    flex-grow: 1;
    overflow-y: auto;
    background-color: var(--secondary-bg);
    padding: 20px;
    padding-bottom: 60px;
}

#statusbar-editor-screen .form-container {
    background-color: var(--secondary-bg);
}

body.dark-mode #statusbar-list, body.dark-mode #custom-prompt-list {
    background-color: #000;
}



/* @🍮 新增：下拉框黑底、状态栏测试区黑底及状态栏毛玻璃效果 */
body.dark-mode select, body.dark-mode option { background-color: #1c1c1e !important; color: #ffffff !important; border-color: #38383a !important; }
body.dark-mode #statusbar-preview { background-color: #1c1c1e !important; color: #ffffff !important; border: 1px solid #38383a !important; }
body.dark-mode #manage-api-preset-dropdown, body.dark-mode #manage-style-dropdown { background-color: #1c1c1e !important; border-color: #38383a !important; color: #ffffff !important; }
body.dark-mode #manage-api-preset-dropdown button, body.dark-mode #manage-style-dropdown button { background-color: #2c2c2e !important; border-color: #38383a !important; color: #ffffff !important; }
body.dark-mode #manage-api-preset-dropdown .list-item, body.dark-mode #manage-style-dropdown .list-item { border-bottom-color: #38383a !important; }
#statusbar-display-overlay { backdrop-filter: blur(10px) !important; -webkit-backdrop-filter: blur(10px) !important; background-color: rgba(255, 255, 255, 0.4) !important; }
body.dark-mode #statusbar-display-overlay { background-color: rgba(0, 0, 0, 0.6) !important; }

/* 全局调试透视样式 */
.debug-msg { display: none !important; }
#chat-messages.show-debug-mode .debug-msg { display: flex !important; }
/* 日间模式：灰底黑字 */
.message-bubble.is-debug .content { background-color: #f2f2f2 !important; color: #333333 !important; font-family: monospace; font-size: 12px; width: 100%; border: 1px solid #d9d9d9 !important; box-shadow: none !important; }
/* 夜间模式：深灰底白字 */
body.dark-mode .message-bubble.is-debug .content { background-color: #2c2c2e !important; color: #e5e5e5 !important; border: 1px solid #38383a !important; box-shadow: none !important; }


/* === 正则功能样式 === */
#regex-list-screen, #regex-editor-screen { background-color: #f5f6fa !important; }
body.dark-mode #regex-list-screen, body.dark-mode #regex-editor-screen { background-color: #000 !important; }
#regex-editor-screen .form-container { background-color: var(--secondary-bg); }
body.dark-mode #regex-list { background-color: #000; }


/* === 钱包相关样式 === */
#wallet-screen { background-color: #f5f6fa !important; }
body.dark-mode #wallet-screen { background-color: #000 !important; }
body.dark-mode #wallet-screen .header { background-color: #d32f2f !important; border-bottom: 1px solid #38383a; }
body.dark-mode #wallet-transactions-list { background-color: #1c1c1e !important; box-shadow: none !important; border: 1px solid #38383a; }

.family-card-item { min-width: 140px; background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); border-radius: 12px; padding: 12px; color: #a35c7b; flex-shrink: 0; box-shadow: 0 3px 8px rgba(255, 154, 158, 0.3); position: relative; overflow: hidden; }
.family-card-item::after { content: '💳'; position: absolute; right: -5px; bottom: -10px; font-size: 40px; opacity: 0.15; }
.family-card-item .fc-sender { font-size: 12px; font-weight: bold; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.family-card-item .fc-remain { font-size: 20px; font-weight: bold; margin-bottom: 4px; }
.family-card-item .fc-total { font-size: 10px; opacity: 0.8; }

.transaction-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 5px; border-bottom: 1px solid #eee; }
.transaction-item:last-child { border-bottom: none; }
body.dark-mode .transaction-item { border-bottom-color: #38383a; }
.trans-info { display: flex; flex-direction: column; gap: 4px; }
.trans-desc { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.trans-time { font-size: 11px; color: var(--text-secondary); }
.trans-amount { font-size: 16px; font-weight: bold; }
.trans-amount.income { color: #34c759; }
.trans-amount.expense { color: #ff3b30; }

.message-bubble.is-family-card .content { padding: 0; background: transparent; box-shadow: none; border: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.fc-chat-card { width: 220px; border-radius: 12px; padding: 15px; background: linear-gradient(135deg, #fad0c4 0%, #ffd1ff 100%); color: #a35c7b; box-shadow: 0 4px 10px rgba(0,0,0,0.1); position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,0.5); }
.fc-chat-card::before { content: '🎁'; position: absolute; right: 10px; top: 10px; font-size: 24px; opacity: 0.8; }
.fc-chat-title { font-size: 14px; font-weight: bold; margin-bottom: 5px; }
.fc-chat-amount { font-size: 24px; font-weight: 900; margin-bottom: 10px; }
.fc-chat-note { font-size: 12px; border-top: 1px solid rgba(163, 92, 123, 0.2); padding-top: 8px; opacity: 0.9; }

/* === 钱包相关样式 === */
#wallet-screen { background-color: var(--secondary-bg) !important; }
body.dark-mode #wallet-screen { background-color: #000 !important; }

.family-card-item { min-width: 140px; background: #ffffff; border-radius: 12px; padding: 12px; color: #333333; flex-shrink: 0; box-shadow: 0 4px 15px rgba(0,0,0,0.05); position: relative; overflow: hidden; border: 1px solid var(--border-color); }
body.dark-mode .family-card-item { background: #1c1c1e; color: #ffffff; border-color: #38383a; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.family-card-item::after { content: '💳'; position: absolute; right: -5px; bottom: -10px; font-size: 40px; opacity: 0.05; }
.family-card-item .fc-sender { font-size: 12px; font-weight: bold; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-secondary); }
.family-card-item .fc-remain { font-size: 20px; font-weight: bold; margin-bottom: 4px; }
.family-card-item .fc-total { font-size: 10px; opacity: 0.8; color: var(--text-secondary); }

.transaction-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 5px; border-bottom: 1px solid #eee; }
.transaction-item:last-child { border-bottom: none; }
body.dark-mode .transaction-item { border-bottom-color: #38383a; }
.trans-info { display: flex; flex-direction: column; gap: 4px; }
.trans-desc { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.trans-time { font-size: 11px; color: var(--text-secondary); }
.trans-amount { font-size: 16px; font-weight: bold; }
.trans-amount.income { color: var(--text-primary); }
.trans-amount.expense { color: var(--text-secondary); }

.message-bubble.is-family-card .content { padding: 0; background: transparent !important; box-shadow: none !important; border: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.fc-chat-card { width: 220px; border-radius: 12px; padding: 15px; background: #ffffff; color: #333333; box-shadow: 0 4px 15px rgba(0,0,0,0.08); position: relative; overflow: hidden; border: 1px solid var(--border-color); }
body.dark-mode .fc-chat-card { background: #1c1c1e; color: #ffffff; border-color: #38383a; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.fc-chat-card::before { content: '🎁'; position: absolute; right: 10px; top: 10px; font-size: 24px; opacity: 0.1; }
.fc-chat-title { font-size: 14px; font-weight: bold; margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.fc-chat-amount { font-size: 24px; font-weight: 800; margin-bottom: 10px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
.fc-chat-note { font-size: 12px; border-top: 1px solid #eee; padding-top: 8px; color: #666; }
body.dark-mode .fc-chat-note { border-top-color: #38383a; color: #aaa; }

/* === 查手机功能样式 === */
.check-phone-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 10px; }
.cp-app-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.cp-app-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; justify-content: center; align-items: center; color: white; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: transform 0.1s; }
.cp-app-item:active .cp-app-icon { transform: scale(0.9); }
.cp-app-name { font-size: 11px; color: var(--text-primary); font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 65px; }
body.dark-mode #check-phone-apps-container { background-color: #000 !important; }
body.dark-mode .cp-app-icon { box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
/* @🍮 */

/* === 查岗: QQ 界面样式 === */
.cp-qq-contact { border-bottom: 1px solid var(--border-color); cursor: pointer; background: var(--secondary-bg); transition: background 0.2s; }
.cp-qq-contact:hover { background: rgba(0,0,0,0.02); }
.cp-qq-contact-header { padding: 12px 15px; display: flex; align-items: center; gap: 12px; }
.cp-qq-contact-header img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #eee; border: 1px solid rgba(0,0,0,0.05); }
.cp-qq-contact-info { flex-grow: 1; overflow: hidden; }
.cp-qq-contact-name { font-weight: bold; font-size: 16px; color: var(--text-primary); margin-bottom: 4px; }
.cp-qq-contact-lastmsg { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-qq-chat-area { display: none; padding: 15px; background: #f0f2f5; border-top: 1px dashed var(--border-color); flex-direction: column; gap: 10px; box-shadow: inset 0 2px 5px rgba(0,0,0,0.02); }
.cp-qq-chat-area.open { display: flex; }
body.dark-mode .cp-qq-chat-area { background: #000; }
.cp-qq-msg-row { display: flex; flex-direction: column; max-width: 85%; }
.cp-qq-msg-row.ta { align-self: flex-end; align-items: flex-end; }
.cp-qq-msg-row.other { align-self: flex-start; align-items: flex-start; }
.cp-qq-msg-name { font-size: 11px; color: #888; margin-bottom: 3px; padding: 0 4px; }
.cp-qq-bubble { padding: 8px 12px; border-radius: 14px; font-size: 14px; word-break: break-all; box-shadow: 0 1px 3px rgba(0,0,0,0.1); line-height: 1.4; }
.cp-qq-msg-row.ta .cp-qq-bubble { background: #12B7F5; color: white; border-bottom-right-radius: 2px; }
.cp-qq-msg-row.other .cp-qq-bubble { background: white; color: #333; border-bottom-left-radius: 2px; border: 1px solid var(--border-color); }
body.dark-mode .cp-qq-msg-row.other .cp-qq-bubble { background: #1c1c1e; color: #fff; border-color: #38383a; }
