/* ============================================
   AI女友网页 - 微信风格CSS
   版本: 1.0.0
   ============================================ */

/* === 重置与基础 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: #191919;
    background: #ededed;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

input, textarea, button {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
    background: none;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.hidden {
    display: none !important;
}

/* === 登录注册页 === */
#page-auth {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#page-auth.active {
    display: flex;
}

.auth-container {
    width: 90%;
    max-width: 360px;
    background: #fff;
    border-radius: 16px;
    padding: 40px 24px 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo .auth-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 12px;
    object-fit: cover;
    background: #f0f0f0;
}

.auth-logo h2 {
    font-size: 20px;
    font-weight: 600;
    color: #07c160;
}

.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e5e5;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 15px;
    color: #999;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.auth-tab.active {
    color: #07c160;
    font-weight: 600;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #07c160;
    border-radius: 2px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 15px;
    color: #191919;
    transition: background 0.2s;
}

.auth-form input:focus {
    background: #e8f5e9;
}

.auth-form input::placeholder {
    color: #bbb;
}

.btn-primary {
    width: 100%;
    height: 44px;
    background: #07c160;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-primary:active {
    opacity: 0.85;
    transform: scale(0.98);
}

.btn-danger {
    width: 100%;
    height: 44px;
    background: #fa5151;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-danger:active {
    opacity: 0.85;
}

/* === 主容器 === */
.app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ededed;
}

/* === 顶部标题栏 === */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 48px;
    background: #ededed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 0.5px solid rgba(0,0,0,0.05);
}

.header h1 {
    font-size: 17px;
    font-weight: 600;
    color: #191919;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right img {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.header-action {
    color: #07c160;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

/* === 内容区 === */
.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.page-content {
    display: none;
    min-height: 100%;
}

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

/* === 底部导航栏 === */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: rgba(247,247,247,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    border-top: 0.5px solid rgba(0,0,0,0.06);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    padding: 6px 0;
    position: relative;
    transition: transform 0.1s;
}

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

.tab-item .tab-icon {
    width: 24px;
    height: 24px;
}

.tab-item .active-icon {
    display: none;
}

.tab-item.active .tab-icon:not(.active-icon) {
    display: none;
}

.tab-item.active .active-icon {
    display: block;
}

.tab-item span {
    font-size: 10px;
    color: #999;
}

.tab-item.active span {
    color: #07c160;
}

/* === 聊天列表 === */
.chat-list {
    padding: 0;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 0.5px solid #e5e5e5;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.chat-item:active {
    background: #d9d9d9;
}

.chat-item .avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
    flex-shrink: 0;
}

.chat-item .chat-info {
    flex: 1;
    margin-left: 12px;
    overflow: hidden;
}

.chat-item .chat-name {
    font-size: 16px;
    font-weight: 500;
    color: #191919;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item .chat-preview {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item .chat-time {
    font-size: 12px;
    color: #b2b2b2;
    position: absolute;
    top: 14px;
    right: 16px;
}

/* === 通讯录 === */
.contact-list {
    padding: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 0.5px solid #e5e5e5;
    cursor: pointer;
    transition: background 0.15s;
}

.contact-item:active {
    background: #d9d9d9;
}

.contact-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
    flex-shrink: 0;
}

.contact-item .contact-info {
    flex: 1;
    margin-left: 12px;
}

.contact-item .contact-name {
    font-size: 16px;
    color: #191919;
}

.contact-item .contact-desc {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

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

.contact-item .contact-actions img {
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0.5;
}

.contact-section-title {
    padding: 8px 16px;
    font-size: 13px;
    color: #999;
    background: #ededed;
}

.add-persona-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 0.5px solid #e5e5e5;
    cursor: pointer;
    color: #07c160;
    font-size: 15px;
    gap: 8px;
}

.add-persona-btn:active {
    background: #d9d9d9;
}

.add-persona-btn img {
    width: 20px;
    height: 20px;
}

/* === 聊天页 === */
.page-full {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #ededed;
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-full.show {
    transform: translateX(0);
}

.chat-header {
    height: 48px;
    background: #ededed;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 0.5px solid rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.chat-back {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-back img {
    width: 20px;
    height: 20px;
}

.chat-header span {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
}

.chat-header-right {
    width: 32px;
    display: flex;
    justify-content: flex-end;
}

.chat-header-right img {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

/* === 聊天消息区 === */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 85%;
    animation: msgFadeIn 0.3s ease;
}

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

.msg-row.msg-right {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-row .msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
    flex-shrink: 0;
}

.msg-bubble {
    position: relative;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-all;
    max-width: 100%;
}

.msg-row:not(.msg-right) .msg-bubble {
    background: #fff;
    color: #191919;
}

.msg-row:not(.msg-right) .msg-bubble::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 12px;
    width: 0; height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #fff;
}

