/** * 聊天模块 — 与论坛 feed 粉色毛玻璃主题统一 */ .chat-page { --chat-accent: #fdbbdb; --chat-accent-text: #a85878; --chat-accent-muted: #c97a96; --chat-text: #333; --chat-text-muted: #666; --chat-glass: rgba(255, 255, 255, 0.32); --chat-glass-border: rgba(255, 255, 255, 0.45); --chat-shadow: 0 4px 16px rgba(253, 189, 219, 0.08); } .chat-page .section-wrap.chat-stage { padding: 2rem 2.5rem 2.5rem; } .chat-page .section-wrap.chat-stage-narrow { max-width: 640px; margin-left: auto; margin-right: auto; } .feed-list-title.chat-room-title { margin-bottom: 0; text-align: left; border-bottom: none; padding-bottom: 0; flex: 1; min-width: 0; } .chat-page-lead { margin: 0.75rem 0 1rem; font-size: 0.9375rem; line-height: 1.65; color: var(--chat-text-muted); text-align: center; } .chat-room-desc { text-align: left; margin-bottom: 0.75rem; } .chat-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 1rem; font-size: 0.8125rem; color: var(--chat-text-muted); } .chat-breadcrumb a { color: var(--chat-accent-muted); text-decoration: none; } .chat-breadcrumb a:hover { color: var(--chat-accent-text); } .chat-breadcrumb-sep { opacity: 0.45; } .chat-breadcrumb-current { color: var(--chat-text); font-weight: 500; } .chat-room-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255, 255, 255, 0.45); } .chat-room-meta { margin: 0 0 1.25rem; font-size: 0.8125rem; color: var(--chat-text-muted); } .chat-room-meta a { color: var(--chat-accent-text); text-decoration: none; font-weight: 600; } .chat-room-meta a:hover { text-decoration: underline; } .chat-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 1.25rem; } .chat-room-search { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 1.25rem; } .chat-room-search-input { flex: 1; min-width: 0; min-height: 42px; padding: 0.55rem 0.9rem; border: 1px solid rgba(253, 189, 219, 0.45); border-radius: 999px; background: rgba(255, 255, 255, 0.72); color: var(--chat-text); font-size: 0.9375rem; } .chat-room-search-input:focus { outline: none; border-color: rgba(253, 189, 219, 0.75); box-shadow: 0 0 0 3px rgba(253, 189, 219, 0.22); } .chat-room-search-input::placeholder { color: #aaa; } .chat-room-search-btn { flex-shrink: 0; padding: 0.55rem 1.1rem; border: 1px solid rgba(253, 189, 219, 0.55); border-radius: 999px; background: rgba(253, 189, 219, 0.35); color: var(--chat-accent-text); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease; } .chat-room-search-btn:hover { background: rgba(253, 189, 219, 0.5); } .chat-list-footer { display: flex; justify-content: center; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.45); } .chat-create-room-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.65rem; width: min(100%, 320px); padding: 0.85rem 1.35rem; border-radius: 999px; text-decoration: none; color: #fff; font-size: 0.9375rem; font-weight: 600; border: 1px solid rgba(255, 255, 255, 0.35); background: linear-gradient(135deg, #f0a8c4 0%, #a85878 100%); box-shadow: 0 6px 20px rgba(168, 88, 120, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25); transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease; } .chat-create-room-btn:hover { color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(168, 88, 120, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.3); filter: brightness(1.03); } .chat-create-room-btn:active { transform: translateY(0); } .chat-create-room-btn__icon { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; font-size: 0.8125rem; background: rgba(255, 255, 255, 0.22); } .chat-search-empty { margin-top: 0.5rem; } .chat-action-link { display: inline-flex; align-items: center; } .chat-ws-status { flex-shrink: 0; font-size: 0.75rem; font-weight: 500; padding: 0.2rem 0.65rem; border-radius: 999px; color: var(--chat-accent-muted); background: rgba(255, 255, 255, 0.35); border: 1px solid rgba(253, 189, 219, 0.35); } .chat-ws-status-ok { color: #3d7a52; background: rgba(144, 238, 144, 0.2); border-color: rgba(144, 238, 144, 0.45); } .chat-ws-status-error { color: #a85858; background: rgba(255, 182, 193, 0.25); border-color: rgba(255, 160, 160, 0.45); } .chat-ws-errors { margin: 0.5rem 0 0; color: #a85858; font-size: 0.875rem; } /* ---------- 消息区 ---------- */ .chat-messages { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1.25rem; padding: 1rem; border-radius: 14px; background: var(--chat-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--chat-glass-border); box-shadow: var(--chat-shadow); min-height: 240px; max-height: min(60vh, 520px); overflow-y: auto; } .chat-message { display: flex; gap: 0.75rem; align-items: flex-start; } .chat-message-mine { flex-direction: row-reverse; } .chat-message-mine .chat-message-body { text-align: right; } .chat-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid rgba(255, 255, 255, 0.65); box-shadow: 0 2px 8px rgba(253, 189, 219, 0.15); } .chat-message-body { flex: 1; min-width: 0; padding: 0.6rem 0.75rem; border: 1px solid rgba(253, 189, 219, 0.4); border-radius: 10px; background: rgba(255, 255, 255, 0.35); } .chat-message-mine .chat-message-body { border-color: rgba(240, 168, 196, 0.55); background: rgba(253, 189, 219, 0.22); } .chat-message-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--chat-text-muted); margin-bottom: 0.35rem; } .chat-message-mine .chat-message-meta { justify-content: flex-end; } .chat-author { color: var(--chat-text); font-weight: 600; } .chat-profile-link { color: var(--chat-accent-text); text-decoration: none; font-weight: 500; } .chat-profile-link:hover { text-decoration: underline; } .chat-content { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 0.9375rem; line-height: 1.55; color: var(--chat-text); } .chat-compose { margin-top: 0.5rem; } /* ---------- 列表 / 分页 ---------- */ .chat-room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; } .chat-room-card { display: block; padding: 1.15rem; border-radius: 14px; background: var(--chat-glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(253, 189, 219, 0.35); color: inherit; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; } .chat-room-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(253, 189, 219, 0.2); color: inherit; } .chat-room-card h2 { margin: 0 0 0.5rem; font-size: 1.05rem; color: var(--chat-text); } .chat-room-card p { margin: 0; color: var(--chat-text-muted); font-size: 0.875rem; } .chat-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; font-size: 0.875rem; } .chat-pagination-link { padding: 0.35rem 0.85rem; border-radius: 999px; text-decoration: none; color: var(--chat-accent-text); background: rgba(253, 189, 219, 0.25); border: 1px solid rgba(253, 189, 219, 0.4); } .chat-pagination-link:hover { background: rgba(253, 189, 219, 0.4); color: var(--chat-accent-text); } .chat-pagination-info { color: var(--chat-text-muted); } /* ---------- 私聊收件箱 ---------- */ .feed-list-title.chat-inbox-title { margin-bottom: 0; text-align: left; border-bottom: none; padding-bottom: 0; } .chat-inbox-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255, 255, 255, 0.45); } .chat-inbox-new-btn { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 1rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; text-decoration: none; color: var(--chat-accent-text); background: rgba(253, 189, 219, 0.28); border: 1px solid rgba(253, 189, 219, 0.45); transition: background 0.2s ease, box-shadow 0.2s ease; } .chat-inbox-new-btn:hover { color: var(--chat-accent-text); background: rgba(253, 189, 219, 0.42); box-shadow: 0 4px 12px rgba(253, 189, 219, 0.2); } .chat-inbox-panel { padding: 0.85rem; border-radius: 14px; background: var(--chat-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--chat-glass-border); box-shadow: var(--chat-shadow); } .chat-inbox-panel--compact { padding: 0.65rem; } .chat-inbox-list { list-style: none; margin: 0; padding: 0; } .chat-inbox-list li + li { margin-top: 0.5rem; } .chat-inbox-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.85rem; border-radius: 12px; text-decoration: none; color: var(--chat-text); background: rgba(255, 255, 255, 0.28); border: 1px solid rgba(253, 189, 219, 0.22); transition: background 0.15s ease, border-color 0.15s ease; } .chat-inbox-item:hover { background: rgba(253, 189, 219, 0.18); border-color: rgba(253, 189, 219, 0.38); color: var(--chat-text); } .chat-inbox-avatar { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.7); box-shadow: 0 2px 8px rgba(253, 189, 219, 0.15); } .chat-inbox-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; } .chat-inbox-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; } .chat-inbox-name { font-size: 0.9375rem; font-weight: 600; color: var(--chat-accent-text); } .chat-inbox-time { flex-shrink: 0; font-size: 0.75rem; color: var(--chat-text-muted); } .chat-inbox-preview { display: block; font-size: 0.8125rem; line-height: 1.45; color: var(--chat-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .chat-inbox-arrow { flex-shrink: 0; font-size: 0.75rem; color: var(--chat-accent-muted); opacity: 0.75; } .chat-inbox-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.65rem; padding: 2.5rem 1.25rem; text-align: center; } .chat-inbox-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 3.25rem; height: 3.25rem; border-radius: 50%; font-size: 1.25rem; color: var(--chat-accent-muted); background: rgba(253, 189, 219, 0.22); border: 1px solid rgba(253, 189, 219, 0.35); } .chat-inbox-empty-title { margin: 0; font-size: 1rem; font-weight: 600; color: var(--chat-text); } .chat-inbox-empty-lead { margin: 0; max-width: 18rem; font-size: 0.875rem; line-height: 1.55; color: var(--chat-text-muted); } .chat-inbox-empty-btn { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 0.35rem; padding: 0.65rem 1.25rem; border-radius: 999px; font-size: 0.875rem; font-weight: 600; text-decoration: none; color: #fff; background: linear-gradient(135deg, #f0a8c4 0%, #a85878 100%); border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: 0 4px 14px rgba(168, 88, 120, 0.25); transition: transform 0.15s ease, box-shadow 0.15s ease; } .chat-inbox-empty-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(168, 88, 120, 0.32); } .chat-thread-list { list-style: none; padding: 0; margin: 0; } .chat-thread-list li + li { margin-top: 0.5rem; } .chat-thread-list a { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1rem; border-radius: 12px; background: var(--chat-glass); border: 1px solid rgba(253, 189, 219, 0.3); color: var(--chat-text); text-decoration: none; } .chat-thread-list a:hover { background: rgba(253, 189, 219, 0.2); } .chat-thread-time { font-size: 0.8125rem; color: var(--chat-text-muted); } .chat-empty, .chat-login-hint { color: var(--chat-text-muted); text-align: center; } .chat-empty a, .chat-login-hint a { color: var(--chat-accent-text); font-weight: 600; } @media (max-width: 768px) { .chat-page .section-wrap.chat-stage { padding: 1.5rem 1.25rem 2rem; } .feed-list-title.chat-room-title { font-size: 1.25rem; } } @media (max-width: 640px) { .chat-messages { max-height: none; } }