/* ============================================
   X (原小红书) 样式 - 推特风格
   ============================================ */

#xhsView {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--xhs-bg);
}

/* X 顶部导航 */
.x-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--xhs-bg);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.x-header-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #0F1419;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.x-header-btn:hover {
  background: rgba(15, 20, 25, 0.1);
}

.x-logo {
  font-size: 24px;
  font-weight: 700;
  color: #0F1419;
  font-family: system-ui, -apple-system, sans-serif;
}

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

.x-upgrade-btn {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #0F1419;
  background: transparent;
  color: #0F1419;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.x-upgrade-btn:hover {
  background: rgba(15, 20, 25, 0.1);
}

/* X 标签页 */
.x-tabs {
  display: flex;
  background: var(--xhs-bg);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.x-tab {
  flex: 1;
  padding: 16px;
  border: none;
  background: transparent;
  color: #536471;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.x-tab:hover {
  color: #0F1419;
  background: rgba(15, 20, 25, 0.05);
}

.x-tab.active {
  color: #0F1419;
  font-weight: 700;
}

.x-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: #1D9BF0;
  border-radius: 2px;
}

/* X 内容区域 */
.x-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--xhs-bg);
}

.x-feed {
  display: flex;
  flex-direction: column;
}

/* X 推文卡片 */
.x-tweet {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #EFF3F4;
  background: var(--xhs-bg);
  cursor: pointer;
  transition: background 0.2s;
}

.x-tweet:active {
  background: var(--xhs-surface);
}

.x-tweet-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #EFF3F4;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.x-tweet-content {
  flex: 1;
  min-width: 0;
}

.x-tweet-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.x-tweet-name {
  font-weight: 700;
  color: #0F1419;
  font-size: 15px;
}

.x-tweet-username,
.x-tweet-time {
  color: #536471;
  font-size: 15px;
}

.x-tweet-text {
  color: #0F1419;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.x-tweet-media {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
  border-radius: 16px;
  overflow: hidden;
}

.x-tweet-media img {
  width: 100%;
  object-fit: cover;
}

/* X 推文操作栏 */
.x-tweet-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 12px;
}

.x-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border: none;
  background: transparent;
  color: #536471;
  font-size: 13px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
  flex: 1;
  justify-content: flex-start;
}

.x-action-btn svg {
  width: 18px;
  height: 18px;
}

.x-action-btn:hover {
  background: rgba(29, 155, 240, 0.1);
  color: #1D9BF0;
}

.x-action-btn.liked {
  color: #F91880;
}

.x-action-btn.liked:hover {
  background: rgba(249, 24, 128, 0.1);
}

/* X 悬浮发布按钮 */
.x-post-btn {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #1D9BF0;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(29, 155, 240, 0.4);
  transition: all 0.2s;
  z-index: 100;
}

.x-post-btn:hover {
  background: #1A8CD8;
  transform: scale(1.05);
}

.x-post-btn:active {
  transform: scale(0.95);
}

/* X 底部导航 - 4个按钮 */
.x-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--xhs-bg);
  border-top: 1px solid rgba(0,0,0,0.05);
  z-index: 1000;
}

.x-dock-btn {
  flex: 1;
  height: 100%;
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #536471;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.x-dock-btn svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.x-dock-btn span {
  font-size: 11px;
  font-weight: 500;
}

.x-dock-btn.active {
  color: #0F1419;
}

.x-dock-btn.active::after {
  content: '';
  position: absolute;
  top: 8px;
  width: 4px;
  height: 4px;
  background: #1D9BF0;
  border-radius: 50%;
}

/* X 发布 Modal */
.x-create-modal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--xhs-bg);
}

.x-create-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  background: var(--xhs-bg);
}

.x-create-cancel {
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #0F1419;
  font-size: 15px;
  cursor: pointer;
}

.x-create-submit {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #0F1419;
  background: var(--xhs-surface);
  color: #0F1419;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.x-create-submit:not(:disabled) {
  opacity: 1;
}

.x-create-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: var(--xhs-bg);
}

.x-create-user {
  display: flex;
  gap: 12px;
}

.x-create-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.x-create-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 18px;
  resize: none;
  min-height: 120px;
  font-family: system-ui, -apple-system, sans-serif;
  background: transparent;
  color: #0F1419;
}

.x-create-input::placeholder {
  color: #7A6B57;
}

