/* ========== 主页样式 ========== */

/* 页面背景层 */
.home-page-bg {
    position: fixed;
    inset: 0;
    background: #fafafa;
    background-image: 
radial-gradient(circle at 20% 80%, rgba(184, 169, 201, 0.08) 0%, transparent 50%),
radial-gradient(circle at 80% 20%, rgba(200, 200, 200, 0.1) 0%, transparent 50%);
    z-index: -1;
    transition: background 0.5s ease;
}

/* 主页激活时允许 body 滚动 */
body.home-active {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* 主容器 */
.home-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 20px 16px 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
    display: none; /* 默认隐藏 */
    align-self: center;
    flex-shrink: 0;
}

.home-container.active {
    display: flex;
}

/* ========== 顶部大卡片 - 背景覆盖整体 ========== */
.hero-card {
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
0 8px 32px rgba(0, 0, 0, 0.08),
0 0 0 1px rgba(255, 255, 255, 0.4) inset;
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    cursor: pointer;
}

/* 背景图 - 覆盖整个卡片 */
.hero-bg-full {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f5f0f9 0%, #faf8fb 50%, #f8f6f9 100%);
    background-size: cover;
    background-position: center;
    z-index: 0;
    transition: background 0.5s ease;
}

/* 上段：纯占位 */
.hero-card-top {
    position: relative;
    height: 80px;
    z-index: 1;
}

/* 下段：毛玻璃遮罩层 */
.hero-card-bottom {
    position: relative;
    padding: 28px 20px 16px;
    background: linear-gradient(
180deg,
rgba(255, 255, 255, 0.35) 0%,
rgba(255, 255, 255, 0.55) 50%,
rgba(255, 255, 255, 0.45) 100%
    );
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.hero-content-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* 双人头像 - 浮在分界线上 */
.hero-avatars-float {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -30px;
    margin-bottom: -16px;
    position: relative;
    z-index: 10;
}

.hero-avatar-wrap {
    position: relative;
    cursor: pointer;
}

.hero-avatar-left {
    z-index: 2;
}

.hero-avatar-right {
    z-index: 1;
    margin-left: -20px;
}

.hero-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.hero-avatar-wrap:hover .hero-avatar {
    transform: scale(1.08);
}

/* 会话切换按钮（对方头像旁） */
.hero-session-switch-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-avatar-wrap:hover .hero-session-switch-btn {
    opacity: 1;
}

.hero-session-switch-btn:hover {
    background: rgba(var(--accent-color-rgb, 184, 169, 201), 0.35);
    color: rgba(255, 255, 255, 0.85);
    transform: scale(1.1);
}

/* 编辑提示 */
.hero-edit-hint {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 20;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.hero-card:hover .hero-edit-hint {
    opacity: 1;
}

.hero-title {
    font-size: 20px;
    font-weight: 600;
    color: #3a3a3a;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.hero-subtitle {
    font-size: 13px;
    color: #8a8a8a;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 独立时间显示 */
.standalone-time {
    text-align: center;
    padding: 8px 0;
}

.standalone-time .time-display {
    font-size: 36px;
    font-weight: 200;
    color: #3a3a3a;
    letter-spacing: 2px;
    line-height: 1;
}

.standalone-time .date-display {
    font-size: 13px;
    color: #8a8a8a;
    margin-top: 4px;
    letter-spacing: 1px;
}

/* ========== 功能网格 ========== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 4px 0;
}

/* ========== 翻页容器 ========== */
.apps-pager {
    position: relative;
    overflow: hidden;
}

.apps-page {
    display: none;
    animation: appsFadeIn 0.3s ease;
}

.apps-page.active {
    display: block;
}

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

.apps-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 4px;
}

.apps-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apps-dot.active {
    background: #b8a9c9;
    width: 18px;
    border-radius: 3px;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 4px;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.app-item:active {
    transform: scale(0.95);
}

/* 拖拽模式样式 */
.apps-grid.drag-mode .app-item {
    cursor: grab;
}

.apps-grid.drag-mode .app-item.dragging {
    cursor: grabbing;
    transform: scale(1.05);
    z-index: 1000;
    opacity: 0.9;
    position: relative;
}

.apps-grid.drag-mode .app-item:not(.dragging) {
    opacity: 0.6;
}

/* 拖拽时所有页面都显示拖拽效果 */
#apps-pager:has(.dragging) .apps-grid {
    border: 2px dashed var(--accent-color, #b8a9c9);
    border-radius: 16px;
}

/* 边缘翻页提示 */
#apps-pager.drag-left::before,
#apps-pager.drag-right::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 80px;
    background: rgba(184, 169, 201, 0.3);
    border-radius: 0 8px 8px 0;
    z-index: 10;
    pointer-events: none;
    animation: edge-pulse 0.8s ease-in-out infinite;
}

#apps-pager.drag-left::before {
    left: 0;
    border-radius: 0 8px 8px 0;
}

#apps-pager.drag-right::after {
    right: 0;
    border-radius: 8px 0 0 8px;
}

