/* --- 【全新】系统消息卡片美化样式 --- */
.summary-card-base {
    display: inline-block; /* 允许 margin: auto 生效 */
    width: 280px;
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 12px 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: left; /* 卡片内文字左对齐 */
}

.summary-card-base:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.summary-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.summary-card-header .svg-icon {
    width: 20px;
    height: 20px;
    color: var(--secondary-text);
}

.summary-card-header .title {
    font-weight: 600;
    color: var(--primary-text);
}

.summary-card-content {
    font-size: 14px;
    color: var(--secondary-text);
    line-height: 1.5;
}

.summary-card-footer {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-color);
    text-align: right;
}
/* --- 【全新】纪念日卡片样式 --- */
.anniversary-card {
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    color: #ffffff;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}
.anniversary-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 100%);
}
.anniversary-card-content {
    position: relative;
    z-index: 2;
}
.anniversary-card .countdown {
    font-size: 28px;
    font-weight: 700;
}
.anniversary-card .countdown.is-today {
    color: #f6e58d;
}
.anniversary-card .countdown-label {
    font-size: 14px;
    opacity: 0.9;
}
.anniversary-card .title {
    font-size: 18px;
    font-weight: 600;
    margin-top: 8px;
}
.anniversary-card .date {
    font-size: 14px;
    opacity: 0.9;
}
.anniversary-card .type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

/* --- 【全新 V2.0 精确校准版】全局设置开关样式 --- */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0; /* 防止在 flex 布局中被压缩 */
}
.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: 28px; /* 让圆角等于高度，形成完美跑道形 */
    
    /* ▼▼▼ 核心修复：使用 Flexbox 精确对齐 ▼▼▼ */
    display: flex;
    align-items: center; /* 垂直居中 */
    padding: 0 4px; /* 设置左右两边的内边距 */
}
.slider:before {
    /* 【简化】不再需要 position: absolute 和 left/bottom */
    content: "";
    height: 20px;
    width: 20px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); /* (可选) 加一点阴影更有质感 */
}

/* ▼▼▼ 核心修复：用 Flexbox 的 justify-content 来控制位置 ▼▼▼ */
input:checked + .slider {
    background-color: var(--accent-color);
    justify-content: flex-end; /* 选中时，让圆圈跑到最右边 */
}


/* --- 【V5 最终精调版】主屏幕美化样式 --- */
#home-screen-content {
    padding: 20px 20px 5px 20px;
    background-size: cover;
    background-position: center;
    color: var(--home-text-color, white);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.system-bar {
    flex-shrink: 0;
    text-align: center;
    padding: 45px 0 20px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
#home-time { font-size: 52px; font-weight: 600; }
#home-date { font-size: 16px; opacity: 0.8; }

/* 1. 【核心】2x2 网格布局容器 (保持不变) */
.home-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    width: 100%;
    max-width: 420px;
    margin: auto;
    aspect-ratio: 1 / 1;
}

/* 兼容性回退方案 (保持不变) */
@supports not (aspect-ratio: 1 / 1) {
    .home-main-grid { height: 0; padding-bottom: 100%; position: relative; }
    .home-main-grid > * { position: absolute; width: calc(50% - 7.5px); height: calc(50% - 7.5px); }
    .home-main-grid > *:nth-child(1) { top: 0; left: 0; }
    .home-main-grid > *:nth-child(2) { top: 0; right: 0; }
    .home-main-grid > *:nth-child(3) { bottom: 0; left: 0; }
    .home-main-grid > *:nth-child(4) { bottom: 0; right: 0; }
}

/* 2. 【核心】为所有格子创建统一的、透明的“占位容器”样式 */
#home-widget-anniversary, #home-app-grid-top-right, #home-app-chat, #home-widget-music {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 3. 【核心】为格子内部的“可见元素”定义样式 */

/* a. 小组件的内部元素 */
/* a. 小组件的内部元素 */
/* a. 小组件的内部元素 */
.home-widget-inner {
    width: 100%; /* 宽度占满格子 */
    /* 【核心修改】移除 height: 100%; */
    aspect-ratio: 1 / 1; /* 【核心新增】强制宽高比为1:1，即正方形 */
    box-sizing: border-box; /* (推荐新增) 确保padding不会撑大元素 */
    
    padding: 16px;
    border-radius: 28px; /* 推荐保留稍大的圆角 */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-size: cover;
    background-position: center;
}

/* 纪念日小组件内部文字样式 (无变化) */
.widget-anniversary-days { font-size: 42px; font-weight: 700; }
.widget-anniversary-label { font-size: 14px; opacity: 0.8; }
.widget-anniversary-title { font-size: 16px; font-weight: 500; text-align: right; }