.x-create-images {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.x-create-add-image {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  border: 2px dashed #9A7B3F;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.x-create-add-image:hover {
  background: rgba(0, 0, 0, 0.05);
}

.x-create-footer {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: var(--xhs-bg);
}

.x-create-tool {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.x-create-tool:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* X 详情 Modal */
.x-detail-modal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--xhs-bg);
}

.x-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  background: rgba(var(--xhs-bg-rgb), 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.x-detail-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #0F1419;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.x-detail-back:hover {
  background: rgba(15, 20, 25, 0.1);
}

.x-detail-title {
  font-size: 17px;
  font-weight: 700;
  color: #0F1419;
}

.x-detail-content {
  flex: 1;
  overflow-y: auto;
  padding-top: 0;
}

/* ============================================
   X 个人资料页面样式
   ============================================ */

#xhsProfileView {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--xhs-bg);
}

/* 顶部导航 */
.x-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: transparent;
  border-bottom: none;
  flex-shrink: 0;
}

.x-profile-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #0F1419;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.x-profile-back:hover {
  background: rgba(15, 20, 25, 0.1);
}

.x-profile-nav-right {
  display: flex;
  gap: 8px;
}

.x-profile-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #0F1419;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.x-profile-nav-btn:hover {
  background: rgba(15, 20, 25, 0.1);
}

/* 个人资料内容 */
.x-profile-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 背景区域 */
.x-profile-banner {
  position: relative;
  height: 190px;
  background: linear-gradient(135deg, var(--xhs-bg) 0%, var(--xhs-surface) 100%);
  margin-bottom: 72px;
}

.x-profile-avatar-large {
  position: absolute;
  bottom: -40px;
  left: 16px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--xhs-bg);
  background: #EFF3F4;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

/* 用户信息 */
.x-profile-info {
  padding: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.x-profile-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.x-profile-name {
  font-size: 20px;
  font-weight: 800;
  color: #0F1419;
  margin: 0;
}

.x-profile-verified {
  flex-shrink: 0;
}

.x-profile-username {
  font-size: 15px;
  color: #536471;
  margin: 0 0 12px 0;
}

.x-profile-bio {
  font-size: 15px;
  color: #0F1419;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.x-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.x-profile-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #536471;
}

.x-profile-stats {
  display: flex;
  gap: 20px;
}

.x-profile-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #536471;
  text-decoration: none;
  cursor: pointer;
}

.x-profile-stat:hover {
  text-decoration: underline;
}

.x-profile-stat strong {
  font-weight: 700;
  color: #0F1419;
}

/* 内容标签页 */
.x-profile-tabs {
  display: flex;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  overflow-x: auto;
  scrollbar-width: none;
}

.x-profile-tabs::-webkit-scrollbar {
  display: none;
}

.x-profile-tab {
  flex: 1;
  min-width: 60px;
  padding: 16px 12px;
  border: none;
  background: transparent;
  color: #536471;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}

.x-profile-tab:hover {
  color: #0F1419;
  background: rgba(15, 20, 25, 0.05);
}

.x-profile-tab.active {
  color: #0F1419;
  font-weight: 700;
}

.x-profile-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: #1D9BF0;
  border-radius: 2px;
}