@keyframes edge-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.app-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--app-icon-color, #6b5b7b);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    position: relative;
}

.app-icon i {
    color: inherit;
    transition: color 0.3s ease;
}

/* 应用图标小红点 */
.app-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.3);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.app-item:hover .app-icon {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.app-name {
    font-size: 11px;
    color: #8a8a8a;
    font-weight: 500;
}

/* ========== 底部导航栏 - 毛玻璃效果 ========== */
.home-bottom-nav {
    margin-top: auto;
    padding: 8px 0 16px;
    position: relative;
}

.home-nav-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(135deg, 
rgba(255, 255, 255, 0.7) 0%, 
rgba(255, 255, 255, 0.5) 50%,
rgba(255, 255, 255, 0.6) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 32px;
    padding: 12px 10px;
    box-shadow: 
0 8px 32px rgba(0, 0, 0, 0.08),
0 2px 8px rgba(0, 0, 0, 0.04),
inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.home-nav-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
    pointer-events: none;
}

.home-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.home-nav-item:active {
    transform: scale(0.92);
}

.home-nav-item.active {
    background: linear-gradient(135deg, 
rgba(184, 169, 201, 0.25) 0%, 
rgba(232, 224, 240, 0.4) 100%);
    box-shadow: 
inset 0 2px 4px rgba(0, 0, 0, 0.05),
0 2px 8px rgba(184, 169, 201, 0.2);
}

.home-nav-icon {
    font-size: 18px;
    color: #8a8a8a;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-nav-icon i {
    color: inherit;
    transition: all 0.3s ease;
}

.home-nav-item.active .home-nav-icon i {
    transform: translateY(-2px);
}

.home-nav-label {
    font-size: 10px;
    color: #b0b0b0;
    font-weight: 500;
    transition: all 0.3s ease;
}

.home-nav-item.active .home-nav-label {
    color: #b8a9c9;
    font-weight: 600;
}

/* ========== 个人资料页 ========== */
.profile-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    background: rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

.profile-overlay.active {
    pointer-events: auto;
    opacity: 1;
}

.profile-page {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80%;
    max-width: 320px;
    background: white;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.1);
}

.profile-overlay.active .profile-page {
    transform: translateX(0);
}

.profile-back {
    font-size: 14px;
    color: #8a8a8a;
    cursor: pointer;
    padding: 4px 0 16px;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 20px;
}

.profile-avatar-wrapper {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #e8e0f0, #b8a9c9);
    margin-bottom: 14px;
    position: relative;
    cursor: pointer;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    background: #f0f0f0;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    color: #3a3a3a;
    margin-bottom: 2px;
}

.profile-id {
    font-size: 12px;
    color: #b0b0b0;
}

