/* --- 全局样式 & 重置 --- */
:root { 
    --case-color: #1a1a1a; 
    --wallpaper: rgb(242, 244, 245); 
    --global-text-color: #000000; /* 全局字体颜色变量 */
    --desktop-text-color: #000000; /* 桌面与状态栏字体颜色变量 */
}
* { box-sizing: border-box; user-select: none; -webkit-tap-highlight-color: transparent; }
body { margin: 0; padding: 0; background-color: #f0f0f0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; transition: background 0.3s; color: var(--global-text-color); }
.phone-case { width: 375px; height: 812px; background: #000; border-radius: 40px; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.3); overflow: hidden; border: 12px solid var(--case-color); transition: all 0.3s ease; }
body.fullscreen-mode { background-color: #000; }
body.fullscreen-mode .phone-case { width: 100%; height: 100%; border: none; border-radius: 0; box-shadow: none; }
.screen { width: 100%; height: 100%; background: #fff; position: relative; overflow: hidden; display: none; flex-direction: column; color: var(--global-text-color); }
.screen.active { display: flex; }
.status-bar { height: 44px; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; font-size: 14px; font-weight: 600; color: var(--desktop-text-color); z-index: 100; position: absolute; top: 0; left: 0; pointer-events: none; }
.notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 150px; height: 30px; background: #1a1a1a; border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; z-index: 101; transition: opacity 0.3s; }
body.fullscreen-mode .notch { opacity: 0.8; } 
.home-indicator { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 130px; height: 5px; background: #000; border-radius: 10px; z-index: 100; cursor: pointer; opacity: 0.3; }

/* --- 锁屏界面 --- */
#lock-screen { background: var(--wallpaper); background-size: cover; background-position: center; justify-content: center; align-items: center; color: var(--global-text-color); }
.clock { font-size: 80px; font-weight: 200; margin-bottom: 20px; }
.date { font-size: 20px; margin-bottom: 200px; }
.slider-container { width: 80%; position: relative; height: 50px; background: rgba(255,255,255,0.3); border-radius: 25px; display: flex; align-items: center; padding: 5px; backdrop-filter: blur(5px); }
.slider-text { position: absolute; width: 100%; text-align: center; color: #333; font-size: 14px; pointer-events: none; animation: shimmer 2s infinite; }
input[type="range"] { -webkit-appearance: none; width: 100%; background: transparent; z-index: 2; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; height: 40px; width: 40px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.2); cursor: pointer; }
@keyframes shimmer { 0% {opacity: 0.3;} 50% {opacity: 1;} 100% {opacity: 0.3;} }

/* --- 主屏幕 --- */
#home-screen { background: var(--wallpaper); background-size: cover; background-position: center; padding-top: 50px; align-items: center; flex-direction: column; color: var(--desktop-text-color); overflow: hidden; }
.home-header { width: 100%; padding: 0 25px; margin-bottom: 20px; color: var(--desktop-text-color); text-shadow: 0 2px 10px rgba(0,0,0,0.3); text-align: left; flex-shrink: 0; }
.home-time-big { font-size: 56px; font-weight: 300; line-height: 1; letter-spacing: -1px; margin: 0; margin-left: -3px; }
.home-date-big { font-size: 18px; font-weight: 500; opacity: 0.9; margin-top: 5px; margin-left: 2px; }

/* 桌面翻页容器 */
.home-pages-container { width: 100%; flex-grow: 0; overflow: hidden; position: relative; height: 520px; }
.home-pages-wrapper { display: flex; width: 200%; height: 100%; transition: transform 0.3s ease-out; }
.home-page { width: 50%; height: 100%; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; overflow-y: auto; padding-bottom: 20px; }

/* 页面指示器 */
.page-indicator { display: flex; justify-content: center; gap: 8px; padding: 15px 0 8px 0; flex-shrink: 0; }
.page-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); transition: all 0.3s; cursor: pointer; }
.page-dot.active { background: rgba(255,255,255,0.9); transform: scale(1.2); }

/* 底部固定应用栏 */
.bottom-app-bar { 
    width: 94%; 
    margin: 0 auto 0; 
    background: rgba(255,255,255,0.3); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px); 
    border-radius: 25px; 
    padding: 10px 16px 8px; 
    display: flex; 
    justify-content: space-around; 
    align-items: flex-start; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.4);
    flex-shrink: 0;
}

.bottom-app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.bottom-app-icon { 
    width: 50px; 
    height: 50px; 
    border-radius: 12px; 
    background: #ffffff; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: transform 0.2s; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.bottom-app-icon-svg {
    width: 24px;
    height: 24px;
    color: #4a4a4a;
}

.bottom-app-icon-label {
    font-size: 10px;
    color: var(--desktop-text-color);
    font-weight: 600;
    text-align: center;
}

.home-widget-container { width: 100%; padding: 0 25px; margin-bottom: 30px; }
.home-widget { width: 100%; aspect-ratio: 16/9; background: rgba(255,255,255,0.25); border-radius: 24px; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(255,255,255,0.3); box-shadow: 0 10px 30px rgba(0,0,0,0.1); display: flex; justify-content: center; align-items: center; overflow: hidden; position: relative; cursor: pointer; color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 500; }
.home-widget > #home-widget-img { width: 100%; height: 100%; object-fit: cover; display: none; position: absolute; top: 0; left: 0; z-index: 0; opacity: 1; transition: opacity 0.55s ease; }
.home-widget.has-image > #home-widget-img { display: block; }
.home-widget > #home-widget-img.fading { opacity: 0; }
.home-widget-bg-text { position: relative; z-index: 1; color: #4a4a4a; transform: translateX(24px); }
.home-widget.has-image .home-widget-bg-text { display: none; }

.home-widget-avatar-area {
    position: absolute;
    left: 9%;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.home-widget-avatar {
    width: 50%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 8px 18px rgba(0,0,0,0.22), inset 0 1px 2px rgba(255,255,255,0.35);
}

.home-widget-avatar:active {
    transform: scale(0.98);
}

.home-widget-avatar-placeholder {
    color: #4a4a4a;
    font-size: 11px;
    font-weight: 600;
    text-shadow: none;
    z-index: 1;
}

.home-widget-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    display: none;
}

.home-widget-avatar.has-image img {
    display: block;
}

.home-widget-avatar.has-image .home-widget-avatar-placeholder {
    display: none;
}

.home-widget-user-tag {
    min-width: 74px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    color: rgba(255,255,255,0.95);
    text-align: center;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    outline: none;
    cursor: text;
    width: 50%;
    align-self: flex-start;
}

.home-widget-user-tag:focus {
    border-color: rgba(255,255,255,0.8);
    background: rgba(0,0,0,0.28);
}

.widget-upload-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.42);
    z-index: 720;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 18px;
}

.widget-upload-modal.active {
    display: flex;
}

.widget-upload-modal-content {
    width: 100%;
    max-height: 86%;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.22);
}