.msg-row.msg-right .msg-bubble {
    background: #95ec69;
    color: #191919;
}

.msg-row.msg-right .msg-bubble::before {
    content: '';
    position: absolute;
    right: -6px;
    top: 12px;
    width: 0; height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid #95ec69;
}

.msg-bubble.msg-image {
    padding: 4px;
    background: #fff !important;
}

.msg-bubble.msg-image img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 6px;
    cursor: pointer;
}

.msg-row.msg-right .msg-bubble.msg-image {
    background: #95ec69 !important;
}

.msg-bubble.msg-voice {
    min-width: 80px;
    cursor: pointer;
}

.msg-bubble.msg-voice::after {
    content: '';
    display: inline-block;
    width: 0; height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid #999;
    margin-left: 6px;
    vertical-align: middle;
}

.msg-row.msg-right .msg-bubble.msg-voice::after {
    border-left-color: #191919;
}

.msg-time-divider {
    text-align: center;
    font-size: 12px;
    color: #b2b2b2;
    padding: 4px 0;
}

.msg-loading {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.msg-loading .dot {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.msg-loading .dot:nth-child(2) { animation-delay: 0.2s; }
.msg-loading .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* === 聊天输入栏 === */
.chat-input-bar {
    display: flex;
    align-items: flex-end;
    padding: 8px 10px;
    background: #f7f7f7;
    border-top: 0.5px solid rgba(0,0,0,0.06);
    gap: 6px;
    flex-shrink: 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.chat-input-left, .chat-input-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.chat-tool-icon {
    width: 28px;
    height: 28px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.chat-tool-icon:active {
    opacity: 1;
}

#chat-input {
    flex: 1;
    min-height: 36px;
    max-height: 100px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 6px;
    font-size: 15px;
    color: #191919;
    resize: none;
    line-height: 1.4;
}

#chat-input:focus {
    background: #fff;
}

.btn-send {
    width: 56px;
    height: 36px;
    background: #07c160;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-send:active {
    opacity: 0.85;
    transform: scale(0.96);
}

/* === 更多功能面板 === */
.chat-extra-panel {
    display: flex;
    gap: 20px;
    padding: 16px 20px;
    background: #f7f7f7;
    border-top: 0.5px solid rgba(0,0,0,0.06);
    flex-shrink: 0;
    justify-content: center;
}

.extra-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.extra-item:active {
    opacity: 0.7;
}

.extra-item img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
}

.extra-item span {
    font-size: 12px;
    color: #999;
}

/* === 语音录制面板 === */
.voice-record-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f7f7f7;
    border-top: 0.5px solid rgba(0,0,0,0.06);
    flex-shrink: 0;
}

.voice-record-tip {
    font-size: 14px;
    color: #999;
    margin-bottom: 16px;
}

.voice-record-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #07c160;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.voice-record-btn.recording {
    animation: recordPulse 1.5s ease-in-out infinite;
}

@keyframes recordPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(7,193,96,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(7,193,96,0); }
}

.voice-record-btn img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

/* === 朋友圈 === */
.moments-container {
    padding: 0;
}

.moment-item {
    background: #fff;
    margin-bottom: 10px;
    padding: 14px 16px;
}

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

.moment-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
}

.moment-header .moment-name {
    font-size: 15px;
    font-weight: 600;
    color: #576b95;
}

.moment-content {
    font-size: 15px;
    line-height: 1.6;
    color: #191919;
    margin-bottom: 10px;
    padding-left: 50px;
}

.moment-images {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-left: 50px;
    margin-bottom: 10px;
}

.moment-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

.moment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 50px;
}

.moment-time {
    font-size: 12px;
    color: #b2b2b2;
}

.moment-actions {
    display: flex;
    gap: 16px;
}

.moment-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #576b95;
    transition: opacity 0.2s;
}

.moment-action-btn:active {
    opacity: 0.6;
}

.moment-action-btn img {
    width: 16px;
    height: 16px;
}

.moment-action-btn.liked {
    color: #fa5151;
}

.moment-comments {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-left: 50px;
}