.profile-signature {
    text-align: center;
    padding: 14px;
    margin-bottom: 20px;
    background: #fafafa;
    border-radius: 14px;
}

.profile-signature-text {
    font-size: 13px;
    color: #8a8a8a;
    font-style: italic;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 16px 0;
    margin-bottom: 20px;
    background: #fafafa;
    border-radius: 14px;
}

.profile-stat-item {
    text-align: center;
    flex: 1;
}

.profile-stat-value {
    font-size: 20px;
    font-weight: 600;
    color: #3a3a3a;
}

.profile-stat-label {
    font-size: 10px;
    color: #b0b0b0;
    margin-top: 2px;
}

.profile-stat-divider {
    width: 1px;
    background: #eee;
}

.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.profile-menu-item:hover {
    background: #fafafa;
}

.profile-menu-icon {
    font-size: 18px;
}

.profile-menu-text {
    flex: 1;
    font-size: 14px;
    color: #3a3a3a;
}

.profile-menu-arrow {
    font-size: 16px;
    color: #b0b0b0;
}

/* 编辑模式 */
.profile-edit-header {
    font-size: 16px;
    font-weight: 600;
    color: #3a3a3a;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.profile-edit-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    cursor: pointer;
}

.profile-edit-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-edit-avatar-badge {
    font-size: 12px;
    color: #b8a9c9;
    font-weight: 500;
}

.profile-edit-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.profile-edit-field label {
    display: block;
    font-size: 12px;
    color: #b0b0b0;
    margin-bottom: 6px;
    font-weight: 500;
}

.profile-edit-field input,
.profile-edit-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #eee;
    border-radius: 12px;
    font-size: 14px;
    color: #3a3a3a;
    background: #fafafa;
    outline: none;
    font-family: inherit;
    resize: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.profile-edit-field input:focus,
.profile-edit-field textarea:focus {
    border-color: #b8a9c9;
    background: white;
}

.profile-edit-actions {
    display: flex;
    gap: 10px;
}

.profile-edit-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.profile-edit-btn.cancel {
    background: #f5f5f5;
    color: #8a8a8a;
}

.profile-edit-btn.save {
    background: #b8a9c9;
    color: white;
}

/* ========== 自定义设置面板 ========== */
.customize-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    pointer-events: none;
    opacity: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.customize-overlay.active {
    pointer-events: auto;
    opacity: 1;
}

.customize-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    background: white;
    border-radius: 28px 28px 0 0;
    padding: 20px;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

.customize-overlay.active .customize-panel {
    transform: translateY(0);
}

.customize-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.customize-title {
    font-size: 16px;
    font-weight: 600;
    color: #3a3a3a;
}

.customize-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 14px;
    color: #8a8a8a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.customize-section {
    margin-bottom: 20px;
}

.customize-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #3a3a3a;
    margin-bottom: 12px;
}

.bg-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.bg-preset {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bg-preset:hover {
    transform: scale(1.08);
}

.bg-preset.active {
    border-color: #b8a9c9;
    box-shadow: 0 2px 12px rgba(184, 169, 201, 0.4);
}

.customize-upload-btn {
    width: 100%;
    padding: 10px;
    border: 2px dashed #e0e0e0;
    border-radius: 14px;
    background: #fafafa;
    color: #8a8a8a;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ========== 头像绑定开关 ========== */
.customize-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.customize-toggle-row:hover {
    background: rgba(255, 255, 255, 0.9);
}
.customize-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.customize-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: #3a3a3a;
}
.customize-toggle-desc {
    font-size: 11px;
    color: #999;
}
.customize-toggle-switch {
    width: 42px;
    height: 24px;
    border-radius: 24px;
    background: #ddd;
    position: relative;
    flex-shrink: 0;
    transition: background 0.25s ease;
}
/* ========== 图标颜色预设 ========== */
.icon-color-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.icon-color-preset {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.icon-color-preset:hover {
    transform: scale(1.1);
}
.icon-color-preset.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px #b8a9c9, 0 2px 8px rgba(0, 0, 0, 0.15);
}

.customize-toggle-row.active .customize-toggle-switch {
    background: #b8a9c9;
}
.customize-toggle-knob {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: left 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.customize-toggle-row.active .customize-toggle-knob {
    left: 21px;
}

.avatar-customize-row {
    display: flex;
    gap: 16px;
}

.avatar-customize-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #fafafa;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-customize-preview {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avatar-customize-item span {
    font-size: 12px;
    color: #8a8a8a;
}

.customize-field {
    margin-bottom: 12px;
}

.customize-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #eee;
    border-radius: 12px;
    font-size: 14px;
    color: #3a3a3a;
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

/* 主题预设 */
.theme-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.theme-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 14px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: #fafafa;
    min-width: 52px;
}