/* b. 右上角 2x2 小图标的网格容器 (它本身也是个格子) */
#home-app-grid-top-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
	 place-items: center;
}

/* c. 聊天App的内部图标元素 */
.app-icon-large-inner {
    width: 85%; /* 让聊天图标为 85% 大小，确保正方形 */
    aspect-ratio: 1 / 1;
    position: relative;
    border-radius: 22%;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}
.app-icon-large-inner:active { transform: scale(0.95); }

/* d. 音乐小组件的内部元素 */
#home-widget-music-inner {
    width: 95%; /* 让音乐小组件为 95% 大小 */
    height: 95%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 黑胶唱片相关样式 (无变化) */
.widget-vinyl-container {
    position: relative; width: 100%; padding-bottom: 100%; height: 0;
}
.widget-vinyl-record {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background-color: #222;
    background-image: repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 2px);
    box-shadow: 0 0 15px rgba(0,0,0,0.4), inset 0 0 10px rgba(0,0,0,0.5);
    border: 1px solid #111; border-radius: 50%; display: flex;
    justify-content: center; align-items: center;
    animation: rotate-vinyl 20s linear infinite; animation-play-state: paused;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.widget-vinyl-record:hover {
    transform: scale(1.02);
}
.widget-vinyl-record.playing { animation-play-state: running; }
.widget-vinyl-cover {
    width: 65%; height: 65%; background-color: #555; background-size: cover;
    background-position: center; border-radius: 50%; border: 1px solid #111;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.widget-vinyl-cover:hover {
    transform: scale(1.05);
}

/* 底部 Dock (无变化) */
.bottom-dock {
    flex-shrink: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
    /* 【核心修改】将背景从半透明黑色，改为半透明白色 */
    background: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); border-radius: 24px; margin: 15px 10px 0 10px;
}

/* --- 小图标 & Dock 图标样式 --- */
.app-icon-small, .app-icon-dock {
    position: relative; border-radius: 22%; overflow: hidden;
    cursor: pointer; display: flex; flex-direction: column;
    align-items: center; justify-content: center; transition: transform 0.2s ease;
    aspect-ratio: 1 / 1;
}
.app-icon-small {
    width: 75%;
    height: 75%;
}
.app-icon-small:active, .app-icon-dock:active { transform: scale(0.95); }

/* 图标通用内部样式 (背景、SVG等) */
.app-icon-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 1;
}
.app-icon-large-inner .svg-icon, .app-icon-small .svg-icon, .app-icon-dock .svg-icon {
    position: relative; z-index: 2; color: white; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

/* SVG 图标尺寸 */
.app-icon-large-inner .svg-icon { width: 40%; height: 40%; }
.app-icon-small .svg-icon { width: 50%; height: 50%; }
.app-icon-dock .svg-icon { width: 45%; height: 45%; }

/* App 名称 */
.app-name {
    position: absolute; bottom: 10px; font-size: 14px;
    font-weight: 500; z-index: 2; text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* 隐藏旧列表 */
#home-screen .app-list { display: none; }
/* --- 【杂志风格Plus】心声弹窗样式 --- */
#heart-voice-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(40, 40, 40, 0.5); /* 遮罩层颜色加深，突出主体 */
    backdrop-filter: blur(10px); /* 模糊效果更强 */
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;

    opacity: 0;
    transition: opacity 0.4s ease-out; /* 动画时间稍长，更优雅 */
    pointer-events: none;
    cursor: pointer;
}
#heart-voice-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* 弹窗主体，模拟杂志卡片 */
#heart-voice-bubble {
    background-color: #fdfdfd; 
    border-radius: 4px; /* 更锐利的直角，增加高级感 */
    box-shadow: 0 15px 35px rgba(0,0,0,0.15); /* 阴影更柔和 */
    max-width: 90%;
    width: 400px;
    max-height: 85vh; /* 增加最大高度 */
    cursor: default;
    overflow: hidden; 
    display: flex; 
    flex-direction: column;

    /* 【动画升级】更具弹性的入场动画 */
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), 
                opacity 0.3s ease-out;
}
#heart-voice-overlay.show #heart-voice-bubble {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* 头部图片区域 */
#heart-voice-header-image {
    width: 100%;
    height: 180px; /* 图片高度可以适当增加 */
    background-image: url('https://pic1.imgdb.cn/item/68b614b858cb8da5c86d8e1c.jpg'); 
    background-size: cover;
    background-position: center 30%; /* 视觉焦点稍稍上移 */
    flex-shrink: 0;
    position: relative; /* 为渐变遮罩提供定位基准 */
}
/* 文字内容区域 */
#heart-voice-content {
    padding: 30px 40px 40px; /* 增加内边距，让文字呼吸 */
    overflow-y: auto; 
    flex-grow: 1;
    /* 【新增】添加非常细微的纸张纹理，提升质感 */
    background-image: url('https://www.transparenttextures.com/patterns/subtle-white-feathers.png');
}

