﻿/* --- 全局与主题样式 --- */
        :root {
            --bg-color: #fce4ec;
            --primary-color: #ff80ab;
            --secondary-color: #f48fb1;
            --accent-color: #90caf9;
            --text-color: #444;
            --white-color: #fff;
            --border-radius: 18px;
            --phone-corner-radius: 0px;
            --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            --top-pinned-bg: #fff0f5;
            --online-status-color: #4CAF50;
        }

        *,
        *::before,
        *::after {
            box-sizing: border-box;
        }

        html {
            -webkit-text-size-adjust: 100%;
            height: 100%;
        }

        body {
            font-family: var(--font-family);
            margin: 0;
            padding: 0;
            background: linear-gradient(135deg, #fce4ec, #f8bbd0);
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            height: 100%;
            overflow: hidden;
        }

        .phone-screen {
            width: 100%;
            max-width: 420px;
            height: 100vh;
            max-height: 850px;
            background-color: var(--white-color);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            border-radius: var(--phone-corner-radius);
            overflow: hidden;
            position: relative;
            display: flex;
            flex-direction: column;
        }
        
        /* PWA全屏模式适配 */
        @media (display-mode: standalone) {
            body {
                background: var(--white-color);
            }
            
            .phone-screen {
                max-width: 100%;
                max-height: 100vh;
                height: 100vh;
                border-radius: 0;
                box-shadow: none;
            }
        }

        /* 顶部状态栏样式 */
        #status-bar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 32px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 15px;
            padding-top: env(safe-area-inset-top);
            z-index: 9999;
            font-size: 14px;
            font-weight: 600;
            color: #000;
            pointer-events: none; /* 让状态栏不阻挡下面的点击 */
        }

        .status-bar-time {
            font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
            letter-spacing: -0.3px;
            text-shadow: 0 0 3px rgba(255, 255, 255, 0.8), 0 0 5px rgba(255, 255, 255, 0.6);
            pointer-events: auto; /* 时间区域可以交互 */
        }

        .status-bar-right {
            display: flex;
            align-items: center;
            gap: 6px;
            text-shadow: 0 0 3px rgba(255, 255, 255, 0.8), 0 0 5px rgba(255, 255, 255, 0.6);
            pointer-events: auto; /* 电量区域可以交互 */
        }

        .status-bar-battery {
            display: flex;
            align-items: center;
            gap: 5px;
            position: relative;
        }

        .battery-percentage {
            font-size: 13px;
            font-weight: 600;
            color: #000;
            text-shadow: 0 0 2px rgba(255, 255, 255, 0.8), 0 0 3px rgba(255, 255, 255, 0.6);
            min-width: 35px;
            text-align: right;
        }

        .battery-icon {
            width: 30px;
            height: 15px;
            filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 3px rgba(255, 255, 255, 0.6));
        }

        .battery-outline {
            fill: none;
            stroke: #000;
            stroke-width: 1.5;
            opacity: 0.35;
        }

        .battery-tip {
            fill: #000;
            opacity: 0.35;
        }

        .battery-level {
            fill: #000;
            transition: width 0.3s ease, fill 0.3s ease;
        }

        .battery-level.low {
            fill: #ff3b30;
        }

        .battery-level.charging {
            fill: #34c759;
        }

        .charging-icon {
            width: 14px;
            height: 18px;
            fill: #34c759;
            filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 3px rgba(255, 255, 255, 0.6));
        }

        .status-bar-fallback {
            font-size: 13px;
            color: #000;
            opacity: 0.7;
            font-weight: 500;
        }

        /* 锁屏界面样式 */
        #lock-screen {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 10000;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* 默认背景 */
            background-size: cover;
            background-position: center;
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            color: white;
            touch-action: none;
            transition: transform 0.3s ease, opacity 0.3s ease;
        }

        #lock-screen.active {
            display: flex;
        }

        .lock-time {
            font-size: 80px;
            font-weight: 300;
            margin-bottom: 10px;
            font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
        }

        .lock-date {
            font-size: 20px;
            font-weight: 400;
            margin-bottom: 60px;
            opacity: 0.9;
        }

        .unlock-indicator {
            position: absolute;
            bottom: 40px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
            opacity: 0.8;
        }

        .unlock-arrow {
            font-size: 30px;
            animation: bounceUp 2s ease-in-out infinite;
        }

        @keyframes bounceUp {
            0%, 100% {
                transform: translateY(0);
                opacity: 0.8;
            }
            50% {
                transform: translateY(-15px);
                opacity: 1;
            }
        }

        .pin-dot {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background-color: #e0e0e0;
            transition: background-color 0.3s;
        }

        .pin-dot.filled {
            background-color: var(--primary-color);
        }

        @keyframes shake {
            0%, 100% { transform: translateX(-50%); }
            10%, 30%, 50%, 70%, 90% { transform: translateX(calc(-50% - 10px)); }
            20%, 40%, 60%, 80% { transform: translateX(calc(-50% + 10px)); }
        }

        .unlock-text {
            font-size: 16px;
            font-weight: 500;
        }

        .screen {
            display: none;
            flex-direction: column;
            width: 100%;
            height: 100%;
            animation: fadeIn 0.5s ease;
        }

        .screen.active {
            display: flex;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: scale(0.95);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }
        
        @keyframes fadeOut {
            from {
                opacity: 1;
            }
            to {
                opacity: 0;
            }
        }
        
        @keyframes zoomIn {
            from {
                opacity: 0;
                transform: scale(0.5);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }
        
        @keyframes slideUpBounce {
            0% {
                transform: translateX(-50%) translateY(100px);
                opacity: 0;
            }
            60% {
                transform: translateX(-50%) translateY(-10px);
                opacity: 1;
            }
            80% {
                transform: translateX(-50%) translateY(5px);
            }
            100% {
                transform: translateX(-50%) translateY(0);
            }
        }

        .app-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 20px;
            padding-top: calc(10px + env(safe-area-inset-top));
            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;
        }

        .app-header .back-btn,
        .app-header .action-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;
        }

        #cancel-multi-select-btn {
            font-size: 14px !important;
            font-weight: 500 !important;
            color: var(--white-color) !important;
            background-color: var(--primary-color) !important;
            border-radius: 10px !important;
            padding: 5px 10px !important;
            width: auto !important;
            height: auto !important;
        }

        .app-header .action-btn-group {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .app-header .action-btn-group .action-btn {
            font-size: 16px;
            font-weight: 600;
            width: auto;
            padding: 6px 12px;
            border-radius: 10px;
        }

        .app-header .action-btn-group #create-group-btn {
            background-color: var(--primary-color);
            color: var(--white-color);
        }

        .app-header .action-btn-group #add-chat-btn {
            font-size: 28px;
            padding: 0;
            width: 40px;
            height: 40px;
            background-color: transparent;
            color: var(--primary-color);
            border-radius: 50%;
        }

        .app-header .action-btn img {
            width: 28px;
            height: 28px;
        }

        .app-header .title-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            max-width: calc(100% - 200px);
            z-index: 1;
        }

        .app-header .title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-color);
            margin: 0;
        }

        .app-header .subtitle {
            font-size: 12px;
            color: #888;
            display: flex;
            align-items: center;
            margin-top: 2px;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .online-indicator {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: var(--online-status-color);
            margin-right: 5px;
        }

        .app-header .placeholder {
            width: 40px;
        }

        .app-header .header-action-buttons {
            position: relative;
            z-index: 10;
        }

        #home-screen {
            justify-content: space-between;
            background-size: cover;
            background-position: center;
            transition: background-image 0.5s ease-in-out;
            padding: 50px 0;
            overflow: hidden;
            position: relative;
        }

        /* 主屏幕页面容器 */
        .home-pages-container {
            display: flex;
            width: 200%;
            height: 100%;
            transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            touch-action: pan-y;
        }

        .home-page {
            width: 50%;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: relative;
        }

        /* 第二页左上角插件图标 */
        .plugin-icon-top-left {
            position: absolute;
            top: 20px;
            left: 40px;
            z-index: 10;
        }

        /* 顶部小组件 - 新设计 */
        .top-blur-container {
            width: calc(100% - 5vw);
            margin: 2vh 2.5vw 0 2.5vw;
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        /* 头像 - 纯白色圆形，正好50%在外面50%在里面 */
        .top-avatar {
            width: 15vw;
            height: 15vw;
            max-width: 80px;
            max-height: 80px;
            min-width: 50px;
            min-height: 50px;
            border-radius: 50%;
            background-color: #ffffff;
            border: 0.3vh solid #f8bbd0;
            box-shadow: 0 0.5vh 1.5vh rgba(0, 0, 0, 0.1);
            position: relative;
            z-index: 2;
            /* 负边距正好是头像高度的50%，确保一半在外一半在内 */
            margin-bottom: calc(-15vw / 2);
            object-fit: cover;
        }

        /* 头像旁边的小椭圆装饰 - 第一个 */
        .top-avatar::before {
            content: '';
            position: absolute;
            width: 3vw;
            height: 2.2vw;
            max-width: 16px;
            max-height: 12px;
            min-width: 11px;
            min-height: 8px;
            background-color: #ffffff;
            border: 0.2vh solid #f8bbd0;
            border-radius: 50%;
            top: 20%;
            right: -3vw;
            box-shadow: 0 0.2vh 0.5vh rgba(0, 0, 0, 0.08);
        }

        /* 头像旁边的小椭圆装饰 - 第二个 */
        .top-avatar::after {
            content: '';
            position: absolute;
            width: 4vw;
            height: 3vw;
            max-width: 22px;
            max-height: 16px;
            min-width: 15px;
            min-height: 11px;
            background-color: #ffffff;
            border: 0.2vh solid #f8bbd0;
            border-radius: 50%;
            top: -5%;
            right: -7vw;
            box-shadow: 0 0.2vh 0.5vh rgba(0, 0, 0, 0.08);
        }

        /* 圆角容器 - 纯白色 */
        .top-widget-container {
            width: 100%;
            min-height: 20vh;
            background-color: #ffffff;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-radius: 3vh;
            box-shadow: 0 0.5vh 2vh rgba(0, 0, 0, 0.1);
            /* padding-top 正好是头像高度的50%加上额外间距 */
            padding: calc(15vw / 2 + 2vh) 4vw 3vh 4vw;
            position: relative;
            z-index: 1;
            box-sizing: border-box;
        }

        /* 小屏幕响应式调整 */
        @media (max-width: 380px) {
            .top-avatar {
                width: 16vw;
                height: 16vw;
                margin-bottom: calc(-16vw / 2);
                border-width: 0.25vh;
            }

            .top-avatar::before {
                width: 3.3vw;
                height: 2.4vw;
                right: -3.2vw;
            }

            .top-avatar::after {
                width: 4.3vw;
                height: 3.2vw;
                right: -7.5vw;
            }
            
            .top-widget-container {
                border-radius: 2.5vh;
                min-height: 18vh;
                padding-top: calc(16vw / 2 + 2vh);
            }
        }

        /* 大屏幕响应式调整 */
        @media (min-width: 768px) {
            .top-avatar {
                width: 10vw;
                height: 10vw;
                max-width: 70px;
                max-height: 70px;
                margin-bottom: calc(-10vw / 2);
                border-width: 0.25vh;
            }

            .top-avatar::before {
                width: 2.7vw;
                height: 2vw;
                right: -2.5vw;
            }

            .top-avatar::after {
                width: 3.5vw;
                height: 2.6vw;
                right: -6.5vw;
            }
            
            .top-widget-container {
                border-radius: 2.5vh;
                padding-top: calc(10vw / 2 + 2vh);
            }
        }

        /* 当头像达到最大尺寸时的调整 */
        @media (min-width: 533px) {
            .top-avatar {
                margin-bottom: -40px;
            }

            .top-avatar::before {
                right: -18px;
            }

            .top-avatar::after {
                right: -38px;
            }
            
            .top-widget-container {
                padding-top: calc(40px + 2vh);
            }
        }

        /* 当头像达到最小尺寸时的调整 */
        @media (max-width: 333px) {
            .top-avatar {
                margin-bottom: -25px;
            }

            .top-avatar::before {
                right: -12px;
            }

            .top-avatar::after {
                right: -28px;
            }
            
            .top-widget-container {
                padding-top: calc(25px + 2vh);
            }
        }

        .time-widget {
            text-align: center;
            padding: 0 20px;
            color: var(--text-color);
        }

        .time-widget.hidden {
            display: none !important;
        }

        .time-widget .time {
            font-size: 72px;
            font-weight: 600;
        }

        .time-widget .date {
            font-size: 18px;
            color: #666;
        }

        #home-screen.day-mode .time-widget,
        #home-screen.day-mode .time-widget .date,
        #home-screen.day-mode .app-icon .app-name {
            color: var(--white-color);
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        }

        .app-grid {
            width: 100%;
            padding: 20px 40px;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            justify-content: center;
            align-content: center;
            margin-top: 20px;
        }

        #home-screen.day-mode .time-widget,
        #home-screen.day-mode .time-widget .date,
        #home-screen.day-mode .app-icon .app-name {
            color: var(--white-color);
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        }

        .dock {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 10px;
            padding-bottom: calc(10px + env(safe-area-inset-bottom));
            background-color: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(10px);
            border-radius: var(--border-radius);
            margin: 0 20px;
            margin-bottom: env(safe-area-inset-bottom);
            min-height: 80px;
            gap: 15px;
        }

        .app-icon {
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
            text-decoration: none;
        }

        .icon-img {
            width: 60px;
            height: 60px;
            border-radius: 15px;
            margin-bottom: 8px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s ease;
            object-fit: cover;
        }

        .app-icon:hover .icon-img {
            transform: translateY(-5px);
        }

        .app-icon .app-name {
            font-size: 12px;
            color: var(--text-color);
            font-weight: 500;
        }

        .content {
            flex-grow: 1;
            overflow-y: auto;
            padding: 20px;
            position: relative;
        }

        .placeholder-text {
            text-align: center;
            color: #aaa;
            margin-top: 50px;
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4);
            z-index: 10000;
            display: none;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.3s ease;
        }

        .modal-overlay.visible {
            display: flex;
        }

        .modal-window {
            background: var(--white-color);
            padding: 25px;
            border-radius: var(--border-radius);
            box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
            width: 85%;
            max-width: 340px;
            animation: slideUp 0.4s ease-out;
        }

        .modal-window h3 {
            margin-top: 0;
            text-align: center;
            color: var(--primary-color);
        }

        @keyframes slideUp {
            from {
                transform: translateY(20px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        #edit-group-member-modal,
        #create-member-for-group-modal {
            z-index: 102;
        }
        
        #persona-presets-modal,
        #edit-persona-preset-modal {
            z-index: 10001;
        }
        
        #ai-generate-persona-modal {
            z-index: 10002;
        }
        
        #npc-library-modal {
            z-index: 10001;
        }
        
        #edit-npc-modal,
        #ai-generate-npc-modal {
            z-index: 10002;
        }
        
        #convert-char-to-npc-modal {
            z-index: 10003;
        }

        #mutual-convert-confirm-modal {
            z-index: 10004;
        }

        .context-menu {
            position: fixed;
            z-index: 1000;
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
            overflow: hidden;
            padding: 5px 0;
            animation: fadeIn 0.1s ease;
        }

        .context-menu-item {
            padding: 10px 20px;
            cursor: pointer;
        }

        .context-menu-item:hover {
            background-color: #f5f5f5;
        }

        .context-menu-item.danger {
            color: #e53935;
        }

        .action-sheet-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4);
            z-index: 200;
            display: none;
            align-items: flex-end;
            animation: fadeIn 0.3s ease;
        }

        .action-sheet-overlay.visible {
            display: flex;
        }

        .action-sheet {
            background: #f7f7f7;
            width: 100%;
            border-top-left-radius: 20px;
            border-top-right-radius: 20px;
            padding: 10px;
            padding-bottom: calc(10px + env(safe-area-inset-bottom));
            animation: slideUp 0.3s ease-out;
        }

        .action-sheet-button {
            width: 100%;
            background: white;
            border: none;
            padding: 15px;
            font-size: 16px;
            color: var(--primary-color);
            font-weight: 500;
            cursor: pointer;
            border-radius: 10px;
            margin-bottom: 8px;
        }

        .action-sheet-button.danger {
            color: #e53935;
        }

        .action-sheet-button:last-child {
            margin-bottom: 0;
        }

        #chat-list-screen .content,
        #world-book-screen .content {
            padding: 10px 0 0 0;
        }

        .list-container {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .list-item {
            display: flex;
            align-items: center;
            padding: 10px 20px;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
            transition: background-color 0.2s ease;
            position: relative;
        }

        .list-item:hover {
            background-color: #fdf6f8;
        }

        .chat-item.pinned {
            background-color: var(--top-pinned-bg);
        }

        .chat-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            margin-right: 15px;
            object-fit: cover;
            flex-shrink: 0;
            background-color: #eee;
        }

        .group-avatar {
            border-radius: 10px;
        }

        .item-details {
            flex-grow: 1;
            overflow: hidden;
        }

        .item-details-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .item-name {
            font-weight: 600;
            color: var(--text-color);
            font-size: 16px;
        }

        .item-preview-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 4px;
        }

        .item-preview {
            font-size: 14px;
            color: #888;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            flex-grow: 1;
        }

        .pin-badge {
            background-color: var(--primary-color);
            color: white;
            font-size: 10px;
            font-weight: bold;
            padding: 2px 6px;
            border-radius: 5px;
            white-space: nowrap;
            flex-shrink: 0;
        }

        /* 未读消息小红点 */
        .unread-count-wrapper {
            position: absolute;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
        }

        .unread-count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 20px;
            height: 20px;
            padding: 0 6px;
            background-color: #ff4444;
            color: white;
            font-size: 12px;
            font-weight: bold;
            border-radius: 10px;
            box-shadow: 0 2px 4px rgba(255, 68, 68, 0.3);
        }

        /* 弹窗通知栏 */
        #notification-bar {
            position: fixed;
            top: -100px;
            left: 50%;
            transform: translateX(-50%);
            width: 90%;
            max-width: 400px;
            background: white;
            border-radius: 12px;
            padding: 12px 16px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            display: flex;
            align-items: center;
            gap: 12px;
            z-index: 10000;
            transition: top 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            cursor: pointer;
        }

        #notification-bar.visible {
            top: 20px;
            animation: notification-bounce 0.6s ease;
        }

        @keyframes notification-bounce {
            0% { top: -100px; }
            50% { top: 25px; }
            65% { top: 18px; }
            80% { top: 22px; }
            100% { top: 20px; }
        }

        #notification-bar:active {
            transform: translateX(-50%) scale(0.98);
        }

        #notification-avatar {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0;
            background-color: #eee;
        }

        #notification-content {
            flex: 1;
            overflow: hidden;
        }

        #notification-content .name {
            font-weight: 600;
            font-size: 15px;
            color: #333;
            margin-bottom: 4px;
        }

        #notification-content .message {
            font-size: 13px;
            color: #666;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        #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 {
            font-size: 11px;
            color: #888;
            white-space: nowrap;
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 2px;
            margin-left: 52px;
            align-self: flex-start;
        }

        .message-wrapper.sent .group-nickname {
            margin-left: 0;
            margin-right: 52px;
            align-self: flex-end;
        }

        .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);
            cursor: pointer;
        }

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

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

        /* NovelAI图片样式 */
        .naiimag-image {
            max-width: 300px;
            width: 100%;
            height: auto;
            border-radius: 8px;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .naiimag-image:hover {
            transform: scale(1.02);
        }

        .message-bubble.is-naiimag {
            background: transparent !important;
            padding: 0;
            box-shadow: none;
        }

        .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;
            position: relative;
        }
        
        /* 语音播放动画 */
        .voice-bubble.playing .play-icon {
            animation: pulse 1s ease-in-out infinite;
        }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.2); opacity: 0.7; }
        }
        
        .message-wrapper.sent .voice-bubble.playing .play-icon {
            animation: pulse-flip 1s ease-in-out infinite;
        }
        
        @keyframes pulse-flip {
            0%, 100% { transform: scaleX(-1) scale(1); opacity: 1; }
            50% { transform: scaleX(-1) scale(1.2); opacity: 0.7; }
        }

        .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: fadeIn 0.3s ease;
        }

        .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;
        }

        /* ▼▼▼ 共享位置卡片样式 ▼▼▼ */
        .location-share-card {
            width: 230px;
            border-radius: 10px;
            overflow: hidden;
            background-color: #fff;
            border: 1px solid #f0f0f0;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
            cursor: pointer;
        }

        .card-text-area {
            padding: 12px;
            border-bottom: 1px solid #f0f0f0;
        }

        .card-text-primary {
            font-size: 16px;
            font-weight: 600;
            color: #222;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .card-text-secondary {
            font-size: 12px;
            color: #a0a0a0;
        }

        .card-map-area {
            height: 100px;
            display: flex;
            justify-content: center;
            align-items: center;
            background-size: cover;
            background-position: center;
            background-color: #FFF0F5;
        }

        .message-bubble.sent .location-share-card .card-map-area {
            background-color: #F0FFF8;
        }

        .card-pin-icon {
            font-size: 40px;
            color: #FF6B6B;
            text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
        }
        /* ▲▲▲ 共享位置卡片样式结束 ▲▲▲ */

        .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;
            height: auto;
            border-radius: var(--border-radius);
            margin: 0 8px;
            overflow: hidden;
            position: relative;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            color: white;
        }

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

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

        .transfer-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-size: cover;
            background-position: center;
            filter: blur(4px);
            transform: scale(1.1);
            z-index: 1;
        }

        .transfer-card.sent-transfer::before {
            background-image: var(--custom-bg-image, url('https://i.postimg.cc/sxN893WF/IMG-20250712.png'));
        }

        .transfer-card.received-transfer::before {
            background-image: var(--custom-bg-image, url('https://i.postimg.cc/FzR8LY7g/IMG-20250712-170703.png'));
        }

        .transfer-card .overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.3);
            z-index: 2;
            transition: background-color 0.5s ease;
        }

        .transfer-card.received .overlay {
            background-color: rgba(255, 182, 193, 0.4);
        }

        .transfer-card.returned .overlay {
            background-color: rgba(100, 100, 100, 0.5);
        }

        /* ▼▼▼ 【全新】外卖代付卡片样式 ▼▼▼ */
        .message-bubble.is-waimai-request {
            max-width: none !important; /* 移除气泡的宽度限制 */
        }

        .message-bubble.is-waimai-request .content {
            padding: 0;
            background: transparent;
            box-shadow: none;
            border: none;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            max-width: none !important; /* 移除内容区的宽度限制 */
            overflow: visible !important; /* 确保不出现滚动条 */
        }

        .waimai-card {
            width: 240px;
            min-width: 240px; /* 确保最小宽度 */
            border-radius: 12px;
            overflow: visible !important; /* 核心修改：改为visible，确保内容完整显示 */
            background-color: #fff;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        .waimai-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 12px;
            border-bottom: 1px solid #f0f0f0;
            overflow: visible !important; /* 确保头部不出现滚动条 */
        }

        .waimai-header .icon {
            width: 20px;
            height: 20px;
        }

        .waimai-header .title-group {
            display: flex;
            align-items: baseline;
            font-size: 14px;
            color: #8a8a8a;
        }
        .waimai-header .title-group .brand {
            font-weight: 600;
            color: #555;
            margin-right: 5px;
        }
        .waimai-header .title-group .separator {
            margin: 0 5px;
        }

        .waimai-catchphrase {
            font-size: 13px;
            color: #1f1f1f;
            padding: 12px;
            overflow: visible !important; /* 确保不出现滚动条 */
        }

        .waimai-main {
            background-color: #FFD66B; /* 橙黄色背景 */
            padding: 12px;
            text-align: center;
            overflow: visible !important; /* 核心修改：确保主内容区不出现滚动条 */
            max-height: none !important; /* 移除高度限制 */
            height: auto !important; /* 自动高度 */
        }

        .waimai-main .request-title {
            font-size: 12px;
            color: #856404;
            margin-bottom: 8px;
        }

        .waimai-main .payment-box {
            background-color: #fff;
            border-radius: 8px;
            padding: 15px 10px;
            overflow: visible !important; /* 确保支付框不出现滚动条 */
            max-height: none !important; /* 移除高度限制 */
        }

        .waimai-main .payment-label {
            font-size: 13px;
            color: #8a8a8a;
        }

        .waimai-main .amount {
            font-size: 32px;
            font-weight: 700;
            color: #1f1f1f;
            margin: 4px 0 12px 0;
        }

        .waimai-main .countdown-label {
            font-size: 13px;
            color: #8a8a8a;
        }
        .waimai-main .countdown-timer {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            margin-left: 5px;
        }
        .waimai-main .countdown-timer span {
            background-color: #333;
            color: white;
            padding: 2px 4px;
            border-radius: 2px;
            font-weight: bold;
            font-size: 12px;
        }

        .waimai-details-btn {
            width: 100%;
            padding: 10px 0;
            margin-top: 15px;
            border: none;
            border-radius: 6px;
            background-color: #FFC33A;
            color: #49380a;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
        }

        /* === 【核心修复】强制移除所有外卖卡片相关元素的滚动条 === */
        .waimai-card,
        .waimai-card *,
        .message-bubble.is-waimai-request,
        .message-bubble.is-waimai-request * {
            overflow: visible !important; /* 强制所有元素不出现滚动条 */
            max-height: none !important; /* 移除所有高度限制 */
        }
        /* ▲▲▲ 新CSS粘贴结束 ▲▲▲ */

        /* ▼▼▼ 【全新】外卖响应状态样式 ▼▼▼ */

        /* === 同意支付后的样式 === */
        .message-bubble.status-paid .waimai-card {
            border: 2px solid #28a745; /* 绿色边框 */
        }
        .message-bubble.status-paid .waimai-main .request-title::before {
            content: '✅  ';
        }
        .message-bubble.status-paid .waimai-main .request-title {
            color: #155724;
            font-weight: 600;
        }

        .message-bubble.status-paid .payment-box {
            display: none; /* 隐藏支付详情 */
        }
        .message-bubble.status-paid .waimai-details-btn {
            background-color: #28a745;
            color: white;
        }

        /* === 拒绝支付后的样式 === */
        .message-bubble.status-rejected .waimai-card {
            border: 2px solid #dc3545; /* 红色边框 */
            opacity: 0.8;
        }
        .message-bubble.status-rejected .waimai-main {
            background-color: #e9ecef;
        }
        .message-bubble.status-rejected .waimai-main .request-title::before {
            content: '❌ ';
        }
        .message-bubble.status-rejected .waimai-main .request-title {
            color: #721c24;
            font-weight: 600;
        }
        .message-bubble.status-rejected .payment-box {
            display: none; /* 隐藏支付详情 */
        }
        .message-bubble.status-rejected .waimai-details-btn {
            background-color: #6c757d;
            color: white;
        }

        /* 强制重写 request-title 内容的技巧 */
        .message-bubble[class*="status-"] .request-title {
            font-size: 0;
        }
        .message-bubble[class*="status-"] .request-title::after {
            font-size: 14px;
        }
        .message-bubble.status-paid .request-title::after {
            content: "我已为您买单，请尽情享用吧～";
        }
        .message-bubble.status-rejected .request-title::after {
            content: "我拒绝了您的代付请求";
        }

        /* === 外卖请求的用户操作按钮样式 === */
        .waimai-user-actions {
            display: flex;
            gap: 10px;
            padding: 0 12px 12px 12px; /* 在卡片底部留出空间 */
            background-color: #fff;
        }

        .waimai-user-actions button {
            flex: 1;
            padding: 10px;
            border-radius: 8px;
            border: 1.5px solid;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .waimai-pay-btn {
            background-color: #28a745;
            border-color: #1f7a33;
            color: white;
        }
        .waimai-pay-btn:hover {
            background-color: #218838;
        }

        .waimai-decline-btn {
            background-color: #f8f9fa;
            border-color: #ced4da;
            color: #495057;
        }
        .waimai-decline-btn:hover {
            background-color: #e2e6ea;
        }
        /* ▲▲▲ 外卖代付CSS结束 ▲▲▲ */

        /* ▼▼▼ 分享链接功能样式 ▼▼▼ */
        .link-share-card {
            width: 240px;
            background: linear-gradient(135deg, #fff 0%, #fff5f8 100%);
            border-radius: var(--border-radius);
            border: 2px solid rgba(255, 128, 171, 0.2);
            padding: 15px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            gap: 10px;
            box-shadow: 0 2px 8px rgba(255, 128, 171, 0.1);
        }

        .link-share-card:hover {
            background: linear-gradient(135deg, #fff5f8 0%, #ffe8f0 100%);
            border-color: var(--primary-color);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255, 128, 171, 0.2);
        }

        .link-share-card .title {
            font-weight: 600;
            font-size: 15px;
            line-height: 1.5;
            color: var(--text-color);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .link-share-card .description {
            font-size: 13px;
            color: #666;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .link-share-card .footer {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: var(--primary-color);
            margin-top: 4px;
            font-weight: 500;
        }

        .link-share-card .footer-icon {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
            stroke: var(--primary-color);
        }

        .message-bubble.is-link-share {
            background: transparent !important;
            padding: 0;
            box-shadow: none;
        }
        /* ▲▲▲ 分享链接功能样式结束 ▲▲▲ */

        /* ▼▼▼ 外卖界面样式 ▼▼▼ */
        #waimai-screen {
            display: none;
            flex-direction: column;
            width: 100%;
            height: 100%;
        }

        #waimai-screen.active {
            display: flex;
        }

        .waimai-shop-list {
            flex-grow: 1;
            overflow-y: auto;
            padding: 10px;
        }

        .waimai-shop-item {
            background: white;
            border-radius: 12px;
            padding: 12px;
            margin-bottom: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            cursor: pointer;
            transition: transform 0.2s;
        }

        .waimai-shop-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
        }

        .waimai-shop-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 8px;
        }

        .waimai-shop-name {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
        }

        .waimai-shop-rating {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 13px;
            color: #ff6b35;
        }

        .waimai-shop-stats {
            font-size: 12px;
            color: #999;
            margin-bottom: 8px;
        }

        .waimai-shop-distance {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            color: #666;
            margin-bottom: 8px;
        }

        .waimai-shop-coupons {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .waimai-coupon-tag {
            background: #fff4e6;
            color: #ff6b35;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 11px;
            border: 1px solid #ffe0cc;
        }

        /* 店铺详情界面 */
        #waimai-shop-detail-screen {
            display: none;
            flex-direction: column;
            width: 100%;
            height: 100%;
            position: relative;
        }

        #waimai-shop-detail-screen.active {
            display: flex;
        }

        .waimai-menu-list {
            flex-grow: 1;
            overflow-y: auto;
            padding: 10px;
        }

        .waimai-menu-item {
            background: white;
            border-radius: 12px;
            padding: 12px;
            margin-bottom: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }

        .waimai-menu-info {
            flex: 1;
        }

        .waimai-menu-name {
            font-size: 15px;
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
        }

        .waimai-menu-desc {
            font-size: 12px;
            color: #999;
            margin-bottom: 6px;
        }

        .waimai-menu-price {
            font-size: 16px;
            font-weight: 600;
            color: #ff6b35;
        }

        .waimai-menu-actions {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .waimai-add-btn {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: #ff6b35;
            color: white;
            border: none;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .waimai-quantity-control {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .waimai-minus-btn, .waimai-plus-btn {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #ff6b35;
            color: white;
            border: none;
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .waimai-quantity {
            font-size: 14px;
            font-weight: 600;
            min-width: 20px;
            text-align: center;
        }

        /* 购物车 */
        .waimai-cart-bar {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: white;
            padding: 12px 20px;
            padding-bottom: calc(12px + env(safe-area-inset-bottom));
            box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 100;
        }

        .waimai-cart-info {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .waimai-cart-icon {
            width: 40px;
            height: 40px;
            background: #ff6b35;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
            position: relative;
        }

        .waimai-cart-count {
            position: absolute;
            top: -5px;
            right: -5px;
            background: red;
            color: white;
            border-radius: 10px;
            padding: 2px 6px;
            font-size: 11px;
            font-weight: 600;
        }

        .waimai-cart-total {
            font-size: 18px;
            font-weight: 600;
            color: #ff6b35;
        }

        .waimai-checkout-btn {
            background: #ff6b35;
            color: white;
            border: none;
            padding: 10px 24px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
        }

        /* 支付界面 */
        #waimai-payment-screen {
            display: none;
            flex-direction: column;
            width: 100%;
            height: 100%;
        }

        #waimai-payment-screen.active {
            display: flex;
        }

        .waimai-payment-content {
            flex-grow: 1;
            overflow-y: auto;
            padding: 20px;
        }

        .waimai-payment-amount {
            text-align: center;
            padding: 30px 0;
            background: linear-gradient(135deg, #ff6b35, #ff8c5a);
            color: white;
            border-radius: 12px;
            margin-bottom: 20px;
        }

        .waimai-payment-amount-label {
            font-size: 14px;
            opacity: 0.9;
            margin-bottom: 10px;
        }

        .waimai-payment-amount-value {
            font-size: 42px;
            font-weight: 700;
        }

        .waimai-payment-timer {
            text-align: center;
            font-size: 14px;
            color: #666;
            margin-bottom: 20px;
        }

        .waimai-payment-timer-value {
            font-size: 24px;
            font-weight: 600;
            color: #ff6b35;
            margin-top: 5px;
        }

        .waimai-payment-options {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .waimai-payment-option-btn {
            background: white;
            border: 2px solid #ff6b35;
            color: #ff6b35;
            padding: 15px;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .waimai-payment-option-btn:hover {
            background: #ff6b35;
            color: white;
        }

        .waimai-payment-option-btn.primary {
            background: #ff6b35;
            color: white;
        }

        /* API选择弹窗 */
        #api-select-modal {
            z-index: 10001;
        }

        .api-select-buttons {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }

        .api-select-buttons button {
            flex: 1;
            padding: 12px;
            border-radius: 8px;
            border: none;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
        }

        .api-primary-btn {
            background: #ff6b35;
            color: white;
        }

        .api-secondary-btn {
            background: #6c757d;
            color: white;
        }

        /* 外卖设置弹窗 */
        #waimai-settings-modal {
            z-index: 10001;
        }

        #waimai-settings-modal .form-group {
            margin-bottom: 15px;
        }

        #waimai-settings-modal label {
            display: block;
            margin-bottom: 5px;
            font-size: 14px;
            color: #333;
            font-weight: 500;
        }

        #waimai-settings-modal input[type="number"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 14px;
        }

        /* 开关样式 */
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 28px;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: 0.4s;
            border-radius: 28px;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: 0.4s;
            border-radius: 50%;
        }

        .toggle-switch input:checked + .toggle-slider {
            background-color: var(--primary-color);
        }

        .toggle-switch input:checked + .toggle-slider:before {
            transform: translateX(22px);
        }

        .form-actions {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }

        .form-actions button {
            flex: 1;
            padding: 12px;
            border-radius: 8px;
            border: none;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
        }

        .btn-primary {
            background: var(--primary-color);
            color: white;
        }

        .btn-secondary {
            background: #e0e0e0;
            color: #666;
        }

        /* 外卖刷新模式选择弹窗 */
        #waimai-refresh-mode-modal {
            z-index: 10002;
        }

        .refresh-mode-buttons {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 15px;
        }

        .refresh-mode-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            border-radius: 12px;
            border: 2px solid #e0e0e0;
            background: white;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .refresh-mode-btn:hover {
            border-color: var(--primary-color);
            background: #fff5f8;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255, 128, 171, 0.2);
        }

        .refresh-mode-btn .mode-icon {
            font-size: 32px;
            margin-bottom: 8px;
        }

        .refresh-mode-btn .mode-title {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
        }

        .refresh-mode-btn .mode-desc {
            font-size: 12px;
            color: #888;
        }

        /* ▲▲▲ 外卖界面样式结束 ▲▲▲ */

        .transfer-content {
            position: relative;
            z-index: 3;
            padding: 20px;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
        }

        .transfer-title {
            font-size: 14px;
            margin: 0 0 5px 0;
            opacity: 0.9;
        }

        .transfer-amount {
            font-size: 28px;
            font-weight: bold;
            margin: 0;
        }

        .transfer-remark {
            font-size: 14px;
            margin-top: 10px;
            opacity: 0.9;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .transfer-status {
            font-size: 12px;
            margin-top: 15px;
            padding-top: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.3);
            opacity: 0.8;
        }

        .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: fadeIn 0.3s ease;
        }

        .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;
        }

        /* 引用回复功能样式 */
        #reply-preview-bar {
            display: none;
            padding: 8px 12px;
            margin: 0 8px 8px 8px;
            background-color: rgba(0, 0, 0, 0.05);
            border-left: 3px solid var(--accent-color);
            border-radius: 6px;
            position: relative;
            font-size: 13px;
            color: #666;
        }

        .reply-preview-content .sender {
            font-weight: 600;
            color: var(--text-color);
        }

        .reply-preview-content .text {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: block;
            max-width: 95%;
        }

        #cancel-reply-btn {
            position: absolute;
            top: 50%;
            right: 8px;
            transform: translateY(-50%);
            width: 20px;
            height: 20px;
            line-height: 20px;
            text-align: center;
            border-radius: 50%;
            background-color: rgba(0,0,0,0.1);
            cursor: pointer;
            font-size: 14px;
        }

        .quoted-message {
            padding: 6px 10px;
            margin-bottom: 6px;
            background-color: rgba(0, 0, 0, 0.04);
            border-left: 2px solid var(--accent-color);
            border-radius: 4px;
            font-size: 0.9em;
            opacity: 0.8;
            cursor: pointer;
        }

        .quoted-message:hover {
            opacity: 1;
            background-color: rgba(0, 0, 0, 0.06);
        }

        .quoted-message .quoted-sender {
            font-weight: 600;
            color: var(--accent-color);
            margin-bottom: 2px;
        }

        .quoted-message .quoted-content {
            color: #666;
            white-space: normal;
            word-break: break-word;
            display: block;
        }

        /* 撤回消息样式 */
        .recalled-message-placeholder {
            align-self: center;
            padding: 4px 12px;
            margin: 5px 0;
            background-color: rgba(0, 0, 0, 0.05);
            border-radius: 6px;
            font-size: 12px;
            color: #999;
            white-space: nowrap;
            display: inline-block;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .recalled-message-placeholder:hover {
            background-color: rgba(0, 0, 0, 0.1);
        }

        .recalled-message-placeholder:active {
            background-color: rgba(0, 0, 0, 0.15);
        }

        /* 撤回消息动画 */
        @keyframes recall-animation {
            from {
                opacity: 1;
                transform: scale(1);
            }
            to {
                opacity: 0;
                transform: scale(0.8);
            }
        }

        .message-wrapper.recalled-animation {
            animation: recall-animation 0.3s ease-out forwards;
        }

        .load-more-btn {
            background-color: #e0e0e0;
            color: #757575;
            border: none;
            padding: 8px 16px;
            margin: 10px auto;
            border-radius: 15px;
            cursor: pointer;
            display: block;
            font-size: 13px;
            font-weight: 500;
        }

        .load-more-btn:hover {
            background-color: #d1d1d1;
        }

        .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;
            scroll-behavior: smooth;
            gap: 5px;
        }
        
        /* 隐藏滚动条但保持滚动功能 */
        #sticker-bar::-webkit-scrollbar {
            display: none;
        }
        
        #sticker-bar {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }

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

        .sticker-bar-btn svg {
            width: 28px;
            height: 28px;
            fill: #888;
            transition: fill 0.2s ease, transform 0.2s ease;
        }

        .sticker-bar-btn:hover svg {
            fill: var(--primary-color);
            transform: scale(1.1);
        }

        .sticker-bar-btn:active svg {
            transform: scale(0.95);
        }
        
        /* 展开拓展栏按钮样式 */
        #expand-sticker-bar-btn {
            flex-shrink: 0;
            width: 36px;
            height: 36px;
            padding: 6px;
            background-color: var(--white-color);
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            transition: all 0.2s ease;
        }
        
        #expand-sticker-bar-btn:hover {
            background-color: #f5f5f5;
            border-color: var(--primary-color);
        }
        
        #expand-sticker-bar-btn svg {
            width: 100%;
            height: 100%;
            stroke: #666;
        }
        
        #expand-sticker-bar-btn:hover svg {
            stroke: var(--primary-color);
        }
        
        /* 拓展栏弹窗样式 */
        #sticker-bar-modal {
            z-index: 10001;
        }
        
        #sticker-bar-modal-content {
            scrollbar-width: thin;
            scrollbar-color: #ccc #f5f5f5;
        }
        
        #sticker-bar-modal-content::-webkit-scrollbar {
            width: 8px;
        }
        
        #sticker-bar-modal-content::-webkit-scrollbar-track {
            background: #f5f5f5;
            border-radius: 4px;
        }
        
        #sticker-bar-modal-content::-webkit-scrollbar-thumb {
            background: #ccc;
            border-radius: 4px;
        }
        
        #sticker-bar-modal-content::-webkit-scrollbar-thumb:hover {
            background: #999;
        }
        
        .sticker-bar-modal-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 15px 10px;
            background-color: var(--white-color);
            border: 1px solid #e0e0e0;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            min-height: 90px;
        }
        
        .sticker-bar-modal-btn:hover {
            background-color: #fdf6f8;
            border-color: var(--primary-color);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255, 128, 171, 0.2);
        }
        
        .sticker-bar-modal-btn:active {
            transform: translateY(0);
        }
        
        .sticker-bar-modal-btn svg {
            width: 32px;
            height: 32px;
            fill: #666;
            margin-bottom: 8px;
            transition: all 0.2s ease;
        }
        
        .sticker-bar-modal-btn:hover svg {
            fill: var(--primary-color);
            transform: scale(1.1);
        }
        
        .sticker-bar-modal-btn span {
            font-size: 12px;
            color: #666;
            text-align: center;
            font-weight: 500;
        }
        
        .sticker-bar-modal-btn:hover span {
            color: var(--primary-color);
        }

        /* 暂停按钮特殊样式 */
        #stop-generation-btn svg {
            fill: #ff4444;
        }

        #stop-generation-btn:not(:disabled):hover svg {
            fill: #ff0000;
        }

        /* 暂停按钮启用时的脉冲动画 */
        #stop-generation-btn:not(:disabled) {
            animation: pulse-stop 1.5s ease-in-out infinite;
        }

        /* 暂停按钮禁用状态 */
        #stop-generation-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }

        #stop-generation-btn:disabled svg {
            fill: #888;
        }

        @keyframes pulse-stop {
            0%, 100% {
                opacity: 1;
            }
            50% {
                opacity: 0.6;
            }
        }

        /* 共享位置按钮特殊样式 */
        #share-location-btn svg {
            fill: none;
            stroke: #888;
            stroke-width: 2;
        }

        #share-location-btn:hover svg {
            stroke: var(--primary-color);
            fill: none;
        }

        #sticker-modal {
            position: fixed;
            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;
        }

        /* @成员选择器样式 */
        #mention-selector {
            animation: slideUp 0.2s ease-out;
        }

        .mention-item {
            display: flex;
            align-items: center;
            padding: 12px 16px;
            cursor: pointer;
            transition: background-color 0.2s;
            border-bottom: 1px solid #f0f0f0;
        }

        .mention-item:last-child {
            border-bottom: none;
        }

        .mention-item:hover,
        .mention-item.selected {
            background-color: #f5f5f5;
        }

        .mention-item img {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            margin-right: 12px;
            object-fit: cover;
        }

        .mention-item .mention-name {
            font-size: 15px;
            font-weight: 500;
            color: var(--text-color);
        }

        .mention-item .mention-badge {
            margin-left: 8px;
            font-size: 11px;
            padding: 2px 6px;
            border-radius: 4px;
            background-color: var(--primary-color);
            color: white;
        }

        .mention-item.mention-all {
            background-color: #fff3cd;
            border-bottom: 2px solid #ffc107;
        }

        .mention-item.mention-all:hover {
            background-color: #ffe69c;
        }

        .mention-item.mention-all .mention-name {
            color: #856404;
            font-weight: 600;
        }

        /* @标记样式 */
        .mention-tag {
            color: var(--primary-color);
            font-weight: 600;
            background-color: rgba(255, 128, 171, 0.1);
            padding: 2px 4px;
            border-radius: 4px;
        }

        #multi-select-bar {
            position: fixed;
            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;
        }

        .settings-sidebar {
            position: absolute;
            top: 0;
            right: -100%;
            width: 80%;
            height: 100%;
            background: #fff;
            box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
            transition: right 0.4s ease-in-out;
            z-index: 101;
            display: flex;
            flex-direction: column;
        }

        .settings-sidebar.open {
            right: 0;
        }

        .settings-sidebar.open {
            right: 0;
        }

        .settings-sidebar .header {
            padding: 15px;
            border-bottom: 1px solid #eee;
            font-weight: bold;
            text-align: center;
            color: var(--primary-color);
        }

        .settings-sidebar .content {
            padding: 20px;
            overflow-y: auto;
            flex-grow: 1;
        }

        .settings-sidebar .form-group textarea {
            height: 100px;
            resize: vertical;
        }

        .settings-sidebar .avatar-setting {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 15px;
        }

        .settings-sidebar .avatar-preview {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--primary-color);
            cursor: pointer;
        }
        
        /* Avatar Library Styles */
        .avatar-library-item {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 10px;
            border: 2px solid transparent;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            background: white;
        }
        
        .avatar-library-item:hover {
            border-color: #007aff;
            box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
        }
        
        .avatar-library-item.selected {
            border-color: #007aff;
            background: #e3f2fd;
        }
        
        .avatar-library-item img {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            object-fit: cover;
            margin-bottom: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        
        .avatar-library-item .avatar-name {
            font-size: 12px;
            color: #333;
            text-align: center;
            word-break: break-word;
            max-width: 100%;
        }
        
        .avatar-library-item .selection-checkbox {
            position: absolute;
            top: 5px;
            right: 5px;
            width: 24px;
            height: 24px;
            background: white;
            border: 2px solid #ddd;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        }
        
        .avatar-library-item.selected .selection-checkbox {
            background: #007aff;
            border-color: #007aff;
            color: white;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: var(--secondary-color);
            font-weight: 600;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 12px;
            border: 2px solid #fce4ec;
            border-radius: 10px;
            background-color: #fff;
            transition: border-color 0.3s;
            font-family: var(--font-family);
            font-size: 14px;
            text-overflow: clip;
            overflow: visible;
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary-color);
        }

        .form-group.radio-group {
            display: flex;
            gap: 20px;
            align-items: center;
        }

        .form-group.radio-group label {
            margin-bottom: 0;
        }

        .btn {
            width: 100%;
            padding: 15px;
            border-radius: var(--border-radius);
            border: none;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            text-align: center;
        }

        .btn-primary {
            background-color: var(--primary-color);
            color: var(--white-color);
        }

        .btn-primary:hover {
            background-color: var(--secondary-color);
            box-shadow: 0 4px 15px rgba(255, 128, 171, 0.5);
        }

        label.btn-primary {
            color: var(--white-color) !important;
        }

        .btn-small {
            padding: 8px 16px;
            font-size: 14px;
            width: auto;
        }

        .btn-secondary {
            background-color: var(--accent-color);
            color: var(--white-color);
        }

        .btn-secondary:hover {
            background-color: #64b5f6;
            box-shadow: 0 4px 15px rgba(144, 202, 249, 0.5);
        }

        .btn-neutral {
            background-color: #bdbdbd;
            color: var(--white-color);
        }

        .btn-neutral:hover {
            background-color: #9e9e9e;
        }

        .btn-danger {
            background-color: #ef5350;
            color: white;
        }

        .btn .spinner {
            display: none;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(255, 255, 255, 0.5);
            border-top-color: var(--white-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        .btn.loading .spinner {
            display: block;
        }

        .btn.loading .btn-text {
            display: none;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .wallpaper-preview {
            width: 100%;
            aspect-ratio: 9 / 16;
            max-height: 400px;
            border-radius: var(--border-radius);
            margin-bottom: 25px;
            background-size: cover;
            background-position: center;
            border: 3px dashed var(--primary-color);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--secondary-color);
            font-style: italic;
            background-color: #fff8fa;
        }

        .toast {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 10px 20px;
            border-radius: 15px;
            font-size: 14px;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.5s, visibility 0.5s;
            z-index: 1000;
        }

        .toast.show {
            opacity: 1;
            visibility: visible;
        }

        #world-book-selection-modal,
        #invite-member-modal,
        #group-recipient-selection-modal {
            z-index: 102;
        }

        #world-book-selection-modal .modal-window,
        #invite-member-modal .modal-window,
        #group-recipient-selection-modal .modal-window {
            width: 90%;
            max-width: 380px;
        }

        #world-book-selection-list,
        #invite-member-selection-list,
        #group-recipient-selection-list {
            list-style: none;
            padding: 0;
            margin: 0;
            max-height: 40vh;
            overflow-y: auto;
        }

        .world-book-select-item,
        .invite-member-select-item,
        .group-recipient-select-item {
            display: flex;
            align-items: center;
            padding: 12px 5px;
            border-bottom: 1px solid #f0f0f0;
        }

        .world-book-select-item:last-child,
        .invite-member-select-item:last-child,
        .group-recipient-select-item:last-child {
            border-bottom: none;
        }

        .world-book-select-item input[type="checkbox"],
        .invite-member-select-item input[type="checkbox"],
        .group-recipient-select-item input[type="checkbox"] {
            margin-right: 15px;
            width: 20px;
            height: 20px;
        }

        .world-book-select-item label,
        .invite-member-select-item label,
        .group-recipient-select-item label {
            font-weight: 500;
            color: var(--text-color);
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
        }

        .invite-member-select-item img,
        .group-recipient-select-item img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
        }

        /* --- Group Chat Specific Styles --- */
        .member-selection-list {
            list-style: none;
            padding: 0;
            margin: 15px 0;
            max-height: 40vh;
            overflow-y: auto;
        }

        .member-selection-item {
            display: flex;
            align-items: center;
            padding: 10px 5px;
            border-bottom: 1px solid #f0f0f0;
        }

        .member-selection-item:last-child {
            border-bottom: none;
        }

        .member-selection-item input[type="checkbox"] {
            margin-right: 15px;
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }

        .member-selection-item img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 10px;
        }

        .member-selection-item label {
            font-weight: 500;
            color: var(--text-color);
        }

        #group-settings-sidebar .group-avatar-setting {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 15px;
        }

        #group-settings-sidebar .group-avatar-preview {
            width: 60px;
            height: 60px;
            border-radius: 10px;
            object-fit: cover;
            border: 2px solid var(--primary-color);
            cursor: pointer;
        }

        #group-settings-sidebar .group-members-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
            gap: 15px;
            margin-top: 10px;
        }

        #group-settings-sidebar .group-member,
        #group-settings-sidebar .add-member-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
        }

        #group-settings-sidebar .group-member img {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
            margin-bottom: 5px;
            border: 2px solid #eee;
        }

        #group-settings-sidebar .add-member-btn .add-icon {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            border: 2px dashed #ccc;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: #ccc;
            margin-bottom: 5px;
            transition: all 0.2s ease;
        }

        #group-settings-sidebar .add-member-btn:hover .add-icon {
            color: var(--primary-color);
            border-color: var(--primary-color);
        }

        #group-settings-sidebar .group-member span,
        #group-settings-sidebar .add-member-btn span {
            font-size: 12px;
            text-align: center;
            color: var(--text-color);
        }
        
        /* 群主标识 */
        #group-settings-sidebar .group-member.is-owner {
            position: relative;
        }
        
        #group-settings-sidebar .group-member.is-owner img {
            border-color: #ffd700;
            box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
        }
        
        #group-settings-sidebar .group-member.is-owner::after {
            content: '👑';
            position: absolute;
            top: -5px;
            right: 5px;
            font-size: 16px;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        }
        
        /* 管理员标识 */
        #group-settings-sidebar .group-member.is-admin {
            position: relative;
        }
        
        #group-settings-sidebar .group-member.is-admin img {
            border-color: #10b981;
            box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
        }
        
        #group-settings-sidebar .group-member.is-admin::after {
            content: '🛡️';
            position: absolute;
            top: -5px;
            right: 5px;
            font-size: 16px;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        }
        
        /* 已移除装饰物 */
        #group-settings-sidebar .group-member.is-admin-removed::after {
            content: '�️';
            position: absolute;
            top: -5px;
            right: 5px;
            font-size: 16px;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        }
        
        /* 群公告样式 */
        .announcement-item {
            background: #f9f9f9;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 10px;
            position: relative;
            transition: all 0.2s ease;
        }
        
        .announcement-item:hover {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }
        
        .announcement-item.selected {
            border-color: var(--primary-color);
            background: rgba(255, 128, 171, 0.05);
        }
        
        .announcement-checkbox {
            position: absolute;
            top: 12px;
            left: 12px;
            width: 18px;
            height: 18px;
            cursor: pointer;
        }
        
        .announcement-content {
            margin-left: 30px;
            white-space: pre-wrap;
            word-wrap: break-word;
            font-size: 14px;
            line-height: 1.6;
            color: #333;
            min-height: 40px;
        }
        
        .announcement-edit-area {
            margin-left: 30px;
            display: none;
        }
        
        .announcement-edit-area textarea {
            width: 100%;
            min-height: 100px;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            resize: vertical;
        }
        
        .announcement-actions {
            margin-left: 30px;
            margin-top: 8px;
            display: flex;
            gap: 8px;
        }
        
        .announcement-meta {
            margin-left: 30px;
            margin-top: 8px;
            font-size: 12px;
            color: #999;
        }
        
        #group-announcements-list:empty::before {
            content: '暂无群公告';
            display: block;
            text-align: center;
            padding: 20px;
            color: #999;
            font-size: 14px;
        }
        
        /* 踢出成员选择列表样式 */
        .kick-member-item {
            display: flex;
            align-items: center;
            padding: 12px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        
        .kick-member-item:hover {
            background-color: #f5f5f5;
        }
        
        .kick-member-item:last-child {
            border-bottom: none;
        }
        
        .kick-member-item.disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background-color: #f9f9f9;
        }
        
        .kick-member-item.disabled:hover {
            background-color: #f9f9f9;
        }
        
        .kick-member-item input[type="checkbox"] {
            width: 20px;
            height: 20px;
            margin-right: 15px;
            cursor: pointer;
        }
        
        .kick-member-item.disabled input[type="checkbox"] {
            cursor: not-allowed;
        }
        
        .kick-member-item img {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 12px;
        }
        
        .kick-member-item .member-info {
            flex: 1;
        }
        
        .kick-member-item .member-name {
            font-weight: 600;
            font-size: 15px;
            color: #333;
        }
        
        .kick-member-item .cannot-kick-badge {
            display: inline-block;
            background-color: #e0e0e0;
            color: #666;
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 10px;
            margin-left: 8px;
        }
        
        /* 转让群主选择列表样式 */
        .owner-select-item {
            display: flex;
            align-items: center;
            padding: 12px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        
        .owner-select-item:hover {
            background-color: #f5f5f5;
        }
        
        .owner-select-item:last-child {
            border-bottom: none;
        }
        
        .owner-select-item input[type="radio"] {
            width: 20px;
            height: 20px;
            margin-right: 15px;
            cursor: pointer;
        }
        
        .owner-select-item img {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 12px;
        }
        
        .owner-select-item .member-info {
            flex: 1;
        }
        
        .owner-select-item .member-name {
            font-weight: 600;
            font-size: 15px;
            color: #333;
        }
        
        .owner-select-item .owner-badge {
            display: inline-block;
            background: linear-gradient(135deg, #ffd700, #ffed4e);
            color: #333;
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 10px;
            margin-left: 8px;
            font-weight: bold;
            box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
        }
        
        /* 管理员选择列表样式 */
        .admin-select-item {
            display: flex;
            align-items: center;
            padding: 12px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        
        .admin-select-item:hover {
            background-color: #f5f5f5;
        }
        
        .admin-select-item:last-child {
            border-bottom: none;
        }
        
        .admin-select-item input[type="checkbox"] {
            width: 20px;
            height: 20px;
            margin-right: 15px;
            cursor: pointer;
        }
        
        .admin-select-item img {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 12px;
        }
        
        .admin-select-item .member-info {
            flex: 1;
        }
        
        .admin-select-item .member-name {
            font-weight: 600;
            font-size: 15px;
            color: #333;
        }
        
        .admin-select-item .admin-badge {
            display: inline-block;
            background: linear-gradient(135deg, #10b981, #34d399);
            color: white;
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 10px;
            margin-left: 8px;
            font-weight: bold;
            box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
        }

        #customize-screen .icon-custom-item {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 15px;
            padding-bottom: 15px;
            border-bottom: 1px solid #f0f0f0;
        }

        #customize-screen .icon-custom-item:last-child {
            border-bottom: none;
        }

        #customize-screen .icon-preview {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            object-fit: cover;
            flex-shrink: 0;
        }

        #customize-screen .icon-details {
            flex-grow: 1;
        }

        #customize-screen .icon-details p {
            margin: 0 0 8px 0;
            font-weight: 600;
        }

        #customize-screen .icon-details input {
            width: calc(100% - 70px);
        }

        #customize-screen .reset-icon-btn {
            background: #e0e0e0;
            color: #555;
            border: none;
            border-radius: 8px;
            padding: 8px 10px;
            font-size: 12px;
            cursor: pointer;
            margin-left: 10px;
        }

        /* --- Preset Management Styles --- */
        .preset-section {
            margin-top: 20px;
        }

        .preset-list {
            border: 1px solid #f0f0f0;
            border-radius: 10px;
            overflow: hidden;
            background-color: #fff;
            max-height: 300px;
            overflow-y: auto;
        }

        .preset-item:hover {
            background-color: #fdf6f8;
        }

        .preset-item:last-child label {
            border-bottom: none;
        }

        .btn-danger {
            background-color: #e53935;
            color: var(--white-color);
        }

        .btn-danger:hover {
            background-color: #c62828;
        }

        /* --- Mute Management Styles --- */
        .mute-member-item {
            display: flex;
            align-items: center;
            padding: 10px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            margin-bottom: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .mute-member-item:hover {
            background-color: #f5f5f5;
        }

        .mute-member-item.selected {
            border-color: var(--primary-color);
            background-color: rgba(255, 128, 171, 0.1);
        }

        .mute-member-item.muted {
            background-color: #ffe5e5;
            border-color: #ff3b30;
        }

        .mute-member-item.muted.selected {
            background-color: rgba(255, 59, 48, 0.2);
        }

        .mute-member-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 12px;
            object-fit: cover;
        }

        .mute-member-info {
            flex: 1;
        }

        .mute-member-name {
            font-weight: 600;
            font-size: 15px;
            margin-bottom: 2px;
        }

        .mute-member-status {
            font-size: 12px;
            color: #888;
        }

        .mute-member-status.muted-status {
            color: #ff3b30;
            font-weight: 600;
        }

        .mute-duration-btn {
            padding: 8px 12px;
            border: 1px solid #ddd;
            background: white;
            border-radius: 5px;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.2s;
        }

        .mute-duration-btn:hover {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        .mute-duration-btn.selected {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        /* --- Toggle Switch Styles --- */
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
            flex-shrink: 0;
        }

        .toggle-switch input[type="checkbox"] {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: 0.3s;
            border-radius: 26px;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: 0.3s;
            border-radius: 50%;
        }

        .toggle-switch input[type="checkbox"]:checked + .toggle-slider {
            background-color: var(--primary-color);
        }

        .toggle-switch input[type="checkbox"]:checked + .toggle-slider:before {
            transform: translateX(24px);
        }

        /* --- Tutorial Screen Styles --- */
        .tutorial-item {
            margin-bottom: 15px;
            border: 1px solid #fce4ec;
            border-radius: 12px;
            overflow: hidden;
            background-color: #fff8fa;
        }

        .tutorial-header {
            padding: 12px 18px;
            font-weight: 600;
            color: var(--secondary-color);
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .tutorial-header::after {
            content: '▼';
            font-size: 12px;
            transition: transform 0.3s ease;
        }

        .tutorial-item.open .tutorial-header::after {
            transform: rotate(180deg);
        }

        .tutorial-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.5s ease-in-out, padding 0.5s ease;
            padding: 0 10px;
        }

        .tutorial-item.open .tutorial-content {
            padding: 10px 10px;
            /* A large value to ensure it expands to fit the content */
            max-height: 5000px;
        }

        .tutorial-content img {
            width: 100%;
            height: auto;
            border-radius: 8px;
            display: block;
        }

        /* --- 世界书分组筛选样式 --- */
        .wb-group-filter-select {
            padding: 6px 10px;
            border: 1px solid #ddd;
            border-radius: 6px;
            background: white;
            font-size: 14px;
            color: #333;
            cursor: pointer;
            outline: none;
            transition: all 0.2s ease;
            max-width: 80px;
        }

        .wb-group-filter-select:hover {
            border-color: var(--primary-color);
        }

        .wb-group-filter-select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(255, 128, 171, 0.1);
        }

        /* 世界书页面右上角按钮组样式调整 */
        #world-book-screen .action-btn-group {
            gap: 8px;
        }

        #world-book-screen .action-btn-group #add-world-book-btn {
            font-size: 24px;
            padding: 0;
            width: 40px;
            height: 40px;
        }

        /* --- 世界书悬浮按钮和菜单样式 --- */
        .wb-float-btn {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            box-shadow: 0 4px 12px rgba(255, 128, 171, 0.4);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 50;
            transition: all 0.3s ease;
            color: var(--white-color);
            font-size: 24px;
            font-weight: bold;
        }

        .wb-float-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 16px rgba(255, 128, 171, 0.6);
        }

        .wb-float-btn:active {
            transform: scale(0.95);
        }

        .wb-float-menu {
            position: fixed;
            bottom: 95px;
            right: 30px;
            background: var(--white-color);
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            overflow: hidden;
            z-index: 49;
            animation: slideUpFade 0.3s ease-out;
        }

        @keyframes slideUpFade {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .wb-menu-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 15px 20px;
            border: none;
            background: none;
            width: 100%;
            font-size: 16px;
            color: var(--text-color);
            cursor: pointer;
            transition: background-color 0.2s ease;
            border-bottom: 1px solid #f0f0f0;
        }

        .wb-menu-item:last-child {
            border-bottom: none;
        }

        .wb-menu-item:hover {
            background-color: #fdf6f8;
        }

        .wb-menu-item.wb-danger {
            color: #e53935;
        }

        .wb-menu-item.wb-danger:hover {
            background-color: #ffebee;
        }

        /* 世界书选择列表项样式 */
        .wb-select-item {
            display: flex;
            align-items: center;
            padding: 12px 5px;
            border-bottom: 1px solid #f0f0f0;
        }

        .wb-select-item:last-child {
            border-bottom: none;
        }

        .wb-select-item input[type="checkbox"] {
            margin-right: 15px;
            width: 20px;
            height: 20px;
            cursor: pointer;
        }

        .wb-select-item label {
            font-weight: 500;
            color: var(--text-color);
            cursor: pointer;
            flex-grow: 1;
        }

        .wb-select-all-container {
            padding: 15px 5px;
            border-bottom: 2px solid var(--primary-color);
            margin-bottom: 10px;
        }

        .wb-select-all-container input[type="checkbox"] {
            margin-right: 15px;
            width: 22px;
            height: 22px;
            cursor: pointer;
        }

        .wb-select-all-container label {
            font-weight: 600;
            color: var(--primary-color);
            cursor: pointer;
            font-size: 16px;
        }
        #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: 10003; opacity: 0; transition: opacity 0.2s ease-in-out; }
        #custom-modal-overlay.visible { display: flex; opacity: 1; }
        #custom-modal { background-color: #fff; width: 320px; max-width: 90%; 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; line-height: 1.5; }
        .custom-modal-body p { margin: 0; margin-bottom: 12px; }
        .custom-modal-body::-webkit-scrollbar { width: 6px; }
        .custom-modal-body::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
        .custom-modal-body::-webkit-scrollbar-thumb { background: #ff80ab; border-radius: 3px; }
        .custom-modal-body::-webkit-scrollbar-thumb:hover { background: #f48fb1; }
        .custom-modal-footer { display: flex; border-top: 1px solid #e5e5e5; }
        .custom-modal-footer button { flex: 1; background: none; border: none; padding: 12px; font-size: 17px; cursor: pointer; color: #007aff; font-weight: 400; border-right: 1px solid #e5e5e5; }
        .custom-modal-footer button:last-child { border-right: none; font-weight: 600; }
        .custom-modal-footer button.cancel { color: #007aff; font-weight: 400; }
        .custom-modal-footer button.confirm-btn { font-weight: 600; }
        
        /* --- Toggle Switch Styles --- */
        .switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
        }
        
        .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: 26px;
        }
        
        .slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        
        input:checked + .slider {
            background-color: #4CAF50;
        }
        
        input:focus + .slider {
            box-shadow: 0 0 1px #4CAF50;
        }
        
        input:checked + .slider:before {
            transform: translateX(24px);
        }
        
        /* --- Memory Summary Item Styles --- */
        .memory-summary-item {
            padding: 10px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: background-color 0.2s;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .memory-summary-item:hover {
            background-color: #f5f5f5;
        }
        
        .memory-summary-item:last-child {
            border-bottom: none;
        }
        
        .memory-summary-info {
            flex: 1;
        }
        
        .memory-summary-name {
            font-weight: bold;
            color: #333;
            margin-bottom: 3px;
        }
        
        .memory-summary-preview {
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            line-height: 1.4;
        }
        
        /* --- Persona Preset Item Styles --- */
        .persona-preset-item {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            padding: 12px;
            border-bottom: 1px solid #eee;
            transition: background-color 0.2s;
            position: relative;
        }
        
        .persona-preset-item:hover {
            background-color: #f5f5f5;
        }
        
        .persona-preset-item:last-child {
            border-bottom: none;
        }
        
        .persona-preset-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 12px;
            flex-shrink: 0;
        }
        
        .persona-preset-info {
            flex: 1;
            min-width: 0;
            margin-right: 8px;
        }
        
        .persona-preset-name {
            font-weight: bold;
            color: #333;
            margin-bottom: 4px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .persona-preset-toggle-btn {
            background: none;
            border: none;
            color: var(--primary-color);
            cursor: pointer;
            font-size: 12px;
            padding: 2px 6px;
            display: inline-flex;
            align-items: center;
            transition: all 0.2s;
            border-radius: 4px;
        }
        
        .persona-preset-toggle-btn:hover {
            background-color: rgba(255, 128, 171, 0.1);
        }
        
        .persona-preset-description-preview {
            font-size: 12px;
            color: #666;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            line-height: 1.5;
        }
        
        .persona-preset-description-full {
            font-size: 12px;
            color: #666;
            line-height: 1.5;
            white-space: pre-wrap;
            word-break: break-word;
            margin-top: 4px;
            display: none;
        }
        
        .persona-preset-actions {
            display: flex;
            gap: 8px;
            flex-shrink: 0;
            align-self: flex-start;
        }
        
        .persona-preset-actions button {
            padding: 4px 10px;
            font-size: 12px;
        }
        
        .persona-preset-item.expanded .persona-preset-description-preview {
            display: none;
        }
        
        .persona-preset-item.expanded .persona-preset-description-full {
            display: block;
        }
        
        /* --- Persona Import Selection Item --- */
        .persona-import-item {
            display: flex;
            align-items: center;
            padding: 12px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        
        .persona-import-item:hover {
            background-color: #f5f5f5;
        }
        
        .persona-import-item:last-child {
            border-bottom: none;
        }
        
        .persona-import-item input[type="checkbox"] {
            margin-right: 12px;
            width: 18px;
            height: 18px;
            cursor: pointer;
        }
        
        /* --- NPC Library Item Styles --- */
        .npc-item {
            display: flex;
            align-items: center;
            padding: 12px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        
        .npc-item:hover {
            background-color: #f5f5f5;
        }
        
        .npc-item:last-child {
            border-bottom: none;
        }
        
        .npc-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 12px;
            flex-shrink: 0;
            background-color: #eee;
        }
        
        /* NPC聊天按钮样式 */
        .npc-chat-btn {
            transition: all 0.2s ease;
        }
        
        .npc-chat-btn:hover {
            background-color: var(--secondary-color) !important;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(255, 128, 171, 0.3);
        }
        
        .npc-chat-btn:active {
            transform: translateY(0);
        }
        
        /* --- Convert CHAR to NPC Item Styles --- */
        #convert-char-list {
            scrollbar-width: thin;
            scrollbar-color: #ccc #f5f5f5;
            display: flex;
            flex-direction: column;
        }
        
        #convert-char-list::-webkit-scrollbar {
            width: 8px;
        }
        
        #convert-char-list::-webkit-scrollbar-track {
            background: #f5f5f5;
            border-radius: 4px;
        }
        
        #convert-char-list::-webkit-scrollbar-thumb {
            background: #ccc;
            border-radius: 4px;
        }
        
        #convert-char-list::-webkit-scrollbar-thumb:hover {
            background: #999;
        }
        
        .convert-char-item {
            display: flex;
            align-items: center;
            padding: 12px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: background-color 0.2s;
            flex-shrink: 0;
            min-height: 74px;
            width: 100%;
            box-sizing: border-box;
        }
        
        .convert-char-item:hover {
            background-color: #f5f5f5;
        }
        
        .convert-char-item:last-child {
            border-bottom: none;
        }
        
        /* 页面动态效果 - 下雪效果 */
        .snowflake {
            position: fixed;
            top: -10px;
            z-index: 9999;
            user-select: none;
            pointer-events: none;
            color: #fff;
            font-size: 1em;
            animation: fall linear infinite;
        }
        
        @keyframes fall {
            to {
                transform: translateY(100vh) rotate(360deg);
            }
        }
        
        /* 动态效果容器 */
        #page-effect-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 9998;
            overflow: hidden;
        }
        
        /* 雪花颜色预设块样式 */
        .snow-color-preset {
            position: relative;
            overflow: hidden;
        }
        
        .snow-color-preset::after {
            content: '✓';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0);
            color: var(--primary-color);
            font-size: 20px;
            font-weight: bold;
            transition: transform 0.2s;
            text-shadow: 0 0 3px white, 0 0 5px white;
        }
        
        .snow-color-preset.selected::after {
            transform: translate(-50%, -50%) scale(1);
        }

        /* 音乐播放器样式 */
        @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: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 50;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            padding-top: 30px;
            background-color: rgba(0,0,0,0.3);
            opacity: 0;
            visibility: hidden;
            transform: translateY(-50px);
            transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        
        #music-player-overlay.visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
        
        .music-player-window { 
            width: 70%; 
            min-height: 420px;
            background-color: rgba(255, 255, 255, 0.6); 
            backdrop-filter: blur(20px); 
            -webkit-backdrop-filter: blur(20px); 
            border-radius: 25px; 
            box-shadow: 0 8px 32px 0 rgba(25, 25, 25, 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;
            justify-content: space-between;
            padding-bottom: 15px;
        }
        
        .music-player-top-actions {
            position: absolute;
            top: 15px;
            left: 15px;
            right: 15px;
            width: calc(100% - 30px);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .top-left-cluster {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        #music-return-btn, #music-exit-btn {
            background: none;
            border: none;
            font-size: 28px;
            font-weight: 300;
            cursor: pointer;
            color: #555;
            padding: 5px;
            line-height: 1;
        }
        #music-exit-btn {
            font-size: 24px;
            font-weight: 400;
        }
        #music-playlist-btn {
            font-size: 24px;
            cursor: pointer;
            color: #333;
        }
        /* 音乐播放器头像区域 */
        #music-avatars-container {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 30px;
            margin-bottom: 15px;
            position: relative;
        }
        
        .music-avatar {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid white;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }
        
        #music-user-avatar {
            position: relative;
            z-index: 1;
        }
        
        #music-char-avatar {
            position: relative;
            z-index: 2;
            margin-left: -15px; /* 让两个头像靠在一起 */
        }
        
        #music-time-counter {
            font-size: 12px;
            color: #555;
            margin-bottom: 20px;
            margin-top: 10px;
        }
        #music-player-song-title {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 5px;
            color: #1f1f1f;
        }
        #music-player-artist {
            font-size: 14px;
            color: #666;
            margin-bottom: 20px;
        }
        
        .music-progress-bar-container {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 25px;
            margin-bottom: 10px;
        }
        .time-display {
            font-size: 11px;
            color: #888;
            width: 35px;
            text-align: center;
            flex-shrink: 0;
            font-family: 'SF Mono', 'Menlo', monospace;
        }
        .progress-bar {
            flex-grow: 1;
            height: 5px;
            background-color: #e5e5e5;
            border-radius: 2.5px;
            cursor: pointer;
        }
        .progress-bar-fill {
            width: 0%;
            height: 100%;
            background-color: #333;
            border-radius: 2.5px;
        }
        
        #music-lyrics-container {
            width: 100%;
            height: 192px;
            overflow: hidden;
            position: relative;
            -webkit-mask-image: linear-gradient(transparent, black 20%, black 80%, transparent);
            mask-image: linear-gradient(transparent, black 20%, black 80%, transparent);
        }
        
        #music-lyrics-list {
            display: flex;
            flex-direction: column;
            align-items: center;
            transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
        }
        
        .lyric-line {
            padding: 4px 0;
            font-size: 14px;
            color: #666;
            text-align: center;
            line-height: 1.5;
            transition: all 0.5s ease;
            opacity: 0.7;
            transform: scale(0.95);
        }
        
        .lyric-line.active {
            font-size: 16px;
            color: #000;
            opacity: 1;
            transform: scale(1);
        }
        
        /* 胶片和歌词视图容器样式 */
        #music-visual-container {
            width: 100%;
            max-width: 280px;
            aspect-ratio: 1 / 1;
            position: relative;
            margin: 0 auto 15px auto;
            cursor: pointer;
        }
        
        /* 胶片视图和歌词视图的通用样式 */
        #vinyl-view, #inline-lyrics-view {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: opacity 0.5s ease, transform 0.5s ease;
        }
        
        /* 黑胶唱片视图样式 */
        #vinyl-view {
            background-color: #222;
            border-radius: 50%;
            padding: 18px;
            box-shadow: 0 8px 25px rgba(0,0,0,0.3), 
                        inset 0 0 0 2px rgba(255, 255, 255, 0.05);
            background-image: repeating-radial-gradient(circle, #333, #333 1px, #222 1px, #222 2px);
            box-sizing: border-box;
            aspect-ratio: 1 / 1;
        }
        
        #vinyl-view #music-player-cover {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            box-shadow: 0 0 10px rgba(0,0,0,0.5);
            margin: 0;
        }
        
        /* 歌词视图样式 */
        #inline-lyrics-view {
            opacity: 0;
            transform: scale(1.1);
            pointer-events: none;
            padding: 10px;
            box-sizing: border-box;
        }
        
        /* 切换逻辑：当容器有 lyrics-active 类时 */
        #music-visual-container.lyrics-active #vinyl-view {
            opacity: 0;
            transform: scale(0.9);
        }
        
        #music-visual-container.lyrics-active #inline-lyrics-view {
            opacity: 1;
            transform: scale(1);
            pointer-events: auto;
        }
        
        /* 歌词容器在内联视图中的样式 */
        #inline-lyrics-view #music-lyrics-container {
            width: 100%;
            height: 100%;
        }

        /* 页面悬浮歌词样式 - 纯歌词无背景 */
        #floating-lyrics-container {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 9998;
            background: transparent;
            padding: 20px;
            display: none;
            cursor: move;
            user-select: none;
            -webkit-user-select: none;
            touch-action: none;
            transition: opacity 0.3s ease;
            pointer-events: auto;
        }

        #floating-lyrics-container.visible {
            display: block;
            animation: floatingLyricsIn 0.4s ease-out;
        }

        @keyframes floatingLyricsIn {
            from {
                opacity: 0;
                transform: translate(-50%, -50%) translateY(20px);
            }
            to {
                opacity: 1;
                transform: translate(-50%, -50%) translateY(0);
            }
        }

        #floating-lyrics-container.dragging {
            transition: none;
            opacity: 0.9;
        }

        .floating-lyrics-header {
            display: none;
        }

        .floating-lyrics-close {
            position: absolute;
            top: 0;
            right: 0;
            background: rgba(0, 0, 0, 0.3);
            border: none;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 20px;
            color: white;
            transition: all 0.2s;
            opacity: 0;
            pointer-events: auto;
        }

        #floating-lyrics-container:hover .floating-lyrics-close {
            opacity: 1;
        }

        .floating-lyrics-close:hover {
            background: rgba(0, 0, 0, 0.5);
            transform: scale(1.1);
        }

        .floating-lyrics-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            pointer-events: none;
        }

        .floating-lyric-line {
            font-size: 15px;
            color: rgba(150, 150, 150, 0.9);
            text-align: center;
            line-height: 1.8;
            transition: all 0.5s ease;
            opacity: 0.6;
            transform: scale(0.95);
            padding: 3px 0;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
            font-weight: 400;
        }

        .floating-lyric-line.active {
            font-size: 20px;
            font-weight: 700;
            color: var(--primary-color);
            opacity: 1;
            transform: scale(1);
            text-shadow: 0 2px 8px rgba(255, 128, 171, 0.4);
        }

        .floating-lyric-line.upcoming {
            font-size: 14px;
            opacity: 0.4;
            color: rgba(120, 120, 120, 0.8);
        }
        
        .floating-lyric-line.previous {
            font-size: 14px;
            opacity: 0.4;
            color: rgba(120, 120, 120, 0.8);
        }
        
        /* 黑胶唱片旋转动画 */
        @keyframes spin-vinyl {
            from {
                transform: rotate(0deg);
            }
            to {
                transform: rotate(360deg);
            }
        }
        
        #vinyl-view.spinning {
            animation: spin-vinyl 12s linear infinite;
        }
        
        .music-player-controls-wrapper {
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .music-controls {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            margin-top: 0;
        }
        .music-controls button {
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: #333;
            padding: 10px;
        }
        .play-pause-btn {
            font-size: 28px !important;
        }
        
        #music-playlist-panel {
            position: fixed;
            bottom: -100%;
            left: 0;
            width: 100%;
            height: 60%;
            background-color: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
            z-index: 51;
            transition: bottom 0.3s ease;
            display: flex;
            flex-direction: column;
            border-radius: 20px 20px 0 0;
        }
        #music-playlist-panel.visible {
            bottom: 0;
        }
        .playlist-header {
            padding: 20px 15px 15px 15px;
            background-color: rgba(240, 240, 240, 0.8);
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 600;
            border-bottom: 1px solid #ddd;
            border-radius: 20px 20px 0 0;
            position: relative;
        }
        
        .playlist-header-left {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        
        .playlist-header-right {
            display: flex;
            gap: 6px;
            align-items: center;
        }
        .playlist-header::before {
            content: '';
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            width: 40px;
            height: 4px;
            background-color: rgba(0, 0, 0, 0.2);
            border-radius: 2px;
        }
        .panel-btn {
            cursor: pointer;
            padding: 5px 10px;
            background-color: rgba(0, 123, 255, 0.1);
            border-radius: 5px;
            font-size: 14px;
            transition: all 0.2s;
        }
        .panel-btn:hover {
            background-color: rgba(0, 123, 255, 0.2);
            transform: translateY(-1px);
        }
        
        /* 清理按钮特殊样式 */
        #clean-invalid-songs-btn {
            background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
            color: white;
            font-weight: 600;
        }
        
        #clean-invalid-songs-btn:hover {
            background: linear-gradient(135deg, #ff5252, #e91e63);
            box-shadow: 0 2px 8px rgba(255, 82, 82, 0.3);
        }
        
        /* 管理按钮样式 */
        #manage-playlist-btn {
            background-color: rgba(0, 123, 255, 0.1);
            color: #333;
            font-weight: 500;
        }
        
        #manage-playlist-btn:hover {
            background-color: rgba(0, 123, 255, 0.2);
        }
        
        #manage-playlist-btn.active {
            background: rgba(52, 152, 219, 0.15);
            color: #3498db;
            font-weight: 600;
        }
        
        /* 管理模式控制条 */
        .playlist-manage-bar {
            display: none;
            padding: 10px 15px;
            background: #f8f9fa;
            border-bottom: 1px solid #ddd;
            align-items: center;
            gap: 10px;
            justify-content: space-between;
        }
        
        .playlist-manage-bar.visible {
            display: flex;
        }
        
        .playlist-manage-actions {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        
        /* 管理模式删除按钮hover效果 */
        #delete-selected-playlist-btn:hover {
            background: rgba(255, 107, 107, 0.25) !important;
            transform: translateY(-1px);
        }
        
        /* 播放列表项复选框 */
        .playlist-item-checkbox {
            width: 24px;
            height: 24px;
            margin-right: 12px;
            cursor: pointer;
            display: none;
            flex-shrink: 0;
            /* 增大点击区域 */
            padding: 8px;
            margin: -8px 12px -8px -8px;
            accent-color: #4CAF50;
        }
        
        .playlist-item.manage-mode .playlist-item-checkbox {
            display: block;
        }
        
        /* 拖动相关样式 */
        #playlist-manage-modal .modal-content-wrapper {
            position: absolute;
            cursor: move;
            user-select: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
        }
        
        #playlist-manage-modal .modal-content-wrapper.dragging {
            transition: none !important;
        }
        
        #playlist-manage-modal .modal-header-drag-handle {
            cursor: move;
            padding: 8px 0;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        #playlist-manage-modal .drag-indicator {
            width: 36px;
            height: 4px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 2px;
            margin-bottom: 4px;
        }
        
        .playlist-item.manage-mode {
            padding-left: 10px;
        }
        
        /* 弹窗按钮统一磨砂hover效果 */
        .upload-modal-option:hover,
        .lyrics-modal-option:hover,
        .cover-modal-option:hover,
        .manage-modal-option:hover {
            background: rgba(0, 0, 0, 0.06) !important;
            border-color: rgba(0,0,0,0.15) !important;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }
        
        .manage-modal-option[data-action="delete"]:hover {
            background: rgba(255, 107, 107, 0.2) !important;
            border-color: rgba(255, 107, 107, 0.3) !important;
        }
        
        .manage-modal-option[data-action="time-settings"]:hover {
            background: rgba(108, 99, 255, 0.2) !important;
            border-color: rgba(108, 99, 255, 0.3) !important;
        }
        
        .time-settings-option {
            transition: all 0.25s ease;
        }
        
        .time-settings-option:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        
        .time-settings-option[data-action="toggle-unit"]:hover {
            background: rgba(108, 99, 255, 0.15) !important;
            border-color: rgba(108, 99, 255, 0.3) !important;
        }
        
        .time-settings-option[data-action="reset-time"]:hover {
            background: rgba(255, 107, 107, 0.15) !important;
            border-color: rgba(255, 107, 107, 0.3) !important;
        }
        
        .time-settings-option:active {
            transform: translateY(0);
        }
        
        #close-time-settings:hover {
            background: rgba(0,0,0,0.08) !important;
        }
        
        /* 时长设置弹窗拖动样式 */
        #time-settings-modal .modal-content-wrapper {
            position: absolute;
            cursor: move;
            user-select: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
        }
        
        #time-settings-modal .modal-content-wrapper.dragging {
            transition: none !important;
        }
        
        #time-settings-modal .modal-header-drag-handle {
            cursor: move;
            padding: 8px 0;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        #time-settings-modal .drag-indicator {
            width: 36px;
            height: 4px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 2px;
        }
        
        .upload-modal-option:active,
        .lyrics-modal-option:active,
        .cover-modal-option:active,
        .manage-modal-option:active {
            transform: translateY(0);
            box-shadow: 0 1px 3px rgba(0,0,0,0.06);
        }
        
        /* 关闭按钮hover效果 */
        #close-upload-modal:hover,
        #close-lyrics-modal:hover,
        #close-cover-modal:hover,
        #close-manage-modal:hover {
            background: rgba(0,0,0,0.08) !important;
            transform: scale(1.05);
        }
        
        #close-upload-modal:active,
        #close-lyrics-modal:active,
        #close-cover-modal:active,
        #close-manage-modal:active {
            transform: scale(0.95);
        }
        
        #upload-options-modal,
        #lyrics-import-modal,
        #cover-import-modal,
        #playlist-manage-modal,
        #time-settings-modal {
            display: none !important;
        }
        
        #upload-options-modal.show,
        #lyrics-import-modal.show,
        #cover-import-modal.show,
        #playlist-manage-modal.show,
        #time-settings-modal.show {
            display: flex !important;
        }
        
        #close-upload-modal:hover,
        #close-lyrics-modal:hover,
        #close-cover-modal:hover {
            background: rgba(255,255,255,0.3) !important;
            transform: rotate(90deg);
            transition: all 0.2s;
        }
        
        /* 音乐搜索弹窗样式 - 底部滑出 */
        #music-search-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            display: none;
        }
        
        #music-search-modal.show {
            display: block;
        }
        
        .music-search-modal {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 75%;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 20px 20px 0 0;
            box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.2);
            transform: translateY(100%);
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        #music-search-modal.show .music-search-modal {
            transform: translateY(0);
        }
        
        .music-search-modal .modal-header {
            background: white;
            color: #333;
            padding: 20px;
            flex-shrink: 0;
            position: relative;
            border-bottom: 1px solid #f0f0f0;
        }
        
        .music-search-modal .modal-header::before {
            content: '';
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            width: 40px;
            height: 4px;
            background: #e0e0e0;
            border-radius: 2px;
        }
        
        .music-search-modal .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .music-search-modal .modal-header h3 {
            margin: 0;
            font-size: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        
        .music-search-modal .modal-header h3::before {
            content: '';
        }
        
        .header-buttons {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .history-btn {
            background: #90caf9;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 15px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .history-btn:hover {
            background: #64b5f6;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(100, 181, 246, 0.3);
        }
        
        .music-search-modal .modal-close {
            background: #f5f5f5;
            border: none;
            color: #999;
            font-size: 24px;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            flex-shrink: 0;
        }
        
        .music-search-modal .modal-close:hover {
            background: #ffebee;
        }
        
        /* 搜索历史样式 */
        .history-item {
            padding: 12px 15px;
            background: white;
            border-radius: 10px;
            margin-bottom: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .history-item:hover {
            background: #f5f5f5;
            transform: translateX(5px);
        }
        
        .history-item-text {
            flex: 1;
        }
        
        .history-keyword {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
        }
        
        .history-date {
            font-size: 12px;
            color: #888;
        }
        
        .history-badge {
            padding: 4px 10px;
            background: #4caf50;
            color: white;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            margin-left: 10px;
        }
        
        /* 搜索历史复选框样式 */
        .history-item-checkbox {
            width: 20px;
            height: 20px;
            margin-right: 12px;
            cursor: pointer;
            accent-color: var(--primary-color);
            display: none;
            flex-shrink: 0;
        }
        
        .history-item.delete-mode {
            padding-left: 10px;
        }
        
        .history-item.delete-mode .history-item-checkbox {
            display: block;
            animation: fadeIn 0.2s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: scale(0.8); }
            to { opacity: 1; transform: scale(1); }
        }
        
        .history-item.delete-mode {
            cursor: default;
        }
        
        .history-item.delete-mode:hover {
            transform: translateX(0);
            background: #f9f9f9;
        }
        
        #toggle-delete-mode {
            font-weight: 500;
        }
        
        #toggle-delete-mode.active {
            background: #ff5252;
            color: white;
            font-weight: 600;
        }
        
        #toggle-delete-mode:hover {
            background: #f5f5f5;
        }
        
        #toggle-delete-mode.active:hover {
            background: #ff1744;
        }
        
        /* 清理无效歌曲样式 */
        .invalid-song-item {
            padding: 12px 15px;
            background: white;
            border-radius: 10px;
            border: 1px solid #f0f0f0;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: all 0.2s;
        }
        
        .invalid-song-item:hover {
            background: #f9f9f9;
            border-color: #e0e0e0;
        }
        
        .invalid-song-item input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--primary-color);
            flex-shrink: 0;
        }
        
        .invalid-song-info {
            flex: 1;
            min-width: 0;
        }
        
        .invalid-song-name {
            font-size: 14px;
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .invalid-song-artist {
            font-size: 12px;
            color: #888;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .invalid-song-reason {
            font-size: 11px;
            color: #f44336;
            padding: 2px 8px;
            background: #ffebee;
            border-radius: 4px;
            white-space: nowrap;
        }
        
        .api-selector {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 10px 0;
            margin-bottom: 10px;
            border-bottom: 1px solid #f0f0f0;
        }
        
        .music-search-modal .modal-body {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
        }
        
        .search-input-container {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .search-box {
            position: relative;
            background: white;
            border-radius: 25px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            overflow: hidden;
        }
        
        .search-box input {
            width: 100%;
            border: none;
            padding: 14px 90px 14px 20px;
            font-size: 16px;
            outline: none;
            background: transparent;
        }
        
        .search-btn-inner {
            position: absolute;
            right: 5px;
            top: 50%;
            transform: translateY(-50%);
            padding: 8px 24px;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: 20px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .search-btn-inner:hover {
            background: var(--secondary-color);
        }
        
        .search-btn-inner:active {
            transform: translateY(-50%) scale(0.95);
        }
        
        .platform-tabs {
            display: flex;
            gap: 0;
            background: #f5f5f5;
            border-radius: 8px;
            padding: 4px;
        }
        
        .platform-tab {
            flex: 1;
            padding: 10px 16px;
            text-align: center;
            border-radius: 6px;
            background: transparent;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 14px;
            color: #666;
            user-select: none;
        }
        
        .platform-tab:hover {
            background: rgba(255, 128, 171, 0.1);
            color: var(--primary-color);
        }
        
        .platform-tab.active {
            background: white;
            color: var(--primary-color);
            font-weight: 600;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
        }
        
        .search-status {
            padding: 15px;
            text-align: center;
            color: #666;
            min-height: 30px;
            font-size: 14px;
        }
        
        .search-loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-right: 10px;
            vertical-align: middle;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .music-search-results {
            max-height: 450px;
            overflow-y: auto;
            padding: 5px;
        }
        
        .search-result-item {
            display: flex;
            align-items: center;
            padding: 14px;
            border-radius: 8px;
            margin-bottom: 8px;
            background: white;
            border: 1px solid #f0f0f0;
            transition: all 0.2s;
        }
        
        .search-result-item:hover {
            background: #fafafa;
            border-color: #e0e0e0;
        }
        
        .result-cover {
            width: 50px;
            height: 50px;
            border-radius: 6px;
            object-fit: cover;
            margin-right: 12px;
            background: #f5f5f5;
            flex-shrink: 0;
        }
        
        .song-info {
            flex: 1;
            min-width: 0;
        }
        
        .song-title {
            font-weight: 600;
            font-size: 15px;
            color: #333;
            margin-bottom: 5px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .song-artist {
            color: #888;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .platform-tag {
            display: inline-flex;
            align-items: center;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            color: white;
        }
        
        .platform-tag.netease {
            background: #ec4141;
        }
        
        .platform-tag.qq {
            background: #1aad19;
        }
        
        .platform-tag.kugou {
            background: #2ca7f8;
        }
        
        .platform-tag.kuwo {
            background: #ff8800;
        }
        
        
        .add-song-btn {
            padding: 6px 16px;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.2s;
            flex-shrink: 0;
            margin-left: 10px;
        }
        
        .add-song-btn:hover {
            background: var(--secondary-color);
        }
        
        .add-song-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        .add-music-btn {
            padding: 6px 15px;
            background-color: #28a745;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 12px;
        }
        .add-music-btn:hover {
            background-color: #218838;
        }
        .add-music-btn:disabled {
            background-color: #6c757d;
            cursor: not-allowed;
        }
        .playlist-body {
            flex: 1;
            overflow-y: auto;
            padding: 10px;
        }
        .playlist-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
        }
        .playlist-item:hover {
            background-color: rgba(0, 123, 255, 0.05);
        }
        .playlist-item.playing {
            background-color: rgba(0, 123, 255, 0.1);
            font-weight: 600;
        }
        .playlist-item-info {
            flex: 1;
        }
        .playlist-item .title {
            font-size: 14px;
            margin-bottom: 2px;
        }
        .playlist-item .artist {
            font-size: 12px;
            color: #888;
        }
        .playlist-item-actions {
            display: flex;
            gap: 8px;
        }
        .playlist-item-actions button {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 16px;
            padding: 5px;
        }
        
        /* 心声样式 */
        .inner-thought-item {
            margin-bottom: 15px;
            padding: 12px 15px;
            background: #ffffff;
            border-radius: 8px;
            border: 1px solid #e8e8e8;
            transition: all 0.2s ease;
        }
        
        .inner-thought-item:hover {
            background: #f8f9fa;
            border-color: var(--primary-color);
        }
        
        .inner-thought-header {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }
        
        .inner-thought-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            margin-right: 10px;
            object-fit: cover;
        }
        
        .inner-thought-info {
            flex: 1;
        }
        
        .inner-thought-name {
            font-weight: 500;
            color: #333;
            font-size: 14px;
            margin-bottom: 2px;
        }
        
        .inner-thought-time {
            font-size: 11px;
            color: #999;
        }
        
        .inner-thought-content {
            font-size: 14px;
            line-height: 1.5;
            color: #666;
            padding: 0;
        }
        
        .inner-thought-empty {
            text-align: center;
            padding: 40px 20px;
            color: #999;
            font-size: 14px;
        }
        
        /* 心声编辑模式样式 */
        .inner-thought-item.editing .inner-thought-content {
            display: none;
        }
        
        .inner-thought-edit-textarea {
            width: 100%;
            min-height: 60px;
            padding: 8px;
            border: 1px solid var(--primary-color);
            border-radius: 4px;
            font-size: 14px;
            line-height: 1.5;
            resize: vertical;
            font-family: inherit;
        }
        
        .inner-thought-edit-actions {
            display: none;
            margin-top: 8px;
            gap: 8px;
        }
        
        .inner-thought-item.editing .inner-thought-edit-actions {
            display: flex;
        }
        
        .inner-thought-delete-btn {
            padding: 4px 12px;
            font-size: 12px;
            background: #ff4444;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        
        .inner-thought-delete-btn:hover {
            background: #cc0000;
        }
        
        /* 心声删除模式样式 */
        .inner-thought-checkbox {
            display: none;
            width: 18px;
            height: 18px;
            margin-right: 10px;
            cursor: pointer;
        }
        
        .inner-thought-item.delete-mode .inner-thought-checkbox {
            display: block;
        }
        
        .inner-thought-item.delete-mode .inner-thought-header {
            display: flex;
            align-items: center;
        }
        
        .inner-thought-item.selected {
            background: #fff3f3;
            border-color: #ff4444;
        }
        
        /* 移动端响应式设计 */
        @media (max-width: 768px) {
            .music-player-window {
                width: 90%;
                min-height: auto;
                max-height: 85vh;
                padding: 20px;
            }
            
            #music-player-overlay {
                padding-top: 20px;
            }
            
            #music-visual-container {
                max-width: 200px;
            }
            
            #music-avatars-container {
                margin-top: 20px;
                margin-bottom: 10px;
            }
            
            .music-avatar {
                width: 50px;
                height: 50px;
            }
            
            #music-time-counter {
                font-size: 11px;
                margin-bottom: 15px;
            }
            
            #music-player-song-title {
                font-size: 18px;
            }
            
            #music-player-artist {
                font-size: 13px;
                margin-bottom: 15px;
            }
            
            .music-progress-bar-container {
                margin-top: 15px;
            }
        }
        
        @media (max-width: 480px) {
            .music-player-window {
                width: 95%;
                padding: 15px;
            }
            
            #music-visual-container {
                max-width: 180px;
            }
            
            .music-avatar {
                width: 45px;
                height: 45px;
            }
        }

        /* === 未读消息小红点样式 === */
        .unread-count-wrapper {
            flex-shrink: 0;
            width: 40px;
            display: flex;
            justify-content: flex-end;
            align-items: flex-start;
            padding-top: 20px;
        }

        .unread-count {
            min-width: 20px;
            height: 20px;
            padding: 0 6px;
            background-color: #ff3b30;
            color: white;
            border-radius: 10px;
            font-size: 12px;
            font-weight: 600;
            display: none;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        /* === 弹窗通知栏样式 === */
        #notification-bar {
            position: fixed;
            top: 40px;
            left: 50%;
            width: 90%;
            max-width: 400px;
            z-index: 500;
            background-color: rgba(250, 250, 250, 0.95);
            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: translateX(-50%) translateY(-150%);
            transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            visibility: hidden;
        }

        #notification-bar.visible {
            transform: translateX(-50%) translateY(0);
            visibility: visible;
        }

        #notification-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0;
        }

        #notification-content {
            flex: 1;
            overflow: hidden;
        }

        #notification-content .name {
            font-weight: 600;
            font-size: 15px;
            color: #000;
            margin-bottom: 2px;
        }

        #notification-content .message {
            font-size: 14px;
            color: #555;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        /* === 头像框选择模态框样式 === */
        
        #avatar-frame-modal .modal-content {
            height: 70%;
        }
        
        #avatar-frame-modal .modal-body {
            padding: 0;
            display: flex;
            flex-direction: column;
        }
        
        #avatar-frame-modal .modal-window {
            padding: 20px;
        }
        
        .frame-tabs {
            display: flex;
            border-bottom: 1px solid #ddd;
            flex-shrink: 0;
            margin-bottom: 15px;
        }
        
        .frame-tab {
            flex: 1;
            padding: 12px;
            text-align: center;
            font-weight: 500;
            cursor: pointer;
            color: #888;
            border-bottom: 2px solid transparent;
        }
        
        .frame-tab.active {
            color: var(--primary-color);
            border-bottom-color: var(--primary-color);
        }
        
        .frame-content {
            flex: 1;
            overflow-y: auto;
            padding: 0 15px 15px 15px;
            min-height: 0;
        }
        
        .frame-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
            gap: 15px;
        }
        
        .frame-item {
            aspect-ratio: 1 / 1;
            border: 2px solid transparent;
            border-radius: 10px;
            cursor: pointer;
            background-color: #f0f0f0;
            background-size: cover;
            background-position: center;
            padding: 5px;
            transition: all 0.2s ease;
            position: relative;
        }
        
        .frame-item.selected {
            border-color: var(--primary-color);
            transform: scale(1.05);
        }
        
        .frame-item .preview-avatar {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .frame-item .preview-frame {
            position: absolute;
            top: -7px;
            left: 0;
            width: 100%;
            height: 100%;
        }
        
        /* 头像框显示样式 */
        .avatar-group {
            width: 36px;
            flex-shrink: 0;
            position: relative;
            transition: width 0.2s ease;
        }
        
        .avatar-group.has-frame {
            width: 43px;
        }
        
        .message-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .avatar-with-frame {
            position: relative;
            width: 38px;
            height: 38px;
            margin: 0 auto;
            transition: all 0.2s ease;
        }
        
        .avatar-group.has-frame .avatar-with-frame {
            width: 43px;
            height: 43px;
        }
        
        .avatar-with-frame .avatar-img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            z-index: 1;
        }
        
        .avatar-with-frame .avatar-frame {
            position: absolute;
            width: 120%;
            height: 120%;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 2;
            pointer-events: none;
        }
        
        /* 聊天列表中隐藏头像框 */
        #chat-list-screen .avatar-frame {
            display: none;
        }

        /* ▼▼▼ 【群投票功能】样式 ▼▼▼ */
        /* 投票卡片在消息气泡中的样式 */
        .message-bubble.is-poll .content {
            padding: 0;
            background: transparent;
            box-shadow: none;
            border: none;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }

        /* 投票卡片主体 */
        .poll-card {
            width: 250px;
            background-color: rgba(255, 255, 255, 0.95);
            border-radius: var(--border-radius);
            border: 1px solid rgba(255, 128, 171, 0.3);
            padding: 12px;
            font-family: var(--font-family);
            box-shadow: 0 2px 8px rgba(255, 128, 171, 0.15);
        }

        .poll-card.closed {
            background-color: rgba(240, 240, 240, 0.95);
            border-color: #ddd;
        }

        /* 投票问题 */
        .poll-question {
            font-weight: 600;
            font-size: 15px;
            margin-bottom: 12px;
            line-height: 1.4;
            word-break: break-word;
            color: var(--text-color);
        }

        /* 投票选项列表 */
        .poll-options-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        /* 单个投票选项 */
        .poll-option-item {
            background-color: white;
            border: 1px solid rgba(255, 128, 171, 0.2);
            border-radius: 12px;
            padding: 10px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            transition: all 0.2s ease;
        }

        .poll-card:not(.closed) .poll-option-item:hover {
            background-color: rgba(255, 240, 246, 0.8);
            border-color: var(--primary-color);
            transform: translateX(2px);
        }

        /* 用户已投票的选项样式 */
        .poll-option-item.voted {
            border-color: var(--primary-color);
            background-color: rgba(255, 240, 246, 0.9);
            font-weight: 500;
            box-shadow: 0 2px 6px rgba(255, 128, 171, 0.2);
        }

        /* 投票进度条 */
        .poll-option-bar {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            background: linear-gradient(90deg, rgba(255, 128, 171, 0.15), rgba(255, 128, 171, 0.05));
            z-index: 1;
            transition: width 0.3s ease-in-out;
        }

        /* 选项内容（文字和票数），确保在进度条之上 */
        .poll-option-content {
            position: relative;
            z-index: 2;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .poll-option-text {
            font-size: 14px;
            color: var(--text-color);
        }

        .poll-option-votes {
            font-size: 13px;
            color: var(--primary-color);
            font-weight: 600;
        }

        /* 投票卡片底部 */
        .poll-footer {
            margin-top: 12px;
            padding-top: 8px;
            border-top: 1px solid rgba(255, 128, 171, 0.2);
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 12px;
            color: #888;
        }

        .poll-total-votes {
            font-weight: 500;
            color: var(--text-color);
        }

        .poll-action-btn {
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            border: none;
            color: white;
            padding: 5px 12px;
            border-radius: 15px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            transition: all 0.2s ease;
            box-shadow: 0 2px 6px rgba(255, 128, 171, 0.3);
        }

        .poll-action-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 10px rgba(255, 128, 171, 0.4);
        }

        .poll-card.closed .poll-action-btn {
            background: linear-gradient(135deg, #aaa, #999);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }

        /* 创建投票模态框的选项输入 */
        .poll-option-input-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .poll-option-input-wrapper input {
            flex-grow: 1;
        }

        .poll-option-input-wrapper .remove-option-btn {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background-color: rgba(255, 128, 171, 0.1);
            color: var(--primary-color);
            border: 1px solid var(--primary-color);
            cursor: pointer;
            font-size: 18px;
            line-height: 28px;
            text-align: center;
            flex-shrink: 0;
            transition: all 0.2s ease;
        }

        .poll-option-input-wrapper .remove-option-btn:hover {
            background-color: var(--primary-color);
            color: white;
        }

        /* ▲▲▲ 【群投票功能】样式结束 ▲▲▲ */

/* ===== 头像形状功能样式 ===== */
.avatar-shape-preset-btn {
    transition: all 0.2s ease;
}

.avatar-shape-preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.avatar-shape-preset-btn.selected {
    border-color: var(--primary-color) !important;
    background-color: rgba(255, 128, 171, 0.1) !important;
}

/* 头像形状应用 - 圆形 */
.avatar-shape-circle .avatar-img,
.avatar-shape-circle .message-avatar,
.avatar-shape-circle .chat-avatar,
.avatar-shape-circle.message-avatar,
.avatar-shape-circle.chat-avatar {
    border-radius: 50% !important;
    clip-path: circle(50%) !important;
}

/* 头像形状应用 - 方形 */
.avatar-shape-square .avatar-img,
.avatar-shape-square .message-avatar,
.avatar-shape-square .chat-avatar,
.avatar-shape-square.message-avatar,
.avatar-shape-square.chat-avatar {
    border-radius: 10px !important;
    clip-path: none !important;
}

/* 头像形状应用 - 自定义 */
.avatar-shape-custom .avatar-img,
.avatar-shape-custom .message-avatar,
.avatar-shape-custom .chat-avatar,
.avatar-shape-custom.message-avatar,
.avatar-shape-custom.chat-avatar {
    clip-path: var(--custom-avatar-shape) !important;
}

/* 导出角色卡样式 */
.export-format-btn {
    transition: all 0.2s ease;
}

.export-format-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 导出角色弹窗滚动条样式 */
#export-character-form::-webkit-scrollbar {
    width: 8px;
}

#export-character-form::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#export-character-form::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

#export-character-form::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.export-wb-checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

#export-worldbook-list::-webkit-scrollbar {
    width: 6px;
}