.theme-preset.active {
    border-color: #b8a9c9;
    background: #f5f0f9;
}

.theme-preset-colors {
    display: flex;
    gap: 3px;
}

.theme-preset-colors span {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
}

.theme-preset-name {
    font-size: 10px;
    color: #8a8a8a;
    font-weight: 500;
}

.theme-color-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.theme-color-row label {
    font-size: 13px;
    color: #3a3a3a;
    font-weight: 500;
}

.theme-color-picker-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-color-picker-wrap input[type="color"] {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    background: none;
    -webkit-appearance: none;
}

.theme-color-hex {
    font-size: 12px;
    color: #b0b0b0;
    font-family: monospace;
    min-width: 60px;
}

/* 功能图标替换网格 */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.icon-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    position: relative;
}

.icon-grid-item:hover {
    background: #f5f5f5;
}

.icon-grid-clear {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff4757;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1;
}

.icon-grid-item:hover .icon-grid-clear {
    opacity: 1;
}

.icon-grid-clear:hover {
    background: #e8414f;
    transform: scale(1.15);
}

.icon-grid-preview {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(255,255,255,0.85);
    border: 1px solid #eee;
    overflow: hidden;
}

.icon-grid-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.icon-grid-label {
    font-size: 10px;
    color: #8a8a8a;
    text-align: center;
    line-height: 1.2;
}

/* 响应式 */
@media (max-width: 380px) {
    .hero-avatar {
width: 56px;
height: 56px;
    }
    .standalone-time .time-display {
font-size: 30px;
    }
    .app-icon {
width: 48px;
height: 48px;
font-size: 20px;
    }
}

/* ========== 消息通知横幅 ========== */
.home-notification {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    width: 100%;
    max-width: 420px;
    z-index: 99998;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    padding: 8px 16px;
}

.home-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.home-notification.hide {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.home-notification-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 18px;
    box-shadow:
0 4px 24px rgba(0, 0, 0, 0.12),
0 0 0 0.5px rgba(255, 255, 255, 0.6) inset;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.home-notification-inner:active {
    transform: scale(0.97);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

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

.home-notification-content {
    flex: 1;
    min-width: 0;
}

.home-notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.home-notification-name {
    font-size: 13px;
    font-weight: 600;
    color: #3a3a3a;
}

.home-notification-time {
    font-size: 11px;
    color: #999;
    flex-shrink: 0;
    margin-left: 8px;
}

.home-notification-text {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.home-notification-app {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}

/* 深色模式适配 */
body.dark-mode .home-notification-inner {
    background: rgba(40, 40, 45, 0.85);
    box-shadow:
0 4px 24px rgba(0, 0, 0, 0.3),
0 0 0 0.5px rgba(255, 255, 255, 0.1) inset;
}

body.dark-mode .home-notification-name {
    color: #e0e0e0;
}

body.dark-mode .home-notification-text {
    color: #aaa;
}

body.dark-mode .home-notification-time,
body.dark-mode .home-notification-app {
    color: #666;
}