.widget-upload-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ececec;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.widget-upload-title {
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.widget-upload-cancel,
.widget-upload-save {
    font-size: 13px;
    cursor: pointer;
}

.widget-upload-cancel { color: #666; }
.widget-upload-save { color: #007aff; font-weight: 600; }

.widget-upload-tip {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.widget-upload-slot {
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
}

.widget-upload-slot-title {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.widget-upload-slot-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.widget-upload-btn {
    border: none;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 12px;
    cursor: pointer;
    background: #007aff;
    color: #fff;
}

.widget-upload-btn.clear {
    background: #8e8e93;
}

.widget-upload-url {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    margin-bottom: 8px;
}

.widget-upload-preview {
    width: 100%;
    height: 70px;
    border-radius: 10px;
    border: 1px dashed #d9d9d9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    overflow: hidden;
    background: #fafafa;
}

.widget-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.app-grid { width: 300px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; column-gap: 20px; row-gap: 45px; }
.app-icon { width: 60px; height: 60px; border-radius: 14px; background: #fff; display: flex; justify-content: center; align-items: center; color: #4a4a4a; font-size: 0; cursor: pointer; position: relative; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: transform 0.1s; background-size: cover !important; background-position: center !important; flex-shrink: 0; overflow: visible; }
.app-icon:active { transform: scale(0.95); }
.app-label { position: absolute; bottom: -25px; width: 140%; left: -20%; text-align: center; color: var(--desktop-text-color); font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 2; }
.app-icon svg { width: 26px; height: 26px; color: #4a4a4a; }
.bottom-app-icon svg { width: 24px; height: 24px; color: #4a4a4a; }
.app-icon.icon-image { padding: 0; overflow: visible; }
.app-icon-custom-image { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

/* 第二页布局 */
.page2-layout { 
    width: 100%; 
    height: 100%;
    padding: 20px; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: auto auto 1fr; 
    gap: 25px;
    align-content: start;
}

/* 左上角方块小组件 */
.page2-widget-square { width: 100%; aspect-ratio: 1; background: rgba(255,255,255,0.25); border-radius: 24px; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(255,255,255,0.3); box-shadow: 0 10px 30px rgba(0,0,0,0.1); display: flex; justify-content: center; align-items: center; overflow: hidden; cursor: pointer; color: #4a4a4a; font-size: 12px; font-weight: 500; }
.page2-widget-square img { width: 100%; height: 100%; object-fit: cover; display: none; }
.page2-widget-square.has-image img { display: block; }
.page2-widget-square.has-image span { display: none; }

/* 右下角新设计区域 */
.page2-new-design {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.design-circles {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
}

.design-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.design-circle:active {
    transform: scale(0.95);
}

.design-circle span {
    font-size: 10px;
    color: #4a4a4a;
    font-weight: 500;
    text-align: center;
    z-index: 1;
}

.design-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    position: absolute;
    top: 0;
    left: 0;
}

.design-circle.has-image img {
    display: block;
}

.design-circle.has-image span {
    display: none;
}

.curved-line {
    position: absolute;
    width: 50px;
    height: 50px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.design-rectangle {
    width: 100%;
    height: 90px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s;
}

.design-rectangle:active {
    transform: scale(0.98);
}

.design-rectangle span {
    font-size: 12px;
    color: #4a4a4a;
    font-weight: 500;
    z-index: 1;
}

.design-rectangle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    position: absolute;
    top: 0;
    left: 0;
}

.design-rectangle.has-image img {
    display: block;
}

.design-rectangle.has-image span {
    display: none;
}

/* 第二页应用网格 */
.page2-app-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px;
    row-gap: 50px;
}
.page2-app-grid .app-icon { 
    width: 55px; 
    height: 55px; 
    margin: 0 auto;
    position: relative;
}

/* --- 通用 App 布局 (修改：应用全局字体颜色) --- */
.app-header { height: 88px; padding-top: 44px; display: flex; align-items: center; justify-content: space-between; padding-left: 15px; padding-right: 15px; border-bottom: 1px solid #eee; background: #fff; flex-shrink: 0; position: relative; z-index: 10; color: var(--global-text-color); }
.app-title { font-size: 20px; font-weight: 700; position: absolute; left: 0; width: 100%; text-align: center; pointer-events: none; z-index: 1; padding: 0 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--global-text-color); }
.back-btn { font-size: 16px; color: var(--global-text-color); cursor: pointer; width: 60px; display: flex; align-items: center; z-index: 50; position: relative; pointer-events: auto; }
.action-btn { font-size: 16px; color: var(--global-text-color); cursor: pointer; width: auto; display: flex; justify-content: flex-end; align-items: center; z-index: 50; position: relative; height: 100%; pointer-events: auto; }

/* --- VK 选择页顶部 --- */
#app-vk .vk-list-header { justify-content: flex-start; gap: 10px; }
#app-vk .vk-arrow-back { width: auto; color: #007aff; font-size: 22px; font-weight: 700; }
#app-vk .vk-list-title { position: static; width: auto; padding: 0; text-align: left; pointer-events: auto; color: var(--global-text-color); }

/* --- 聊天页顶部 --- */
#chat-interface .chat-header { justify-content: space-between; }
#chat-interface .chat-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; position: relative; z-index: 20; }
#chat-interface .chat-arrow-back { width: auto; color: #007aff; font-size: 22px; font-weight: 700; }
#chat-interface .chat-header-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid #dbe8ff; background: #eef4ff; }
#chat-interface .chat-header-title-wrap { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; min-width: 0; margin-top: -2px; }
#chat-interface .chat-header-title { font-size: 16px; font-weight: 700; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#chat-interface .chat-last-online { font-size: 11px; color: #8e8e93; line-height: 1; white-space: nowrap; }
#chat-interface .chat-thought-toggle { cursor: pointer; font-size: 16px; color: #007aff; flex-shrink: 0; line-height: 1; }
#chat-interface .chat-header-actions { display: flex; align-items: center; gap: 8px; }
#chat-interface .chat-header-icon-btn { border: none; background: transparent; padding: 0; width: 24px; height: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#chat-interface .call-icon-shape { width: 18px; height: 18px; fill: #007aff; }
#chat-interface .info-icon-shape { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #007aff; color: #007aff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; line-height: 1; background: #eef5ff; }

.app-content { flex-grow: 1; overflow-y: auto; padding: 15px; background: #fff; color: #000; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; color: #666; margin-bottom: 5px; text-transform: uppercase; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; -webkit-appearance: none; background: #fff; color: #000; }
.form-group textarea { height: 100px; resize: none; }
.save-btn { width: 100%; padding: 15px; background: #000; color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; }
.toggle-switch { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding: 10px 0; border-bottom: 1px solid #eee; }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 24px; width: 24px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #000; }
input:checked + .slider:before { transform: translateX(22px); }
.input-group-row { display: flex; gap: 10px; }
.fetch-btn { background: #007aff; color: #fff; border: none; border-radius: 8px; padding: 0 15px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.fetch-btn:active { opacity: 0.8; }

/* --- 日历 App 样式 (修改：应用全局字体颜色) --- */
#app-calendar .app-content { padding: 0; display: flex; flex-direction: column; }
.calendar-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; background: #fff; border-bottom: 1px solid #f0f0f0; flex-shrink: 0; }
.calendar-month-title { font-size: 24px; font-weight: bold; color: var(--global-text-color); }
.calendar-nav-btn { font-size: 20px; color: var(--global-text-color); cursor: pointer; padding: 10px; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; padding: 10px 0; font-size: 12px; color: #999; background: #fff; flex-shrink: 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); background: #fff; align-content: start; flex-shrink: 0; }
.calendar-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 10px; cursor: pointer; position: relative; border-top: 1px solid #fafafa; }
.calendar-day.other-month { color: #ccc; }
.day-number { font-size: 16px; font-weight: 500; margin-bottom: 4px; width: 30px; height: 30px; display: flex; justify-content: center; align-items: center; border-radius: 50%; z-index: 2; }
.calendar-day.today .day-number { background: #ff3b30; color: #fff; }
.calendar-day.has-event .day-number { background: #ff3b30; color: #fff; } 
.calendar-day.period-day { background-color: #ffeff2; }
.calendar-day.period-day::after { content: '月经期'; font-size: 8px; color: #ff2d55; position: absolute; bottom: 2px; }
.calendar-events-list { flex-grow: 1; background: #f9f9f9; border-top: 1px solid #eee; overflow-y: auto; padding: 15px; }
.calendar-event-row { font-size: 14px; padding: 10px 0; border-bottom: 1px solid #e0e0e0; color: #333; display: flex; align-items: center; }
.calendar-event-row:last-child { border-bottom: none; }
.cal-event-dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; flex-shrink: 0; }
#calendar-event-modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 600; display: none; justify-content: center; align-items: flex-end; }
#calendar-event-modal.active { display: flex; }
.calendar-modal-content { width: 100%; background: #fff; border-top-left-radius: 20px; border-top-right-radius: 20px; padding: 20px; animation: slideUp 0.3s; max-height: 80%; overflow-y: auto; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cal-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.cal-modal-title { font-size: 18px; font-weight: bold; color: #000; }
.event-type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.event-type-btn { padding: 12px; border: 1px solid #eee; border-radius: 10px; text-align: center; font-size: 14px; cursor: pointer; color: #000; }
.event-type-btn.active { background: #000; color: #fff; border-color: #000; }
.event-list-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: #f9f9f9; border-radius: 8px; margin-bottom: 10px; }

/* --- 其他 App 样式 --- */
.contact-list-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.avatar-preview { width: 50px; height: 50px; border-radius: 50%; background: #eee; object-fit: cover; margin-right: 15px; flex-shrink: 0; }
.contact-info { flex-grow: 1; overflow: hidden; }
.contact-name { font-weight: 600; font-size: 16px; }
.contact-persona { font-size: 12px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-actions { display: flex; gap: 10px; }
.contact-btn { padding: 8px; cursor: pointer; font-size: 16px; }
.add-contact-form { display: none; background: #f9f9f9; padding: 15px; border-radius: 10px; margin-bottom: 15px; }
.add-contact-form.active { display: block; }
.contacts-bottom-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eee;
    background: #fff;
    flex-shrink: 0;
}
.contacts-tab-btn {
    border: 1px solid #d9d9d9;
    background: #f7f7f7;
    color: #333;
    font-size: 14px;
    border-radius: 10px;
    padding: 10px 8px;
    cursor: pointer;
}
.contacts-tab-btn.active {
    background: rgb(90,156,194);
    border-color: rgb(90,156,194);
    color: #fff;
}
#user-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 2px 0 18px 0;
}
.user-account-list-item {
    padding: 14px 12px;
    background: #fff;
    border: none;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.14);
    border-radius: 14px;
    font-size: 15px;
    color: #222;
    cursor: pointer;
}
.user-account-list-item:active {
    background: #f3f3f3;
}
.user-account-add-item {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px auto 4px auto;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}
.user-account-add-plus {
    font-size: 34px;
    font-weight: 500;
    line-height: 1;
    transform: translateY(-2px);
    display: inline-block;
}
.user-account-add-item:active {
    background: rgba(0, 0, 0, 0.6);
}
.contacts-account-editor-modal {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    z-index: 650;
}
.contacts-account-editor-modal.active {
    display: flex;
}
.contacts-account-editor-box {
    width: 86%;
    max-height: 84%;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.chat-list-item { display: flex; align-items: center; padding: 15px; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.chat-list-item:hover { background: #fafafa; }
#chat-interface { display: none; flex-direction: column; height: 100%; background: #fff; position: absolute; top: 0; left: 0; width: 100%; z-index: 200; background-size: cover; background-position: center; }
.chat-messages { flex-grow: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; background: rgba(245,245,245,0.8); padding-bottom: 80px; }
.message-row { display: flex; align-items: flex-end; width: 100%; position: relative; transition: all 0.2s; }
.message-row.user { justify-content: flex-end; }
.message-row.ai { justify-content: flex-start; }
.message-row.voice-row { align-items: center; }
.chat-avatar-small { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.message-row.ai .chat-avatar-small { margin-right: 8px; }
.message-row.user .chat-avatar-small { margin-left: 8px; }
.bubble-container { max-width: 70%; display: flex; flex-direction: column; }
.quote-block-in-msg { background: rgba(0,0,0,0.05); border-radius: 8px; padding: 8px; margin-bottom: 5px; font-size: 12px; color: #666; border-left: 3px solid #ccc; white-space: pre-wrap; word-wrap: break-word; }
.user .quote-block-in-msg { background: rgba(255,255,255,0.2); color: #eee; border-left-color: #fff; }
.message-bubble { padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.4; position: relative; word-wrap: break-word; cursor: pointer; }
.message-bubble.user { background: rgb(204,229,255); color: #000; border-bottom-right-radius: 4px; }
.message-bubble.ai { background: rgb(236,238,242); color: #000; border: 1px solid #ddd; border-bottom-left-radius: 4px; }
.voice-message-stack {
    width: auto;
    min-width: 84px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.voice-bubble {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 10px !important;
}
.voice-bubble-icon-wrap {
    width: 38px;
    height: 28px;
    border-radius: 12px;
    background: rgba(255,255,255,0.28);
    display: flex;
    justify-content: center;
    align-items: center;
}
.voice-bubble-icon-wrap svg {
    width: 18px;
    height: 18px;
    color: currentColor;
}
.voice-bubble-icon-wrap svg * {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.voice-transcript-strip {
    width: 100%;
    display: block;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
    border: none;
    cursor: pointer;
}
.voice-transcript-strip.user { background: rgb(204,229,255); color: #000; }
.voice-transcript-strip.ai { background: rgb(236,238,242); color: #000; }
.message-row.voice-row.user .bubble-container { max-width: 72%; align-items: flex-end; }
.message-row.voice-row.ai .bubble-container { max-width: 72%; align-items: flex-start; }
.transfer-bubble { background: #ff9500 !important; color: #fff !important; border: none !important; width: 220px; padding: 0 !important; overflow: hidden; display: flex; flex-direction: column; }
.transfer-bubble.rejected { background: #ff3b30 !important; }
.transfer-bubble.accepted { background: #34c759 !important; }
.redpacket-bubble { background: linear-gradient(180deg, #d9312b 0%, #bc1f1a 100%) !important; color: #ffe9a9 !important; border: none !important; width: 220px; padding: 0 !important; overflow: hidden; display: flex; flex-direction: column; }
.redpacket-header { padding: 14px 15px; display: flex; align-items: center; gap: 10px; }
.redpacket-icon { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255, 234, 170, 0.9); display: flex; justify-content: center; align-items: center; font-size: 18px; font-weight: 700; }
.redpacket-info { display: flex; flex-direction: column; }
.redpacket-amount { font-size: 18px; font-weight: 700; color: #ffe9a9; }
.redpacket-note { font-size: 12px; opacity: 0.92; color: #ffd8a6; }
.redpacket-footer { background: rgba(255, 233, 169, 0.14); padding: 8px 15px; font-size: 11px; color: #ffebbf; }
.transfer-header { padding: 15px; display: flex; align-items: center; gap: 10px; }
.transfer-icon { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; display: flex; justify-content: center; align-items: center; font-size: 20px; font-weight: bold; }
.transfer-info { display: flex; flex-direction: column; }
.transfer-amount { font-size: 18px; font-weight: bold; }
.transfer-status { font-size: 12px; opacity: 0.8; }
.transfer-footer { background: rgba(255,255,255,0.2); padding: 8px 15px; font-size: 11px; }
.system-message-bar { align-self: center; background: rgba(0, 0, 0, 0.3); color: #fff; padding: 5px 15px; border-radius: 15px; font-size: 12px; margin: 10px 0; max-width: 80%; text-align: center; backdrop-filter: blur(2px); }
.listen-together-notice {
    align-self: center;
    background-color: #e0e0e0;
    color: #666;
    padding: 4px 15px;
    border-radius: 15px;
    font-size: 12px;
    margin: 10px auto;
    text-align: center;
    max-width: 80%;
    width: fit-content;
}
.selection-checkbox { width: 20px; height: 20px; border: 2px solid #ccc; border-radius: 50%; margin-right: 10px; display: none; flex-shrink: 0; }
.selection-checkbox.checked { background: #007aff; border-color: #007aff; }
.selection-mode .selection-checkbox { display: block; }
.selection-mode .message-row { pointer-events: none; } 
.selection-mode .message-row { cursor: pointer; pointer-events: auto; }
.chat-tools-bar { display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 10px; padding: 14px 10px 16px; background: #fff; border-top: 1px solid #eceff4; min-height: 180px; align-items: start; }
.chat-tools-bar.active { display: grid; }
.tool-btn { background: transparent; border: none; padding: 4px 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; color: rgb(72,141,190); }
.tool-btn:active { opacity: 0.8; }
.tool-icon { width: 42px; height: 42px; border-radius: 50%; background: #fff; color: rgb(72,141,190); border: 1px solid rgb(72,141,190); display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 700; line-height: 1; }
.tool-icon svg { width: 22px; height: 22px; color: inherit; }
.tool-icon svg * { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tool-label { font-size: 12px; line-height: 1.2; color: rgb(72,141,190); text-align: center; }
.tool-placeholder-btn { opacity: 0.92; }

/* --- 表情包功能样式 --- */
#sticker-panel {
    display: none;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
    min-height: 200px;
}
#sticker-panel.active {
    display: block;
}
.sticker-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}
.sticker-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.sticker-add-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #007aff;
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}
.sticker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.sticker-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #eee;
    position: relative;
    background: #f9f9f9;
}
.sticker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sticker-item:active {
    transform: scale(0.95);
}
.sticker-item .sticker-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.9);
    color: #fff;
    font-size: 12px;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.sticker-item:hover .sticker-delete {
    display: flex;
}
.sticker-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 20px;
}

/* 表情包管理弹窗 */
#sticker-manager-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-height: 80%;
    background: #fff;
    border-radius: 20px;
    z-index: 700;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}
#sticker-manager-modal.active {
    display: flex;
}
.sticker-manager-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    background: #f9f9f9;
}
.sticker-manager-content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}
.sticker-upload-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.sticker-upload-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    background: #fff;
}
.sticker-upload-tab.active {
    background: #007aff;
    color: #fff;
    border-color: #007aff;
}
.sticker-upload-section {
    display: none;
}
.sticker-upload-section.active {
    display: block;
}
.sticker-preview-container {
    width: 100px;
    height: 100px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #f9f9f9;
}
.sticker-preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.sticker-preview-placeholder {
    color: #999;
    font-size: 12px;
}

/* 表情包消息气泡 */
.sticker-bubble {
    padding: 5px !important;
    background: transparent !important;
    border: none !important;
}
.sticker-bubble img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
}
#quote-preview-area { display: none; background: #f0f0f0; padding: 8px 15px; border-top: 1px solid #ddd; align-items: center; justify-content: space-between; font-size: 12px; color: #555; }
.quote-preview-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 85%; border-left: 3px solid #007aff; padding-left: 8px; }
.quote-close-btn { font-size: 16px; color: #999; cursor: pointer; padding: 5px; }
.chat-input-area { padding: 10px 8px 10px 10px; background: #fff; border-top: 1px solid #eee; display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px 36px; column-gap: 6px; align-items: center; }
.chat-input-wrapper { position: relative; width: calc(100% - 10px); min-width: 0; }
.chat-input { width: 100%; min-width: 0; padding: 10px 36px 10px 12px; border-radius: 20px; border: 1px solid #ddd; outline: none; font-size: 14px; color: #000; background: rgb(242,244,245); }
.chat-input::placeholder { color: rgb(182,186,191); }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: none; display: flex; justify-content: center; align-items: center; cursor: pointer; font-size: 18px; }
.tools-toggle-btn { background: #fff; color: rgb(72,141,190); border: 1px solid rgb(72,141,190); font-size: 22px; font-weight: 300; line-height: 1; }
.tools-toggle-btn.active { color: rgb(72,141,190); }
.trigger-ai-btn { background: #f0f0f0; color: rgb(72,141,190); }
.trigger-ai-btn svg { width: 18px; height: 18px; color: inherit; }
.trigger-ai-btn svg * { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.send-btn { background: rgb(72,141,190); color: #fff; }
.input-emoji-btn { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 28px; height: 28px; border: none; background: transparent; color: rgb(182,186,191); font-size: 21px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.input-emoji-btn:active { opacity: 0.8; }
.typing-indicator { font-size: 12px; color: #888; text-align: center; padding: 5px; display: none; background: #f5f5f5; }
.ctx-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 499; display: none; }
.ctx-overlay.active { display: block; }
#msg-context-menu { position: absolute; bottom: 0; left: 0; width: 100%; background: #fff; border-top-left-radius: 20px; border-top-right-radius: 20px; box-shadow: 0 -5px 20px rgba(0,0,0,0.2); z-index: 500; display: none; flex-direction: column; padding: 20px; transform: translateY(100%); transition: transform 0.3s; }
#msg-context-menu.active { transform: translateY(0); display: flex; }
.ctx-menu-item { padding: 15px; text-align: center; border-bottom: 1px solid #eee; font-size: 16px; color: #007aff; cursor: pointer; }
.ctx-menu-item:last-child { border-bottom: none; color: #ff3b30; }
#delete-mode-bar { position: absolute; bottom: 0; left: 0; width: 100%; height: 60px; background: #fff; border-top: 1px solid #eee; display: none; justify-content: space-between; align-items: center; padding: 0 20px; z-index: 300; }
#delete-mode-bar.active { display: flex; }
.delete-confirm-btn { color: #ff3b30; font-weight: 600; cursor: pointer; }
.delete-cancel-btn { color: #007aff; cursor: pointer; }
#edit-msg-modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #fff; z-index: 600; display: none; flex-direction: column; }
#edit-msg-modal.active { display: flex; }
.wb-tabs { display: flex; border-bottom: 1px solid #eee; background: #fff; }
.wb-tab { flex: 1; text-align: center; padding: 12px; font-size: 14px; font-weight: 600; color: #999; cursor: pointer; }
.wb-tab.active { color: #000; border-bottom: 2px solid #000; }
.wb-category { margin-bottom: 15px; }
.wb-category-header { font-size: 13px; color: #666; background: #f5f5f5; padding: 8px 15px; font-weight: bold; display: flex; justify-content: space-between; align-items: center; }
.wb-entry-item { padding: 12px 15px; border-bottom: 1px solid #f0f0f0; background: #fff; font-size: 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.wb-entry-item:active { background: #fafafa; }
.wb-create-menu { position: absolute; top: 44px; right: 10px; background: #fff; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); z-index: 200; display: none; flex-direction: column; width: 150px; overflow: hidden; }
.wb-create-menu.active { display: flex; }
.wb-menu-item { padding: 12px; font-size: 14px; border-bottom: 1px solid #eee; cursor: pointer; }
.wb-menu-item:last-child { border-bottom: none; }
.wb-menu-item:hover { background: #f5f5f5; }
#wb-editor-modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #fff; z-index: 600; display: none; flex-direction: column; }
#wb-editor-modal.active { display: flex; }
#chat-settings-modal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 85%; height: 80%; background: #fff; border-radius: 20px; z-index: 600; display: none; flex-direction: column; box-shadow: 0 10px 40px rgba(0,0,0,0.3); overflow: hidden; }
#chat-settings-modal.active { display: flex; }
.settings-modal-header { padding: 15px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; font-weight: bold; background: #f9f9f9; }
.settings-modal-content { padding: 20px; overflow-y: auto; flex-grow: 1; display: flex; flex-direction: column; }
.settings-section-title { font-size: 12px; color: #888; text-transform: uppercase; margin-bottom: 10px; margin-top: 20px; font-weight: 600; }
.user-avatar-upload { width: 80px; height: 80px; border-radius: 50%; background: #eee; margin: 0 auto 10px; display: block; object-fit: cover; cursor: pointer; border: 2px dashed #ccc; }
.bind-wb-list { max-height: 200px; min-height: 100px; flex-shrink: 0; overflow-y: auto; border: 1px solid #eee; border-radius: 8px; padding: 5px; }
.bind-wb-item { display: flex; align-items: center; padding: 8px; border-bottom: 1px solid #f9f9f9; }
.bind-wb-item input { margin-right: 10px; width: auto; }
.bind-wb-item label { font-size: 14px; color: #333; margin: 0; text-transform: none; }
#app-spy-home { background: rgb(242, 244, 245); padding-top: 88px; align-items: center; flex-direction: column; }
#app-spy-home .app-header { background: transparent; border: none; color: #fff; position: absolute; top: 0; left: 0; width: 100%; }
.spy-app-grid { width: 160px; margin: 20px auto 0; display: flex; flex-wrap: wrap; justify-content: center; column-gap: 40px; row-gap: 45px; }
.spy-app-grid .app-icon {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    color: #4a4a4a;
}
.spy-app-grid .spy-icon-graphic {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a4a4a;
}
.spy-app-grid .spy-icon-graphic svg {
    width: 26px;
    height: 26px;
}
.spy-app-grid .spy-icon-graphic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.spy-app-grid .app-label { color: #1f1f1f !important; text-shadow: none; }
#spy-home-title {
    width: auto;
    max-width: calc(100% - 130px);
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 18px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff !important;
    text-shadow: none;
}
.memo-list { padding: 20px; }
.memo-top-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 10px 10px 0 10px;
    background: #fff;
    border-bottom: 1px solid #eee;
}
.memo-top-tab {
    border: 1px solid #ddd;
    background: #f5f5f7;
    color: #555;
    border-radius: 10px;
    padding: 8px 6px;
    font-size: 12px;
    cursor: pointer;
}
.memo-top-tab.active {
    background: #007aff;
    color: #fff;
    border-color: #007aff;
}
.memo-section-header { font-size: 14px; font-weight: bold; color: #666; margin: 20px 0 10px; display: flex; justify-content: space-between; align-items: center; }
.memo-item { background: #fff9c4; padding: 15px; border-radius: 10px; margin-bottom: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); font-family: "Marker Felt", sans-serif; font-size: 16px; line-height: 1.4; color: #333; position: relative; }
.memo-item.important { background: #ffccbc; border: 2px solid #ff5722; }
.memo-item.long-term { background: #ffe0b2; border: 2px solid #ff9800; }
.memo-item.short-term { background: #e8f5e9; border: 2px solid #66bb6a; }
.memo-item.schedule-upcoming { background: #e3f2fd; border: 2px solid #42a5f5; }
.memo-item.schedule-ongoing { background: #e8f5e9; border: 2px solid #2e7d32; }
.memo-item.schedule-past { background: #f5f5f5; border: 2px solid #bdbdbd; color: #666; }
.memo-item.impression { background: #f3e5f5; border: 2px solid #ab47bc; }
.memo-empty { text-align: center; color: #bbb; font-size: 12px; margin-bottom: 16px; }
.memo-date { font-size: 10px; color: #888; margin-bottom: 5px; display: block; }
.memo-keywords { font-size: 10px; color: #555; margin-top: 8px; font-style: italic; border-top: 1px dashed rgba(0,0,0,0.1); padding-top: 5px; }
.memo-meta { font-size: 10px; color: #666; margin-top: 6px; }
.memo-delete { position: absolute; bottom: 5px; right: 10px; font-size: 14px; cursor: pointer; opacity: 0.5; }
#transfer-modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 700; display: none; justify-content: center; align-items: center; }
#transfer-modal.active { display: flex; }
.transfer-box { background: #fff; width: 80%; border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.transfer-box h3 { margin: 0; text-align: center; }
.currency-convert-preview {
    margin-top: 8px;
    font-size: 12px;
    color: #5f7f94;
}
.currency-convert-preview.redpacket {
    color: #ffe9a9;
}
#redpacket-modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 700; display: none; justify-content: center; align-items: center; }
#redpacket-modal.active { display: flex; }
.redpacket-box { background: linear-gradient(180deg, #d9362f 0%, #b71f1b 100%); width: 74%; max-width: 280px; min-height: 380px; border-radius: 16px; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 14px 40px rgba(0,0,0,0.35); }
.redpacket-box h3 { margin: 4px 0 0; text-align: center; color: #ffe9a9; font-size: 22px; letter-spacing: 2px; }
.redpacket-box label { color: #ffd8a6; }
.redpacket-box input { background: rgba(255,255,255,0.95); }

#image-modal, #video-modal, #video-detail-modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 700; display: none; justify-content: center; align-items: center; }
#image-modal.active, #video-modal.active, #video-detail-modal.active { display: flex; }
.media-upload-box textarea { height: 100px; }
#voice-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 710;
    display: none;
    justify-content: center;
    align-items: center;
}
#voice-modal.active { display: flex; }
.voice-modal-box {
    width: 84%;
    max-width: 320px;
    background: #fff;
    border-radius: 20px;
    padding: 20px 16px 16px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.26);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.voice-modal-box h3 {
    margin: 0;
    font-size: 18px;
    color: #222;
}
.voice-record-status {
    font-size: 12px;
    color: #666;
}
.voice-record-btn {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 1px solid #dbe6ef;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.voice-record-btn svg {
    width: 38px;
    height: 38px;
    color: rgb(90,156,194);
}
.voice-record-btn svg * {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.voice-record-btn.recording {
    background: #f2f8fc;
    box-shadow: 0 0 0 8px rgba(90,156,194,0.18);
    transform: scale(1.03);
}
#voice-transcript-input {
    width: 100%;
    min-height: 88px;
    border: 1px solid #d8dde3;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    outline: none;
}
#voice-transcript-input:focus {
    border-color: rgb(90,156,194);
}
.voice-modal-actions {
    width: 100%;
    display: flex;
    gap: 10px;
}
.voice-cancel-btn {
    flex: 1;
    background: #eee !important;
    color: #333 !important;
}
.voice-send-btn {
    flex: 1;
    background: rgb(90,156,194) !important;
}

.image-plain-message { width: 100%; max-width: 240px; display: flex; flex-direction: column; gap: 6px; }
.image-plain-message img { width: 100%; border-radius: 12px; display: block; border: 1px solid rgba(0,0,0,0.08); }

.video-plain-message { width: 240px; max-width: 100%; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.video-plain-thumb { width: 100%; min-height: 140px; aspect-ratio: 4 / 3; border-radius: 12px; background: #dfe3e8; border: 1px solid #ccd3db; position: relative; overflow: hidden; }
.video-thumb-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.video-play-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; width: 0; height: 0; border-top: 13px solid transparent; border-bottom: 13px solid transparent; border-left: 20px solid rgba(80, 90, 100, 0.88); }

.video-detail-box { background: #fff; width: 80%; border-radius: 16px; padding: 18px; box-shadow: 0 12px 36px rgba(0,0,0,0.24); }
.video-detail-box h3 { margin: 0 0 10px; font-size: 17px; color: #111; }
#video-detail-text { font-size: 14px; line-height: 1.5; color: #333; white-space: pre-wrap; word-break: break-word; }
.theme-section-title { font-size: 18px; font-weight: bold; color: #000; margin-bottom: 15px; margin-top: 10px; }
.theme-divider { height: 1px; background: #eee; border: none; margin: 30px 0; }
.theme-option-row { display: flex; gap: 10px; margin-bottom: 10px; }
.theme-option-btn { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 8px; background: #fff; cursor: pointer; text-align: center; font-size: 13px; }
.theme-option-btn.active { background: #000; color: #fff; border-color: #000; }
.color-picker-wrapper { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.color-preview { width: 40px; height: 40px; border-radius: 8px; border: 1px solid #ddd; }
.theme-note { font-size: 11px; color: #888; margin-top: 5px; line-height: 1.4; }
.thoughts-modal { position: absolute; top: 100px; left: 50%; transform: translateX(-50%); width: 85%; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-radius: 16px; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); z-index: 550; display: none; flex-direction: column; border: 1px solid rgba(0,0,0,0.05); }
.thoughts-modal.active { display: flex; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popIn { from { opacity: 0; transform: translate(-50%, -20px); } to { opacity: 1; transform: translate(-50%, 0); } }
.thoughts-header { font-size: 14px; font-weight: bold; color: #007aff; margin-bottom: 10px; display: flex; align-items: center; gap: 5px; }
.thoughts-content { font-size: 14px; line-height: 1.5; color: #333; font-style: italic; }
.thoughts-close { position: absolute; top: 10px; right: 15px; color: #999; cursor: pointer; font-size: 18px; }
#call-screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 800; display: none; flex-direction: column; align-items: center; padding-top: 80px; }
#call-screen.active { display: flex; }
.call-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; border: 2px solid rgba(255,255,255,0.2); flex-shrink: 0; }
.call-status { color: rgba(255,255,255,0.7); font-size: 16px; margin-bottom: 10px; height: 20px; flex-shrink: 0; }
.call-timer { color: #fff; font-size: 32px; font-weight: 300; margin-bottom: 20px; flex-shrink: 0; }
.call-controls-container { margin-top: auto; width: 100%; padding-bottom: 50px; display: flex; flex-direction: column; align-items: center; gap: 20px; flex-shrink: 0; background: linear-gradient(to top, #000 20%, transparent); }
.call-input-container { width: 90%; padding: 10px; background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); border-radius: 20px; display: flex; align-items: center; gap: 8px; }
.call-input-container .chat-input { background: rgba(0,0,0,0.3); color: #fff; border: none; }
.call-input-container .chat-input::placeholder { color: rgba(255,255,255,0.5); }
.call-input-container .icon-btn { background: rgba(255,255,255,0.2); color: #fff; }
.call-hangup-btn { width: 70px; height: 70px; border-radius: 50%; background: #ff3b30; color: #fff; display: flex; justify-content: center; align-items: center; font-size: 30px; cursor: pointer; transition: transform 0.1s; }
.call-hangup-btn:active { transform: scale(0.9); }
#offline-mode { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #0b1220; z-index: 750; display: none; flex-direction: column; overflow: hidden; --offline-body-text-color: #f9fcff; --offline-dialog-text-color: rgb(187,191,211); }
#offline-mode.active { display: flex; }
#offline-bg-photo { position: absolute; inset: 0; background-position: center; background-size: cover; background-repeat: no-repeat; z-index: 0; transform: scale(1.03); filter: saturate(1.06) contrast(1.02); }
#offline-rain-gl { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
#offline-rain-gl canvas { width: 100%; height: 100%; display: block; }
.offline-header-glass { position: relative; z-index: 3; background: rgba(255,255,255,0.24); border-bottom: 1px solid rgba(255,255,255,0.25); backdrop-filter: blur(14px) saturate(1.12); -webkit-backdrop-filter: blur(14px) saturate(1.12); }
#offline-history { position: relative; z-index: 3; flex-grow: 1; padding: 18px 14px; overflow-y: auto; line-height: 1.65; color: #f4f7ff; font-size: 15px; display: flex; flex-direction: column; gap: 8px; }
.offline-msg-block { max-width: 84%; padding: 12px 14px; border-radius: 18px; border: 1px solid rgba(255,255,255,0.32); backdrop-filter: blur(16px) saturate(1.28); -webkit-backdrop-filter: blur(16px) saturate(1.28); box-shadow: 0 10px 26px rgba(9,15,38,0.25), inset 0 1px 0 rgba(255,255,255,0.45); white-space: pre-wrap; word-break: break-word; }
.offline-msg-block.user { align-self: flex-end; background: linear-gradient(135deg, rgba(126,175,255,0.28), rgba(77,128,214,0.18)); display: flex; align-items: center; justify-content: center; text-align: center; }
.offline-msg-block.ai { align-self: flex-start; background: linear-gradient(135deg, rgba(255,255,255,0.28), rgba(198,220,255,0.16)); }
.offline-msg-block.system { align-self: center; max-width: 92%; background: rgba(0,0,0,0.2); border-color: rgba(255,255,255,0.2); color: rgba(240,247,255,0.8); font-size: 12px; text-align: center; font-style: italic; box-shadow: none; }
.offline-msg-main { color: var(--offline-body-text-color); }
.offline-dialog { color: var(--offline-dialog-text-color); font-weight: 600; }
.offline-action-bar { position: relative; z-index: 3; display: flex; gap: 10px; opacity: 0.95; margin-bottom: 12px; }
.offline-action-bar.user { justify-content: flex-end; }
.offline-action-bar.ai { justify-content: flex-start; }
.offline-action-btn { font-size: 12px; color: rgba(230,242,255,0.95); cursor: pointer; border: 1px solid rgba(255,255,255,0.28); background: rgba(10,22,50,0.32); border-radius: 999px; padding: 3px 10px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.offline-action-btn:hover { background: rgba(12,33,76,0.45); }
.offline-action-btn.delete { color: #ffd0cf; border-color: rgba(255,130,130,0.46); }
.offline-typing { position: relative; z-index: 3; background: transparent; color: rgba(235,242,255,0.82); margin-bottom: 6px; text-shadow: 0 2px 8px rgba(10,16,40,0.38); }
.offline-input-area { position: relative; z-index: 3; padding: 12px; background: rgba(255,255,255,0.2); border-top: 1px solid rgba(255,255,255,0.24); display: flex; align-items: center; gap: 10px; backdrop-filter: blur(14px) saturate(1.14); -webkit-backdrop-filter: blur(14px) saturate(1.14); }
.offline-input-area .chat-input { background: rgba(255,255,255,0.24); border: 1px solid rgba(255,255,255,0.28); color: #f7fbff; }
.offline-input-area .chat-input::placeholder { color: rgba(238,246,255,0.66); }
#offline-settings-modal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80%; background: #fff; border-radius: 15px; z-index: 760; display: none; flex-direction: column; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
#offline-settings-modal.active { display: flex; }

/* --- 线下模式专用编辑弹窗 --- */
#offline-edit-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 75%; /* 占屏幕 3/4 */
    background: #fff;
    border-radius: 20px;
    z-index: 800;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}
#offline-edit-modal.active { display: flex; }
.offline-edit-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    background: #f9f9f9;
    font-size: 16px;
}
.offline-edit-content {
    flex-grow: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}
#offline-edit-textarea {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    font-family: inherit;
}

/* --- 新增：查岗日记专用编辑弹窗 --- */
#spy-diary-edit-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 75%;
    background: #fff;
    border-radius: 20px;
    z-index: 800;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}
#spy-diary-edit-modal.active { display: flex; }
#spy-diary-edit-textarea {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    font-family: inherit;
}

.chat-timestamp {
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 11px;
    margin: 15px auto 5px;
    width: fit-content;
    align-self: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.retracted-message-bar {
    align-self: center;
    background: rgba(150, 150, 150, 0.3);
    color: #666;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    margin: 5px 0;
    backdrop-filter: blur(2px);
    font-style: italic;
    text-align: center;
    max-width: 80%;
}

/* --- 浏览器与日记样式 --- */
.browser-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #333;
}
.browser-item::before {
    content: '🔍';
    margin-right: 15px;
    font-size: 16px;
    opacity: 0.6;
}

.diary-entry {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.8;
    color: #333;
    position: relative;
}
.diary-date {
    font-weight: bold;
    color: #000;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}
.diary-content mark {
    background-color: #ffeb3b;
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
}
.diary-content strike {
    color: #999;
    text-decoration: line-through;
}
.diary-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 15px;
    border-top: 1px dashed #eee;
    padding-top: 10px;
}
.diary-action-btn {
    font-size: 12px;
    color: #007aff;
    cursor: pointer;
}
.diary-separator {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 20px 0;
    position: relative;
}
.diary-separator::before, .diary-separator::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 1px;
    background: #ddd;
    vertical-align: middle;
    margin: 0 10px;
}

/* --- 备忘录设置弹窗样式 --- */
#memo-settings-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-height: 85%;
    background: #fff;
    border-radius: 20px;
    z-index: 600;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}
#memo-settings-modal.active { display: flex; }
#memo-settings-modal .settings-modal-content {
    overflow-y: auto;
}
#memo-transfer-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-height: 85%;
    background: #fff;
    border-radius: 20px;
    z-index: 605;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}
#memo-transfer-modal.active { display: flex; }
#memo-transfer-modal .settings-modal-content { overflow-y: auto; }
#memo-editor-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-height: 88%;
    background: #fff;
    border-radius: 20px;
    z-index: 610;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}
#memo-editor-modal.active { display: flex; }
#memo-editor-modal .settings-modal-content { overflow-y: auto; }
.memo-impression-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.memo-impression-tab {
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #f6f6f8;
    color: #555;
    padding: 8px 6px;
    font-size: 12px;
    cursor: pointer;
}
.memo-impression-tab.active {
    background: #af52de;
    border-color: #af52de;
    color: #fff;
}

/* 每日总结样式 */
.memo-item.daily-summary {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 10px;
    border: 2px solid #4caf50;
}
.memo-item.daily-summary .memo-date {
    color: #2e7d32;
    font-weight: bold;
}

/* --- 表情包功能样式 --- */
#sticker-panel {
    display: none;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
}
#sticker-panel.active {
    display: block;
}
.sticker-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}
.sticker-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.sticker-add-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #007aff;
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}
.sticker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.sticker-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #eee;
    position: relative;
    background: #f9f9f9;
}
.sticker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sticker-item:active {
    transform: scale(0.95);
}
.sticker-item .sticker-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.9);
    color: #fff;
    font-size: 12px;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.sticker-item:hover .sticker-delete {
    display: flex;
}
.sticker-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 20px;
}

/* 表情包管理弹窗 */
#sticker-manager-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-height: 80%;
    background: #fff;
    border-radius: 20px;
    z-index: 700;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}
#sticker-manager-modal.active {
    display: flex;
}
.sticker-manager-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    background: #f9f9f9;
}
.sticker-manager-content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}
.sticker-upload-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.sticker-upload-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    background: #fff;
}
.sticker-upload-tab.active {
    background: #007aff;
    color: #fff;
    border-color: #007aff;
}
.sticker-upload-section {
    display: none;
}
.sticker-upload-section.active {
    display: block;
}
.sticker-preview-container {
    width: 100px;
    height: 100px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #f9f9f9;
}
.sticker-preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.sticker-preview-placeholder {
    color: #999;
    font-size: 12px;
}

/* 表情包消息气泡 */
.sticker-bubble {
    padding: 5px !important;
    background: transparent !important;
    border: none !important;
}
.sticker-bubble img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
}

/* --- 情侣空间 App 样式 --- */
#app-couple { 
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%); 
    color: #fff; 
    position: relative;
    overflow: hidden;
}
/* 添加背景装饰球 */
#app-couple::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}
#app-couple::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

#app-couple .app-header { background: transparent; border-bottom: none; color: #fff; z-index: 10; }
#app-couple .back-btn, #app-couple .app-title, #app-couple .action-btn { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.1); }

.couple-container { 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; /* 默认居中，用于锁屏 */
    padding: 0 20px 20px; 
    overflow-y: auto;
}

/* 锁定界面 */
.couple-lock-icon { font-size: 80px; margin-bottom: 20px; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1)); animation: float 3s ease-in-out infinite; }
.couple-lock-title { font-size: 24px; font-weight: bold; margin-bottom: 10px; }
.couple-lock-desc { font-size: 14px; opacity: 0.9; margin-bottom: 40px; max-width: 80%; line-height: 1.5; text-align: center; }
.couple-invite-btn { background: rgba(255,255,255,0.9); color: #ff6b6b; border: none; padding: 15px 40px; border-radius: 30px; font-size: 18px; font-weight: bold; box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3); cursor: pointer; transition: transform 0.2s; backdrop-filter: blur(5px); }
.couple-invite-btn:active { transform: scale(0.95); }

/* 主界面重构 */
#couple-main-view { justify-content: flex-start; padding-top: 10px; }

.couple-glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    padding: 20px;
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

.couple-header-card {
    margin-top: 10px;
    padding: 25px 20px;
}

.couple-days-label { font-size: 14px; opacity: 0.9; letter-spacing: 2px; margin-bottom: 5px; text-transform: uppercase; }
.couple-days { font-size: 64px; font-weight: 700; text-shadow: 0 4px 10px rgba(0,0,0,0.1); line-height: 1; margin: 5px 0 15px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

.couple-partner-info { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 15px; 
    background: rgba(0,0,0,0.1);
    padding: 8px 20px;
    border-radius: 30px;
}
.couple-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.couple-heart-icon { font-size: 16px; color: #fff; animation: pulse 1.5s infinite; }

.couple-tree-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    min-height: 250px;
}

.couple-tree-container { 
    position: relative; 
    width: 180px; 
    height: 180px; 
    cursor: pointer; 
    display: flex;
    justify-content: center;
    align-items: flex-end;
}
.couple-tree { 
    font-size: 100px; 
    transition: transform 0.2s; 
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15)); 
    z-index: 2;
}
.couple-tree:active { transform: scale(0.95); }

/* 树底座光晕 */
.couple-tree-base {
    position: absolute;
    bottom: 10px;
    width: 120px;
    height: 40px;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 1;
}

.water-btn { 
    margin-top: 20px; 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); 
    color: #fff; 
    border: none; 
    padding: 12px 25px; 
    border-radius: 25px; 
    font-size: 15px; 
    font-weight: 600; 
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4); 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    transition: all 0.3s;
}
.water-btn:active { transform: scale(0.95); }
.water-btn:disabled { background: #a0c4ff; cursor: not-allowed; opacity: 0.8; box-shadow: none; filter: grayscale(0.5); }

.couple-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
    margin-top: auto;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.couple-menu-item {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.couple-menu-item:active { background: rgba(255, 255, 255, 0.4); }

.couple-menu-icon {
    font-size: 28px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* 情书列表视图样式修复 */
#couple-letters-view {
    display: flex !important;
    flex-direction: column !important;
    padding-top: 88px !important; /* 确保内容不与 header 重叠 */
    overflow: hidden !important; /* 容器不滚动，由子元素滚动 */
    -webkit-overflow-scrolling: touch;
}

#couple-letters-view .app-header {
    position: absolute !important; /* 修复：改为绝对定位，相对于手机屏幕 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: linear-gradient(135deg, rgba(255, 154, 158, 0.98) 0%, rgba(250, 208, 196, 0.98) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: none;
}

/* 修复收纳箱和编辑界面的滚动和定位问题 */
#couple-letter-box, #couple-letter-editor {
    overflow: hidden !important;
    padding-top: 88px !important;
}

#couple-letters-list {
    width: 100%;
    padding: 0 20px 20px 20px;
}

#couple-letters-empty {
    margin-top: 30px;
}

.love-letter-card {
    margin-bottom: 15px;
}

/* 情书功能样式 - 重新设计 */

/* 邀请写情书按钮 */
.letter-invite-btn {
    background: linear-gradient(135deg, #ff6b8a 0%, #ff8fab 100%);
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(255, 107, 138, 0.4);
    transition: all 0.3s;
    margin-top: 20px;
}

.letter-invite-btn:active {
    transform: scale(0.95);
    box-shadow: 0 3px 10px rgba(255, 107, 138, 0.3);
}

.letter-invite-btn span {
    font-size: 20px;
}

/* 情书信纸展示样式 */
.letter-paper-display {
    background: linear-gradient(180deg, #fff0f5 0%, #ffe8ef 100%);
    border-radius: 16px;
    padding: 25px 20px;
    position: relative;
    box-shadow: 0 8px 25px rgba(255, 107, 138, 0.2);
    border: 2px solid #ffb6c1;
    margin-bottom: 20px;
}

.letter-paper-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #ffb6c1, #ff6b8a, #ffb6c1);
    border-radius: 14px 14px 0 0;
}

.letter-hearts-decoration {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.letter-hearts-decoration span {
    font-size: 16px;
    animation: heartBeat 1.5s infinite;
}

.letter-hearts-decoration span:nth-child(2) {
    animation-delay: 0.3s;
}

.letter-hearts-decoration span:nth-child(3) {
    animation-delay: 0.6s;
}

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

.letter-content {
    font-size: 15px;
    line-height: 1.8;
    color: #5d4037;
    white-space: pre-wrap;
    text-align: left;
    min-height: 150px;
}

/* 情书编辑信纸样式 */
.letter-paper-edit {
    background: linear-gradient(180deg, #fff0f5 0%, #ffe8ef 100%);
    border-radius: 16px;
    padding: 25px 20px;
    margin: 0 20px;
    position: relative;
    box-shadow: 0 8px 25px rgba(255, 107, 138, 0.2);
    border: 2px solid #ffb6c1;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    max-height: calc(100% - 160px);
}

.letter-paper-edit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #ffb6c1, #ff6b8a, #ffb6c1);
    border-radius: 14px 14px 0 0;
}

#love-letter-textarea {
    width: 100%;
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    font-size: 16px;
    line-height: 1.8;
    color: #5d4037;
    font-family: inherit;
    min-height: 200px;
}

#love-letter-textarea::placeholder {
    color: #d4a5a5;
}

/* 交换情书按钮 */
.letter-exchange-btn {
    background: linear-gradient(135deg, #ff6b8a 0%, #ff8fab 100%);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(255, 107, 138, 0.4);
    transition: all 0.3s;
    width: calc(100% - 40px);
    margin: 0 auto;
}

.letter-exchange-btn:active {
    transform: scale(0.98);
}

.letter-exchange-btn span {
    font-size: 18px;
}

/* 情书加载状态 */
.letter-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #ff6b8a;
    font-size: 14px;
    gap: 15px;
}

.letter-loading-icon {
    font-size: 48px;
    animation: letterFloat 2s ease-in-out infinite;
}

@keyframes letterFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* 情书收纳箱网格 */
.letter-box-grid {
    width: 100%;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    overflow-y: auto;
    align-content: flex-start;
}

/* 情书预览卡片 */
.letter-preview-card {
    width: calc(50% - 7.5px);
    aspect-ratio: 1;
    background: linear-gradient(135deg, #fff0f5 0%, #ffe8ef 100%);
    border-radius: 16px;
    border: 2px solid #ffb6c1;
    box-shadow: 0 4px 15px rgba(255, 107, 138, 0.2);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.letter-preview-card::before {
    content: '💌';
    font-size: 36px;
    margin-bottom: 10px;
}

.letter-preview-card:active {
    transform: scale(0.95);
}

.letter-preview-date {
    font-size: 13px;
    color: #ff6b8a;
    font-weight: 600;
    text-align: center;
}

.letter-preview-hint {
    font-size: 11px;
    color: #d4a5a5;
    margin-top: 5px;
}

/* 情书收纳箱空状态 */
.letter-box-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60%;
    color: #ff6b8a;
    text-align: center;
    padding: 20px;
}

.letter-box-empty-icon {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 情书详情弹窗 */
.letter-detail-content {
    width: 90%;
    max-height: 85%;
    background: linear-gradient(135deg, #fff0f5 0%, #ffe8ef 100%);
    border-radius: 20px;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(255, 107, 138, 0.3);
    position: relative;
    animation: albumSlideUp 0.3s ease;
}

.letter-detail-section {
    margin-bottom: 20px;
}

.letter-detail-label {
    font-size: 14px;
    font-weight: 600;
    color: #ff6b8a;
    margin-bottom: 10px;
    text-align: center;
}

.letter-detail-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0;
    position: relative;
}

.letter-detail-divider::before,
.letter-detail-divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffb6c1, transparent);
}

.letter-detail-divider span {
    font-size: 24px;
    margin: 0 15px;
}

/* 旧版样式兼容（保留部分） */
.love-letter-card {
    background: #fff0f5;
    border-radius: 15px;
    padding: 20px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: #5d4037;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.love-letter-card::after {
    content: '❤';
    position: absolute;
    bottom: -10px;
    right: -5px;
    font-size: 40px;
    opacity: 0.1;
    transform: rotate(-20deg);
    pointer-events: none;
}

.love-letter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
    padding-bottom: 10px;
}

.love-letter-role { font-weight: bold; font-size: 16px; color: #ff6b6b; }
.love-letter-date { font-size: 12px; opacity: 0.6; }
.love-letter-body { font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
.couple-menu-text {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

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

/* 邀请弹窗 */
#couple-invite-modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 900; display: none; justify-content: center; align-items: center; }
#couple-invite-modal.active { display: flex; }
.invite-box { background: #fff; width: 85%; border-radius: 20px; padding: 20px; max-height: 60%; display: flex; flex-direction: column; }
.invite-header { font-size: 18px; font-weight: bold; color: #333; margin-bottom: 15px; text-align: center; }
.invite-list { overflow-y: auto; flex-grow: 1; }
.invite-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.invite-item:hover { background: #f9f9f9; }
.invite-item img { width: 40px; height: 40px; border-radius: 50%; margin-right: 12px; object-fit: cover; }
.invite-item-name { font-size: 16px; color: #333; font-weight: 500; }
.invite-close-btn { margin-top: 15px; padding: 12px; background: #eee; color: #666; border: none; border-radius: 10px; font-size: 14px; cursor: pointer; width: 100%; }

@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }
@keyframes waterDrop { 0% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(50px) scale(0.5); } }
.water-anim { position: absolute; font-size: 24px; pointer-events: none; animation: waterDrop 1s forwards; }

/* 情侣空间特殊气泡 */
.message-bubble.couple-invite-req {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%) !important;
    color: #fff !important;
    font-size: 18px !important;
    padding: 15px 20px !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
    border: 2px solid #fff;
    text-align: center;
    font-weight: bold;
}
.message-bubble.couple-invite-accept {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%) !important;
    color: #fff !important;
    font-size: 18px !important;
    padding: 15px 20px !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
    border: 2px solid #fff;
    text-align: center;
    font-weight: bold;
}
.message-bubble.couple-invite-reject {
    background: linear-gradient(135deg, #434343 0%, #000000 100%) !important;
    color: #fff !important;
    font-size: 18px !important;
    padding: 15px 20px !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid #666;
    text-align: center;
    font-weight: bold;
}

/* --- 提问箱 App 样式 --- */
#app-question-box,
#app-question-box-ask {
    background: #f5f5f5; /* 改为白色/浅灰 */
}

.qbox-header {
    background: #ffffff !important; /* 头部改为白色 */
    border-bottom: 1px solid #e0e0e0 !important;
}

.qbox-header .back-btn,
.qbox-header .app-title,
.qbox-header .action-btn {
    color: #333 !important; /* 头部文字改为深色 */
}

.qbox-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 角色选择列表 */
.qbox-contact-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #ffffff; /* 列表项背景改为白色 */
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.qbox-contact-item:active {
    transform: scale(0.98);
    background: #fafafa;
}

.qbox-contact-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid #eee;
}

.qbox-contact-info {
    flex-grow: 1;
}

.qbox-contact-name {
    font-size: 16px;
    font-weight: 600;
    color: #333; /* 文字改为深色 */
    margin-bottom: 4px;
}

.qbox-contact-desc {
    font-size: 12px;
    color: #888; /* 描述文字改为灰色 */
}

.qbox-contact-arrow {
    font-size: 18px;
    color: #ccc;
}

/* 提问输入区域 */
.qbox-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qbox-input-label {
    background: #fff;
    color: #333;
    padding: 12px 18px;
    border-radius: 16px 16px 0 0;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: -15px;
    position: relative;
    z-index: 1;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    border-bottom: none;
}

.qbox-input-box {
    background: rgba(255, 255, 255, 0.8); /* 保持毛玻璃感，但更亮 */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 0 16px 16px 16px;
    padding: 20px;
    border: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.qbox-input-box textarea {
    width: 100%;
    height: 120px;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    font-size: 15px;
    line-height: 1.6;
    color: #333; /* 输入文字改为深色 */
    font-family: inherit;
}

.qbox-input-box textarea::placeholder {
    color: #999;
}

/* 匿名选项 */
.qbox-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qbox-anonymous-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #666; /* 选项文字改为灰色 */
    font-size: 14px;
}

.qbox-anonymous-option input[type="checkbox"] {
    display: none;
}

.qbox-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    background: #fff;
}

.qbox-anonymous-option input[type="checkbox"]:checked + .qbox-checkbox {
    background: #333;
    border-color: #333;
}

.qbox-anonymous-option input[type="checkbox"]:checked + .qbox-checkbox::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

/* 发送按钮 */
.qbox-send-btn {
    width: 100%;
    padding: 16px;
    background: #333; /* 按钮改为深色 */
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.qbox-send-btn:active {
    transform: scale(0.98);
    background: #000;
}

/* 历史问答列表 */
.qbox-history {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.qbox-history-title {
    font-size: 14px;
    color: #999;
    font-weight: 500;
    margin-bottom: 5px;
    text-align: center;
}

/* 问答卡片 */
.qbox-qa-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    animation: qboxSlideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 16px;
}

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

/* 问题区域 */
.qbox-question-area {
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 15px 18px;
    position: relative;
    border-bottom: 1px dashed #eee;
}

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

.qbox-question-from {
    font-size: 12px;
    color: #999;
}

.qbox-question-anonymous {
    font-size: 11px;
    color: #fff;
    background: #ccc;
    padding: 2px 8px;
    border-radius: 10px;
}

.qbox-question-text {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

/* 回答区域 */
.qbox-answer-area {
    background: rgba(245, 245, 245, 0.8); /* 浅灰背景 */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 0 0 16px 16px;
    padding: 15px 18px;
    border-top: none;
}

.qbox-answer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.qbox-answer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.qbox-answer-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.qbox-answer-text {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* 加载状态 */
.qbox-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 100;
    color: #333;
    font-size: 16px;
}

.qbox-loading.active {
    display: flex;
}

.qbox-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: #333;
    border-radius: 50%;
    animation: qboxSpin 1s linear infinite;
}

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

/* 空状态 */
.qbox-empty {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 40px 20px;
}

.qbox-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* --- 恋爱相册样式 --- */
.album-photos-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 15px 10px;
    gap: 15px;
    overflow-y: auto;
    padding-bottom: 30px;
}

.album-photo-item {
    width: 45%;
    aspect-ratio: 1;
    border-radius: 12px;
    border: 4px solid #ffb6c1;
    background: #fff;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.4);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.album-photo-item:nth-child(odd) {
    transform: rotate(-3deg);
}

.album-photo-item:nth-child(even) {
    transform: rotate(3deg);
}

.album-photo-item:nth-child(3n) {
    transform: rotate(-5deg);
}

.album-photo-item:nth-child(4n) {
    transform: rotate(4deg);
}

.album-photo-item:active {
    transform: scale(0.95) rotate(0deg);
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.3);
}

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

.album-photo-item.text-photo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: linear-gradient(135deg, #fff0f3 0%, #ffe4ec 100%);
}

.album-photo-text {
    font-size: 11px;
    color: #666;
    text-align: center;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

.album-photo-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff6b8a;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

.album-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60%;
    color: #ff6b8a;
}

.album-empty-icon {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.album-empty-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.album-empty-hint {
    font-size: 14px;
    opacity: 0.7;
}

/* 添加照片弹窗 */
.album-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
}

.album-modal.active {
    display: flex;
}

.album-modal-content {
    width: 90%;
    max-height: 85%;
    background: #fff0f3;
    border-radius: 20px;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(255, 107, 138, 0.3);
    animation: albumSlideUp 0.3s ease;
}

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

.album-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ffb6c1;
}

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

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

.album-upload-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.album-upload-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: 2px solid #ffb6c1;
    border-radius: 12px;
    background: #fff;
    color: #ff6b8a;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.album-upload-tab.active {
    background: linear-gradient(135deg, #ff6b8a 0%, #ff8fab 100%);
    color: #fff;
    border-color: #ff6b8a;
}

.album-upload-section {
    display: block;
}

.album-file-preview {
    width: 100%;
    height: 120px;
    border: 2px dashed #ffb6c1;
    border-radius: 12px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
}

.album-file-preview:hover {
    border-color: #ff6b8a;
}

.album-file-preview span {
    color: #ff6b8a;
    font-size: 14px;
}

.album-file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-file-preview.has-image span {
    display: none;
}

.album-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ffb6c1;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: #333;
    transition: border-color 0.2s;
}

.album-input:focus {
    border-color: #ff6b8a;
}

.album-url-preview {
    margin-top: 10px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    display: none;
}

.album-url-preview.has-image {
    display: block;
}

.album-url-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ffb6c1;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: #333;
    resize: none;
    height: 80px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.album-textarea:focus {
    border-color: #ff6b8a;
}

.album-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #ffb6c1, transparent);
    margin: 20px 0;
}

.album-invite-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff6b8a 0%, #ff8fab 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 107, 138, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.album-invite-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(255, 107, 138, 0.3);
}

/* 照片查看弹窗 */
.album-view-content {
    width: 90%;
    max-height: 90%;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: albumSlideUp 0.3s ease;
}

.album-view-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    z-index: 10;
}

.album-view-photo {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    border: 4px solid #ffb6c1;
    overflow: hidden;
    background: linear-gradient(135deg, #fff0f3 0%, #ffe4ec 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.album-view-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-view-photo-text {
    padding: 20px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    text-align: center;
}

.album-view-info {
    margin-bottom: 15px;
}

.album-view-description {
    background: #fff0f3;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 10px;
    border-left: 4px solid #ff6b8a;
}

.album-view-description::before {
    content: '📷 ';
}

.album-view-user-comment {
    background: #e8f4fd;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 10px;
    border-left: 4px solid #007aff;
    display: none;
}

.album-view-user-comment.has-content {
    display: block;
}

.album-view-user-comment::before {
    content: '💭 我的评论：';
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    color: #007aff;
}

.album-view-char-comment {
    background: linear-gradient(135deg, #fff0f3 0%, #ffe4ec 100%);
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    border-left: 4px solid #ff6b8a;
    display: none;
}

.album-view-char-comment.has-content {
    display: block;
}

.album-view-char-comment::before {
    content: '💕 TA的评论：';
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    color: #ff6b8a;
}

.album-comment-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff6b8a 0%, #ff8fab 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 107, 138, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.album-comment-btn:active {
    transform: scale(0.98);
}

.album-comment-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.album-comment-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: #ff6b8a;
    font-size: 14px;
}

.album-comment-loading.active {
    display: flex;
}

.album-loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #ffe4ec;
    border-top-color: #ff6b8a;
    border-radius: 50%;
    animation: albumSpin 1s linear infinite;
}

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

/* 恋爱相册删除模式 */
.album-delete-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-top: 1px solid #ffb6c1;
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 60;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.album-delete-bar.active {
    display: flex;
}

.album-delete-cancel {
    color: #333;
    font-size: 16px;
    cursor: pointer;
}

.album-delete-confirm {
    color: #ff3b30;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.album-photo-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
    z-index: 10;
    display: none;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.album-delete-mode .album-photo-checkbox {
    display: flex;
}

.album-photo-checkbox.checked {
    background: #ff3b30;
    border-color: #fff;
}

.album-photo-checkbox.checked::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.album-delete-mode .album-photo-item {
    animation: shake 0.3s infinite;
    transform: rotate(0deg) !important; /* 删除模式下取消随机旋转，改为抖动 */
}

@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-1deg); }
    100% { transform: rotate(0deg); }
}

/* --- 留言板样式 --- */
.message-board-list {
    width: 100%;
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 40px; /* 修正：配合容器的60px padding，总共100px，避开88px的Header */
    padding-bottom: 100px; /* 修正：增加底部留白，避免被底部按钮遮挡 */
    margin-top: 0; /* 修正：移除负margin，恢复正常流布局 */
}

.message-board-item {
    background: #fffacd; /* 淡黄色 */
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* 只在非删除模式下显示动画 */
.message-board-list:not(.message-board-delete-mode) .message-board-item {
    animation: slideUp 0.3s ease;
}

/* 在删除模式下显式禁用动画 */
.message-board-delete-mode .message-board-item {
    animation: none !important;
}

.message-board-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
}

.message-board-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 2px solid #fff;
}

.message-board-info {
    display: flex;
    flex-direction: column;
}

.message-board-date {
    font-size: 14px;
    font-weight: 600;
    color: #5d4037;
}

.message-board-time {
    font-size: 11px;
    color: #8d6e63;
}

.message-board-content {
    font-size: 15px;
    line-height: 1.6;
    color: #5d4037;
    white-space: pre-wrap;
    margin-bottom: 10px;
}

.message-board-reply-area {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 10px;
    margin-top: 10px;
    font-size: 14px;
    color: #5d4037;
    position: relative;
}

.message-board-reply-label {
    display: block;
    font-size: 12px;
    color: #ff6b8a;
    font-weight: bold;
    margin-bottom: 5px;
}

.message-board-user-reply {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    font-size: 14px;
    color: #5d4037;
}

.message-board-user-reply::before {
    content: '💬 我的回复：';
    display: block;
    font-size: 12px;
    color: #007aff;
    font-weight: bold;
    margin-bottom: 5px;
}

.message-board-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 228, 225, 0.9);
    backdrop-filter: blur(5px);
    z-index: 10;
}

.message-board-checkbox {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    border: 2px solid #ff6b8a;
    border-radius: 50%;
    background: #fff;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.message-board-delete-mode .message-board-checkbox {
    display: flex;
}

.message-board-checkbox.checked {
    background: #ff6b8a;
}

.message-board-checkbox.checked::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.message-board-reply-btn {
    font-size: 12px;
    color: #007aff;
    cursor: pointer;
    margin-top: 5px;
    display: inline-block;
}

/* --- 交换情书功能样式 --- */
.letter-main-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.letter-invite-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.letter-invite-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: letterFloat 2s ease-in-out infinite;
}

.letter-invite-text {
    font-size: 16px;
    color: #ff6b8a;
    margin-bottom: 30px;
    line-height: 1.5;
}

.letter-editor-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow: hidden;
}

.letter-editor-content .letter-paper-edit {
    flex-grow: 1;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.letter-editor-content #love-letter-textarea {
    flex-grow: 1;
    min-height: 250px;
}

/* --- 音乐 App 样式 --- */
#app-music {
    background: #fff;
}

.music-header {
    background: linear-gradient(135deg, #ff2d55, #ff375f) !important;
    border-bottom: none !important;
}

.music-header .back-btn,
.music-header .app-title,
.music-header .action-btn {
    color: #fff !important;
}

.music-content {
    padding: 0 !important;
    background: #f5f5f5;
}

/* 音乐列表项 */
.music-list-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.music-list-item:active {
    background: #f9f9f9;
}

.music-list-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    background: linear-gradient(135deg, #ff2d55, #ff375f);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
}

.music-list-cover img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.music-list-info {
    flex-grow: 1;
    overflow: hidden;
}

.music-list-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-list-artist {
    font-size: 13px;
    color: #888;
    margin-top: 3px;
}

.music-list-style {
    font-size: 11px;
    color: #ff2d55;
    margin-top: 3px;
    background: rgba(255, 45, 85, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

/* 空状态 */
.music-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #999;
}

.music-empty-icon {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.music-empty-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #666;
}

.music-empty-hint {
    font-size: 14px;
    color: #999;
}

/* 添加音乐弹窗 */
.music-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.music-modal.active {
    display: flex;
}

.music-modal-content {
    width: 90%;
    max-width: 350px;
    max-height: 85%;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.music-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.music-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

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

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

.music-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.music-input:focus {
    border-color: #ff2d55;
}

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

.music-textarea {
    width: 100%;
    height: 150px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    resize: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.music-textarea:focus {
    border-color: #ff2d55;
}

/* 封面上传 */
.music-cover-upload-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.music-cover-tab {
    flex: 1;
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.music-cover-tab.active {
    background: #ff2d55;
    color: #fff;
    border-color: #ff2d55;
}

.music-cover-preview {
    width: 100px;
    height: 100px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    background: #f9f9f9;
    margin: 0 auto;
    position: relative;
}

.music-cover-preview span {
    font-size: 12px;
    color: #999;
}

.music-cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* 音乐播放器弹窗 */
.music-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: none;
    justify-content: center;
    align-items: center;
}

.music-player-modal.active {
    display: flex;
}

.music-player-content {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 30px 40px;
    position: relative;
}

.music-player-minimize {
    position: absolute;
    top: 50px;
    left: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

.music-player-menu-btn {
    position: absolute;
    bottom: 120px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    cursor: pointer;
}

/* 旋转封面 */
.music-player-cover-container {
    margin-top: 30px;
    margin-bottom: 30px;
}

.music-player-cover {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: coverRotate 20s linear infinite;
    animation-play-state: paused;
    background: linear-gradient(135deg, #ff2d55, #ff375f);
    display: flex;
    justify-content: center;
    align-items: center;
}

.music-player-cover.playing {
    animation-play-state: running;
}

.music-player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

/* 歌曲信息 */
.music-player-info {
    text-align: center;
    margin-bottom: 20px;
}

.music-player-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.music-player-artist {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* 歌词显示 */
.music-player-lyrics {
    width: 100%;
    height: 80px;
    overflow: hidden;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.lyrics-line {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.8;
    transition: all 0.3s;
}

.lyrics-line.active {
    font-size: 16px;
    color: #fff;
    font-weight: 600;
}

/* 进度条 */
.music-player-progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.music-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 40px;
}

.music-player-progress {
    flex-grow: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.music-player-progress-bar {
    height: 100%;
    background: #ff2d55;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

/* 控制按钮 */
.music-player-controls {
    display: flex;
    align-items: center;
    gap: 30px;
}

.music-control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.music-control-btn:active {
    transform: scale(0.95);
}

.music-control-btn.play-btn {
    width: 70px;
    height: 70px;
    background: #ff2d55;
    font-size: 28px;
}

/* 菜单 */
.music-player-menu {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
    max-height: 60%;
    overflow-y: auto;
}

.music-player-menu.active {
    transform: translateY(0);
}

.music-menu-title {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 600;
}

.music-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 15px;
    color: #333;
}

.music-menu-item span:first-child {
    margin-right: 10px;
}

.music-menu-check {
    margin-left: auto;
    color: #ff2d55;
}

.music-menu-divider {
    height: 1px;
    background: #eee;
    margin: 15px 0;
}

.music-menu-songs {
    max-height: 200px;
    overflow-y: auto;
}

.music-menu-song-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.music-menu-song-item.active {
    color: #ff2d55;
}

.music-menu-song-cover {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    margin-right: 10px;
    background: linear-gradient(135deg, #ff2d55, #ff375f);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 14px;
}

.music-menu-song-cover img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
}

.music-menu-song-info {
    flex-grow: 1;
}

.music-menu-song-title {
    font-size: 14px;
    font-weight: 500;
}

.music-menu-song-artist {
    font-size: 12px;
    color: #888;
}

/* 迷你播放器 */
.music-mini-player {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff2d55, #ff375f);
    box-shadow: 0 5px 20px rgba(255, 45, 85, 0.4);
    z-index: 999;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    animation: miniPlayerPulse 2s infinite;
    bottom: 100px;
    right: 20px;
}

.music-mini-player.active {
    display: flex;
}

.music-mini-player img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: coverRotate 20s linear infinite;
}

.music-mini-player.paused img {
    animation-play-state: paused;
}

.mini-player-playing-indicator {
    position: absolute;
    bottom: 5px;
    display: flex;
    gap: 2px;
}

.mini-player-playing-indicator span {
    width: 3px;
    height: 10px;
    background: #fff;
    border-radius: 2px;
    animation: soundWave 0.5s infinite alternate;
}

.mini-player-playing-indicator span:nth-child(2) {
    animation-delay: 0.1s;
}

.mini-player-playing-indicator span:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes soundWave {
    from { height: 5px; }
    to { height: 15px; }
}

@keyframes miniPlayerPulse {
    0%, 100% { box-shadow: 0 5px 20px rgba(255, 45, 85, 0.4); }
    50% { box-shadow: 0 5px 30px rgba(255, 45, 85, 0.6); }
}

/* 音乐播放器退出按钮 */
.music-player-close {
    position: absolute;
    top: 50px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
}

/* --- 论坛 App 样式 (Tumblr风格) --- */
#app-forum {
    background: #000;
    color: #fff;
}

.forum-header {
    position: absolute;
    top: 44px;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    background: #000;
    z-index: 20;
}

.forum-back-btn {
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.forum-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    pointer-events: none;
}

.forum-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.forum-add-btn {
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forum-settings-btn {
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forum-tabs {
    position: absolute;
    top: 94px;
    left: 15px;
    display: flex;
    gap: 20px;
    z-index: 10;
}

.forum-tab {
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.forum-tab.active {
    color: #fff;
    border-bottom-color: #fff;
}

.forum-content {
    position: absolute;
    top: 130px;
    left: 0;
    width: 100%;
    height: calc(100% - 130px);
    overflow-y: auto;
    padding: 15px;
    padding-bottom: 30px;
}

/* 帖子卡片 */
.forum-post {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    animation: forumPostSlideIn 0.3s ease;
}

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

.forum-post-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.forum-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
    overflow: hidden;
}

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

.forum-post-info {
    flex-grow: 1;
}

.forum-post-username {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
}

.forum-post-time {
    font-size: 12px;
    color: #999;
}

.forum-post-menu {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    font-size: 20px;
}

.forum-post-content {
    font-size: 15px;
    line-height: 1.6;
    color: #e0e0e0;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.forum-post-image-desc {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: #bbb;
    border-left: 3px solid #5856d6;
}

.forum-post-image-desc::before {
    content: '📷 ';
}

/* 论坛弹窗 */
.forum-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.forum-modal.active {
    display: flex;
}

.forum-modal-content {
    width: 90%;
    max-width: 400px;
    max-height: 85%;
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.forum-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #000;
    border-bottom: 1px solid #333;
}

.forum-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

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

.forum-label {
    display: block;
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
}

.forum-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

.forum-textarea::placeholder {
    color: #666;
}

.forum-clear-btn {
    width: 100%;
    padding: 12px;
    background: #ff3b30;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.forum-clear-btn:active {
    opacity: 0.8;
}

/* 添加帖子选项 */
.forum-add-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.forum-add-option {
    background: #000;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.forum-add-option:active {
    transform: scale(0.98);
    background: #111;
}

.forum-add-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.forum-add-text {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.forum-add-desc {
    font-size: 12px;
    color: #999;
}

/* Forum Action Sheet Styles (Replacing the Menu Modal) */
.forum-action-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    flex-direction: column;
    justify-content: flex-end;
}

.forum-action-sheet-overlay.active {
    display: flex;
}

.forum-action-sheet-content {
    background: transparent;
    padding: 10px 10px 20px 10px;
    width: 100%;
    animation: slideUp 0.3s ease-out;
}

.forum-action-sheet-item {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 16px;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.forum-action-sheet-item:first-child {
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

.forum-action-sheet-item:last-of-type {
    border-bottom: none;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    margin-bottom: 8px;
}

.forum-action-sheet-item.delete {
    color: #ff3b30;
}

.forum-action-sheet-cancel {
    background: rgba(44, 44, 46, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 16px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    cursor: pointer;
}

.forum-action-sheet-item:active,
.forum-action-sheet-cancel:active {
    background: rgba(58, 58, 60, 0.95);
}

/* 删除模式 */
.forum-delete-mode .forum-post {
    padding-left: 50px;
}

.forum-post-checkbox {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 2px solid #5856d6;
    border-radius: 50%;
    background: #000;
    display: none;
    justify-content: center;
    align-items: center;
}

.forum-delete-mode .forum-post-checkbox {
    display: flex;
}

.forum-post-checkbox.checked {
    background: #5856d6;
}

.forum-post-checkbox.checked::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.forum-delete-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #000;
    border-top: 1px solid #333;
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 30;
}

.forum-delete-bar.active {
    display: flex;
}

.forum-delete-cancel {
    color: #fff;
    cursor: pointer;
    font-size: 16px;
}

.forum-delete-confirm {
    color: #ff3b30;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

/* 音乐菜单头部 */
.music-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.music-menu-header .music-menu-title {
    margin: 0;
    padding: 0;
}

.music-menu-close {
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 5px;
}

/* 音乐删除模式 */
.music-delete-mode .music-list-item {
    position: relative;
}

.music-list-checkbox {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 2px solid #ff2d55;
    border-radius: 50%;
    background: #fff;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.music-delete-mode .music-list-checkbox {
    display: flex;
}

.music-delete-mode .music-list-item {
    padding-left: 50px;
}

.music-list-checkbox.checked {
    background: #ff2d55;
}

.music-list-checkbox.checked::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

/* --- 番茄钟 App --- */
#app-tomato {
    background: linear-gradient(180deg, #f9e7e7 0%, #f5dfdf 100%);
}

.tomato-header {
    background: rgba(255, 236, 236, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tomato-settings-btn {
    justify-content: center;
    width: 60px;
    font-size: 19px;
}

.tomato-content {
    background: transparent;
    padding: 20px 18px 30px;
    display: flex;
    flex-direction: column;
}

.tomato-view {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
}

.tomato-view.active {
    display: flex;
}

.tomato-prompt {
    margin-top: 70px;
    font-size: 19px;
    font-weight: 600;
    color: #7b4a4a;
    text-align: center;
}

.tomato-input-shell {
    margin-top: 26px;
    width: 100%;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    padding: 6px 6px 6px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 24px rgba(150, 98, 98, 0.16);
}

.tomato-history-title {
    margin-top: 22px;
    margin-bottom: 10px;
    width: 100%;
    max-width: 320px;
    color: #805454;
    font-size: 14px;
    font-weight: 700;
}

.tomato-history-list {
    width: 100%;
    max-width: 320px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 6px;
}

.tomato-history-item {
    width: 100%;
    margin-bottom: 10px;
    padding: 11px 13px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(152, 112, 112, 0.1);
    color: #624141;
    font-size: 13px;
    line-height: 1.45;
    cursor: pointer;
}

.tomato-history-item.unfinished {
    border-color: rgba(233, 151, 151, 0.9);
}

.tomato-history-status {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
}

.tomato-history-item.unfinished .tomato-history-status {
    color: #cc6666;
}

.tomato-history-item.completed .tomato-history-status {
    color: #7d5a5a;
}

.tomato-history-empty {
    color: #9a7777;
    font-size: 13px;
    text-align: center;
    margin-top: 12px;
}

.tomato-input-shell input {
    flex: 1;
    border: none;
    background: transparent;
    color: #6a4141;
    font-size: 14px;
    outline: none;
}

.tomato-send-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #eb9494, #d77777);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.tomato-plan-title {
    margin-top: 6px;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
    color: #704848;
    text-align: center;
}

.tomato-plan-list {
    width: 100%;
    overflow-y: auto;
    max-height: calc(100% - 170px);
    padding-right: 2px;
}

.tomato-plan-item {
    width: 100%;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    padding: 13px 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(152, 112, 112, 0.12);
}

.tomato-plan-name {
    display: inline-block;
    min-width: 120px;
    max-width: 100%;
    font-size: 15px;
    font-weight: 600;
    color: #5f3e3e;
    outline: none;
    border-bottom: 1px dashed rgba(126, 84, 84, 0.4);
    padding-bottom: 2px;
    user-select: text;
    cursor: text;
}

.tomato-plan-time-edit {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7d5454;
    font-size: 13px;
}

.tomato-plan-time-edit input {
    width: 46px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    padding: 6px 4px;
    text-align: center;
    font-weight: 600;
    color: #6a4343;
    outline: none;
}

.tomato-total-time {
    margin-top: 4px;
    margin-bottom: 14px;
    color: #7a5050;
    font-size: 14px;
    font-weight: 600;
}

.tomato-focus-btn,
.tomato-break-btn {
    width: 100%;
    max-width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.42);
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 700;
    color: #704848;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
}

.tomato-focus-avatar-wrap {
    margin-top: 4px;
}

.tomato-focus-avatar {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 10px 26px rgba(120, 82, 82, 0.24);
}

.tomato-focus-message {
    margin-top: 14px;
    width: 100%;
    max-width: 320px;
    min-height: 72px;
    border-radius: 18px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #6b4747;
    font-size: 14px;
    line-height: 1.5;
}

.tomato-stage-label {
    margin-top: 18px;
    color: #885d5d;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.tomato-stage-countdown {
    margin-top: 6px;
    color: #5d3939;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

.tomato-next-stage-btn,
.tomato-exit-hold-tip {
    width: 100%;
    max-width: 320px;
    min-height: 52px;
    border: none;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.tomato-next-stage-btn {
    margin-top: 16px;
    background: rgba(241, 171, 171, 0.95);
    color: #fff;
    box-shadow: 0 10px 20px rgba(185, 113, 113, 0.2);
}

.tomato-exit-hold-tip {
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.tomato-break-title,
.tomato-finish-title {
    margin-top: 150px;
    color: #7e4f4f;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.tomato-break-actions {
    margin-top: 18px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.tomato-break-btn.continue {
    color: #fff;
    background: rgba(222, 136, 136, 0.95);
}

.tomato-break-btn.home {
    color: #6b4343;
}

.tomato-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.tomato-modal.active {
    display: flex;
}

.tomato-modal-card {
    width: 86%;
    background: #fff;
    border-radius: 18px;
    padding: 18px 16px 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.tomato-modal-title {
    text-align: center;
    color: #4f3a3a;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.tomato-role-list {
    max-height: 270px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.tomato-role-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 6px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

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

.tomato-role-item.selected {
    background: #fff0f0;
    border-radius: 10px;
}

.tomato-role-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #f2f2f2;
}

.tomato-role-name {
    color: #5b4141;
    font-size: 15px;
    font-weight: 600;
}

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

.tomato-modal-btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 11px 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.tomato-modal-btn.cancel {
    background: #efefef;
    color: #555;
}

.tomato-modal-btn.confirm {
    background: #ec9898;
    color: #fff;
}

.tomato-setting-row {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: #5b4141;
    font-size: 14px;
}

.tomato-setting-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

#tomato-msg-interval-input {
    width: 70px;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 8px 6px;
    text-align: center;
    font-weight: 700;
    color: #634343;
    outline: none;
}

/* --- 游戏 App（合成大西瓜） --- */
#app-game {
    background: linear-gradient(180deg, #fff6dc 0%, #ffe7b5 100%);
}

.game-header {
    background: rgba(255, 247, 223, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.game-settings-top-btn {
    font-size: 20px;
    justify-content: center;
}

.game-content {
    background: transparent;
    padding: 14px;
}

.game-view {
    display: none;
    height: 100%;
}

.game-view.active {
    display: block;
}

.game-select-title {
    margin-top: 12px;
    text-align: center;
    color: #7a5d20;
    font-size: 24px;
    font-weight: 800;
}

.game-select-subtitle {
    text-align: center;
    color: #9a7a34;
    font-size: 13px;
    margin-top: 6px;
    margin-bottom: 20px;
}

.suika-entry-card {
    width: 100%;
    margin-top: 16px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.42);
    border-radius: 24px;
    min-height: 108px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 14px 30px rgba(150, 116, 40, 0.12);
}

.suika-entry-emoji {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.66);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.suika-entry-text {
    display: flex;
    flex-direction: column;
    color: #6f531b;
    text-align: left;
}

.suika-entry-text strong {
    font-size: 20px;
}

.suika-entry-text small {
    margin-top: 2px;
    font-size: 12px;
    color: #9a7a34;
}

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

.suika-score-box {
    color: #6f531b;
    font-size: 16px;
    font-weight: 800;
}

.suika-small-btn {
    border: 1px solid rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.55);
    color: #6f531b;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.suika-board-wrap {
    position: relative;
    width: 100%;
    height: calc(100% - 46px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.34);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 14px 30px rgba(129, 98, 31, 0.14);
    touch-action: none;
}

#suika-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.suika-overflow-line {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 92px;
    border-top: 2px dashed rgba(225, 119, 88, 0.75);
    color: rgba(190, 94, 66, 0.92);
    font-size: 11px;
    font-weight: 700;
    padding-top: 4px;
    text-align: right;
    pointer-events: none;
}

.suika-next-ball-tip {
    position: absolute;
    left: 12px;
    top: 54px;
    color: #aa7d2b;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    padding: 4px 8px;
    pointer-events: none;
}

.suika-game-over {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(120, 90, 20, 0.22);
}

.suika-game-over.active {
    display: flex;
}

.suika-game-over-card {
    width: 82%;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.96);
    background: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 18px 14px 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.suika-game-over-title {
    color: #7e5d21;
    font-size: 22px;
    font-weight: 800;
}

.suika-game-over-score {
    margin-top: 10px;
    color: #8f6b28;
    font-size: 15px;
    font-weight: 700;
}

.suika-game-over-actions {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.suika-settings-modal {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.24);
    z-index: 60;
}

.suika-settings-modal.active {
    display: flex;
}

.suika-settings-card {
    width: 88%;
    max-height: 80%;
    overflow-y: auto;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.94);
    background: rgba(255, 248, 226, 0.88);
    padding: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.suika-settings-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #7d5f25;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 10px;
}

.suika-close-btn {
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    color: #856427;
    background: rgba(255, 255, 255, 0.76);
    font-size: 18px;
    line-height: 1;
}

.suika-ball-settings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.suika-ball-upload-row {
    display: grid;
    grid-template-columns: 56px 1fr 150px;
    align-items: center;
    gap: 8px;
    border-radius: 14px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.7);
}

.suika-ball-upload-preview {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff2cf;
    border: 1px solid rgba(154, 122, 52, 0.25);
}

.suika-ball-upload-label {
    color: #7f6127;
    font-size: 13px;
    font-weight: 700;
}

.suika-ball-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.suika-ball-upload-row input[type="file"] {
    font-size: 11px;
}

.suika-clear-upload-btn {
    border: 1px solid rgba(161, 127, 52, 0.35);
    border-radius: 10px;
    background: rgba(255, 248, 224, 0.9);
    color: #7d5f24;
    font-size: 11px;
    line-height: 1.2;
    padding: 6px 8px;
    cursor: pointer;
}

/* --- 钱包 App --- */
#app-wallet {
    background: #fff;
    position: relative;
}

.wallet-main-shell,
.wallet-detail-shell {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: #fff;
}

.wallet-main-shell {
    display: flex;
    flex-direction: column;
}

.wallet-detail-shell {
    display: none;
    flex-direction: column;
}

.wallet-detail-shell.active {
    display: flex;
}

.wallet-top-right {
    position: absolute;
    top: 58px;
    right: 16px;
    color: rgb(90, 156, 194);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.wallet-top-left-back {
    position: absolute;
    top: 54px;
    left: 12px;
    border: none;
    background: transparent;
    color: rgb(90, 156, 194);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.wallet-main-center {
    margin-top: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.wallet-balance-circle {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: rgb(90, 156, 194);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    font-weight: 700;
}

.wallet-balance-label {
    font-size: 18px;
    color: #333;
}

.wallet-balance-amount {
    font-size: 38px;
    font-weight: 700;
    color: #111;
    letter-spacing: 0.4px;
}

.wallet-main-actions {
    margin-top: auto;
    padding: 0 20px 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-action-btn {
    border: none;
    border-radius: 16px;
    height: 52px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}

.wallet-action-btn.recharge {
    background: rgb(90, 156, 194);
    color: #fff;
}

.wallet-action-btn.withdraw {
    background: #ececec;
    color: #333;
}

.wallet-detail-header {
    height: 88px;
    padding: 44px 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.wallet-detail-back,
.wallet-detail-placeholder {
    width: 48px;
}

.wallet-detail-back {
    border: none;
    background: transparent;
    color: rgb(90, 156, 194);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    padding: 0;
}

.wallet-detail-title {
    font-size: 17px;
    font-weight: 700;
    color: #222;
}

.wallet-detail-list {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px 18px;
}

.wallet-empty-record {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 30px 10px;
}

.wallet-month-card {
    background: #f4f4f4;
    border-radius: 16px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.wallet-month-title {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    margin-bottom: 6px;
}

.wallet-record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid #e3e3e3;
}

.wallet-month-card .wallet-record-item:first-of-type {
    border-top: none;
}

.wallet-record-left {
    min-width: 0;
}

.wallet-record-feature {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
}

.wallet-record-time {
    font-size: 12px;
    color: #888;
}

.wallet-record-right {
    text-align: right;
}

.wallet-record-change {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.wallet-record-change.income {
    color: rgb(90, 156, 194);
}

.wallet-record-change.expense {
    color: #333;
}

.wallet-record-balance {
    font-size: 12px;
    color: #888;
}

.wallet-action-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    z-index: 760;
    padding: 0 20px;
}

.wallet-action-modal.active {
    display: flex;
}

.wallet-action-modal-card {
    width: 100%;
    background: #fff;
    border-radius: 14px;
    padding: 16px;
}

.wallet-action-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 12px;
    text-align: center;
}

.wallet-action-input {
    width: 100%;
    border: 1px solid #dedede;
    border-radius: 10px;
    height: 42px;
    padding: 0 12px;
    font-size: 16px;
    margin-bottom: 14px;
}

.wallet-action-modal-btns {
    display: flex;
    gap: 10px;
}

.wallet-modal-btn {
    flex: 1;
    border: none;
    border-radius: 10px;
    height: 42px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.wallet-modal-btn.cancel {
    background: #ececec;
    color: #333;
}

.wallet-modal-btn.confirm {
    background: rgb(90, 156, 194);
    color: #fff;
}

/* --- 购物 App --- */
#app-shopping {
    background: #fff;
}

.shopping-header {
    height: 88px;
    padding: 44px 14px 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-bottom: 1px solid #eee;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 20;
}

.shopping-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 700;
    color: #111;
    pointer-events: none;
}

.shopping-back-btn,
.shopping-add-btn {
    border: none;
    background: transparent;
    color: #111;
    font-size: 16px;
    font-weight: 600;
    min-width: 52px;
    height: 36px;
    cursor: pointer;
}

.shopping-add-btn {
    font-size: 28px;
    line-height: 1;
    font-weight: 400;
    min-width: 34px;
    width: 34px;
}

.shopping-content {
    flex: 1;
    overflow-y: auto;
    background: #fff;
    padding: 14px 12px 70px;
}

.shopping-empty {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-top: 24px;
}

.shopping-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shopping-item {
    width: 100%;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    padding: 10px;
    cursor: pointer;
}

.shopping-item-cover {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    background: rgb(90, 156, 194);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
    padding: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

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

.shopping-item-title {
    margin-top: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #111;
    text-align: left;
}

.shopping-item-price {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    text-align: left;
}

.shopping-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    z-index: 780;
    padding: 0 18px;
}

.shopping-modal.active {
    display: flex;
}

.shopping-modal-card {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    max-height: 82%;
    overflow-y: auto;
}

.shopping-custom-card {
    padding-bottom: 14px;
}

.shopping-modal-title {
    text-align: center;
    font-size: 18px;
    color: #111;
    font-weight: 700;
    margin-bottom: 14px;
}

.shopping-option-btn,
.shopping-cancel-btn,
.shopping-confirm-btn {
    width: 100%;
    height: 42px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    cursor: pointer;
}

.shopping-option-btn {
    background: #f2f5f8;
    color: #222;
    margin-bottom: 8px;
    text-align: left;
    padding: 0 12px;
}

.shopping-cancel-btn {
    background: #ececec;
    color: #333;
    margin-top: 6px;
}

.shopping-confirm-btn {
    background: rgb(90, 156, 194);
    color: #fff;
}

.shopping-role-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shopping-role-item {
    width: 100%;
    border: 1px solid #ececec;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
}

.shopping-form-label {
    display: block;
    font-size: 13px;
    color: #444;
    margin: 8px 0 6px;
}

.shopping-form-input,
.shopping-form-textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    font-size: 14px;
    color: #111;
    background: #fff;
}

.shopping-form-textarea {
    min-height: 90px;
    resize: none;
}

.shopping-custom-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.shopping-custom-actions .shopping-cancel-btn,
.shopping-custom-actions .shopping-confirm-btn {
    margin-top: 0;
}

.shopping-detail-text {
    font-size: 14px;
    color: #222;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 60px;
}

.shopping-header-actions {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.shopping-delete-btn,
.shopping-purchased-btn {
    border: none;
    background: transparent;
    color: #555;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.shopping-delete-btn.active {
    color: #ff3b30;
}

.shopping-delete-btn svg,
.shopping-purchased-btn svg {
    width: 20px;
    height: 20px;
}

.shopping-delete-toolbar {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    display: none;
    gap: 8px;
    background: #fff;
    border-top: 1px solid #ececec;
    padding: 10px 12px 20px;
    z-index: 60;
}

.shopping-delete-toolbar.active {
    display: flex;
}

.shopping-delete-cancel,
.shopping-delete-confirm {
    flex: 1;
    height: 40px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.shopping-delete-cancel {
    background: #ececec;
    color: #333;
}

.shopping-delete-confirm {
    background: #ff3b30;
    color: #fff;
}

.shopping-item {
    position: relative;
}

.shopping-item-select {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 18px;
    height: 18px;
    z-index: 4;
    accent-color: rgb(90, 156, 194);
}

.shopping-item.adding-space {
    padding-bottom: 44px;
}

.shopping-add-cart-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border: none;
    border-radius: 8px;
    background: rgb(90, 156, 194);
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    cursor: pointer;
}

.shopping-cart-fab {
    position: absolute;
    right: 12px;
    bottom: 82px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: rgb(90, 156, 194);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 70;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    touch-action: none;
}

.shopping-cart-fab svg {
    width: 25px;
    height: 25px;
}

.shopping-cart-list,
.shopping-checkout-list {
    max-height: 52vh;
    overflow-y: auto;
}

.shopping-cart-item,
.shopping-checkout-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #efefef;
    font-size: 14px;
    color: #222;
}

.shopping-cart-price,
.shopping-checkout-price {
    font-weight: 700;
}

.shopping-cart-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.shopping-cart-checkout-btn {
    width: 100px;
}

.shopping-checkout-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 85;
    display: none;
    flex-direction: column;
}

.shopping-checkout-view.active {
    display: flex;
}

.shopping-checkout-header {
    height: 88px;
    padding-top: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eee;
    position: relative;
}

.shopping-checkout-title {
    font-size: 18px;
    font-weight: 700;
}

.shopping-checkout-list {
    flex: 1;
    padding: 12px 12px 96px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shopping-checkout-bottom {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    border-top: 1px solid #ececec;
    background: #fff;
    padding: 10px 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shopping-checkout-back-btn,
.shopping-checkout-pay-btn {
    height: 38px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.shopping-checkout-back-btn {
    width: 76px;
    background: #ececec;
    color: #333;
}

.shopping-checkout-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.shopping-checkout-total {
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.shopping-checkout-pay-btn {
    min-width: 62px;
    padding: 0 10px;
    background: rgb(90, 156, 194);
    color: #fff;
}

.shopping-checkout-agent-btn {
    height: 38px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-width: 84px;
    padding: 0 12px;
    background: #eef3f7;
    color: #2b4f66;
}

.shopping-purchased-back-btn {
    position: absolute;
    left: 12px;
    top: 48px;
    border: none;
    background: transparent;
    color: #111;
    font-size: 15px;
    font-weight: 600;
    height: 30px;
    cursor: pointer;
}

.shopping-gift-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border: none;
    border-radius: 8px;
    background: #f1f5f8;
    color: #315a73;
    font-size: 12px;
    padding: 6px 10px;
    cursor: pointer;
}
