/* CSS 变量定义 - 主题色管理 */
:root {
    --theme-primary: #07c160;
    --theme-primary-light: rgba(7, 193, 96, 0.1);
    --theme-primary-hover: #06a84f;
    --theme-secondary: #1890ff;
    --theme-secondary-hover: #0078d4;
    --theme-secondary-active: #106ebe;
    --theme-gradient-direction: to right;
    --theme-gradient: linear-gradient(var(--theme-gradient-direction), var(--theme-primary), var(--theme-secondary));
    --use-gradient: 0; /* 0 = 不使用渐变, 1 = 使用渐变 */
    
    /* 亮色模式变量 */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #ededed;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --input-bg: #ffffff;
    --modal-bg: #ffffff;
    --overlay-bg: rgba(0, 0, 0, 0.5);
}

/* 暗黑模式变量 */
.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #363636;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-tertiary: #999999;
    --border-color: #404040;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --input-bg: #2d2d2d;
    --modal-bg: #1a1a1a;
    --overlay-bg: rgba(0, 0, 0, 0.7);
    
    /* 暗色模式下的主题色适配 */
    --theme-secondary-hover: #4dabf7;
    --theme-secondary-active: #339af0;
}

/* 系统主题检测 */
@media (prefers-color-scheme: dark) {
    .system-theme {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --bg-tertiary: #363636;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --text-tertiary: #999999;
        --border-color: #404040;
        --shadow-color: rgba(0, 0, 0, 0.3);
        --input-bg: #2d2d2d;
        --modal-bg: #1a1a1a;
        --overlay-bg: rgba(0, 0, 0, 0.7);
        
        /* 系统暗色主题下的主题色适配 */
        --theme-secondary-hover: #4dabf7;
        --theme-secondary-active: #339af0;
    }
}

/* 渐变模式下的样式 */
.gradient-mode {
    --theme-background: var(--theme-gradient);
}

.gradient-mode .apply-custom-color-btn,
.gradient-mode .apply-gradient-btn,
.gradient-mode .send-btn,
.gradient-mode .memory-panel-btn:active,
.gradient-mode .generate-moment-btn,
.gradient-mode .form-submit,
.gradient-mode .header-btn,
.gradient-mode .song-item.active {
    background: var(--theme-gradient) !important;
}

/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* 屏蔽长按选择和上下文菜单 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 主容器 - 用于页面堆叠和过渡 */
.main-container {
    position: relative;
    height: 100vh;
    height: var(--viewport-height, 100vh);
    padding-bottom: var(--nav-height, 50px); /* 留出底部导航空间 */
}

/* 页面通用样式 */
.contact-list-page,
.moments-page,
.profile-page,
.weibo-page,
.data-management-page,
.memory-management-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-in-out, background-color 0.3s ease;
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    padding-left: var(--safe-area-left, 0px);
    padding-right: var(--safe-area-right, 0px);
    padding-bottom: var(--safe-area-bottom, 0px);
    overflow: hidden; /* 防止溢出 */
}

/* 聊天页面单独设置（不需要bottom nav空间） */
.chat-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-in-out, background-color 0.3s ease;
    background-color: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    padding-left: var(--safe-area-left, 0px);
    padding-right: var(--safe-area-right, 0px);
    overflow: hidden; /* 防止记忆面板溢出 */
}

/* 当前激活的页面 */
.contact-list-page.active,
.chat-page.active,
.moments-page.active,
.profile-page.active,
.weibo-page.active,
.data-management-page.active,
.memory-management-page.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10; /* 确保活动页面在最上层 */
}

/* 聊天页面激活时的z-index调整 */
.chat-page.active {
    z-index: 50; /* 聊天页面层级稍高 */
}

/* 联系人列表页面特定样式 */
.contact-list-page {
    background-color: var(--bg-primary);
}

.contact-list-page .wechat-header {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 10px 15px;
    padding-top: calc(10px + var(--safe-area-top, 0px)); /* 自动避开刘海屏/状态栏 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0; /* 不压缩 */
    min-height: calc(44px + var(--safe-area-top, 0px)); /* 最小高度包含safe area */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.contact-list-page:not(.active) .wechat-header,
.chat-page:not(.active) .chat-header,
.moments-page:not(.active) .moments-header,
.profile-page:not(.active) .chat-header,
.data-management-page:not(.active) .chat-header,
.memory-management-page:not(.active) .chat-header {
    display: none;
}

/* 互动页面隐藏规则 */
.interactive-page:not(.active) {
    display: none;
}

.header-title {
    font-size: 17px;
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 20px;
}

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

.search-bar {
    padding: 8px 15px;
    background-color: var(--bg-tertiary);
    flex-shrink: 0; /* 不压缩 */
    transition: background-color 0.3s ease;
}

.search-input {
    width: 100%;
    height: 32px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-input:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.1);
}

/* 联系人列表容器 - 主页的滚动区域 */
#contactList {
    flex: 1; /* 占据header/search和nav bar之间的空间 */
    overflow-y: auto; /* 只有这个区域可以滚动 */
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--nav-height, 50px); /* 为底部导航栏留出空间 */
}

/* 联系人项目 */
.contact-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: var(--bg-primary);
    border-bottom: 0.5px solid var(--border-color);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.contact-item:active {
    background-color: var(--bg-secondary);
}

.contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    margin-right: 12px;
    background-color: var(--theme-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-info {
    flex: 1;
    overflow: hidden;
}

.contact-name {
    font-size: 17px;
    color: var(--text-primary);
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.contact-message {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.contact-time {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 12px;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

/* 聊天页面 */
/* 聊天页面fixed定位样式已在上面统一定义 */

.chat-page.active {
    /* This is now handled by the global .active class */
}

.chat-header {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 10px 15px;
    padding-top: calc(10px + var(--safe-area-top, 0px)); /* 自动避开刘海屏/状态栏 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 0.5px solid var(--border-color);
    flex-shrink: 0; /* 不压缩 */
    min-height: calc(44px + var(--safe-area-top, 0px)); /* 最小高度包含safe area */
    transition: all 0.3s ease;
}

/* memory-panel-header保持相对定位的padding调整 */
.memory-panel-header {
    padding-top: 10px;
}


.back-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 17px;
    color: var(--theme-primary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.chat-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-more, .memory-btn {
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    padding-bottom: calc(80px + var(--safe-area-bottom, 0px)); /* 为固定底部的输入框留出空间，包含safe area */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth; /* 添加平滑滚动 */
}

.messages-scroll-content {
    transform: translateZ(0);
}

.message-timestamp {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin: 0 auto 15px;
    padding: 2px 8px;
    background-color: rgba(0,0,0,0.05);
    border-radius: 4px;
    display: inline-block;
    left: 50%;
    position: relative;
    transform: translateX(-50%);
}

.message {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
    animation: slideInFromBottom 0.3s ease-out;
}

/* 新消息从底部滑入的动画 */
@keyframes slideInFromBottom {
    from {
        transform: translateY(15px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 为新发送的消息添加特殊动画类 */
.message.new-message {
    animation: slideInFromBottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 打字指示器也使用相同动画 */
#typingIndicator {
    animation: slideInFromBottom 0.4s ease-out;
}

.message.sent {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin: 0 10px;
    background-color: var(--theme-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-bubble,
.custom-bubble-container {
    max-width: calc(100% - 120px);
    position: relative;
}

.message-content {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
}

/* 为自定义气泡容器内的文本元素添加换行属性 */
.custom-bubble-container * {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.message.received .message-content {
    background-color: #fff;
    color: #000;
}

.message.sent .message-content {
    background-color: #95ec69;
    color: #000;
}

.message-content::before {
    content: '';
    position: absolute;
    top: 10px;
    width: 0;
    height: 0;
    border-style: solid;
}

.message.received .message-content::before {
    left: -5px;
    border-width: 6px 6px 6px 0;
    border-color: transparent #fff transparent transparent;
}

.message.sent .message-content::before {
    right: -5px;
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent #95ec69;
}

.message-emoji {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    display: block;
}

.message-content.red-packet {
    background-color: #fa9d3b;
    color: white;
    padding: 0;
    width: 240px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

.red-packet-body {
    display: flex;
    align-items: center;
    padding: 12px;
}

.red-packet-icon {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.red-packet-text {
    flex: 1;
}

.red-packet-text div:first-child {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
}

.red-packet-text div:last-child {
    font-size: 14px;
}

.red-packet-footer {
    background-color: white;
    color: #999;
    font-size: 12px;
    padding: 4px 12px;
    border-top: 0.5px solid rgba(0,0,0,0.05);
}

.message.sent .message-content.red-packet::before,
.message.received .message-content.red-packet::before {
    border-color: transparent transparent transparent #fa9d3b;
}

.message.received .message-content.red-packet::before {
     border-color: transparent #fa9d3b transparent transparent;
}

/* 输入区域 */
.chat-input-area {
    background-color: var(--bg-primary);
    border-top: 0.5px solid var(--border-color);
    padding: 8px 10px 10px 10px; /* 稍微增加底部内边距 */
    padding-bottom: calc(10px + var(--safe-area-bottom, 0px)); /* 适配底部安全区域 */
    padding-left: calc(10px + var(--safe-area-left, 0px));
    padding-right: calc(10px + var(--safe-area-right, 0px));
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transition: all 0.3s ease;
    z-index: 102;
}

.input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background-color: var(--bg-primary);
    font-size: 20px;
    transition: background-color 0.3s ease;
}

.action-btn:active {
    background-color: var(--bg-secondary);
}

.chat-input {
    flex: 1;
    min-height: 36px;
    max-height: 120px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 16px;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input::placeholder {
    color: var(--text-tertiary);
}

.chat-input:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.1);
}

.send-btn {
    padding: 8px 16px;
    background-color: var(--theme-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.send-btn:active {
    background-color: #06a652;
}

.send-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 记忆表格面板 */
.memory-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f7f7f7;
    z-index: 100; /* 在聊天之上 */
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out, visibility 0s linear 0.3s, opacity 0.3s ease-in-out;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.memory-panel.active {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: transform 0.3s ease-in-out, visibility 0s linear 0s, opacity 0.3s ease-in-out;
}

.memory-panel-header {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ededed;
    border-bottom: 0.5px solid #d9d9d9;
    position: sticky;
    top: 0;
    z-index: 1;
}

.memory-panel-title {
    font-size: 17px;
    font-weight: 500;
}

.memory-panel-actions {
    display: flex;
    gap: 15px;
}

.memory-panel-btn {
    font-size: 16px;
    color: #576b95;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.memory-panel-btn:active {
    color: var(--theme-primary);
}

.memory-panel-content {
    padding: 15px;
    background-color: #f7f7f7;
}

.memory-textarea {
    width: 100%;
    height: calc(100vh - 150px);
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    resize: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background-color: #fff;
    color: #333;
    padding: 10px;
}

/* --- 简洁现代风格记忆表格 --- */
.memory-table-view {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #333;
    line-height: 1.6;
}

.memory-table-view h1,
.memory-table-view h2,
.memory-table-view h3,
.memory-table-view h4 {
    font-weight: 600;
    color: #111;
    margin-top: 24px;
    margin-bottom: 16px;
}

.memory-table-view h1 { font-size: 1.5em; }
.memory-table-view h2 { font-size: 1.3em; }
.memory-table-view h3 { font-size: 1.1em; }
.memory-table-view h4 { font-size: 1em; }

.memory-table-view p {
    margin-bottom: 16px;
}

.memory-table-view ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.memory-table-view table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden; /* 确保圆角生效 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    table-layout: fixed; /* 固定表格布局避免内容撑破 */
}

.memory-table-view th,
.memory-table-view td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0; /* 水平分割线 */
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap; /* 保留换行但允许折行 */
    max-width: 0; /* 配合table-layout: fixed使用 */
    overflow-wrap: break-word;
}

.memory-table-view th {
    background-color: #fafafa;
    font-weight: 600;
    color: #555;
}

.memory-table-view tr:last-child th,
.memory-table-view tr:last-child td {
    border-bottom: none;
}

.memory-table-view hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 24px 0;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height, 50px); /* 使用计算好的高度 */
    padding-bottom: var(--safe-area-bottom, 0px);
    padding-left: var(--safe-area-left, 0px);
    padding-right: var(--safe-area-right, 0px);
    background-color: var(--bg-primary);
    border-top: 0.5px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 200;
    transition: all 0.3s ease;
}

/* 聊天页面激活时隐藏底部导航栏 */
body:has(.chat-page.active) .bottom-nav {
    display: none;
}

/* 兼容性备用方案：通过body类控制导航栏隐藏 */
/* 适用于不支持 :has() 选择器的浏览器 */
body.chat-active .bottom-nav,
body.no-has-support.chat-active .bottom-nav {
    display: none !important;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    position: relative;
}

.nav-icon {
    width: 24px;
    height: 24px;
}

.nav-text {
    font-size: 10px;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.nav-item.active .nav-text {
    color: var(--theme-primary);
}

/* 朋友圈页面 */
.moments-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 50px;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    z-index: 120;
    padding-bottom: calc(50px + env(safe-area-inset-bottom)); /* 只保留底部padding */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* 朋友圈图片网格样式 */
.moment-images-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-top: 10px;
    max-width: 300px;
}

.moment-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.moment-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.moment-image-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

/* 朋友圈展示图片网格 */
.moment-images-grid {
    display: grid;
    gap: 4px;
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
}

.moment-images-grid.grid-1 {
    grid-template-columns: 1fr;
    max-width: 200px;
}

.moment-images-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 200px;
}

.moment-images-grid.grid-3,
.moment-images-grid.grid-4,
.moment-images-grid.grid-5,
.moment-images-grid.grid-6,
.moment-images-grid.grid-7,
.moment-images-grid.grid-8,
.moment-images-grid.grid-9 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 200px;
}

.moment-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.moment-grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.moment-image-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

.image-error-icon {
    font-size: 24px;
    margin-bottom: 4px;
    opacity: 0.6;
}

.image-error-text {
    font-size: 10px;
    text-align: center;
}

/* 评论时间样式 */
.comment-time {
    font-size: 11px;
    color: #999;
    margin-left: 8px;
}

/* 朋友圈三点菜单按钮 */
.moment-menu-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.1);
    color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.moment-menu-btn:hover {
    background-color: rgba(0, 0, 0, 0.2);
    color: #333;
}

/* 朋友圈菜单 */
.moment-menu {
    position: absolute;
    top: 32px;
    right: 0px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 120px;
}

.moment-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

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

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

.moment-menu-item:first-child:hover {
    color: #e53e3e;
}

.moment-header {
    position: relative;
}

.moments-page.active {
    /* This is now handled by the global .active class */
}

.moments-header {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 10px 15px;
    padding-top: calc(10px + var(--safe-area-top, 0px)); /* 自动避开刘海屏/状态栏 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 0.5px solid var(--border-color);
    flex-shrink: 0; /* 不压缩 */
    min-height: calc(44px + var(--safe-area-top, 0px)); /* 最小高度包含safe area */
    transition: all 0.3s ease;
}

.moments-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    padding-bottom: calc(var(--nav-height, 50px) + 15px); /* 为底部导航栏留出空间 */
    -webkit-overflow-scrolling: touch;
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

.moments-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.moments-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.moments-empty-text {
    font-size: 16px;
    margin-bottom: 20px;
}

.moments-empty-btn {
    background-color: var(--theme-primary);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
}

.moments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.moment-item {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px var(--shadow-color);
    margin-top: 8px;
    transition: all 0.3s ease;
}

.moment-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}


.moment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.moment-info {
    flex: 1;
}

.moment-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 2px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.moment-time {
    font-size: 12px;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.moment-content {
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.moment-image {
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* 发布朋友圈模态框 */
.publish-moment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
}

.publish-moment-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 12px 12px 0 0;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.publish-moment-header {
    padding: 15px;
    border-bottom: 0.5px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.publish-moment-title {
    font-size: 17px;
    font-weight: 500;
}

.publish-moment-close {
    font-size: 14px;
    color: #576b95;
    cursor: pointer;
}

.publish-moment-body {
    padding: 15px;
}

.generate-moment-section {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.generate-moment-btn {
    background-color: var(--theme-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 10px;
}

.generate-moment-hint {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.moment-preview {
    display: none;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
}

.moment-preview-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.moment-preview-content {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.moment-preview-image {
    width: 100%;
    max-width: 200px;
    border-radius: 8px;
}

.unsplash-key-section {
    margin-bottom: 20px;
}

.unsplash-key-label {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.unsplash-key-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
}

.unsplash-key-input:focus {
    border-color: var(--theme-primary);
}

.publish-moment-submit {
    width: 100%;
    padding: 12px;
    background-color: var(--theme-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.publish-moment-submit:active {
    background-color: #06a652;
}

.publish-moment-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--overlay-bg);
    z-index: 2000;
    transition: background-color 0.3s ease;
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--modal-bg);
    color: var(--text-primary);
    border-radius: 12px 12px 0 0;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    transition: background-color 0.3s ease, color 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px;
    border-bottom: 0.5px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 17px;
    font-weight: 500;
}

.modal-close {
    font-size: 14px;
    color: #576b95;
    cursor: pointer;
}

.modal-body {
    padding: 15px;
}

.modal-footer {
    padding: 15px;
    text-align: right;
    border-top: 1px solid #eee;
}

/* Specific styles for the Update Modal to make it scrollable */
#updateModal .modal-body {
    max-height: 60vh; /* Limit height to 60% of the viewport height */
    overflow-y: auto; /* Enable vertical scrolling */
    padding-right: 20px; /* Add some space for the scrollbar */
}

#updateModal .modal-footer {
    display: none; /* Initially hide the footer */
}

#updateModal .modal-footer.visible {
    display: block; /* Show the footer when it has the 'visible' class */
}

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

.form-label {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
    transition: color 0.3s ease;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 10px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.form-input::placeholder, .form-textarea::placeholder {
    color: var(--text-tertiary);
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.1);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.api-key-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.api-key-input {
    flex: 1;
}

.timeout-group {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.timeout-label {
    font-size: 12px;
    color: #666;
}

.timeout-input {
    width: 50px;
    padding: 8px 4px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    text-align: center;
}

.timeout-input:focus {
    border-color: var(--theme-primary);
}

.timeout-unit {
    font-size: 12px;
    color: #666;
}

/* API Provider Row Styles */
.api-provider-row {
    border-left: 3px solid #e1e5e9; /* 默认灰色左边框 */
    padding-left: 12px;
    margin-left: 8px;
    background-color: #f8f9fa; /* 默认灰色背景 */
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 8px;
}

/* 副key启用状态 */
.api-provider-row.enabled {
    border-left: 3px solid #28a745; /* 绿色左边框 */
    background-color: rgba(40, 167, 69, 0.05); /* 淡绿色背景 */
}

.remove-provider-btn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 8px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.remove-provider-btn:hover {
    background: #ff3838;
}

.remove-provider-btn:active {
    transform: scale(0.95);
}

/* Model Selection Styles */
.model-selection-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.model-config-select {
    flex: 1;
    min-width: 120px;
}

.model-select {
    flex: 2;
    min-width: 180px;
}

/* API配置管理页面样式 */
.config-list {
    padding: 16px;
}

.config-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 16px;
    margin-bottom: 20px;
}

.empty-action-btn {
    background: var(--theme-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    cursor: pointer;
}

.config-item {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
}

.config-item:hover {
    background: #f8f9fa;
}

.config-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.config-item-name {
    font-weight: bold;
    font-size: 16px;
}

.config-item-actions {
    display: flex;
    gap: 8px;
}

.config-item-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.config-item-edit {
    color: #007bff;
}

.config-item-delete {
    color: #dc3545;
}

.config-item-url {
    color: #666;
    font-size: 14px;
    margin-bottom: 4px;
}

.config-item-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    color: white;
}

.config-item-status.active {
    background: #28a745;
}

.config-item-status.inactive {
    background: #6c757d;
}

.config-form {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1000;
    padding: 16px;
    overflow-y: auto;
}

.config-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}

.close-form-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

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

.form-button.primary {
    background: var(--theme-primary);
    color: white;
}

.form-button.secondary {
    background: #6c757d;
    color: white;
}

.form-submit {
    width: 100%;
    padding: 12px;
    background-color: var(--theme-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.form-submit:active {
    background-color: #06a652;
}

/* 表情面板 */
.emoji-panel {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-top: 0.5px solid var(--border-color);
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 8px;
    box-shadow: 0 -2px 10px var(--shadow-color);
    transition: all 0.3s ease;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px;
}

.emoji-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.emoji-item:active {
    background-color: #e5e5e5;
}

.emoji-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.emoji-delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

.emoji-item:hover .emoji-delete-btn {
    display: flex;
}

.add-emoji-btn {
    grid-column: span 4;
    padding: 10px;
    background-color: var(--bg-primary);
    border: 1px dashed var(--theme-primary);
    border-radius: 8px;
    color: var(--theme-primary);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-emoji-btn:hover {
    background-color: var(--theme-primary-light);
}

/* 设置菜单 */
.settings-menu {
    display: none;
    position: fixed;
    top: 50px; /* 调整位置 */
    right: 10px;
    background-color: #4c4c4c;
    border-radius: 4px;
    padding: 8px 0;
    min-width: 120px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1500;
}

.settings-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #4c4c4c;
}

.menu-item {
    padding: 10px 20px;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

.menu-item:active {
    background-color: #3c3c3c;
}

/* 新增删除选项的样式 */
.menu-item.delete-item {
    color: #ff4444; /* 红色字体 */
}

.menu-item.delete-item:active {
    background-color: #8b0000; /* 深红色背景 */
}

/* 加载动画 */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 3000;
    display: none;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    display: block;
    animation: fadeInOut 2s ease;
}

/* Toast类型样式 */
.toast.toast-error {
    background-color: #dc3545;
    color: white;
}

.toast.toast-success {
    background-color: #28a745;
    color: white;
}

.toast.toast-warning {
    background-color: #ffc107;
    color: #212529;
}

.toast.toast-info {
    background-color: #17a2b8;
    color: white;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

/* 顶部提示 */
.top-notification {
    position: fixed;
    top: 20px; /* 调整位置 */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 3000;
    display: none;
}

.top-notification.show {
    display: block;
    animation: slideDown 1.5s ease;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* 模型列表 */
.model-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-top: 10px;
}

.model-item {
    padding: 12px;
    border-bottom: 0.5px solid #e5e5e5;
    cursor: pointer;
    font-size: 14px;
}

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

.model-item:active {
    background-color: #f5f5f5;
}

.model-item.selected {
    background-color: #e8f5e9;
    color: var(--theme-primary);
}


.loading-text {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

/* 提示词管理 */
.prompt-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.prompt-title {
    font-size: 14px;
    font-weight: 500;
}

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

.prompt-btn {
    padding: 5px 10px;
    background-color: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.prompt-btn:active {
    background-color: #e5e5e5;
}

.file-input {
    display: none;
}

/* 个人信息页面 */
.profile-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 50px;
    background-color: var(--bg-secondary);
    z-index: 150;
    overflow-y: auto;
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    transition: background-color 0.3s ease;
}

.profile-page.active {
    /* This is now handled by the global .active class */
}

.profile-header {
    background-color: var(--bg-primary);
    padding: 20px 15px; /* 调整内边距 */
    text-align: center;
    border-bottom: 10px solid var(--bg-secondary);
    transition: all 0.3s ease;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin: 0 auto 15px;
    background-color: var(--theme-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.profile-id {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.profile-section {
    background-color: var(--bg-primary);
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}

.profile-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 0.5px solid var(--border-color);
    cursor: pointer;
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

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

.profile-item:active {
    background-color: var(--bg-secondary);
}

.profile-item-label {
    flex: 1;
    font-size: 16px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.profile-item-value {
    color: var(--text-secondary);
    font-size: 14px;
    margin-right: 5px;
    transition: color 0.3s ease;
}

.profile-item-arrow {
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.profile-version {
    text-align: center;
    padding: 15px;
    margin-top: 10px;
    background-color: transparent;
}

.profile-version #profileVersionText {
    font-size: 12px;
    color: #999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    user-select: none;
    opacity: 0.8;
}

.feature-hint {
    position: absolute;
    bottom: 60px;
    right: 15px;
    background: var(--theme-primary);
    color: white;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 12px;
    z-index: 150;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.context-control {
    background-color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

.context-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.context-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.context-value {
    font-size: 14px;
    color: var(--theme-primary);
    font-weight: bold;
    min-width: 40px;
    text-align: right;
}

.context-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
    margin-top: 10px;
}

.context-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--theme-primary);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.context-info {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    line-height: 1.4;
}

.music-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.music-modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    max-height: 80vh;
    overflow-y: auto;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: #000;
}

.playlist-container {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.song-item {
    padding: 10px;
    margin: 5px 0;
    background: #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.song-item:hover {
    background: #e0e0e0;
}

.song-item.active {
    background: var(--theme-primary);
    color: white;
}

.delete-song {
    color: #ff4444;
    cursor: pointer;
    padding: 0 10px;
}

.player-controls {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px 0;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--theme-primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.floating-lyrics {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    z-index: 999;
    transition: all 0.3s ease;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.debug-info {
    position: fixed;
    top: 20px; /* 调整位置 */
    right: 10px;
    background: rgba(255,255,255,0.9);
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.group-avatar {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    margin-right: 12px;
    background-color: #4a90e2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.group-avatar-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.group-avatar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    overflow: hidden;
    border: 1px solid white;
    background-color: var(--theme-primary);
}

.group-avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.create-group-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.group-member-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-top: 10px;
    padding: 10px;
}

.group-member-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 0.5px solid #eee;
    cursor: pointer;
}

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

.group-member-item.selected {
    background-color: #e6f7ff;
}

.group-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    margin-right: 10px;
    background-color: var(--theme-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    overflow: hidden;
}

.group-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-member-name {
    flex: 1;
    font-size: 14px;
}

.group-member-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-member-checkbox.selected {
    background-color: var(--theme-primary);
    color: white;
    border-color: var(--theme-primary);
}

.group-message-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.group-message-name {
    font-size: 12px;
    font-weight: bold;
    color: #576b95;
}

.group-message-time {
    font-size: 10px;
    color: #999;
    margin-left: 8px;
}

.group-info-hint {
    background-color: #f0f0f0;
    color: #666;
    font-size: 12px;
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    margin: 10px 0;
}

.weibo-page {
    background-color: var(--bg-secondary);
}

.weibo-page.active {
    /* This is now handled by the global .active class */
}

.weibo-header {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 10px 15px;
    padding-top: calc(10px + var(--safe-area-top, 0px)); /* 自动避开刘海屏/状态栏 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 0.5px solid var(--border-color);
    flex-shrink: 0; /* 不压缩 */
    min-height: calc(44px + var(--safe-area-top, 0px)); /* 最小高度包含safe area */
    transition: all 0.3s ease;
}

.weibo-page:not(.active) .weibo-header {
    display: none;
}

.weibo-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-secondary);
    transition: background-color 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    padding-bottom: calc(var(--nav-height, 50px) + 15px); /* 为底部导航栏留出空间 */
    -webkit-overflow-scrolling: touch;
}

.weibo-scroll-content {
    transform: translateZ(0);
}

/* 确保虚拟滚动时的布局稳定 */
.weibo-container > .post {
    min-width: 0; /* 防止flex项目收缩过度 */
    max-width: 100%;
}

.post {
    background: var(--bg-primary);
    color: var(--text-primary);
    margin-bottom: 8px;
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    transform: translateZ(0);
    transition: all 0.3s ease;
}

.post-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    position: relative; /* For menu positioning */
}

.post-menu {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
}

.post-menu:hover {
    background-color: var(--bg-secondary);
}

.post-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-primary);
    border-radius: 4px;
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 10;
    min-width: 80px;
    padding: 4px 0;
    transition: all 0.3s ease;
}

.post-menu-dropdown .menu-item {
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.post-menu-dropdown .menu-item:hover {
    background-color: var(--bg-secondary);
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff8a80, #ff5722);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 12px;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-info {
    flex: 1;
}

.user-name {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.vip-badge {
    display: inline-block;
    background: linear-gradient(45deg, #ffb74d, #ff9800);
    color: white;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 10px;
    margin-left: 4px;
    vertical-align: middle;
}

.post-time {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.post-source {
    font-size: 12px;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.post-content {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
    color: var(--text-primary);
    word-wrap: break-word;
    transition: color 0.3s ease;
}

.hashtag, .mention {
    color: var(--theme-primary);
    text-decoration: none;
}

.post-image-desc {
    width: 120px;
    height: 120px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    text-align: center;
    padding: 12px;
    line-height: 1.2;
    overflow: hidden;
    word-wrap: break-word;
    hyphens: auto;
}

.post-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    margin-top: 12px;
}

.action-btn-weibo {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 13px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.action-btn-weibo:hover {
    background-color: #f5f5f5;
}

.action-icon {
    margin-right: 4px;
    font-size: 16px;
}

.comments-section {
    background: var(--bg-secondary);
    margin: 12px -16px -16px -16px;
    padding: 12px 16px;
    transition: background-color 0.3s ease;
}

.comment {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.comment:last-child {
    margin-bottom: 0;
}

.comment-user {
    color: var(--theme-primary);
    font-weight: 500;
    margin-right: 4px;
    transition: color 0.3s ease;
}

.comment-content {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.comment-time {
    color: var(--text-tertiary);
    font-size: 12px;
    margin-left: 8px;
    transition: color 0.3s ease;
}

/* 新增：加载更多消息按钮 */
.load-more-messages {
    text-align: center;
    padding: 10px;
    color: #576b95;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 10px;
}
.load-more-messages:hover {
    text-decoration: underline;
}

/* 加载更多帖子按钮 */
.load-more-posts {
    text-align: center;
    padding: 15px;
    color: #576b95;
    font-size: 14px;
    cursor: pointer;
    margin: 10px 0;
    border: 1px dashed #d0d0d0;
    border-radius: 8px;
    background: #f9f9f9;
}
.load-more-posts:hover {
    background: #f0f0f0;
    text-decoration: underline;
}

/* 数据管理页面样式 */
.data-management-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--nav-height, 50px) + 15px); /* 为底部导航栏留出空间 */
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

/* 虚拟滚动占位符样式 */
.virtual-spacer-top,
.virtual-spacer-bottom {
    width: 100%;
    background: transparent;
    flex-shrink: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 确认对话框样式 */
.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4000;
}

/* Update Modal Specifics */
#updateModalBody {
    max-height: 60vh; /* Limit height for long content */
    overflow-y: auto;
    padding-bottom: 15px;
}

#updateModalBody h2 {
    font-size: 1.2em;
    margin-top: 1em;
    margin-bottom: 0.5em;
    text-align: center;
}

#updateModalBody h3 {
    font-size: 1.1em;
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: var(--theme-primary);
}

#updateModalBody ul {
    padding-left: 20px;
    margin-bottom: 1em;
}

#updateModalBody li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}

.modal-footer {
    padding: 15px;
    border-top: 0.5px solid #e5e5e5;
}

/* 新增：回复框样式 */
.reply-box {
    margin-top: 12px;
    padding-top: 12px;
    padding-bottom: 60px; /* 为底部导航栏留出空间 */
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 8px;
}

.reply-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 18px;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}

.reply-input:focus {
    border-color: #4a90e2;
}

.reply-button {
    padding: 8px 16px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.reply-button:hover {
    background-color: #357bd8;
}

.reply-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.confirm-dialog {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 300px;
    text-align: center;
}

.confirm-dialog-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
}

.confirm-dialog-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.confirm-dialog-buttons {
    display: flex;
    justify-content: space-between;
}

.confirm-dialog-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.confirm-dialog-btn.cancel {
    background-color: #f0f0f0;
    color: #333;
    margin-right: 10px;
}

.confirm-dialog-btn.confirm {
    background-color: #ff4444;
    color: white;
}

/* 帖子选择对话框样式 */
.post-choice-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.choice-option {
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.choice-option:hover {
    border-color: var(--theme-primary);
    background-color: var(--theme-primary-light);
}

.choice-option:active {
    transform: scale(0.98);
}

.choice-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.choice-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.choice-description {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* 手动发帖表单样式 */
#manualPostModal .form-input {
    width: 100%;
}

#manualPostModal textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

#manualPostAuthor {
    background-color: #f5f5f5;
    color: #666;
}

/* 批量删除消息样式 */
.message-selected {
    background-color: rgba(255, 99, 99, 0.2) !important;
    border-left: 4px solid #ff6b6b !important;
}

.message-selected .message-bubble {
    background-color: rgba(255, 99, 99, 0.15) !important;
}

.multi-select-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: 1001;
    height: 80px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.multi-select-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    height: 45px;
}

.multi-select-btn.cancel-btn {
    background-color: #6c757d;
    color: white;
}

.multi-select-btn.cancel-btn:hover {
    background-color: #5a6268;
}

.multi-select-btn.delete-btn {
    background-color: #dc3545;
    color: white;
}

.multi-select-btn.delete-btn:hover {
    background-color: #c82333;
}

/* 语音消息样式 */
.voice-message {
    position: relative;
    cursor: pointer;
    transition: opacity 0.2s;
}

.voice-message:hover {
    opacity: 0.9;
}

/* 语音图标样式 */
.voice-icon {
    display: inline-block;
    margin-right: 6px;
    margin-left: 2px;
    vertical-align: middle;
    line-height: 1;
    user-select: none;
    color: inherit;
}

/* SVG图标样式 */
.voice-icon svg {
    display: inline-block;
    vertical-align: middle;
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* 播放状态样式 */
.voice-message.playing .voice-icon {
    animation: pulse 1.5s infinite;
}

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

/* 加载状态样式 */
.voice-message.loading .voice-icon {
    animation: spin 1s linear infinite;
}

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

/* 为了向后兼容，保留一些旧样式但标记为废弃 */
/* DEPRECATED: 以下样式将在未来版本中移除 */
.voice-player { display: none !important; }
.play-button { display: none !important; }
.waveform { display: none !important; }
.duration { display: none !important; }
.message-content.has-voice-player {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* === 调试日志页面样式 === */
.debug-log-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-in-out;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.debug-log-page.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

.debug-log-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
    padding-bottom: 70px; /* 给底部导航留出空间 */
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

/* 数据管理页面样式 */
.database-stats {
    background: var(--bg-primary) !important;
    color: var(--text-primary);
    padding: 15px;
    border-radius: 8px;
    margin: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

/* 数据管理页面的各种区域 */
.import-export-actions > div {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.context-control {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.import-warning {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

/* 各种状态显示元素 */
#migrationStatusDetails,
#chatEmojiMigrationStatusDetails,
#imageKeywordConfigStatus,
#databaseStatsContent {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

/* 同步密钥输入框 */
#syncKeyInput {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

#syncKeyInput::placeholder {
    color: var(--text-tertiary) !important;
}

/* 角色选择器 */
#characterSelector {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.debug-log-info {
    margin-bottom: 15px;
}

.debug-log-stats {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.debug-log-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.debug-log-content {
    flex: 1;
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 10px;
    max-height: calc(100vh - 200px);
    transition: background-color 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.debug-log-empty {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 14px;
}

.debug-log-item {
    margin-bottom: 8px;
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    word-break: break-all;
    transition: all 0.3s ease;
}

.debug-log-item.debug-log-error {
    background: rgba(229, 62, 62, 0.1);
    border-left-color: #e53e3e;
}

.debug-log-item.debug-log-warn {
    background: rgba(221, 107, 32, 0.1);
    border-left-color: #dd6b20;
}

.debug-log-item.debug-log-info {
    background: rgba(49, 130, 206, 0.1);
    border-left-color: #3182ce;
}

.debug-log-item.debug-log-log {
    background: var(--bg-secondary);
    border-left-color: #718096;
}

.debug-log-item.debug-log-debug {
    background: rgba(56, 161, 105, 0.1);
    border-left-color: #38a169;
}

.debug-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.debug-log-time {
    color: var(--text-tertiary);
    font-size: 11px;
    transition: color 0.3s ease;
}

.debug-log-level {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.debug-log-error .debug-log-level {
    background: #e53e3e;
    color: white;
}

.debug-log-warn .debug-log-level {
    background: #dd6b20;
    color: white;
}

.debug-log-info .debug-log-level {
    background: #3182ce;
    color: white;
}

.debug-log-log .debug-log-level {
    background: #718096;
    color: white;
}

.debug-log-debug .debug-log-level {
    background: #38a169;
    color: white;
}

.debug-log-message {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.4;
    white-space: pre-wrap;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.header-btn {
    background: var(--theme-primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
}

.header-btn:hover {
    background: #06ad56;
}

.header-actions {
    display: flex;
    align-items: center;
}

/* === 记忆管理页面样式 === */
.memory-management-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 70px;
    overflow: hidden; /* 确保子元素滚动正常 */
}

.memory-tabs {
    display: flex;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.memory-tab {
    flex: 1;
    padding: 15px;
    border: none;
    background: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.memory-tab.active {
    color: var(--theme-primary);
    border-bottom-color: var(--theme-primary);
    font-weight: 600;
}

.memory-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 确保子元素滚动正常 */
}

.memory-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow: hidden; /* 确保子元素滚动正常 */
}

.memory-section.hidden,
.hidden {
    display: none;
}

.character-selector {
    margin-bottom: 15px;
}

.character-selector select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.memory-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px; /* 为底部留出空间 */
}

.memory-empty {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 40px 20px;
}

.memory-item {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.memory-item:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 2px 8px var(--theme-primary-light);
}

.memory-item.single-item {
    padding: 12px 15px;
}

.memory-single-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.memory-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    word-break: break-word;
}

.memory-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.memory-date {
    font-size: 12px;
    color: #999;
}

/* 保留旧的展开样式用于兼容 */
.memory-header {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}

.memory-title {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    flex: 1;
}

.memory-expand-icon {
    font-size: 14px;
    color: #666;
    transition: transform 0.3s ease;
}

.memory-item.expanded .memory-expand-icon {
    transform: rotate(90deg);
}

.memory-content-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.memory-item.expanded .memory-content-wrapper {
    max-height: 500px;
}

.memory-content-text {
    padding: 15px;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.memory-content-text h1,
.memory-content-text h2,
.memory-content-text h3 {
    margin: 0 0 8px 0;
    font-weight: 600;
}

.memory-content-text h1 { font-size: 18px; }
.memory-content-text h2 { font-size: 16px; }
.memory-content-text h3 { font-size: 14px; }

.memory-content-text ul,
.memory-content-text ol {
    margin: 8px 0;
    padding-left: 20px;
}

.memory-content-text li {
    margin: 4px 0;
}

.memory-actions {
    padding: 10px 15px;
    background: #f9f9f9;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #e0e0e0;
}

.memory-edit-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
}

.memory-btn:hover {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

.memory-btn.delete {
    color: #e53e3e;
    border-color: #e53e3e;
}

.memory-btn.delete:hover {
    background: #e53e3e;
    color: white;
}

.form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* === 个人主页样式 === */
.user-profile-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-in-out;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.user-profile-page.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

.user-profile-header {
    background-color: var(--bg-primary);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-left: calc(15px + env(safe-area-inset-left));
    padding-right: calc(15px + env(safe-area-inset-right));
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 0.5px solid var(--border-color);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: calc(44px + env(safe-area-inset-top));
    transition: all 0.3s ease;
}

/* 暗黑模式下调整背景透明度 */
.dark-mode .user-profile-header {
    background-color: rgba(26, 26, 26, 0.95);
}

.system-theme .user-profile-header {
    background-color: var(--bg-primary);
}

.user-profile-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: calc(44px + env(safe-area-inset-top));
    padding-bottom: calc(50px + env(safe-area-inset-bottom)); /* 为底部导航栏留空间 */
    position: relative; /* 创建堆叠上下文 */
    z-index: 0; /* 设置基础层级 */
}

/* Banner */
.user-profile-banner {
    width: 100%;
    height: 30vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: visible; /* 允许avatar超出banner边界 */
    z-index: 2; /* 确保banner在朋友圈内容之上 */
}

/* Avatar容器 - 在banner右下角 */
.user-profile-avatar-container {
    position: absolute;
    right: 20px;
    bottom: 0;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 15px; /* 名字和头像之间的间距 */
    z-index: 20; /* 确保整个容器在最上层 */
}

/* Avatar样式 */
.user-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background-size: cover;
    background-position: center;
    transform: translateY(50%); /* 下三等分线与banner底部齐平 */
    z-index: 25; /* 确保头像在所有内容之上 */
    position: relative; /* 使z-index生效 */
}

/* 用户名 - 在avatar上三等分线左侧，右对齐 */
.user-profile-name {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    text-align: right;
    max-width: 200px;
    word-wrap: break-word;
    align-self: flex-end; /* 与avatar底部对齐 */
    margin-bottom: 13px; /* 向上偏移，对齐avatar的上三等分线（40px-27px=13px） */
}

/* 朋友圈内容区域 */
.user-profile-moments {
    background-color: var(--bg-secondary);
    min-height: 60vh;
    padding-top: 40px; /* 给avatar留出空间 */
    position: relative;
    z-index: 1; /* 确保在头像下方 */
    overflow: visible;
    transition: background-color 0.3s ease;
}

.user-profile-moments-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.user-profile-moments-list {
    padding: 0 15px;
    background-color: var(--bg-secondary);
    overflow: visible;
    transition: background-color 0.3s ease;
}

/* 朋友圈动态项样式 */
.user-profile-moment-item {
    background-color: var(--bg-primary);
    margin-bottom: 8px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--shadow-color);
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
}

.user-profile-moment-content {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.user-profile-moment-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.user-profile-moment-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
}

.user-profile-moment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.user-profile-moment-time {
    flex: 1;
}

.user-profile-moment-actions {
    display: flex;
    gap: 15px;
}

.user-profile-moment-action {
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.user-profile-moment-action:hover {
    color: var(--theme-primary);
}

/* === 朋友圈交互功能样式 === */
.moment-actions-container {
    position: relative;
    display: inline-block;
}

.moment-collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 20px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 10px;
    transition: background-color 0.3s ease;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.moment-collapse-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.moment-actions-menu {
    position: absolute;
    display: flex;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
        bottom: 120%;
    left: 50%;
    transform: translate(-50%, 10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}

.moment-actions-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.moment-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}

.moment-action-btn:first-child {
    border-radius: 15px 0 0 15px;
}

.moment-action-btn:last-child {
    border-radius: 0 15px 15px 0;
}

.moment-action-btn:only-child {
    border-radius: 15px;
}

.moment-action-btn:hover {
    background: #f5f5f5;
}

.moment-likes {
    margin-top: 8px;
    padding: 8px 0;
    font-size: 13px;
    color: #576b95;
    border-bottom: 1px solid #f0f0f0;
}

.moment-likes:empty {
    display: none;
}

.moment-comment {
    color: var(--text-primary);
    margin-left: 4px;
    transition: color 0.3s ease;
}

.profile-moment-comments {
    margin-top: 8px;
}

.profile-moment-comment-item {
    align-items: flex-start;
}

.profile-moment-comment {
    margin-bottom: 8px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 13px;
    position: relative;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    transition: background-color 0.3s ease;
}

.profile-moment-comment-author {
    color: var(--theme-primary);
    font-weight: bold;
    cursor: pointer;
    line-height: 16px;
    margin: 0;
    transition: color 0.3s ease;
}

.profile-moment-comment-text {
    font-size: 14px;
    color: var(--text-primary);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 18px;
    margin: 0;
    transition: color 0.3s ease;
}

.profile-moment-comment-reply-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.profile-moment-comment-reply-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}


.moment-reply-input-container {
    margin-top: 8px;
    padding: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: none !important;
    transition: all 0.3s ease;
}

.moment-reply-input-container.active {
    display: block !important;
}

/* 确保隐藏状态下textarea也被隐藏 */
.moment-reply-input-container:not(.active) .moment-reply-input {
    display: none !important;
}

.moment-reply-input-container:not(.active) .moment-reply-actions {
    display: none !important;
}

.moment-reply-input {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 13px;
    padding: 8px;
    min-height: 60px;
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.moment-reply-input::placeholder {
    color: var(--text-tertiary);
}
}

.moment-reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.moment-reply-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.moment-reply-submit {
    background: var(--theme-primary);
    color: white;
}

.moment-reply-submit:hover {
    background: #06ad56;
}

.moment-reply-cancel {
    background: #f0f0f0;
    color: #666;
}

.moment-reply-cancel:hover {
    background: #e0e0e0;
}

/* === Banner上传模态框样式 === */
.user-profile-banner:hover .banner-upload-hint {
    opacity: 1 !important;
}

.banner-upload-container {
    margin-bottom: 20px;
}

.banner-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.banner-upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.banner-upload-area.dragover {
    border-color: #667eea;
    background: #e8f0ff;
}

.banner-upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.banner-upload-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.banner-upload-hint {
    font-size: 12px;
    color: #999;
}

.banner-preview-container {
    margin-top: 20px;
}

.banner-preview-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 500;
}

.banner-preview-wrapper {
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
}

#bannerPreviewCanvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.banner-crop-controls {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.banner-crop-controls label {
    font-size: 14px;
    color: #333;
    min-width: 100px;
}

#bannerCropSlider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

#bannerCropSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#bannerCropSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.banner-upload-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-secondary {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.btn-primary {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: #667eea;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #5a67d8;
}

/* 外观管理页面样式 */
.appearance-management-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-secondary);
    z-index: 10;
    display: none;
    transition: background-color 0.3s ease;
}

.appearance-management-page.active {
    display: block;
}

.appearance-content {
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 60px);
}

.appearance-section {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all 0.3s ease;
}

.appearance-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    transition: color 0.3s ease;
}

.appearance-section-desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

/* 主题模式网格 */
.theme-mode-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.theme-mode-option {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.theme-mode-option:hover {
    border-color: var(--theme-primary);
    background-color: var(--theme-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-mode-option.active {
    border-color: var(--theme-primary);
    background-color: var(--theme-primary-light);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.theme-mode-icon {
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.theme-mode-content {
    flex: 1;
}

.theme-mode-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.theme-mode-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 主题色彩网格 */
.theme-color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.theme-color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.theme-color-option:hover {
    background-color: var(--bg-secondary);
    transform: translateY(-2px);
}

.theme-color-option.active {
    border-color: var(--theme-primary);
    background-color: var(--theme-primary-light);
}

.theme-color-preview {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-bottom: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
}

.theme-color-option.active .theme-color-preview::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.theme-color-name {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    transition: color 0.3s ease;
}

.theme-color-option.active .theme-color-name {
    color: var(--theme-primary);
    font-weight: 600;
}

/* 自定义颜色选择器 */
.custom-color-section {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    transition: border-color 0.3s ease;
}

.custom-color-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.custom-color-desc {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    font-size: 12px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.custom-color-preview-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .custom-color-preview-row {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
}

.custom-color-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.custom-color-preview-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-color-preview-circle:hover {
    transform: scale(1.05);
    border-color: var(--theme-primary);
}

.custom-color-picker-hidden {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 70px;
    height: 70px;
    border: none;
    background: none;
    opacity: 0;
    cursor: pointer;
}

.custom-color-picker-hidden::-webkit-color-swatch-wrapper {
    padding: 0;
}

.custom-color-picker-hidden::-webkit-color-swatch {
    border: none;
}

.custom-color-preview-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.custom-color-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

@media (max-width: 480px) {
    .custom-color-input-container {
        width: 100%;
    }
}

.custom-color-text {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.custom-color-text::placeholder {
    color: var(--text-tertiary);
}

.custom-color-text:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px var(--theme-primary-light);
}

.custom-color-text.invalid {
    border-color: #ff4d4f;
    background-color: #fff2f0;
}

.apply-custom-color-btn {
    padding: 12px 16px;
    background-color: var(--theme-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .apply-custom-color-btn {
        width: 100%;
        margin-top: 8px;
    }
}

.apply-custom-color-btn:hover {
    background-color: var(--theme-primary-hover);
    transform: translateY(-1px);
}

.apply-custom-color-btn:active {
    transform: translateY(0);
}

.apply-custom-color-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.color-input-tips {
    margin-top: 12px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--theme-primary);
}

.color-input-tips small {
    color: #666;
    font-size: 12px;
}

/* 渐变主题设置 */
.gradient-toggle-container {
    margin-bottom: 20px;
}

.gradient-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.gradient-toggle-input {
    display: none;
}

.gradient-toggle-slider {
    width: 50px;
    height: 26px;
    background-color: #ccc;
    border-radius: 13px;
    position: relative;
    transition: all 0.3s ease;
}

.gradient-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

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

.gradient-settings {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

.gradient-color-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .gradient-color-row {
        flex-direction: column;
        gap: 16px;
    }
}

.gradient-color-group {
    flex: 1;
}

.gradient-color-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

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

.gradient-color-preview {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.gradient-color-preview:hover {
    transform: scale(1.05);
    border-color: var(--theme-primary);
}

.gradient-color-picker-hidden {
    position: absolute;
    top: -2px;
    left: -2px;
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    opacity: 0;
    cursor: pointer;
}

.gradient-color-text {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.gradient-color-text:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px var(--theme-primary-light);
}

.gradient-preview-container {
    margin-bottom: 20px;
}

.gradient-preview-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.gradient-preview-demo {
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to right, #07c160, #1890ff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gradient-preview-text {
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.gradient-direction-container {
    margin-bottom: 20px;
}

.gradient-direction-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.gradient-direction-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gradient-direction-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: white;
}

.gradient-direction-option:hover {
    border-color: var(--theme-primary);
    background-color: #f8f9fa;
}

.gradient-direction-option input[type="radio"] {
    margin: 0;
}

.gradient-direction-option input[type="radio"]:checked + .gradient-direction-text {
    color: var(--theme-primary);
    font-weight: 600;
}

.gradient-direction-option:has(input[type="radio"]:checked) {
    border-color: var(--theme-primary);
    background-color: var(--theme-primary-light);
}

.gradient-direction-text {
    font-size: 14px;
    color: #666;
    transition: all 0.2s ease;
}

.apply-gradient-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-hover));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.apply-gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.apply-gradient-btn:active {
    transform: translateY(0);
}

/* 气泡设计器按钮 */
.bubble-designer-option {
    margin-top: 12px;
}

.bubble-designer-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bubble-designer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.bubble-designer-btn:active {
    transform: translateY(0);
}

.bubble-designer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.bubble-designer-btn:hover::before {
    left: 100%;
}

.bubble-designer-icon {
    font-size: 28px;
    margin-right: 16px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.bubble-designer-info {
    flex: 1;
    text-align: left;
}

.bubble-designer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
}

.bubble-designer-desc {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.3;
}

.bubble-designer-arrow {
    font-size: 20px;
    margin-left: 12px;
    flex-shrink: 0;
    opacity: 0.8;
}

/* 即将推出区域 */
.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    color: #999;
}

.coming-soon-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.coming-soon-text {
    font-size: 16px;
}

/* 键盘弹出时的布局优化 */
/* 当键盘弹出时，避免调整viewport height，使用平滑滚动和位置调整 */
html[data-keyboard-visible="true"] {
    /* 确保页面不会因为键盘弹出而产生白色区域 */
    overflow: hidden;
}

html[data-keyboard-visible="true"] body {
    /* 保持固定高度，不随键盘变化 */
    height: 100vh;
    height: var(--viewport-height, 100vh);
}

/* 键盘弹出时，聊天输入区域的调整 */
html[data-keyboard-visible="true"] .chat-input-area {
    /* 使用transform而不是改变position，避免重新计算布局 */
    transform: translateY(calc(-1 * var(--keyboard-height, 0px)));
    transition: transform 0.25s ease-out;
}

/* 键盘弹出时，确保聊天消息区域可以正常滚动 */
html[data-keyboard-visible="true"] .chat-messages {
    /* 调整最大高度，为键盘留出空间 */
    max-height: calc(var(--chat-content-height, 100vh) - var(--keyboard-height, 0px) - 60px);
    transition: max-height 0.25s ease-out;
}

/* 为输入框聚焦时提供更好的体验 */
/* 可编辑元素恢复文本选择功能 */
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
}

.chat-input:focus,
input:focus,
textarea:focus {
    outline: none;
    /* 确保聚焦的输入框有足够的滚动空间 */
    scroll-margin: 20px;
}

/* 防止页面因为滚动操作而跳出可视区域 */
html {
    scroll-behavior: smooth;
    /* 限制滚动范围，防止滚动超出页面边界 */
    overscroll-behavior: contain;
}

body {
    /* 防止橡皮筋滚动效果导致的布局问题 */
    overscroll-behavior-y: contain;
    /* 确保页面在键盘弹出时不会产生意外的滚动 */
    touch-action: pan-x pan-y;
}

/* 为iOS Safari提供额外的滚动保护 */
@supports (-webkit-touch-callout: none) {
    .main-container {
        /* 在iOS设备上限制滚动行为 */
        overscroll-behavior: none;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 防止键盘弹出时的布局跳动 */
    .chat-page {
        position: fixed;
        transform: translateZ(0); /* 开启硬件加速，减少重绘 */
    }
}

/* 七夕节空回复重试模态框样式 */
#qixiRetryModal .modal-content {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    color: #8b5cf6;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(255, 105, 180, 0.3);
    animation: qixiModalShow 0.4s ease-out;
}

#qixiRetryModal .modal-header {
    background: transparent;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding: 20px 24px 16px;
}

#qixiRetryModal .modal-title {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    color: #8b5cf6;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

#qixiRetryModal .modal-close {
    background: rgba(255, 255, 255, 0.3);
    color: #8b5cf6;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

#qixiRetryModal .modal-close:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.qixi-retry-content {
    text-align: center;
    padding: 20px 24px 24px;
}

.qixi-retry-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: qixiHeartbeat 1.5s ease-in-out infinite;
}

.qixi-retry-message {
    color: #8b5cf6;
    line-height: 1.6;
}

.qixi-retry-message p {
    margin-bottom: 12px;
    font-size: 16px;
}

.qixi-retry-message strong {
    color: #7c3aed;
    font-weight: 600;
}

.qixi-retry-buttons {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px;
    flex-direction: column;
}

.qixi-retry-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.qixi-retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.qixi-cancel-btn {
    background: rgba(255, 255, 255, 0.7);
    color: #8b5cf6;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qixi-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(139, 92, 246, 0.5);
}

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

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

/* 移动端优化 */
@media (max-width: 480px) {
    .qixi-retry-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .qixi-retry-icon {
        font-size: 40px;
    }
    
    .qixi-retry-message p {
        font-size: 15px;
    }
}

/* === API配置管理样式 === */
.config-management-section {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.config-selector-row {
    display: flex;
    align-items: end;
    gap: 12px;
}

.config-selector-group {
    flex: 1;
}

.config-actions {
    display: flex;
    gap: 6px;
}

.config-action-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.config-action-btn:hover {
    background: var(--theme-primary-light);
    border-color: var(--theme-primary);
}

.config-delete-btn:hover {
    background: rgba(255, 77, 79, 0.1);
    border-color: #ff4d4f;
    color: #ff4d4f;
}

.config-section {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.config-section-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.form-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* 配置下拉框样式优化 */
#configSelector {
    font-weight: 500;
}

#configSelector option[data-is-default="true"] {
    font-weight: 600;
    color: var(--theme-primary);
}

/* Key头部样式 */
.key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.key-header .form-label {
    margin: 0;
    flex: 1;
}

/* 紧凑型API Key行样式 */
.compact-key-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: #f8f9fa;
    margin-top: 5px;
    position: relative;
}

/* 主key行样式 - 根据状态动态设置 */
.main-key-row {
    background: #f8f9fa; /* 默认灰色背景 */
    border-color: #e1e5e9; /* 默认边框 */
}

/* 主key启用状态 */
.main-key-row.enabled {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-color: #28a745;
}

.additional-key-row {
    background: #f5f5f5;
}

.compact-key-input {
    flex: 1;
    min-width: 120px;
    font-size: 14px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.timeout-group {
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.timeout-input {
    width: 40px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    text-align: center;
}

.timeout-unit {
    font-size: 12px;
    color: #666;
    min-width: 8px;
}

.key-status-btn, 
.key-enable-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #6c757d;
}

.key-enable-btn:hover {
    opacity: 0.8;
}

.main-key-status {
    background: transparent !important; /* 强制透明背景，避免日本国旗效果 */
    cursor: default;
}

.key-stats-compact {
    position: absolute;
    bottom: 2px;
    right: 8px;
    font-size: 10px;
    color: #666;
    text-align: right;
    line-height: 1.2;
}

.key-masked-compact {
    font-family: monospace;
    font-size: 9px;
    color: #777;
    margin-bottom: 1px;
}

.stats-compact {
    font-size: 9px;
    color: #888;
}

.remove-provider-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 6px;
    padding: 0;
    line-height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    box-sizing: border-box;
    /* 确保点击区域精确 */
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.remove-provider-btn:hover {
    background: #c82333;
}

.remove-provider-btn:active {
    transform: scale(0.95);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .config-selector-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .config-actions {
        justify-content: center;
        margin-top: 8px;
    }
    
    .config-section {
        margin-bottom: 16px;
        padding: 12px;
    }
    
    .compact-key-row {
        flex-wrap: wrap;
        padding: 6px 8px;
        gap: 6px;
    }
    
    .compact-key-input {
        min-width: 100px;
        font-size: 14px;
    }
    
    .timeout-group {
        order: 3;
    }
    
    .key-status-btn,
    .key-enable-btn {
        order: 2;
    }
    
    .key-stats-compact {
        position: static;
        order: 4;
        width: 100%;
        text-align: left;
        margin-top: 4px;
        font-size: 11px;
    }
    
    .timeout-input {
        width: 35px;
    }
}

/* ==== 持久化存储管理样式 ==== */

/* 持久化状态指示器样式 - CSS驱动的状态管理 */
#persistentStatusIndicator[data-status="persistent"] {
    color: #28a745;
}

#persistentStatusIndicator[data-status="not-persistent"] {
    color: #ffc107;
}

#persistentStatusIndicator[data-status="unknown"] {
    color: #6c757d;
}

#persistentStatusIndicator[data-status="requesting"] {
    color: #6c757d;
}

#persistentStatusIndicator[data-status="error"] {
    color: #dc3545;
}

/* 信息展示类模态框样式 - 可复用的 info-modal 类 */
.info-modal.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    transition: opacity 0.2s ease-in-out;
}

.info-modal.modal-overlay.hidden {
    display: none;
}

.info-modal .modal-content {
    background: var(--modal-bg);
    border-radius: 8px;
    padding: 0;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
    color: var(--text-primary);
    animation: infoModalSlideIn 0.2s ease-out;
}

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

.info-modal .modal-header {
    font-size: 16px;
    font-weight: bold;
    padding: 20px 20px 15px 20px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.info-modal .modal-body {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-height: 50vh;
    overflow-y: auto;
}

.info-modal .modal-body p {
    margin-bottom: 10px;
}

.info-modal .modal-body ul {
    margin: 8px 0;
    padding-left: 20px;
}

.info-modal .modal-body li {
    margin-bottom: 4px;
}

.info-modal .modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.info-modal .modal-close-btn {
    flex: 1;
    padding: 10px;
    background: var(--theme-secondary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.info-modal .modal-close-btn:hover {
    background: var(--theme-secondary-hover);
}

.info-modal .modal-close-btn:active {
    background: var(--theme-secondary-active);
}

/* 信息按钮样式 - 使用主题色 */
.info-button {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--theme-primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.info-button:hover {
    background: var(--theme-primary-hover);
}

.info-button:active {
    background: var(--theme-primary);
    transform: scale(0.95);
}

/* 申请持久化按钮样式 */
.request-persistent-btn {
    padding: 5px 10px;
    font-size: 12px;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.request-persistent-btn:hover {
    background: #138496;
}

.request-persistent-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.request-persistent-btn:active {
    background: #117a8b;
}

/* 信息展示类模态框响应式设计 */
@media (max-width: 480px) {
    .info-modal .modal-content {
        max-width: 90vw;
        margin: 0 auto;
    }
    
    .info-modal .modal-header {
        font-size: 15px;
        padding: 15px;
    }
    
    .info-modal .modal-body {
        padding: 15px;
        font-size: 13px;
    }
    
    .info-modal .modal-footer {
        padding: 15px;
    }
}

/* === 用户体验增强样式 === */

/* API配置流程提示样式 */
.form-step-hint {
    display: none;
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #e8f5e8;
    border-radius: 4px;
    font-size: 12px;
    color: #2d5a2d;
    border-left: 3px solid #28a745;
    animation: slideInDown 0.3s ease-out;
}

.form-step-reminder {
    padding: 10px 15px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
    margin-bottom: 15px;
    animation: fadeIn 0.5s ease-out;
}

/* 按钮步骤标识样式 */
.form-submit small {
    opacity: 0.8;
    font-weight: normal;
    font-size: 11px;
}

/* 动画效果 */
@keyframes slideInDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* 提示文字强调样式 */
.form-step-reminder strong {
    color: #d4470b;
    font-weight: 600;
}

.form-step-hint::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: #28a745;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* 暗色主题适配 */
.dark-mode .form-step-hint {
    background-color: #1a2f1a;
    color: #8bc48b;
    border-left-color: #28a745;
}

.dark-mode .form-step-reminder {
    background-color: #2a2516;
    color: #d4c669;
    border-left-color: #ffc107;
}

.dark-mode .form-step-reminder strong {
    color: #f8a15b;
}

/* 最终步骤提示样式 */
.final-step-hint {
    margin: 15px 0 10px 0;
    padding: 8px 12px;
    background-color: #f0f8ff;
    border-left: 3px solid #0066cc;
    border-radius: 4px;
    font-size: 13px;
    color: #0066cc;
    animation: fadeIn 0.5s ease-out;
}

.dark-mode .final-step-hint {
    background-color: #1a2a3a;
    color: #66b3ff;
    border-left-color: #0099ff;
}