/* 推荐关注 */
.x-profile-suggestions {
  padding: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.x-profile-suggestions-title {
  font-size: 17px;
  font-weight: 800;
  color: #0F1419;
  margin: 0 0 16px 0;
}

.x-profile-suggestions-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.x-profile-suggestions-list::-webkit-scrollbar {
  display: none;
}

.x-profile-suggestion-card {
  flex-shrink: 0;
  width: 160px;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  overflow: hidden;
  background: var(--xhs-bg);
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.x-profile-suggestion-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.x-profile-suggestion-cover {
  height: 80px;
  background: linear-gradient(135deg, var(--xhs-bg) 0%, var(--xhs-surface) 100%);
  position: relative;
}

.x-profile-suggestion-avatar {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid var(--xhs-bg);
  background: rgba(0,0,0,0.05);
  overflow: hidden;
}

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

.x-profile-suggestion-info {
  padding: 28px 12px 12px;
  text-align: center;
}

.x-profile-suggestion-name {
  font-size: 15px;
  font-weight: 700;
  color: #0F1419;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-profile-suggestion-bio {
  font-size: 13px;
  color: #536471;
  margin: 0 0 12px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-profile-suggestion-follow {
  width: 100%;
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: #0F1419;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.x-profile-suggestion-follow:hover {
  background: #2F3336;
}

.x-profile-suggestion-follow.following {
  background: transparent;
  color: #0F1419;
  border: 1px solid #CFD9DE;
}

/* 用户帖子列表 */
.x-profile-posts {
  padding-bottom: 80px;
}

/* ============================================
   X 联系人 / 私信 / 聊天
   ============================================ */

#xhsContactsView,
#xhsMessagesView,
#xhsChatView {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #FFFFFF;
  --xhs-bubble-me: #1D9BF0;
  --xhs-bubble-them: #E5E7EB;
  --xhs-bubble-me-text: #FFFFFF;
  --xhs-bubble-them-text: #0F1419;
}

.xhs-sub-header,
.xhs-messages-header,
.xhs-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #FFFFFF;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.xhs-sub-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #0F1419;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.xhs-sub-back:hover {
  background: rgba(0, 0, 0, 0.06);
}

.xhs-sub-title {
  font-size: 17px;
  font-weight: 700;
  color: #0F1419;
  margin: 0;
}

.xhs-sub-action {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #111;
  background: #111;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.xhs-sub-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.xhs-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 20px;
  background: #F0F2F5;
  border: 1px solid transparent;
  color: #6B7280;
  margin-bottom: 12px;
}

.xhs-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #0F1419;
  outline: none;
}

.xhs-filter-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.xhs-chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  font-size: 12px;
  color: #111;
  font-weight: 600;
}

.xhs-chip.active {
  background: #111;
  color: #FFFFFF;
  border-color: #111;
}

.xhs-contacts-list,
.xhs-messages-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.xhs-contact-item,
.xhs-message-item,
.xhs-worldbook-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid #E5E7EB;
  cursor: pointer;
}

.xhs-contact-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

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

.xhs-avatar-emoji {
  font-size: 20px;
  color: #0F1419;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  font-weight: 600;
}

.xhs-contact-info {
  flex: 1;
  min-width: 0;
}

.xhs-contact-name {
  font-size: 15px;
  font-weight: 700;
  color: #0F1419;
  margin-bottom: 2px;
}

.xhs-contact-bio {
  font-size: 13px;
  color: #6B7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xhs-message-info {
  flex: 1;
  min-width: 0;
}

.xhs-message-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.xhs-message-name {
  font-size: 15px;
  font-weight: 700;
  color: #0F1419;
}

.xhs-message-time {
  font-size: 12px;
  color: #6B7280;
}

.xhs-message-preview {
  font-size: 13px;
  color: #6B7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xhs-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #FFFFFF;
}

.xhs-chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.xhs-chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.xhs-chat-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.xhs-chat-more {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.xhs-chat-more:hover {
  background: rgba(0, 0, 0, 0.05);
}

.xhs-chat-bubble {
  max-width: 70%;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.xhs-chat-bubble.me {
  align-self: flex-end;
  background: var(--xhs-bubble-me);
  color: var(--xhs-bubble-me-text);
}

.xhs-chat-bubble.them {
  align-self: flex-start;
  background: var(--xhs-bubble-them);
  color: var(--xhs-bubble-them-text);
}

.xhs-chat-sticker {
  width: 120px;
  height: auto;
  display: block;
  border-radius: 12px;
}

.xhs-chat-image {
  width: 180px;
  height: auto;
  display: block;
  border-radius: 12px;
}

.xhs-chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #E5E7EB;
  background: #FFFFFF;
}

.xhs-chat-attach {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #0F1419;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.xhs-chat-attach:hover {
  background: #F5F5F5;
}

.xhs-chat-sticker-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #0F1419;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.xhs-chat-sticker-btn:hover {
  background: #F5F5F5;
}

.xhs-chat-input-bar input {
  flex: 1;
  border-radius: 18px;
  border: 1px solid #E5E7EB;
  background: #F0F2F5;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  color: #0F1419;
}

.xhs-chat-send {
  padding: 8px 14px;
  border-radius: 18px;
  border: 1px solid #111;
  background: #111;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #FFFFFF;
}

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

.xhs-worldbook-btn {
  padding: 6px 10px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--xhs-surface);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.xhs-worldbook-btn.danger {
  background: #F7D1C4;
  border-color: #E5A89A;
}

