/* 朋友圈样式 - 微信风格（封面+滚动遮盖） */

/* 朋友圈页面整体 */
#moments-page {
  position: relative;
  overflow: hidden;
  background: #000 !important;
}

#moments-page .page-body {
  background: transparent !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* 背景图层 - 全屏固定，作为整个页面的背景 */
.moments-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(0px) brightness(1);
  z-index: 0;
}

/* 背景遮罩层 - 极淡遮罩保证文字可读 */
.moments-bg-layer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, 
    rgba(0,0,0,0.1) 0%, 
    rgba(0,0,0,0) 30%,
    rgba(0,0,0,0.15) 100%
  );
}

/* 背景暗色遮罩 - 去掉fixed的全屏遮罩 */
#moments-page::before {
  display: none;
}

/* 顶部导航栏 - 透明悬浮 */
#moments-page .page-header {
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-top: none !important;
  border-bottom: none !important;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

#moments-page .page-header .page-title {
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

#moments-page .page-header .page-back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

#moments-page .page-header .page-back svg {
  stroke: #fff !important;
  width: 18px;
  height: 18px;
}

#moments-page .page-header div[style*="color"] {
  color: #fff !important;
}

#moments-page .page-header img {
  filter: brightness(10);
}

/* 封面区域 - 滚动内容中的占位区，底部显示用户信息 */
#moments-cover {
  display: flex !important;
  align-items: flex-end;
  gap: 14px;
  position: relative;
  z-index: 2;
  padding: 20px;
  margin-bottom: 20px;
  background: transparent !important;
  height: 280px !important;
  width: 100% !important;
  cursor: pointer;
}

/* 封面用户信息 */
.cover-user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.cover-user-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 3px solid rgba(255,255,255,0.8);
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.cover-user-name {
  font-size: 20px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.cover-user-sign {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}

/* 封面底部渐变遮罩 - 不需要了 */
#moments-cover::after {
  display: none;
}

/* 隐藏联系人侧边栏 */
.moments-sidebar {
  display: none !important;
}

/* 内容容器 - 透明背景，卡片浮在背景上 */
#momentsContainer {
  position: relative;
  z-index: 2;
  padding: 0 12px 80px 12px !important;
  background: transparent !important;
  border-radius: 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 朋友圈卡片 - 半透明效果 */
.moment-item {
  background: rgba(255, 255, 255, 0.50);
  padding: 16px;
  margin-bottom: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.moment-item:active {
  transform: scale(0.98);
}

.moment-item:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.2);
}

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

.moment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.moment-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255,182,193,0.5);
}

.moment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.moment-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.moment-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

/* 内容 */
.moment-content {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 10px;
}

.moment-content img {
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* 操作按钮 - 简洁emoji风格 */
.moment-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.moment-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 12px;
  transition: all 0.2s;
  background: none;
  border: none;
}

.moment-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

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

.moment-action-btn.delete-moment {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.3);
}

.moment-action-btn.delete-moment:hover {
  color: #ff6b6b;
  background: rgba(255, 100, 100, 0.1);
}

.action-emoji {
  font-size: 16px;
  line-height: 1;
}

.action-count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 2px;
}

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