/* 心声文本样式 */
#heart-voice-text {
    font-family: 'Songti SC', 'STSong', 'SimSun', serif; 
    font-size: 17px;
    line-height: 2; /* 进一步增加行高，提升阅读舒适度 */
    color: #4a4a4a; /* 使用更柔和的深灰色 */
    text-indent: 0; /* 【修改】移除首行缩进，因为我们将使用首字下沉 */
    white-space: pre-wrap; 
    margin: 0;
    padding: 0;
}

/* 【新增】华丽的“首字下沉”效果，这是杂志排版的精髓 */
#heart-voice-text::first-letter {
    font-family: 'Georgia', serif; /* 为下沉字母使用更经典的西文字体 */
    font-size: 4em; /* 放大首字母 */
    font-weight: bold;
    float: left; /* 让文字环绕它 */
    line-height: 0.8; /* 调整行高，让其与周围文本对齐 */
    padding-right: 12px; /* 和右侧文字拉开距离 */
    padding-top: 5px; /* 微调垂直位置 */
    color: #a08c75; /* 给首字母一个典雅的颜色 */
}


/* --- 【导航与页签布局最终修正版】--- */

/* 1. 底部导航栏样式 (这部分不变，但为了完整性再次提供) */
.app-bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 6px 0 calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-color);
    background-color: rgba(var(--header-bg-rgb), 0.9);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}
.app-bottom-nav .nav-btn {
    background: none; border: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; padding: 4px 12px; color: var(--secondary-text);
    transition: color 0.2s;
}
.app-bottom-nav .nav-btn .svg-icon { width: 24px; height: 24px; }
.app-bottom-nav .nav-btn span { font-size: 11px; font-weight: 500; }
.app-bottom-nav .nav-btn.active { color: var(--accent-color); }


/* 2. 页签面板通用样式 */
.tab-pane {
    width: 100%; /* 确保面板宽度为100% */
    height: 100%; /* 确保面板高度为100% */
    overflow-y: auto; /* 默认允许滚动 */
    display: none; /* 默认隐藏 */
    flex-direction: column; /* 【关键】所有面板默认都是垂直布局 */
}

/* 【关键】激活的面板用 display: flex 来显示，这样内部的 flex 布局才能生效 */
.tab-pane.active {
    display: flex;
}


/* 3. 联系人页面专属布局 */
/* 搜索框容器：高度固定，不拉伸 */
#contacts-search-wrapper {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0; /* 【关键】防止被压缩 */
}
#contacts-search-input {
    width: 100%; padding: 10px 15px; border-radius: 20px;
    border: none; background-color: #f0f2f5; /* 修改了默认背景色 */
    box-sizing: border-box; font-size: 16px;
}
/* 联系人列表：占据所有剩余空间 */
.contact-list-scroll-area {
    flex-grow: 1; /* 【关键】占据剩余空间 */
    overflow-y: auto; /* 内容超出时滚动 */
    min-height: 0; /* 【关键】一个神奇的flexbox修复，防止内容溢出 */
}

/* 4. “我”页面的美化样式 */
.me-profile-card {
    display: flex; align-items: center; background-color: #fff;
    padding: 20px; border-radius: 16px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.06); cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s; margin-bottom: 24px;
}
.me-profile-card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.me-avatar {
    width: 64px; height: 64px; border-radius: 18px;
    object-fit: cover; margin-right: 16px;
}
.me-info { flex-grow: 1; }
.me-name { font-size: 20px; font-weight: 600; color: var(--primary-text); }
.me-id { display: block; font-size: 14px; color: var(--secondary-text); margin-top: 6px; }
.me-section {
    background-color: #fff; border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06); overflow: hidden;
}
.me-list-item {
    display: flex; align-items: center; padding: 16px 20px;
    cursor: pointer; transition: background-color 0.2s;
}
.me-list-item:not(:last-child) { border-bottom: 1px solid var(--border-color); }
.me-list-item:hover { background-color: #f8f9fa; }
.me-item-icon { width: 22px; height: 22px; margin-right: 16px; }
.me-list-item span { font-size: 16px; color: var(--primary-text); }

/* ---【新增】可滚动列表和成员选择样式 --- */
.list-view-scrollable {
    max-height: 40vh; /* 关键：最大高度为视窗高度的40% */
    overflow-y: auto;   /* 关键：内容超出时，垂直方向出现滚动条 */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    padding: 8px 0;
}

.char-select-list-item {
    padding: 8px 12px;
}

.char-select-list-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
}