.xhs-empty-state {
  padding: 60px 20px;
  text-align: center;
  color: #7A6B57;
}

.xhs-empty-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.xhs-empty-subtitle {
  font-size: 13px;
}

/* XHS 世界书背景 */
#xhsWorldbookView {
  background: var(--xhs-bg);
}

#xhsWorldbookView .app-navbar {
  background: var(--xhs-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.xhs-worldbook-viewport {
  background: var(--xhs-bg);
}

/* 联系人控制台（推特） styles moved to css/views/xhs-worldbook.css */

#xhsWorldbookList {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

/* XHS 聊天设置弹窗 */
.xhs-chat-settings {
  width: 92%;
  max-width: 360px;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.xhs-chat-settings h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.xhs-chat-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.xhs-chat-setting-row label {
  font-size: 14px;
  color: #444;
  font-weight: 600;
}

.xhs-chat-setting-row input[type="color"] {
  width: 56px;
  height: 32px;
  border: none;
  background: none;
  padding: 0;
}

.xhs-sticker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.xhs-sticker-picker-actions {
  display: flex;
  gap: 8px;
}

.xhs-sticker-upload {
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.xhs-sticker-close {
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid #111;
  background: transparent;
  color: #111;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.xhs-sticker-picker {
  width: 92%;
  max-width: 360px;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.xhs-sticker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.xhs-sticker-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #F0F2F5;
  border: 1px solid #E5E7EB;
}

.xhs-sticker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.xhs-sticker-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.xhs-chat-settings-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.xhs-chat-settings-actions button {
  padding: 8px 14px;
  border-radius: 16px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.xhs-chat-settings-actions .secondary {
  background: transparent;
  color: #111;
}

/* ============================================
   X 个人资料编辑样式
   ============================================ */

#xhsProfileEditView,
#xhsUserProfileEditView {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--xhs-bg);
}

.x-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--xhs-bg);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.x-edit-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #0F1419;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.x-edit-back:hover {
  background: rgba(0,0,0,0.06);
}

.x-edit-title {
  font-size: 17px;
  font-weight: 700;
  color: #0F1419;
  margin: 0;
}

.x-edit-save {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #0F1419;
  background: var(--xhs-surface);
  color: #0F1419;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.x-edit-save:hover {
  background: var(--xhs-accent-strong);
}

.x-edit-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.x-edit-avatar-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--xhs-surface);
  border-radius: 16px;
  border: 1px solid var(--xhs-border);
  margin-bottom: 16px;
}

.x-edit-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.x-edit-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.x-edit-avatar span {
  font-size: 32px;
  color: #0F1419;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.x-edit-avatar-overlay {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  color: var(--xhs-peach-light);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
}

.x-edit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.x-edit-row {
  display: flex;
  gap: 12px;
}

.x-edit-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.x-edit-label {
  font-size: 13px;
  color: #7A6B57;
  font-weight: 600;
}

.x-edit-input,
.x-edit-textarea {
  width: 100%;
  background: #FBECCB;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  color: #0F1419;
  outline: none;
  box-sizing: border-box;
}

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

/* ============================================
   X 他人主页样式 - User Profile View
   ============================================ */

/* 他人主页视图 */
#xhsUserProfileView {
  background: var(--xhs-bg);
  overflow-y: auto;
}

/* 顶部导航栏 - 透明背景 */
.x-user-profile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 100;
  background: transparent;
  transition: background 0.2s ease;
}

.x-user-profile-header.scrolled {
  background: rgba(var(--xhs-bg-rgb), 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #EFF3F4;
}

/* 返回按钮 */
.x-user-profile-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #FFFFFF;
  transition: background 0.2s ease;
}

.x-user-profile-back:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* 导航右侧按钮组 */
.x-user-profile-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 导航按钮 */
.x-user-profile-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #FFFFFF;
  transition: background 0.2s ease;
}

.x-user-profile-nav-btn:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* 内容区域 */
.x-user-profile-content {
  padding-top: 0;
  min-height: 100vh;
}

/* 用户信息区 */
.x-user-profile-info {
  padding: 60px 16px 16px;
}

/* 头像和关注按钮行 */
.x-user-profile-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* 头像 */
.x-user-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--xhs-bg);
  overflow: hidden;
  background: #EFF3F4;
  flex-shrink: 0;
}

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