.moment-comment {
    font-size: 13px;
    line-height: 1.6;
    color: #576b95;
    margin-bottom: 4px;
}

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

.moment-comment .comment-user {
    font-weight: 600;
}

/* === 我的页面 === */
.me-container {
    padding: 0;
}

.me-header {
    display: flex;
    align-items: center;
    padding: 20px 16px;
    background: #fff;
    margin-bottom: 10px;
    cursor: pointer;
}

.me-header:active {
    background: #d9d9d9;
}

.me-header .avatar {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
}

.me-header .me-info {
    flex: 1;
    margin-left: 14px;
}

.me-header .me-name {
    font-size: 18px;
    font-weight: 600;
    color: #191919;
}

.me-header .me-id {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

.me-menu-group {
    background: #fff;
    margin-bottom: 10px;
}

.me-menu-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 0.5px solid #e5e5e5;
    cursor: pointer;
    transition: background 0.15s;
}

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

.me-menu-item:active {
    background: #d9d9d9;
}

.me-menu-item img {
    width: 22px;
    height: 22px;
    margin-right: 14px;
}

.me-menu-item .menu-text {
    flex: 1;
    font-size: 15px;
    color: #191919;
}

.me-menu-item .menu-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.3;
}

/* === 配置表单 === */
.config-form {
    padding: 0;
}

.config-section {
    background: #fff;
    margin-bottom: 10px;
    padding: 16px;
}

.config-section-title {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

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

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px 12px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 15px;
    color: #191919;
    transition: background 0.2s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    background: #e8f5e9;
}

.form-group textarea {
    resize: vertical;
    line-height: 1.5;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row input {
    flex: 1;
}

.btn-small {
    height: 36px;
    padding: 0 12px;
    background: #07c160;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.btn-small:active {
    opacity: 0.85;
}

.btn-outline {
    background: none;
    border: 1px solid #07c160;
    color: #07c160;
}

.config-actions {
    display: flex;
    gap: 10px;
    padding: 16px;
    background: #fff;
}

.config-actions .btn-primary {
    flex: 1;
}

.btn-secondary {
    flex: 1;
    height: 44px;
    background: #f5f5f5;
    color: #666;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:active {
    background: #e5e5e5;
}

/* === 人设编辑页 === */
.persona-edit-form {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.avatar-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
}

.avatar-upload span {
    font-size: 14px;
    color: #07c160;
}

/* === 弹窗 === */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    width: 80%;
    max-width: 320px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-title {
    padding: 20px 16px 8px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    color: #191919;
}

.modal-body {
    padding: 8px 16px 20px;
    font-size: 15px;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    border-top: 0.5px solid #e5e5e5;
}

.modal-footer .modal-btn {
    flex: 1;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.modal-footer .modal-btn:active {
    background: #d9d9d9;
}

.modal-footer .modal-btn:first-child {
    color: #666;
    border-right: 0.5px solid #e5e5e5;
}

.modal-footer .modal-btn:last-child {
    color: #07c160;
    font-weight: 600;
}

.modal-footer .modal-btn.btn-confirm-danger {
    color: #fa5151;
}

/* === 加载动画 === */
.loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.6);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e5e5;
    border-top-color: #07c160;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* === Toast提示 === */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 700;
    animation: toastIn 0.2s ease;
    white-space: nowrap;
}

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* === 评论输入框 === */
.comment-input-bar {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f7f7f7;
    border-top: 0.5px solid rgba(0,0,0,0.06);
    gap: 8px;
}

.comment-input-bar input {
    flex: 1;
    height: 36px;
    padding: 0 10px;
    background: #fff;
    border-radius: 6px;
    font-size: 14px;
}

.comment-input-bar .btn-send {
    width: 48px;
    height: 32px;
    font-size: 13px;
}

/* === 高级配置折叠 === */
.config-collapse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 10px 0;
}

.config-collapse-header .collapse-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.config-collapse-header.open .collapse-arrow {
    transform: rotate(180deg);
}

.config-collapse-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.config-collapse-body.open {
    max-height: 800px;
}

/* === 安全区适配 === */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .tab-bar {
        height: calc(56px + env(safe-area-inset-bottom));
    }
    .chat-input-bar {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

/* === 默认头像占位 === */
.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    border-radius: inherit;
}

/* === 空状态 === */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #b2b2b2;
}

.empty-state img {
    width: 80px;
    height: 80px;
    opacity: 0.3;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
}