.char-select-list-item input[type="checkbox"] {
    margin-right: 12px;
    /* 美化 checkbox，可选 */
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.char-select-list-item .avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    margin-right: 10px;
    object-fit: cover;
}

/* 弹窗底部的按钮区域 */
.modal-footer {
    display: flex;
    justify-content: flex-end; /* 按钮靠右 */
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
/* ---【新增】V3.0 QQ-Style 联系人分组样式 --- */
.contact-group-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none; /* 防止长按时选中文本 */
    transition: background-color 0.2s;
}

.contact-group-header:hover {
    background-color: #f8f9fa;
}

.contact-group-header .chevron-icon {
    width: 16px;
    height: 16px;
    color: var(--secondary-text);
    transition: transform 0.2s ease-in-out;
}

.contact-group-header .group-name {
    flex-grow: 1;
    margin-left: 8px;
    font-weight: 500;
    font-size: 16px;
    color: var(--primary-text);
}

.contact-group-header .group-count {
    color: var(--secondary-text);
    font-size: 14px;
}

.contact-group-header .group-actions {
    display: flex;
    gap: 8px; /* 按钮之间的间距 */
    margin-left: 12px; /* 和数量统计拉开距离 */
}
.contact-group-header .group-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.contact-group-header .group-actions button:hover {
    opacity: 1;
}
.contact-group-header .group-actions .svg-icon {
    width: 18px; /* 按钮图标大小 */
    height: 18px;
    color: var(--secondary-text);
}


/* 关键：当分组展开时，旋转小箭头 */
.contact-group-header.expanded .chevron-icon {
    transform: rotate(90deg);
}

.group-members-container {
    padding-left: 20px; /* 成员列表向内缩进 */
    background-color: #fff;
    /* 平滑的展开/收起动画 */
    max-height: 1000px; /* 一个足够大的值 */
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

/* 关键：折叠状态的样式 */
.group-members-container.collapsed {
    max-height: 0;
    /* border-bottom: none; (如果需要) */
}

/* 成员列表项的 hover 效果 */
.group-members-container .list-item:hover {
    background-color: #f8f9fa;
}

/* 移除旧的分组样式，如果你有的话 */
.contact-group-item { display: none; }
/* --- 调整设置页面中特定输入框的高度 (修正版) --- */

/* 1. 调整“人设”和“气泡美化CSS”输入框的高度 */
#setting-ai-persona,      /* <-- 新增了这个！就是AI人设的框框 */
#setting-user-persona, 
#setting-group-user-persona,
#setting-custom-css, 
#setting-group-custom-css {
    min-height: 140px; /* 你可以从这里统一调整高度 */
    resize: vertical;  /* 允许用户手动垂直拖动调整大小 */
}

/* 2. 调整“连接的世界书”容器的样式和高度 (这个不变，保持原样) */
#world-book-link-container, 
#group-world-book-link-container {
    min-height: 150px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    background-color: var(--input-bg);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* --- 全局设置页签样式 (已添加作用域) --- */

/* 全局设置页签容器(下划线式) */
#global-settings-page .settings-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 0 10px;
    flex-shrink: 0;
}

/* 全局设置页签按钮(下划线式) - 优化版 */
#global-settings-page .settings-tab-btn {
    padding: 12px 10px; /* 减少了左右内边距，以适应更多页签 */
    flex-grow: 1; /* 让所有页签平分宽度 */
    text-align: center; /* 确保文字居中 */
    border: none;
    background: none;
    cursor: pointer;
    color: var(--secondary-text);
    font-size: 15px; /* 可以考虑稍微减小一点，比如 14px */
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}


/* 全局设置页签激活状态(下划线式) - 已优化 */
#global-settings-page .settings-tab-btn.active {
    color: var(--primary-text); /* 使用主要文字颜色，保证清晰 */
    font-weight: 600; /* 加粗 */
    border-bottom-color: var(--accent-color); /* 下划线用主题色 */
}

/* 全局设置页面的内容面板样式 */
#global-settings-page .settings-panes-container {
    flex-grow: 1;
    overflow-y: auto;
}

/* 全局设置页面的面板默认隐藏 */
#global-settings-page .settings-tab-pane {
    display: none;
    padding: 20px;
}
#global-settings-page .settings-tab-pane.active {
    display: block;
}

/* 全局设置页面内的通用样式 */
#global-settings-page .settings-tab-pane h4 {
    margin-top: 0;
    margin-bottom: 8px;
}
#global-settings-page p.settings-description {
    font-size: 12px;
    color: var(--secondary-text);
    margin-top: -5px;
    margin-bottom: 15px;
}
#global-settings-page hr.settings-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 24px 0;
}
#global-settings-page .setting-item-with-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#global-settings-page .settings-item-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- 【全新】AI 手机查看功能样式 (V3 网格重构版) --- */