/* 关注按钮 */
.x-user-profile-follow-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: none;
  background: #0F1419;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 4px;
}

.x-user-profile-follow-btn:hover {
  background: #2C333B;
}

.x-user-profile-follow-btn.following {
  background: transparent;
  color: #0F1419;
  border: 1px solid #CFD9DE;
}

.x-user-profile-follow-btn.following:hover {
  background: rgba(15, 20, 25, 0.1);
  border-color: #CFD9DE;
}

/* 用户名行 */
.x-user-profile-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

/* 用户名 */
.x-user-profile-name {
  font-size: 22px;
  font-weight: 800;
  color: #0F1419;
  margin: 0;
  line-height: 1.2;
}

/* 认证徽章 */
.x-user-profile-verified {
  flex-shrink: 0;
}

/* 用户ID */
.x-user-profile-username {
  font-size: 15px;
  color: #536471;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

/* 简介 */
.x-user-profile-bio {
  font-size: 15px;
  color: #0F1419;
  margin: 0 0 12px 0;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* 位置和时间信息 */
.x-user-profile-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.x-user-profile-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #536471;
}

.x-user-profile-meta-item svg {
  color: #536471;
}

.x-user-profile-meta-arrow {
  color: #536471;
  display: flex;
  align-items: center;
}

/* 关注统计 */
.x-user-profile-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
}

.x-user-profile-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #536471;
  text-decoration: none;
  cursor: pointer;
}

.x-user-profile-stat:hover {
  text-decoration: underline;
}

.x-user-profile-stat strong {
  font-weight: 700;
  color: #0F1419;
}

/* 社交提示 */
.x-user-profile-social-hint {
  font-size: 13px;
  color: #536471;
  margin: 0;
}

/* 内容标签页 */
.x-user-profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--xhs-border);
  position: sticky;
  top: 52px;
  background: var(--xhs-bg);
  z-index: 99;
}

.x-user-profile-tab {
  flex: 1;
  padding: 16px 0;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--xhs-muted);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.x-user-profile-tab:hover {
  background: var(--xhs-accent-weak);
  color: var(--xhs-text);
}

.x-user-profile-tab.active {
  color: var(--xhs-text);
  font-weight: 700;
}

.x-user-profile-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  background: var(--xhs-accent);
  border-radius: 2px;
}

/* 置顶标识 */
.x-user-profile-pinned-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #536471;
  border-bottom: 1px solid #EFF3F4;
}

.x-user-profile-pinned-label svg {
  color: #536471;
}

/* 用户帖子列表 */
.x-user-profile-posts {
  padding-bottom: 20px;
}


/* Disable sticky hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {

  /* Buttons/tabs */
  .x-header-btn:hover,
  .x-upgrade-btn:hover,
  .x-tab:hover,
  .x-action-btn:hover,
  .x-post-btn:hover,
  .x-create-add-image:hover,
  .x-create-tool:hover,
  .x-detail-back:hover,
  .x-profile-back:hover,
  .x-profile-nav-btn:hover,
  .x-profile-tab:hover,
  .x-profile-stat:hover,
  .x-profile-suggestion-card:hover,
  .x-profile-suggestion-follow:hover,
  .xhs-sub-back:hover,
  .xhs-chat-more:hover,
  .xhs-chat-attach:hover,
  .xhs-chat-sticker-btn:hover,
  .x-user-profile-back:hover,
  .x-user-profile-nav-btn:hover,
  .x-user-profile-tab:hover,
  .x-user-profile-follow-btn:hover,
  .x-edit-back:hover,
  .x-edit-save:hover {
    background: inherit;
    color: inherit;
    box-shadow: none;
  }
}

/* ===========================================

   XHS 主题色系（来自配色图）
   ============================================ */