/* 点赞区 */
.moment-likes {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px 10px 0 0;
  font-size: 12px;
  color: rgba(255, 182, 193, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* 评论区 */
.moment-comments {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
}

.moment-likes + .moment-comments {
  margin-top: 0;
  border-radius: 0 0 10px 10px;
}

.moment-comment-item {
  font-size: 12px;
  margin-bottom: 6px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

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

.moment-comment-text {
  flex: 1;
  color: rgba(255, 255, 255, 0.8);
}

.comment-author {
  color: #7ecbff;
  font-weight: 500;
  cursor: pointer;
}

.comment-reply-to {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.comment-delete-btn {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0 4px;
  transition: color 0.2s;
}

.comment-delete-btn:hover {
  color: #ff6b6b;
}

/* 底部输入区 */
/* 内嵌评论输入框（嵌入帖子卡片内） */
.moment-inline-input-area {
  margin-top: 8px;
  padding: 8px 0 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  animation: fadeSlideIn 0.2s ease;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.moment-inline-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.moment-reply-prefix {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  flex-shrink: 0;
  padding-left: 2px;
}

.moment-inline-input {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  outline: none;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: all 0.2s;
  min-width: 0;
}

.moment-inline-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
}

.moment-inline-input:focus {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.moment-inline-send-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
  transition: all 0.2s;
}

.moment-inline-send-btn:hover {
  transform: scale(1.08);
}

.moment-inline-send-btn:active {
  transform: scale(0.92);
}

/* 浮动发布按钮 */
.moments-post-float-btn {
  position: fixed;
  bottom: 30px;
  right: 20px;
  z-index: 50;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b8a, #ff8e53);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,107,138,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.moments-post-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(255,107,138,0.6);
}

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

/* 空提示 */
#momentsContainer .empty-tip {
  color: rgba(255, 255, 255, 0.5) !important;
  text-align: center;
  padding: 60px 20px;
  font-size: 14px;
}

/* 个人空间页面 - 白底黑字 */
.moment-profile-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff !important;
  color: #333;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

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

.moment-profile-header {
  position: relative;
  height: 200px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.moment-profile-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
}

.moment-profile-info {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.moment-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.moment-profile-name {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.moment-profile-back {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.moment-profile-back:hover {
  background: rgba(0, 0, 0, 0.6);
}

.moment-profile-back svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
}

.moment-profile-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* 个人空间统计区 */
.moment-profile-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 16px 20px;
  background: #f8f8f8;
  margin: 0 16px;
  border-radius: 12px;
  border: 1px solid #eee;
}

.moment-profile-stat {
  text-align: center;
}

.moment-profile-stat-num {
  font-size: 20px;
  font-weight: 700;
  color: #333;
}

.moment-profile-stat-label {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

/* 个人空间中的动态卡片 */
.moment-profile-body .moment-item {
  background: #f9f9f9;
  border: 1px solid #eee;
}

.moment-profile-body .moment-item .moment-name {
  color: #333;
}

.moment-profile-body .moment-item .moment-time {
  color: #999;
}

.moment-profile-body .moment-item .moment-content {
  color: #333;
}

.moment-profile-body .moment-item .moment-actions {
  border-top: 1px solid #eee;
}

.moment-profile-body .moment-item .moment-action-btn {
  color: #666;
}

.moment-profile-body .moment-item .moment-comments {
  background: #f0f0f0;
}

.moment-profile-body .moment-item .moment-comment-text {
  color: #333;
}

.moment-profile-body .moment-item .comment-author {
  color: #576b95;
}

.moment-profile-body .moment-item .moment-likes {
  background: #f0f0f0;
  color: #ff6b8a;
}

/* 可见性标签 */
.visibility-tag {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.moment-profile-body .visibility-tag {
  color: #999;
  border-color: #ddd;
}

/* 滚动条隐藏 */
#momentsContainer::-webkit-scrollbar {
  display: none;
}

#moments-page .page-body::-webkit-scrollbar {
  display: none;
}

/* 顶部操作按钮圆形 */
.moments-header-action {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  transition: all 0.2s;
}

.moments-header-action:hover {
  background: rgba(255,255,255,0.25);
}

.moments-header-action img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: brightness(10) !important;
}

/* ========== 浅色封面模式 ========== */
#moments-page.light-cover-mode .moment-name {
  color: #333;
}

#moments-page.light-cover-mode .moment-time {
  color: #999;
}

#moments-page.light-cover-mode .moment-content {
  color: #333;
}

#moments-page.light-cover-mode .moment-action-btn {
  color: #666;
}

#moments-page.light-cover-mode .action-count {
  color: #666;
}

#moments-page.light-cover-mode .moment-action-btn.liked {
  color: #ff6b8a;
}

#moments-page.light-cover-mode .moment-action-btn.liked .action-count {
  color: #ff6b8a;
}

#moments-page.light-cover-mode .moment-actions {
  border-top-color: rgba(0, 0, 0, 0.08);
}

#moments-page.light-cover-mode .moment-comments {
  background: rgba(0, 0, 0, 0.05);
}

#moments-page.light-cover-mode .moment-comment-text {
  color: #333;
}

#moments-page.light-cover-mode .comment-author {
  color: #666;
}

#moments-page.light-cover-mode .comment-reply-to {
  color: #999;
}

#moments-page.light-cover-mode .moment-likes {
  background: rgba(0, 0, 0, 0.05);
  color: #ff6b8a;
}

#moments-page.light-cover-mode .moment-item {
  border-color: rgba(0, 0, 0, 0.08);
}

#moments-page.light-cover-mode .moment-action-btn.delete-moment {
  color: rgba(0, 0, 0, 0.3);
}

#moments-page.light-cover-mode .moment-action-btn.delete-moment:hover {
  color: #ff6b6b;
}

#moments-page.light-cover-mode #momentsContainer .empty-tip {
  color: #999 !important;
}

#moments-page.light-cover-mode .cover-user-name {
  color: #333;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#moments-page.light-cover-mode .cover-user-sign {
  color: #666;
}
