body {
    background: url('/image/firefly_cg/?mode=pc') center/cover no-repeat fixed;
    min-height: 100vh;
}
:root {
    --bg: #d4d4d4;
    --tab-bg: #cbcbcb;
    --tab-active: #d4d4d4;
    --header-bg: #d4d4d4;
    --border: #c0c0c0;
    --chat-bg: #d4d4d4;
    --bubble-left: #e7e7e7;
    --bubble-right: #d2bc95;
    --text: #1e1a16;
    --text-dark: #2c241a;
    --input-bg: #f2efe8;
    --send-btn: #a48d6e;
    --settings-bg: #fef9f0;
    --settings-text: #3f3324;
    --toast-bg: #2c241a;
    --toast-text: #f5efe7;
    --progress-bar: #c7af8b;
}
.theme-dark {
    --bg: #1a1a2e; --tab-bg: #16213e; --tab-active: #1a1a2e; --header-bg: #1a1a2e;
    --border: #0f3460; --chat-bg: #1a1a2e; --bubble-left: #2a2a3e; --bubble-right: #4a3a2a;
    --text: #e0e0e0; --text-dark: #f5f5f5; --input-bg: #2a2a3e; --send-btn: #5a4a3a;
    --settings-bg: #2a2a3e; --settings-text: #e0e0e0; --toast-bg: #e0e0e0; --toast-text: #1a1a2e; --progress-bar: #5a4a3a;
}
.theme-firefly {
    --bg: linear-gradient(135deg, #4cc3c6, #7dc8a4);
    --tab-bg: rgba(255, 255, 255, 0.4);
    --tab-active: rgba(255, 255, 255, 0.7);
    --header-bg: rgba(255, 255, 255, 0.3);
    --border: rgba(0, 0, 0, 0.1);
    --chat-bg: transparent;
    --bubble-left: rgba(255, 255, 255, 0.75);
    --bubble-right: rgba(76, 195, 198, 0.3);
    --text: #1a1a2e;
    --text-dark: #0d1b2a;
    --input-bg: rgba(255, 255, 255, 0.5);
    --send-btn: #f6b65b;
    --settings-bg: rgba(255, 255, 255, 0.92);
    --settings-text: #1a1a2e;
    --toast-bg: #1a1a2e;
    --toast-text: #f5efe7;
    --progress-bar: #f6b65b;
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
.aigc-module { width:100%; max-width:500px; margin:0 auto; background:var(--bg); height:100vh; height:100dvh; display:flex; flex-direction:column; border-radius:28px; overflow:hidden; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Roboto,sans-serif; box-shadow:0 8px 28px rgba(0,0,0,0.12); position:relative; }
/* 手机壁纸 */
/*.aigc-module::before {*/
/*    content: '';*/
/*    position: absolute;*/
/*    inset: 0;*/
/*    z-index: 0;*/
/*    background: url('https://likefirefly.com/image/firefly_cg/?mode=pc') center/cover no-repeat;*/
/*    opacity: 0.15;          */
/*    pointer-events: none;   */
/*    border-radius: inherit; */
/*}*/
.theme-firefly .aigc-module { background-image:var(--bg); border:1px solid rgba(255,255,255,0.3); box-shadow:0 0 20px rgba(76,195,198,0.3); }
.toast-container { position:absolute; top:70px; right:12px; z-index:10010; display:flex; flex-direction:column; gap:8px; max-width:280px; }
.toast-message { background:var(--toast-bg); border-radius:16px; padding:10px 14px; color:var(--toast-text); font-size:13px; box-shadow:0 4px 12px rgba(0,0,0,0.3); backdrop-filter:blur(8px); position:relative; overflow:hidden; cursor:pointer; transition:0.2s; }
.toast-message:hover { transform:scale(1.02); }
.toast-content { display:flex; align-items:center; gap:10px; }
.toast-content img { width:20px; height:20px; flex-shrink:0; }
.toast-text { flex:1; word-break:break-word; }
.toast-close { background:none; border:none; color:inherit; cursor:pointer; font-size:16px; padding:0 4px; opacity:0.7; }
.toast-progress { position:absolute; bottom:0; left:0; height:3px; background:var(--progress-bar); width:100%; transition:width 0.05s linear; }
.aigc-tabs { display:flex; background:var(--tab-bg); border-bottom:1px solid var(--border); }
.tab-item { flex:1; text-align:center; padding:14px 0; font-weight:600; font-size:16px; color:inherit; cursor:pointer; transition:0.2s; background:transparent; border-bottom:2px solid transparent; opacity:0.7; }
.tab-item.active { background:var(--tab-active); border-bottom:2px solid #7f6148; color:var(--text-dark); opacity:1; }
.tab-content { flex:1; overflow:hidden; background:transparent; display:flex; flex-direction:column; }
.tab-pane { display:none; flex:1; flex-direction:column; height:100%; overflow-y: auto; }
.tab-pane.active-pane { display:flex; }
.chat-header-compact { padding:12px 16px; background:var(--header-bg); border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
.contact-info { display:flex; align-items:center; gap:12px; }
.contact-avatar { width:44px; height:44px; border-radius:50%; object-fit:cover; background:#bcae9a; border:1px solid #aa947a; }
.contact-name h3 { font-size:18px; font-weight:620; color:var(--text-dark); }
.contact-name p { font-size:11px; color:var(--text); opacity:0.7; }
.settings-icon { background:transparent; border:none; font-size:24px; cursor:pointer; color:inherit; padding:6px; border-radius:50%; }
.chat-messages { flex:1; overflow-y:auto; padding:16px 14px; display:flex; flex-direction:column; gap:14px; background:var(--chat-bg); }
.message-row { display:flex; align-items:flex-start; gap:8px; max-width:85%; position:relative; }
.msg-left { align-self:flex-start; flex-direction:row; }
.msg-right { align-self:flex-end; flex-direction:row-reverse; }
.msg-avatar { width:36px; height:36px; border-radius:50%; object-fit:cover; flex-shrink:0; cursor:pointer; background:#cdc2b2; }
.bubble { padding:10px 14px; font-size:15px; line-height:1.45; word-break:break-word; border-radius:20px; box-shadow:0 1px 1px rgba(0,0,0,0.05); position:relative; }
.msg-left .bubble { background:var(--bubble-left); border-top-left-radius:5px; color:var(--text); }
.msg-right .bubble { background:var(--bubble-right); border-top-right-radius:5px; color:var(--text-dark); }
.emoticon-image { max-width:68px; max-height:68px; border-radius:16px; vertical-align:middle; display:inline-block; margin:2px 4px; }
.msg-delete-btn { position:absolute; top:-8px; right:-8px; background:rgba(0,0,0,0.6); color:#fff; border:none; border-radius:50%; width:20px; height:20px; font-size:12px; line-height:1; cursor:pointer; display:none; z-index:5; }
.message-row:hover .msg-delete-btn { display:block; }
.msg-actions { display:flex; gap:4px; margin-top:4px; } .msg-action-btn { background:none; border:none; cursor:pointer; padding:2px; display:flex; align-items:center; }
.typing-indicator { display:flex; gap:6px; padding:8px 12px; background:var(--bubble-left); border-radius:24px; width:fit-content; }
.dot { width:7px; height:7px; background:#9b8c78; border-radius:50%; animation:pulse 1.2s infinite; }
@keyframes pulse { 0%,60%,100%{ opacity:0.5; transform:translateY(0); } 30%{ opacity:1; transform:translateY(-5px); } }
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.chat-input-area { background:var(--tab-bg); padding:12px 14px 18px; display:flex; align-items:center; gap:12px; border-top:1px solid var(--border); }
.input-wrapper { flex:1; background:var(--input-bg); border-radius:28px; padding:6px 16px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-height:48px; }
.input-editor { flex:1; border:none; background:transparent; font-size:15px; outline:none; font-family:inherit; padding:8px 0; max-height:120px; overflow-y:auto; line-height:1.4; color:var(--text); }
.input-editor:empty:before { content:attr(placeholder); color:var(--text); opacity:0.5; }
.input-emoticon-img { max-width:32px; max-height:32px; border-radius:8px; vertical-align:middle; margin:0 2px; }
.emoji-svg-btn { background:none; border:none; display:flex; align-items:center; justify-content:center; cursor:pointer; padding:4px; border-radius:50%; }
.send-btn { background:var(--send-btn); border:none; border-radius:50%; width:44px; height:44px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:white; font-size:20px; }
.send-btn.pause { background:#d4a5a5; }
.emoji-panel { position:absolute; bottom:90px; left:16px; right:16px; background:#fef7ef; border-radius:32px; padding:14px; display:flex; flex-wrap:wrap; gap:12px; box-shadow:0 6px 20px rgba(0,0,0,0.25); z-index:210; border:1px solid #dac29c; }
.emoji-panel img { width:58px; border-radius:16px; cursor:pointer; transition:0.1s; }
.settings-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.5); backdrop-filter:blur(4px); z-index:1000; display:flex; align-items:center; justify-content:center; }
.settings-card { width:450px; max-width:90vw; background:var(--settings-bg); border-radius:32px; padding:24px 22px; max-height:85vh; overflow-y:auto; box-shadow:0 20px 35px rgba(0,0,0,0.3); color:var(--settings-text); }
.settings-section { margin-bottom:24px; border-bottom:1px solid var(--border); padding-bottom:16px; }
.settings-section h4 { font-size:16px; margin-bottom:14px; display:flex; align-items:center; gap:8px; color:inherit; }
.setting-field { margin-bottom:16px; position:relative; }
.setting-field label { font-weight:600; display:flex; justify-content:space-between; align-items:center; font-size:13px; margin-bottom:6px; color:inherit; }
.help-icon { background:rgba(0,0,0,0.2); border-radius:50%; display:inline-flex; width:18px; height:18px; align-items:center; justify-content:center; font-size:11px; cursor:help; margin-left:8px; }
.help-icon[data-tip]:hover::after { content:attr(data-tip); position:absolute; background:#2c241a; color:#f2e3d4; font-size:11px; white-space:normal; right:0; top:-28px; padding:4px 10px; border-radius:16px; z-index:20; max-width:220px; }
input,select,textarea { background:var(--input-bg); border:1px solid var(--border); padding:9px 14px; border-radius:28px; width:100%; font-size:13px; outline:none; color:var(--text); }
textarea { resize: vertical; overflow: auto; }
.flex-btns { display:flex; gap:12px; justify-content:flex-end; margin-top:8px; }
.btn-sec { background:#e5d5c2; border:none; padding:8px 18px; border-radius:40px; font-weight:500; cursor:pointer; color:#2c241a; }
.btn-primary { background:#c7af8b; color:white; }
.btn-danger { background:#d4a5a5; color:#4a2a2a; }
.conv-list { max-height:180px; overflow-y:auto; border:1px solid var(--border); border-radius:20px; margin:8px 0; background:var(--input-bg); }
.conv-item { padding:10px 14px; border-bottom:1px solid var(--border); cursor:pointer; display:flex; justify-content:space-between; align-items:center; }
.conv-item:last-child { border-bottom:none; } .conv-item:hover { background:rgba(0,0,0,0.05); } .conv-item.active { background:rgba(0,0,0,0.1); }
.conv-delete { color:#b09b82; cursor:pointer; font-size:18px; padding:0 5px; }
.avatar-select { display:flex; gap:12px; align-items:center; } .avatar-option { width:40px; height:40px; border-radius:50%; cursor:pointer; border:2px solid transparent; } .avatar-option.selected { border-color:#c7af8b; }
.model-select-with-btn { display:flex; gap:8px; align-items:center; flex-wrap:wrap; } .model-select-with-btn select,.model-select-with-btn input { flex:2; min-width:150px; } .model-select-with-btn button { flex:0 0 auto; padding:8px 12px; background:#e5d5c2; border:none; border-radius:28px; cursor:pointer; font-size:12px; white-space:nowrap; }
.coming-soon { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; color:var(--text); padding:32px; text-align:center; }
.auth-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.5); backdrop-filter:blur(4px); z-index:10004; display:flex; align-items:center; justify-content:center; }
.auth-card { background:var(--settings-bg); border-radius:32px; padding:24px 22px; max-width:400px; width:90%; box-shadow:0 20px 35px rgba(0,0,0,0.3); }
.auth-tabs { display:flex; margin-bottom:20px; } .auth-tab { flex:1; text-align:center; padding:8px; cursor:pointer; border-bottom:2px solid var(--border); font-weight:600; color:inherit; opacity:0.6; } .auth-tab.active { border-bottom-color:#a48d6e; opacity:1; }
.auth-form { display:none; } .auth-form.active { display:block; } .auth-field { margin-bottom:14px; } .auth-field label { font-weight:600; display:block; margin-bottom:4px; color:inherit; } .auth-field input { width:100%; padding:9px 14px; border-radius:28px; border:1px solid var(--border); background:var(--input-bg); color:var(--text); }
.auth-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:16px; } .btn-auth { padding:8px 20px; border-radius:40px; border:none; cursor:pointer; font-weight:500; } .btn-auth.btn-primary { background:#c7af8b; color:white; } .btn-auth.btn-sec { background:#e5d5c2; color:#2c241a; }
.user-status-row { display:flex; align-items:center; gap:12px; margin-bottom:14px; flex-wrap: wrap;} .user-avatar-icon { width:40px; height:40px; border-radius:50%; object-fit:cover; } .user-info { flex:1; } .user-info .name { font-weight:600; color:inherit; } .user-info .detail { font-size:12px; opacity:0.7; } .user-actions { display:flex; gap:6px; flex-wrap:wrap; width: 100%; justify-content: flex-end; margin-top: 4px;}
.toggle-switch { appearance:none; -webkit-appearance:none; width:44px; height:24px; border-radius:12px; background:#ccc; position:relative; outline:none; cursor:pointer; transition:background 0.2s; }
.toggle-switch:checked { background:var(--send-btn,#c7af8b); } .toggle-switch::before { content:''; position:absolute; top:2px; left:2px; width:20px; height:20px; border-radius:50%; background:white; transition:0.2s; } .toggle-switch:checked::before { left:22px; }
.theme-firefly .contact-name h3 { background:-webkit-linear-gradient(left, rgb(66,85,116), rgb(80,132,148), rgb(101,134,108), rgb(60,150,156), rgb(113,172,175), rgb(76,195,198), rgb(125,200,164), rgb(159,208,138), rgb(223,228,130), rgb(238,232,157), rgb(232,227,144), rgb(246,182,91), rgb(231,122,34), rgb(211,83,3)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; text-shadow:rgb(76,195,198) 0.25vh 0.25vh 0.9vh; }
.dot-spinner { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.dot-spinner .dot { width: 8px; height: 8px; background: var(--text); opacity: 0.4; border-radius: 50%; animation: dotPulse 1.2s infinite ease-in-out; }
.dot-spinner .dot:nth-child(2) { animation-delay: 0.2s; }
.dot-spinner .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
  40% { transform: scale(1.2); opacity: 1; }
}
.loading-overlay { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; }
/* 新手教程样式 */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tutorial-spotlight {
    position: absolute;
    z-index: 10001;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
    pointer-events: none;
    transition: all 0.3s ease;
}
.tutorial-box {
    position: absolute;
    background: var(--settings-bg, #fef9f0);
    color: var(--settings-text, #3f3324);
    border-radius: 20px;
    padding: 20px 22px;
    max-width: 280px;
    font-size: 14px;
    line-height: 1.5;
    z-index: 10001;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
}
.tutorial-box h4 {
    margin-bottom: 10px;
    font-size: 16px;
}
.tutorial-box p {
    margin-bottom: 14px;
    opacity: 0.85;
}
.tutorial-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.tutorial-actions button {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}
.tutorial-next {
    background: var(--send-btn, #a48d6e);
    color: white;
}
.tutorial-skip {
    background: transparent;
    color: var(--text, #333);
    border: 1px solid var(--border, #ccc);
}