:root {
  --xhs-purple-deep: #6D4FBB;
  --xhs-purple-soft: #B079BB;
  --xhs-peach: #FEDDCA;
  --xhs-peach-light: #FFF1E6;
  --xhs-bg: #FEDDCA;
  --xhs-bg-rgb: 254, 221, 202;
  --xhs-surface: #FFF1E6;
  --xhs-border: rgba(109, 79, 187, 0.15);
  --xhs-text: #2B1F3A;
  --xhs-muted: #6E5C7A;
  --xhs-accent: #6D4FBB;
  --xhs-accent-strong: #B079BB;
  --xhs-accent-weak: rgba(109, 79, 187, 0.12);
  --xhs-hero-gradient: linear-gradient(135deg, #6D4FBB 0%, #B079BB 50%, #FEDDCA 100%);
}

#xhsView,
#xhsProfileView,
#xhsProfileEditView,
#xhsUserProfileView,
#xhsUserProfileEditView,
#xhsContactsView,
#xhsMessagesView,
#xhsChatView,
#xhsWorldbookView,
.x-create-modal,
.x-detail-modal {
  background: var(--xhs-bg);
  color: var(--xhs-text);
}

#xhsContactsView,
#xhsMessagesView,
#xhsChatView {
  --xhs-bubble-me: #6D4FBB;
  --xhs-bubble-them: #FFF1E6;
  --xhs-bubble-me-text: #FFFFFF;
  --xhs-bubble-them-text: #2B1F3A;
}

#xhsView .x-header,
#xhsView .x-tabs,
#xhsView .x-content,
#xhsView .x-dock,
.x-create-header,
.x-create-body,
.x-create-footer,
.x-detail-header,
.x-profile-header,
.x-edit-header,
.xhs-sub-header,
.xhs-messages-header,
.xhs-chat-header,
#xhsWorldbookView .app-navbar {
  background: var(--xhs-bg);
  border-color: var(--xhs-border);
}

#xhsView .x-header-btn,
#xhsView .x-logo,
#xhsView .x-create-cancel,
#xhsView .x-tab.active,
#xhsView .x-tab:hover,
.x-profile-back,
.x-profile-nav-btn,
.x-profile-name,
.x-profile-stat strong,
.x-profile-suggestions-title,
.xhs-sub-title,
.xhs-sub-back,
.xhs-chat-more,
.xhs-chat-send {
  color: var(--xhs-text);
}

.x-profile-verified,
#xUserProfileVerified {
  fill: var(--xhs-accent) !important;
}

.xhs-verified-badge {
  color: var(--xhs-accent);
  fill: var(--xhs-accent);
}

#xhsView .x-header-btn:hover,
.x-profile-back:hover,
.x-profile-nav-btn:hover,
.xhs-sub-back:hover,
.xhs-chat-more:hover,
.xhs-chat-attach:hover,
.xhs-chat-sticker-btn:hover {
  background: var(--xhs-accent-weak);
}

#xhsView .x-upgrade-btn {
  border-color: var(--xhs-accent);
  color: var(--xhs-accent);
}

#xhsView .x-upgrade-btn:hover {
  background: var(--xhs-accent-weak);
}

#xhsView .x-tab {
  color: var(--xhs-muted);
}

#xhsView .x-tab.active::after {
  background: var(--xhs-accent);
}

#xhsView .x-tweet {
  border-bottom: 1px solid var(--xhs-border);
  background: var(--xhs-bg);
}

#xhsView .x-tweet:active {
  background: var(--xhs-surface);
}

#xhsView .x-tweet-avatar {
  background: var(--xhs-surface);
}

#xhsView .x-tweet-name,
#xhsView .x-tweet-text {
  color: var(--xhs-text);
}

#xhsView .x-tweet-username,
#xhsView .x-tweet-time,
#xhsView .x-action-btn {
  color: var(--xhs-muted);
}

#xhsView .x-action-btn:hover {
  background: var(--xhs-accent-weak);
  color: var(--xhs-accent);
}

#xhsView .x-action-btn.liked {
  color: var(--xhs-accent-strong);
}

#xhsView .x-action-btn.liked:hover {
  background: rgba(176, 121, 187, 0.12);
}

#xhsView .x-post-btn {
  background: var(--xhs-accent);
  box-shadow: 0 4px 16px rgba(109, 79, 187, 0.35);
}

#xhsView .x-post-btn:hover {
  background: var(--xhs-accent-strong);
}

#xhsView .x-dock {
  border-top: 1px solid var(--xhs-border);
}

#xhsView .x-dock-btn {
  color: var(--xhs-muted);
}

#xhsView .x-dock-btn.active {
  color: var(--xhs-text);
}

#xhsView .x-dock-btn.active::after {
  background: var(--xhs-accent);
}

.x-create-submit {
  background: var(--xhs-accent);
  border-color: var(--xhs-accent);
  color: #FFFFFF;
}

.x-create-modal svg {
  stroke: var(--xhs-accent);
}