/* AI手机主屏幕 (这部分不变) */
#ai-phone-home-page .page-content {
    background-color: #fce3ec;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

/* 1. 【核心修改】将原来的乱放区域，改为一个2列的网格布局 */
.ai-phone-app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 两列，每列占据一半空间 */
    gap: 20px; /* 两列之间的间距 */
    align-items: center; /* 垂直居中对齐 */
}

/* 2. 【新增】为右侧的4个小图标创建一个2x2的网格容器 */
.ai-phone-small-app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px; /* 小图标之间的间距可以小一点 */
}

/* 3. 【修改】图标的通用样式 (移除了绝对定位) */
.ai-phone-app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative; /* 保持相对定位，以备将来添加角标等 */
    width: 100%; /* 宽度占满父容器（网格单元） */
    aspect-ratio: 1 / 1; /* 强制保持正方形 */
}
.ai-phone-app-icon:active {
    transform: scale(0.95);
}

/* 4. 【修改】图标包裹层的样式，让它填满父元素 */
.ai-phone-app-icon .icon-wrapper {
    width: 100%; /* 宽度100% */
    height: 100%; /* 高度100% */
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 22%; /* 调整圆角比例，使其更像iOS图标 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    display: flex;
    justify-content: center;
    align-items: center;
}
.ai-phone-app-icon .icon-wrapper .svg-icon {
    width: 45%; /* SVG图标大小相对于父元素 */
    height: 45%;
    color: var(--primary-text, #333); /* 图标颜色改为更清晰的深色 */
}

/* App名称样式 (这部分不变) */
.ai-phone-app-icon .app-name {
    display: none;
}

/* 底部Dock栏 (这部分不变) */
.ai-phone-dock {
    flex-shrink: 0;
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
	margin-top: auto;
}
.ai-phone-dock .ai-phone-app-icon {
    width: 56px; /* Dock栏图标使用固定宽度 */
    aspect-ratio: auto;
    height: auto;
}
.ai-phone-dock .ai-phone-app-icon .icon-wrapper {
    width: 56px;
    height: 56px;
}



/* AI相册页照片网格 - Card样式 */
.ai-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 【美化】加大间距，让卡片呼吸 */
    gap: 8px; 
}
.ai-gallery-item {
    aspect-ratio: 1 / 1; /* 保持正方形 */
    background-size: cover;
    background-position: center;
    cursor: pointer;
    /* 【美化】核心：添加圆角和阴影，形成卡片感 */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid rgba(0,0,0,0.05); /* 添加一个非常淡的边框，更有质感 */
}
/* 【美化】添加一个悬浮效果 */
.ai-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ai-album-item {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
}
.ai-album-item .cover {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    margin-right: 15px;
}
.ai-album-item .info .name { font-weight: 500; }
.ai-album-item .info .count { font-size: 13px; color: var(--secondary-text); }

/* ---【全新】AI 备忘录 App (手作日记风格改造) --- */

/* 1. 列表页背景：保持柔和 */
#ai-phone-notes-page .page-content {
	background-color: #f7f7f7;
	padding: 10px 0;
	/* 为了让卡片阴影不被切掉 */
	overflow-x: hidden;
	padding-left: 5px; 
	padding-right: 5px;
}

/* 2. 列表页卡片：改造为圆角的、有阴影的实体卡片 */
.ai-note-card {
	background-color: #ffffff;
	margin: 0 10px 12px 10px; /* 卡片之间留出间距*/
	padding: 15px 18px;
	border-radius: 8px; /* 更柔和的圆角 */
	box-shadow: 0 3px 8px rgba(0,0,0,0.06); /* 柔和的阴影，让卡片浮起来 */
	border-bottom: none; /* 移除分割线，靠阴影和间距来区分 */
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
}
.ai-note-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0,0,0,0.08); /* 悬浮时阴影更明显 */
}
.ai-note-card .title {
	font-weight: 600;
	font-size: 16px;
	margin-bottom: 6px;
	color: #2c2c2c;
}
.ai-note-card .snippet {
	font-size: 14px;
	color: #8a8a8a;
	display: -webkit-box;
	-webkit-line-clamp: 2;
    line-clamp: 2;
	-webkit-box-orient: vertical;  
	overflow: hidden;
}

