        /* 样式与之前完全相同，为节省篇幅省略，实际使用请从之前版本复制 */
        * { margin: 0; padding: 0; box-sizing: border-box; }
        html, body { height: 100%; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: #ededed; }
        body { background: #ededed; display: flex; justify-content: center; align-items: center; }
        .auth-container { width: 100%; max-width: 400px; padding: 20px; background: #fff; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin: 20px; }
        .auth-container h2 { text-align: center; margin-bottom: 24px; color: #1a1a23; font-weight: 300; letter-spacing: 1px; }
        .auth-container .tabs { display: flex; gap: 8px; margin-bottom: 20px; background: #f0f2f5; border-radius: 12px; padding: 4px; }
        .auth-container .tabs button { flex: 1; padding: 10px; border: none; background: transparent; border-radius: 10px; font-size: 16px; font-weight: 500; cursor: pointer; transition: 0.2s; color: #6b7280; }
        .auth-container .tabs button.active { background: #60a5fa; color: #fff; }
        .auth-container .form-group { margin-bottom: 16px; }
        .auth-container .form-group label { display: block; font-size: 14px; color: #4b5563; margin-bottom: 4px; }
        .auth-container .form-group input { width: 100%; padding: 12px 16px; border: 1px solid #d1d5db; border-radius: 25px; font-size: 16px; outline: none; transition: 0.2s; }
        .auth-container .form-group input:focus { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96,165,250,0.2); }
        .auth-container .btn-primary { width: 100%; padding: 14px; background: #60a5fa; color: #fff; border: none; border-radius: 25px; font-size: 18px; font-weight: bold; cursor: pointer; transition: 0.2s; }
        .auth-container .btn-primary:hover { background: #3b82f6; }
        .auth-container .error-msg { color: #ef4444; font-size: 14px; margin-top: 8px; text-align: center; }
        .auth-container .success-msg { color: #22c55e; font-size: 14px; margin-top: 8px; text-align: center; }
        .auth-container .toggle-link { text-align: center; margin-top: 16px; font-size: 14px; color: #6b7280; }
        .auth-container .toggle-link a { color: #60a5fa; cursor: pointer; text-decoration: underline; }

        #chatContainer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: none; flex-direction: column; background: #ededed; z-index: 10; }
        #chatContainer.active { display: flex; }
        .chat-header { flex-shrink: 0; background: #2d2d3d; color: #f3f4f6; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 4px rgba(0,0,0,0.1); height: auto; flex-wrap: wrap; gap: 4px; }
        .chat-header .user-info { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-shrink: 0; }
        .chat-header .user-info .avatar { width: 40px; height: 40px; border-radius: 50%; background: #60a5fa; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #fff; font-size: 18px; flex-shrink: 0; }
        .chat-header .user-info .name-wrap { display: flex; flex-direction: column; line-height: 1.3; }
        .chat-header .user-info .name-wrap .nickname { font-size: 16px; font-weight: 500; color: #f3f4f6; }
        .chat-header .user-info .name-wrap .username { font-size: 12px; color: #9ca3af; }
        .chat-header .status-area { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
        .chat-header .status { display: flex; align-items: center; gap: 4px; font-size: 14px; color: #9ca3af; }
        .chat-header .status .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: none; outline: none; }
        .chat-header .status .dot.online { background: #34d399; }
        .chat-header .status .dot.offline { background: #ef4444; }
        .chat-header .msg-count { font-size: 13px; color: #9ca3af; }
        .chat-header .msg-count span { font-weight: 600; color: #f3f4f6; }
        .chat-header .logout-btn { background: none; border: none; color: #fca5a5; font-size: 14px; cursor: pointer; flex-shrink: 0; }

        #messageList { flex: 1; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 8px; background: #ededed; min-height: 0; }
        .msg-item { max-width: 80%; padding: 10px 14px; border-radius: 18px; position: relative; word-break: break-word; font-size: 15px; line-height: 1.5; box-shadow: 0 1px 2px rgba(0,0,0,0.1); animation: fadeIn 0.2s ease; flex-shrink: 0; cursor: pointer; transition: background 0.1s; }
        .msg-item:active { opacity: 0.7; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
        .msg-item.sent { align-self: flex-end; background: #95ec69; color: #1a1a23; border-bottom-right-radius: 4px; }
        .msg-item.received { align-self: flex-start; background: #ffffff; color: #1a1a23; border-bottom-left-radius: 4px; }
        .msg-item .meta { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; color: #6b7280; flex-wrap: wrap; }
        .msg-item .meta .sender { font-weight: 500; cursor: pointer; }
        .msg-item .meta .badge { font-size: 10px; padding: 2px 8px; border-radius: 12px; background: #e5e7eb; color: #4b5563; }
        .msg-item .meta .badge.pending { background: #fcd34d; color: #92400e; }
        .msg-item .meta .badge.reading { background: #93c5fd; color: #1e3a8a; }
        .msg-item .meta .badge.destroyed { background: #d1d5db; color: #4b5563; }
        .msg-item .meta .time { font-size: 11px; color: #9ca3af; margin-left: auto; flex-shrink: 0; }
        .msg-item .content-wrapper { margin-top: 2px; }
        .msg-item .content-wrapper .content-text { display: none; }
        .msg-item .content-wrapper .placeholder { color: #60a5fa; cursor: pointer; text-decoration: underline; font-weight: 500; }
        .msg-item .content-wrapper .placeholder:hover { color: #3b82f6; }
        .msg-item.sent .content-wrapper .content-text { display: block; }
        .msg-item.sent .content-wrapper .placeholder { display: none; }
        .msg-item.received.expanded .content-wrapper .content-text { display: block; }
        .msg-item.received.expanded .content-wrapper .placeholder { display: none; }
        .msg-item .timer { margin-top: 6px; font-size: 13px; color: #ef4444; font-weight: 500; display: none; }
        .msg-item.received.expanded .timer { display: block; }
        .msg-item.sent .timer { display: none; }
        .msg-item .delete-icon { display: none; margin-left: 6px; cursor: pointer; font-size: 16px; color: #ef4444; transition: 0.2s; background: none; border: none; padding: 0 4px; }
        .msg-item .delete-icon:hover { color: #dc2626; transform: scale(1.1); }
        .msg-item.received.expanded .delete-icon { display: inline-block; }

        .input-area { flex-shrink: 0; background: #f8f9fa; padding: 10px 12px; border-top: 1px solid #e5e7eb; display: flex; flex-direction: column; gap: 6px; }
        .input-area .msg-row { display: flex; gap: 8px; }
        .input-area .msg-row input[type="text"] { flex: 1; padding: 12px 16px; border: 1px solid #d1d5db; border-radius: 25px; background: #ffffff; font-size: 15px; outline: none; transition: 0.2s; }
        .input-area .msg-row input[type="text"]:focus { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96,165,250,0.2); }
        .input-area .action-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
        .input-area .action-row .target-wrapper { flex: 1; display: flex; align-items: center; position: relative; }
        .input-area .action-row .target-wrapper input[type="text"] { flex: 1; min-width: 100px; padding: 10px 34px 10px 14px; border: 1px solid #d1d5db; border-radius: 25px; background: #ffffff; font-size: 15px; outline: none; transition: 0.2s; }
        .input-area .action-row .target-wrapper input[type="text"]:focus { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96,165,250,0.2); }
        .input-area .action-row .target-wrapper .dropdown-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 0; font-size: 16px; cursor: pointer; color: #6b7280; line-height: 1; z-index: 2; }
        .input-area .action-row .target-wrapper .dropdown-btn:hover { color: #1a1a23; }
        .input-area .action-row .target-wrapper .dropdown-list { position: absolute; bottom: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid #d1d5db; border-radius: 12px; max-height: 150px; overflow-y: auto; display: none; z-index: 100; box-shadow: 0 -4px 12px rgba(0,0,0,0.1); padding: 4px 0; }
        .input-area .action-row .target-wrapper .dropdown-list.open { display: block; }
        .input-area .action-row .target-wrapper .dropdown-list .list-item { padding: 8px 14px; cursor: pointer; font-size: 14px; color: #1a1a23; transition: background 0.1s; }
        .input-area .action-row .target-wrapper .dropdown-list .list-item:hover { background: #f0f2f5; }
        .input-area .action-row .target-wrapper .dropdown-list .list-item:active { background: #e5e7eb; }
        .input-area .action-row .target-wrapper .dropdown-list .list-empty { padding: 8px 14px; color: #9ca3af; font-size: 14px; text-align: center; }
        .input-area .action-row .receiver-display { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; font-size: 14px; color: #1a1a23; background: #e5e7eb; padding: 4px 12px 4px 8px; border-radius: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 38px; border: 1px solid transparent; transition: 0.2s; margin-left: 6px; }
        .input-area .action-row .receiver-display .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: none; outline: none; flex-shrink: 0; }
        .input-area .action-row .receiver-display .dot.online { background: #34d399; }
        .input-area .action-row .receiver-display .dot.offline { background: #ef4444; }
        .input-area .action-row .receiver-display .placeholder-text { color: #9ca3af; }
        .input-area .send-row { display: flex; justify-content: flex-end; margin-top: 4px; }
        .input-area .send-row button { padding: 10px 24px; border: none; border-radius: 25px; background: #60a5fa; color: #fff; font-size: 15px; font-weight: 500; cursor: pointer; transition: 0.2s; white-space: nowrap; width: 100%; }
        .input-area .send-row button:hover { background: #3b82f6; }

        .hidden { display: none !important; }

        /* 自定义弹窗样式 */
        .custom-alert-overlay {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.5);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 9999;
        }
        .custom-alert-overlay.active { display: flex; }
        .custom-alert-box {
            background: #fff;
            border-radius: 20px;
            padding: 24px 20px 20px;
            max-width: 320px;
            width: 90%;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            text-align: center;
            animation: fadeInScale 0.2s ease;
        }
        @keyframes fadeInScale {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }
        .custom-alert-box .title {
            font-size: 18px;
            font-weight: 600;
            color: #1a1a23;
            margin-bottom: 12px;
        }
        .custom-alert-box .message {
            font-size: 16px;
            color: #4b5563;
            line-height: 1.5;
            margin-bottom: 20px;
            word-break: break-word;
        }
        .custom-alert-box .btn-group {
            display: flex;
            gap: 10px;
            justify-content: center;
        }
        .custom-alert-box .btn-group button {
            flex: 1;
            padding: 10px 0;
            border: none;
            border-radius: 25px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: 0.2s;
            max-width: 120px;
        }
        .custom-alert-box .btn-group .btn-confirm {
            background: #60a5fa;
            color: #fff;
        }
        .custom-alert-box .btn-group .btn-confirm:hover { background: #3b82f6; }
        .custom-alert-box .btn-group .btn-cancel {
            background: #e5e7eb;
            color: #1f2937;
        }
        .custom-alert-box .btn-group .btn-cancel:hover { background: #d1d5db; }
        .custom-alert-box .btn-group .single-btn { max-width: 100%; }

        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; justify-content: center; align-items: center; z-index: 200; }
        .modal-overlay.active { display: flex; }
        .modal-box { background: #fff; border-radius: 24px; padding: 24px; max-width: 400px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); max-height: 90vh; overflow-y: auto; }
        .modal-box h3 { text-align: center; margin-bottom: 20px; color: #1a1a23; }
        .modal-box .form-group { margin-bottom: 16px; }
        .modal-box .form-group label { display: block; font-size: 14px; color: #4b5563; margin-bottom: 4px; }
        .modal-box .form-group input { width: 100%; padding: 12px 16px; border: 1px solid #d1d5db; border-radius: 25px; font-size: 16px; outline: none; }
        .modal-box .form-group input:focus { border-color: #60a5fa; }
        .modal-box .btn-group { display: flex; gap: 10px; margin-top: 20px; }
        .modal-box .btn-group button { flex: 1; padding: 12px; border: none; border-radius: 25px; font-size: 16px; font-weight: bold; cursor: pointer; }
        .modal-box .btn-group .btn-confirm { background: #60a5fa; color: #fff; }
        .modal-box .btn-group .btn-confirm:hover { background: #3b82f6; }
        .modal-box .btn-group .btn-cancel { background: #e5e7eb; color: #1f2937; }
        .modal-box .btn-group .btn-cancel:hover { background: #d1d5db; }
        .modal-box .error-msg { color: #ef4444; font-size: 14px; margin-top: 8px; text-align: center; }
        .modal-box .success-msg { color: #22c55e; font-size: 14px; margin-top: 8px; text-align: center; }