.x-create-input {
  color: var(--xhs-text);
}

.x-create-input::placeholder {
  color: var(--xhs-muted);
}

.x-create-add-image {
  border-color: var(--xhs-accent-strong);
  background: var(--xhs-surface);
}

.x-create-footer {
  border-top: 1px solid var(--xhs-border);
}

.x-create-tool:hover {
  background: var(--xhs-accent-weak);
}

.x-detail-header {
  background: rgba(var(--xhs-bg-rgb), 0.96);
  border-bottom: 1px solid var(--xhs-border);
}

.x-detail-title {
  color: var(--xhs-text);
}

.x-profile-banner {
  background: var(--xhs-hero-gradient);
}

.x-profile-avatar-large {
  border-color: var(--xhs-bg);
  background: var(--xhs-surface);
}

.x-profile-info {
  border-bottom-color: var(--xhs-border);
}

.x-profile-tab {
  color: var(--xhs-muted);
}

.x-profile-tab:hover {
  color: var(--xhs-text);
  background: var(--xhs-accent-weak);
}

.x-profile-tab.active {
  color: var(--xhs-text);
}

.x-profile-tab.active::after {
  background: var(--xhs-accent);
}

.x-profile-tabs {
  border-bottom-color: var(--xhs-border);
}

.x-profile-suggestions {
  border-bottom-color: var(--xhs-border);
}

.x-profile-suggestion-card {
  background: var(--xhs-bg);
  border: 1px solid var(--xhs-border);
}

.x-profile-suggestion-cover {
  background: var(--xhs-hero-gradient);
}

.x-profile-suggestion-avatar {
  border-color: var(--xhs-bg);
  background: var(--xhs-surface);
}

.x-profile-suggestion-name {
  color: var(--xhs-text);
}

.x-profile-suggestion-bio {
  color: var(--xhs-muted);
}

.x-profile-suggestion-follow {
  background: var(--xhs-accent);
  color: #FFFFFF;
}

.x-profile-suggestion-follow.following {
  border-color: var(--xhs-border);
  color: var(--xhs-text);
}

.xhs-sub-action {
  background: var(--xhs-accent);
  border-color: var(--xhs-accent);
  color: #FFFFFF;
}

.xhs-search-bar,
.xhs-chat-input-bar input {
  background: var(--xhs-surface);
  border-color: var(--xhs-border);
  color: var(--xhs-text);
}

.xhs-search-bar {
  color: var(--xhs-muted);
}

.xhs-chip {
  background: var(--xhs-surface);
  border-color: var(--xhs-border);
  color: var(--xhs-text);
}

.xhs-chip.active {
  background: var(--xhs-accent);
  border-color: var(--xhs-accent);
  color: #FFFFFF;
}

.xhs-contact-item,
.xhs-message-item,
.xhs-worldbook-item {
  border-bottom: 1px solid var(--xhs-border);
}

.xhs-contact-avatar,
.xhs-chat-header-avatar {
  background: var(--xhs-surface);
}

.xhs-contact-name,
.xhs-message-name {
  color: var(--xhs-text);
}

.xhs-contact-bio,
.xhs-message-time,
.xhs-message-preview,
.xhs-empty-state {
  color: var(--xhs-muted);
}

.xhs-chat-messages {
  background: var(--xhs-bg);
}

.xhs-chat-input-bar {
  background: var(--xhs-bg);
  border-top: 1px solid var(--xhs-border);
}

.xhs-chat-attach,
.xhs-chat-sticker-btn {
  border-color: var(--xhs-border);
  color: var(--xhs-text);
}

.xhs-chat-send {
  background: var(--xhs-accent);
  border-color: var(--xhs-accent);
  color: #FFFFFF;
}

.xhs-worldbook-btn {
  background: var(--xhs-accent-strong);
  border-color: var(--xhs-accent);
  color: #FFFFFF;
}

.xhs-worldbook-btn.danger {
  background: #F2B5A7;
  border-color: #E79A8A;
  color: #FFFFFF;
}

.xhs-worldbook-viewport {
  background: var(--xhs-bg);
}

.xhs-chat-settings,
.xhs-sticker-picker {
  background: var(--xhs-surface);
}

.xhs-contact-modal {
  width: 92%;
  max-width: 380px;
  background: var(--xhs-surface);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.xhs-contact-modal h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--xhs-text);
}