/* 3. 详情页：核心改造！模拟被胶带贴在墙上的便签纸 */
#ai-phone-note-detail-page .page-content {
	background-color: #fffbef; /* 换成一个温暖的米黄色，像真的便签纸 */
	padding: 40px 25px 30px; /* 顶部留出更多空间给“胶带” */
	position: relative; /* 为了定位伪元素（胶带） */
	border-radius: 4px; /* 便签纸可以有一点点小圆角 */
	box-shadow: 2px 2px 10px rgba(0,0,0,0.1); /* 给便签纸加一点阴影 */
	margin: 20px; /* 让便签纸和屏幕边缘有距离 */
}

/* 4. 【装饰核心】用伪元素制作“和纸胶带”效果 */
#ai-phone-note-detail-page .page-content::before {
	content: '';
	position: absolute;
	top: -10px; /* 向上偏移，压住便签纸 */
	left: 50%;
	transform: translateX(-50%) rotate(-3deg); /* 让胶带歪一点，更真实 */
	width: 120px;
	height: 25px;
	background: rgba(255, 219, 137, 0.6); /* 半透明的胶带颜色 */
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	border-left: 1px solid rgba(0,0,0,0.05); /* 胶带的撕扯感 */
	border-right: 1px solid rgba(0,0,0,0.05);
}

/* 5. 详情页标题：换上我们新引入的漂亮手写体 */
#ai-phone-note-detail-page #ai-note-detail-title {
	font-family: 'Caveat', cursive; /* 使用新字体 */
	font-size: 28px; /* 字体大一些，像标题 */
	color: #594a43; /* 深棕色，像钢笔字 */
	text-align: center; /* 居中 */
	padding-bottom: 20px; /* 和内容拉开距离 */
	margin-bottom: 20px;
	/* 用一条波浪线分割，更有趣 */
	border-bottom: 2px dashed rgba(0,0,0,0.1);
}

/* 6. 详情页正文：保持手写感，但优化阅读体验 */
#ai-phone-note-detail-page #ai-note-detail-content {
	font-family: 'Ma Shan Zheng', cursive; /* 保持你原来的中文字体 */
	font-size: 20px;
	line-height: 2; /* 行距再拉开一点，更像手写 */
	color: #5a5a5a; /* 文字颜色不要纯黑，柔和一点 */
	white-space: pre-wrap; 
}
/* --- 改造结束 --- */


/* AI足迹/地图 时间线样式 */
#ai-map-timeline-container { padding: 30px 20px; }
.ai-timeline-item {
    position: relative;
    padding-left: 30px;
    padding-bottom: 30px;
    border-left: 2px solid #e9ecef;
}
.ai-timeline-item:last-child {
    border-left: none;
}
.ai-timeline-item::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 3px solid #fff;
}
.ai-timeline-item .time { font-size: 13px; color: var(--secondary-text); margin-bottom: 5px; }
.ai-timeline-item .title { font-weight: 600; margin-bottom: 5px; }
.ai-timeline-item .desc { font-size: 15px; }
/* 添加以下新样式 */
.ai-phone-widget-photo {
    height: 180px;
    border-radius: 24px;
    background-color: rgba(0,0,0,0.1);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    color: white;
}
.ai-phone-widget-photo .widget-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    font-style: italic;
}
.settings-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 5px;
}
/* ▼▼▼ 用这段全新的代码替换掉你之前所有的 .ai-phone-modal-* 样式 ▼▼▼ */

/* ---【全新 V2: 纯文本版】AI 手机专用弹窗样式 --- */
.ai-phone-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1001;
    padding: 20px;
}

.ai-phone-modal-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 25px 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    max-width: 90%;
    width: 320px;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s;
}

.ai-phone-modal-caption {
    font-family: 'Ma Shan Zheng', cursive; /* 使用优美的手写字体 */
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
}

.ai-phone-modal-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    text-align: center;
    line-height: 30px;
}

/* 1. 默认只隐藏相册App内部的 Tab 面板 */
#ai-phone-gallery-page .settings-tab-pane {
    display: none;
}
/* 2. 只显示相册App内部被标记为 active 的那一个 Tab 面板 */
#ai-phone-gallery-page .settings-tab-pane.active {
    display: block;
}
/* --- 【全新】AI 手机浏览器 V2.0 沉浸式美化 --- */