#export-worldbook-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#export-worldbook-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#export-worldbook-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 解密按钮样式 */
#decrypt-persona-btn {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 128, 171, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 128, 171, 0.8);
    }
}

/* 导入小手机角色卡弹窗样式 */
#import-phone-character-modal .modal-window {
    animation: slideUp 0.4s ease-out;
}

#decrypt-character-modal .modal-window {
    animation: slideUp 0.4s ease-out;
}

/* 加密类型选择样式 */
#export-encryption-type {
    cursor: pointer;
    transition: border-color 0.2s;
}

#export-encryption-type:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 128, 171, 0.1);
}

/* 自定义假内容输入框样式 */
#custom-fake-persona {
    font-family: var(--font-family);
    transition: border-color 0.2s;
}

#custom-fake-persona:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 128, 171, 0.1);
}

/* 解密口令输入框样式 */
#export-decrypt-password,
#decrypt-password-input {
    transition: border-color 0.2s;
}

#export-decrypt-password:focus,
#decrypt-password-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 128, 171, 0.1);
}


/* 插入新消息功能样式 */
#insert-message-area {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#insert-message-above-btn,
#insert-message-below-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#insert-message-above-btn:hover,
#insert-message-below-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#insert-message-above-btn:active,
#insert-message-below-btn:active {
    transform: translateY(0);
}

#insert-message-role {
    font-size: 14px;
    color: #333;
    background: white;
}

#insert-message-textarea {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
}

#insert-message-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 128, 171, 0.1);
}

#confirm-insert-message-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

#confirm-insert-message-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

#cancel-insert-message-btn {
    background: #e0e0e0;
    color: #666;
    border: none;
    transition: all 0.3s ease;
}

#cancel-insert-message-btn:hover {
    background: #d0d0d0;
}

/* 编辑消息弹窗滚动条美化 */
#edit-message-modal .modal-window > div:first-of-type {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 128, 171, 0.3) transparent;
}

#edit-message-modal .modal-window > div:first-of-type::-webkit-scrollbar {
    width: 6px;
}

#edit-message-modal .modal-window > div:first-of-type::-webkit-scrollbar-track {
    background: transparent;
}

#edit-message-modal .modal-window > div:first-of-type::-webkit-scrollbar-thumb {
    background: rgba(255, 128, 171, 0.3);
    border-radius: 3px;
}

#edit-message-modal .modal-window > div:first-of-type::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 128, 171, 0.5);
}