.xhs-contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xhs-contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.xhs-contact-field label {
  font-size: 13px;
  color: var(--xhs-muted);
  font-weight: 600;
}

.xhs-avatar-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.xhs-avatar-preview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--xhs-border);
  background: var(--xhs-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.xhs-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xhs-avatar-preview .xhs-avatar-emoji {
  font-size: 24px;
}

.xhs-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.xhs-avatar-btn {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--xhs-border);
  background: #fff;
  color: var(--xhs-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.xhs-avatar-hint {
  font-size: 11px;
  color: var(--xhs-muted);
}

.xhs-modal-error {
  font-size: 12px;
  color: #C83A3A;
  min-height: 16px;
}

.xhs-contact-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.xhs-contact-actions button {
  padding: 8px 14px;
  border-radius: 16px;
  border: 1px solid var(--xhs-accent);
  background: var(--xhs-accent);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.xhs-contact-actions .secondary {
  background: transparent;
  color: var(--xhs-text);
  border-color: var(--xhs-border);
}

.xhs-chat-settings h3,
.xhs-chat-setting-row label {
  color: var(--xhs-text);
}

.xhs-chat-settings-actions button,
.xhs-sticker-upload {
  background: var(--xhs-accent);
  border-color: var(--xhs-accent);
  color: #FFFFFF;
}

.xhs-chat-settings-actions .secondary,
.xhs-sticker-close {
  background: transparent;
  color: var(--xhs-text);
  border-color: var(--xhs-border);
}

.xhs-sticker-item {
  background: var(--xhs-surface);
  border-color: var(--xhs-border);
}

.x-edit-label {
  color: var(--xhs-muted);
}

.x-edit-input,
.x-edit-textarea {
  background: var(--xhs-surface);
  border-color: var(--xhs-border);
  color: var(--xhs-text);
}

.x-edit-save {
  background: var(--xhs-accent);
  border-color: var(--xhs-accent);
  color: #FFFFFF;
}

.x-edit-avatar-overlay {
  color: var(--xhs-peach-light);
}

.x-edit-cover {
  display: flex;
  align-items: center;
  gap: 12px;
}

.x-edit-cover-preview {
  width: 120px;
  height: 68px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--xhs-bg) 0%, var(--xhs-surface) 100%);
  border: 1px solid var(--xhs-border);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.x-edit-cover-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.x-edit-cover-btn {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--xhs-border);
  background: #fff;
  color: var(--xhs-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.x-edit-cover-hint {
  font-size: 11px;
  color: var(--xhs-muted);
}

.x-user-profile-header.scrolled {
  background: rgba(var(--xhs-bg-rgb), 0.95);
  border-bottom: 1px solid var(--xhs-border);
}

.x-user-profile-back,
.x-user-profile-nav-btn {
  background: rgba(109, 79, 187, 0.6);
  color: #FFFFFF;
}

.x-user-profile-back:hover,
.x-user-profile-nav-btn:hover {
  background: rgba(109, 79, 187, 0.75);
}

.x-user-profile-avatar {
  border-color: var(--xhs-bg);
  background: var(--xhs-surface);
}

.x-user-profile-follow-btn {
  background: var(--xhs-accent);
}

.x-user-profile-follow-btn:hover {
  background: var(--xhs-accent-strong);
}

.x-user-profile-follow-btn.following {
  border-color: var(--xhs-border);
  color: var(--xhs-text);
}

.x-user-profile-follow-btn.following:hover {
  background: var(--xhs-accent-weak);
  border-color: var(--xhs-border);
}

.x-user-profile-name,
.x-user-profile-bio {
  color: var(--xhs-text);
}

.x-user-profile-username,
.x-user-profile-meta-item,
.x-user-profile-meta-item svg,
.x-user-profile-meta-arrow {
  color: var(--xhs-muted);
}

.x-user-profile-social-hint {
  color: var(--xhs-muted);
}

.x-user-profile-tabs {
  background: var(--xhs-bg);
  border-bottom: 1px solid var(--xhs-border);
}

.x-user-profile-tab {
  color: var(--xhs-muted);
}

.x-user-profile-tab:hover {
  background: var(--xhs-accent-weak);
  color: var(--xhs-text);
}

.x-user-profile-tab.active {
  color: var(--xhs-text);
}

.x-user-profile-tab.active::after {
  background: var(--xhs-accent);
}