/* 1. 重构页面主体布局 */
#ai-phone-browser-page .page-content {
    background-color: var(--phone-bg); /* 浏览器背景色 */
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* 2. 浏览器头部 (地址栏区域) */
.browser-header {
    flex-shrink: 0;
    padding: 10px 15px;
    background-color: #fff; /* 顶部区域用白色，更像真实浏览器 */
    border-bottom: 1px solid var(--border-color);
}
.address-bar {
    background-color: #e9ecef; /* 地址栏底色 */
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); /* 地址栏增加一点内阴影 */
}
.address-bar .lock-icon {
    width: 14px;
    height: 14px;
    color: var(--secondary-text);
    flex-shrink: 0;
}
#browser-url {
    flex-grow: 1;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace; /* 使用等宽字体，更像URL */
    font-size: 14px;
    color: var(--primary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.browser-header .header-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.browser-header .header-action-btn .svg-icon {
    width: 18px;
    height: 18px;
    color: var(--secondary-text);
}

/* 3. 浏览器内容区域 (核心视图) */
.browser-content-view {
    flex-grow: 1;
    overflow-y: auto;
    background-color: #ffffff; /* 网页背景默认为白色 */
}

/* 4. “新标签页”样式 */
.new-tab-page {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}
.new-tab-page .logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-text);
}
.new-tab-page .logo span {
    color: var(--accent-color);
}
.search-bar-fake {
    width: 100%;
    background-color: #f0f2f5;
    border-radius: 20px;
    padding: 12px 20px;
    color: var(--secondary-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.frequent-sites-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}
.site-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
	min-width: 0;
}
.site-thumb .thumb-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-text);
}
.site-thumb .thumb-title {
    font-size: 12px;
    color: var(--secondary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

/* 5. 模拟网页视图样式 */
.web-page-view {
    padding: 20px;
}
.web-page-view h1 {
    font-size: 22px;
    margin: 0 0 15px;
}
.web-page-view p {
    font-size: 14px;
    color: var(--secondary-text);
    line-height: 1.6;
}

/* 6. 底部工具栏 */
.browser-toolbar {
    flex-shrink: 0;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
    background-color: rgba(255,255,255,0.8); /* 半透明磨砂效果 */
    backdrop-filter: blur(10px);
}
.browser-toolbar .toolbar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
}
.browser-toolbar .toolbar-btn .svg-icon {
    width: 26px;
    height: 26px;
    color: var(--primary-text);
}
.browser-toolbar .toolbar-btn:disabled .svg-icon {
    color: #ccc;
    cursor: not-allowed;
}
/* --- 【新增】浏览器内容版块美化 --- */
.browser-section {
    padding: 0 20px 20px;
    border-top: 8px solid #f0f2f5; /* 用粗分割线分隔版块 */
}
.browser-section .section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 15px;
    color: var(--primary-text);
}
.content-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.content-list-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    text-decoration: none;
}
.content-list-item .item-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}
.content-list-item .item-info {
    flex-grow: 1;
    overflow: hidden;
	min-width: 0;
}
.content-list-item .item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.content-list-item .item-url {
    font-size: 12px;
    color: var(--secondary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* --- 【新增】AI地图旅游笔记样式 --- */
.ai-travel-note-card {
    background-color: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ai-travel-note-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.ai-travel-note-card .image-placeholder {
    height: 120px;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--secondary-text);
}
.ai-travel-note-card .card-content {
    padding: 15px;
}
.ai-travel-note-card .location-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--primary-text);
    margin: 0 0 4px;
}
.ai-travel-note-card .date-text {
    font-size: 12px;
    color: var(--secondary-text);
    margin-bottom: 10px;
}
.ai-travel-note-card .note-snippet {
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
}
/* --- 【新增】AI地图App页签切换样式 --- */

/* 1. 默认隐藏地图App内部的所有面板 */
#ai-phone-map-page .settings-tab-pane {
    display: none;
}

/* 2. 只显示被标记为 active 的那一个 */
#ai-phone-map-page .settings-tab-pane.active {
    display: block; /* 或者 display: flex; 也可以，这里用 block 就足够了 */
}
/* ---【全新】AI 手机钱包 App 美化 --- */
.wallet-balance-card {
    margin: 15px;
    padding: 25px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 25px -5px rgba(118, 75, 162, 0.3);
    text-align: center;
}
.wallet-balance-card .balance-label {
    font-size: 14px;
    opacity: 0.8;
}
.wallet-balance-card .balance-amount {
    font-size: 40px;
    font-weight: 700;
    margin-top: 5px;
}
.transaction-list-header {
    padding: 15px 20px 5px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-text);
}
.transaction-list-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    border-bottom: 1px solid #f0f2f5;
}
.transaction-list-item:first-of-type { border-top: 1px solid #f0f2f5; }
.transaction-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    flex-shrink: 0;
    margin-right: 15px;
}
.transaction-details {
    flex-grow: 1;
}
.transaction-description {
    font-weight: 500;
    color: var(--primary-text);
}
.transaction-date {
    font-size: 13px;
    color: var(--secondary-text);
    margin-top: 4px;
}
.transaction-amount {
    font-size: 16px;
    font-weight: 600;
}
.transaction-amount.income {
    color: #28a745; /* 绿色收入 */
}
.transaction-amount.expense {
    color: #333; /* 黑色支出 */
}
/* ---【全新】AI 手机音乐 App 美化 --- */
#ai-phone-music-app-page .page-content {
    padding: 20px 15px;
    background-color: #f8f9fa; /* 一个干净的浅灰色背景 */
}

.ai-music-section {
    margin-bottom: 30px;
}

.ai-music-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ai-music-section-header .title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-text);
}

.ai-music-section-header .more-btn {
    font-size: 13px;
    color: var(--secondary-text);
    background: #e9ecef;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
}

/* 歌单网格 */
.ai-music-playlist-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.ai-music-playlist-card {
    cursor: pointer;
}

.ai-music-playlist-card .cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* 给封面加点阴影 */
    margin-bottom: 8px;
}

.ai-music-playlist-card .name {
    font-size: 13px;
    color: var(--primary-text);
    line-height: 1.4;
    /* 最多显示两行，超出则省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

/* 歌曲列表 */
.ai-music-song-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-music-song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ai-music-song-item:hover {
    background-color: #fff;
}

.ai-music-song-item .cover {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
}

.ai-music-song-item .info {
    flex-grow: 1;
    min-width: 0; /* 防止内容过长时撑开布局 */
}

.ai-music-song-item .title {
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-music-song-item .artist {
    font-size: 13px;
    color: var(--secondary-text);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-music-song-item .more-icon {
    flex-shrink: 0;
    color: var(--secondary-text);
}
/* ---【全新】AI 手机回收站 App 美化 --- */
#ai-phone-trash-page .page-content {
    padding: 15px;
    background-color: #f8f9fa; /* 一个干净的浅灰色背景 */
}

.ai-trash-empty-state {
    text-align: center;
    padding-top: 100px;
    color: var(--secondary-text);
}
.ai-trash-empty-state .svg-icon {
    width: 60px;
    height: 60px;
    color: #ccc;
    margin-bottom: 15px;
}

.ai-trash-item-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
	cursor: pointer; /* 【新增】鼠标变成小手，提示可点击 */
	    transition: transform 0.1s ease-in-out; /* 【新增】添加点击反馈动画 */
}
/* 【全新添加】点击卡片时的缩小效果 */
.ai-trash-item-card:active {
    transform: scale(0.98);
}
.ai-trash-item-card .trash-item-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e9ecef; /* 默认图标背景 */
}

.ai-trash-item-card .trash-item-icon .svg-icon {
    width: 24px;
    height: 24px;
    color: #495057; /* 默认图标颜色 */
}

/* 为不同类型的文件设置不同颜色的图标背景 */
.ai-trash-item-card[data-type="笔记草稿"] .trash-item-icon {
    background-color: #fffbe6;
    color: #fab005;
}
.ai-trash-item-card[data-type="照片"] .trash-item-icon {
    background-color: #e6f7ff;
    color: #1890ff;
}

.ai-trash-item-card .trash-item-info {
    flex-grow: 1;
    min-width: 0;
}

.ai-trash-item-card .item-type {
    font-weight: 600;
    font-size: 15px;
    color: var(--primary-text);
    margin-bottom: 4px;
}

.ai-trash-item-card .item-snippet {
    font-size: 13px;
    color: var(--secondary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-trash-item-card .trash-item-actions {
    display: flex;
    gap: 8px;
}

.ai-trash-item-card .trash-item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.ai-trash-item-card .trash-item-actions .svg-icon {
    width: 20px;
    height: 20px;
    color: var(--secondary-text);
    transition: color 0.2s;
}

.ai-trash-item-card .trash-item-actions button:hover .svg-icon {
    color: var(--primary-text);
}

/* ---【全新】新消息弹窗 & 未读标记 --- */
/* 弹窗遮罩层 (高级杂志风) */
#new-message-popup-overlay {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998; /* 比心声弹窗低一点，避免覆盖 */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* 从顶部出现 */
    padding-top: 20px; /* 距离顶部一点距离 */
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none; /* 默认不可点击 */
}

#new-message-popup-overlay.show {
    opacity: 1;
}

/* 弹窗卡片本身 (高级杂志风) */
#new-message-popup-card {
    background-color: #fdfdfd;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-width: 90%;
    width: 350px;
    padding: 18px 22px;
    cursor: pointer;
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    
    display: flex;
    align-items: center;
    gap: 15px;
    pointer-events: auto; 
}

#new-message-popup-overlay.show #new-message-popup-card {
    transform: translateY(0);
}

.popup-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px; /* 方圆形头像 */
    object-fit: cover;
    flex-shrink: 0;
}

.popup-content {
    overflow: hidden;
}

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

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

