/* ============================================
   community.css - 圈子广场样式（独立文件）
   ============================================ */

/* 圈子顶栏 */
.community-top-bar {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, #262242 0%, #262242 100%);
  padding: 14px 16px 10px; display: flex; align-items: center; gap: 10px;
}
.community-top-bar h1 { font-size: 20px; font-weight: 700; flex: 1; }

/* 发帖浮动按钮 */
.community-fab {
  position: fixed; right: calc((100vw - 480px) / 2 + 16px); bottom: 80px;
  width: 52px; height: 52px; border-radius: 50%;
  background: #927CFF;
  display: flex; align-items: center; justify-content: center;
  color: #F0ECFF; font-size: 28px; font-weight: 300; cursor: pointer; z-index: 90;
  box-shadow: 0 4px 16px rgba(226, 122, 138,0.4);
  transition: transform 0.15s;
  line-height: 1;
}
@media (max-width: 480px) {
  .community-fab { right: 16px; }
}
.community-fab:active { transform: scale(0.92); }

/* 帖子列表 */
.post-list { padding: 8px 12px 12px; }
.post-item {
  background: rgba(104, 86, 164, 0.16);
  border-radius: 20px; padding: 14px; margin-bottom: 10px;
  border: 1px solid rgba(168, 148, 234, 0.09);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) inset; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);}
.post-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.post-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #806FC2, #927CFF);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; overflow: hidden;
}
.post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-user-info { flex: 1; min-width: 0; }
.post-username {
  font-size: 14px; font-weight: 600; color: #F0ECFF;
  display: flex; align-items: center; gap: 6px;
}
.post-user-level {
  font-size: 10px; padding: 1px 6px; border-radius: 8px;
  background: linear-gradient(135deg, #F8B058, #D4964A);
  color: #F0ECFF;
}
.post-time { font-size: 12px; color: #C7BBE8; margin-top: 2px; }
.post-content {
  font-size: 14px; color: #C7BBE8; line-height: 1.6;
  margin-bottom: 10px; word-break: break-word; cursor: pointer;
}
.post-images {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px; margin-bottom: 10px;
}
.post-image {
  width: 100%; aspect-ratio: 1; border-radius: 6px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.post-image img { width: 100%; height: 100%; object-fit: cover; }
.post-actions {
  display: flex; align-items: center; gap: 20px;
  padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.06);
}
.post-action {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: #C7BBE8; cursor: pointer;
}
.post-action.liked { color: #927CFF; }
.post-action-icon { font-size: 16px; }

/* ============================================
   发帖弹窗 - 全屏在手机屏幕内
   ============================================ */
.post-modal-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); z-index: 500;
  display: none;
}
.post-modal-mask.show { display: block; }

.post-modal {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: 100%;
  background: #262242;
  display: flex; flex-direction: column;
  animation: slideDown 0.25s ease;
  overflow: hidden;
}
@keyframes slideDown {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.post-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.post-modal-cancel {
  font-size: 15px; color: #C7BBE8; cursor: pointer;
  padding: 6px 4px;
}
.post-modal-submit {
  padding: 7px 22px;
  background: #927CFF;
  border: none; border-radius: 20px; color: #F0ECFF;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.post-modal-submit:disabled { background: #555; cursor: not-allowed; }

.post-modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.post-user-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.post-user-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #806FC2, #927CFF);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; color: #F0ECFF;
  flex-shrink: 0; overflow: hidden;
}
.post-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-user-name { font-size: 15px; font-weight: 600; color: #F0ECFF; }

.post-textarea {
  width: 100%; min-height: 120px; max-height: 200px;
  padding: 0; background: transparent; border: none;
  color: #F0ECFF; font-size: 16px;
  resize: none; outline: none;
  font-family: inherit; line-height: 1.6;
}
.post-textarea::placeholder { color: #9889C2; }
.post-char-count {
  text-align: right; font-size: 12px; color: #C7BBE8; margin-top: 6px;
}

/* 图片预览 */
.post-images-preview {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; margin-top: 12px;
}
.post-image-item {
  aspect-ratio: 1; border-radius: 8px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.post-image-item img { width: 100%; height: 100%; object-fit: cover; }
.post-image-add {
  border: 1px dashed rgba(255,255,255,0.2);
  color: #C7BBE8; font-size: 28px; cursor: pointer;
}
.post-image-del {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #F0ECFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer; line-height: 1;
}

/* 话题标签 */
.post-topic-title {
  font-size: 13px; color: #C7BBE8; margin: 16px 0 8px;
  display: flex; align-items: center; gap: 6px;
  font-weight: 500;
}
.post-topic-tag {
  display: inline-block; padding: 5px 12px; margin: 4px 6px 4px 0;
  background: rgba(104, 86, 164, 0.12); color: #9889C2;
  border-radius: 14px; font-size: 13px; cursor: pointer;
  transition: all 0.15s;
}
.post-topic-tag.selected {
  background: rgba(146,124,255,0.28);
  border: 1px solid #927CFF;
  padding: 4px 11px;
}

/* 底部工具栏 */
.post-modal-footer {
  display: flex; align-items: center; gap: 20px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.post-tool-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; color: #C7BBE8; cursor: pointer;
  padding: 6px 4px;
}
.post-tool-btn-icon {
  font-size: 18px;
  width: 22px; text-align: center;
}

/* ============================================
   帖子详情页
   ============================================ */
.post-detail-header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, #262242 0%, #262242 100%);
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.post-detail-back {
  cursor: pointer; font-size: 22px; color: #F0ECFF;
  width: 30px; font-weight: 300;
}
.post-detail-header h1 { font-size: 16px; font-weight: 600; flex: 1; }

.comment-list { padding: 0 16px 80px; }
.comment-item {
  display: flex; gap: 10px; padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.comment-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #806FC2, #927CFF);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0; overflow: hidden;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-body { flex: 1; min-width: 0; }
.comment-username { font-size: 13px; font-weight: 600; color: #F0ECFF; }
.comment-time { font-size: 11px; color: #C7BBE8; margin-left: 8px; }
.comment-content { font-size: 14px; color: #C7BBE8; line-height: 1.5; margin-top: 4px; }

.comment-input-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  width: 100%; max-width: 480px; margin: 0 auto;
  background: #262242; padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; gap: 10px; align-items: center; z-index: 100;
}
.comment-input {
  flex: 1; padding: 10px 14px;
  background: rgba(255,255,255,0.08);
  border: none; border-radius: 20px; color: #F0ECFF;
  font-size: 14px; outline: none;
}
.comment-send-btn {
  padding: 8px 18px;
  background: #927CFF; color: #F0ECFF;
  border: none; border-radius: 20px; font-size: 14px; cursor: pointer;
  flex-shrink: 0;
}
.comment-send-btn:disabled { background: #555; cursor: not-allowed; }

/* 已选话题标签 */
.post-selected-topics {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.post-selected-topic-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  background: #927CFF;
  color: #F0ECFF;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.post-selected-topic-del {
  margin-left: 2px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* 帖子话题链接 */
.post-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 6px;
}
.post-topic-link {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(146,124,255,0.12);
  color: #927CFF;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.4;
}
.post-topic-link:hover {
  background: rgba(226, 122, 138,0.2);
}

/* 帖子三点菜单按钮 */
.post-more-btn {
  position: absolute;
  right: 4px;
  top: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #C7BBE8;
  cursor: pointer;
  border-radius: 50%;
  z-index: 5;
}
.post-more-btn:active {
  background: rgba(0,0,0,0.05);
}

/* 帖子操作底部菜单 */
.post-action-sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.post-action-sheet-mask.show {
  display: flex;
}
.post-action-sheet {
  width: 100%;
  max-width: 480px;
  background: #262242;
  border-radius: 16px 16px 0 0;
  padding: 12px 0 0;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.post-action-sheet-header {
  text-align: center;
  color: #C7BBE8;
  font-size: 13px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.post-action-sheet-body {
  padding: 4px 0;
}
.post-action-item {
  padding: 14px 20px;
  text-align: center;
  font-size: 15px;
  color: #F0ECFF;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.post-action-item:active {
  background: rgba(255,255,255,0.05);
}
.post-action-item.danger {
  color: #E27A8A;
}
.post-action-sheet-cancel {
  padding: 14px 20px;
  text-align: center;
  font-size: 15px;
  color: #C7BBE8;
  cursor: pointer;
  border-top: 6px solid #262242;
}

/* 举报弹窗 */
.report-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
}
.report-modal-mask.show {
  display: flex;
}
.report-modal {
  width: 90%;
  max-width: 420px;
  max-height: 80vh;
  background: #262242;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.report-modal-header h3 {
  margin: 0;
  font-size: 17px;
  color: #F0ECFF;
}
.report-modal-close {
  font-size: 24px;
  color: #C7BBE8;
  cursor: pointer;
  line-height: 1;
}
.report-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.report-label {
  font-size: 14px;
  color: #C7BBE8;
  margin-bottom: 10px;
}
.report-type-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.report-type-item {
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  font-size: 14px;
  color: #C7BBE8;
  cursor: pointer;
}
.report-type-item:active,
.report-type-item.selected {
  background: rgba(146,124,255,0.15);
  color: #927CFF;
}
.report-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #F0ECFF;
  font-size: 14px;
  resize: none;
  box-sizing: border-box;
}
.report-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.report-images .post-image-item {
  aspect-ratio: 1;
}
.report-modal-footer {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.report-btn-back {
  flex: 1;
  padding: 12px;
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 24px;
  color: #C7BBE8;
  font-size: 15px;
  cursor: pointer;
}
.report-btn-submit {
  flex: 2;
  padding: 12px;
  background: #927CFF;
  border: none;
  border-radius: 24px;
  color: #F0ECFF;
  font-size: 15px;
  cursor: pointer;
}
.report-btn-submit:disabled {
  opacity: 0.5;
}


/* ============================================
   帖子详情页操作栏
   ============================================ */
.post-detail-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
  padding: 14px 16px;
  margin: 0 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.post-detail-time {
  margin-left: auto;
  font-size: 12px;
  color: #C7BBE8;
}

.post-detail-action {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px 8px;
}

.post-detail-action-icon {
  font-size: 17px;
  color: #C7BBE8;
}

.post-detail-action-icon.detail-like-icon {
  color: #927CFF;
}

.post-detail-action-count {
  font-size: 13px;
  color: #C7BBE8;
}

.post-detail-action:active .post-detail-action-icon,
.post-detail-action:active .post-detail-action-count {
  color: #927CFF;
}

/* ============================================
   评论区标题
   ============================================ */
.comment-section-title {
  padding: 14px 16px 8px;
  font-size: 14px;
  font-weight: 600;
  color: #F0ECFF;
}

/* ============================================
   评论项样式（优化版）
   ============================================ */
.comment-list { padding: 0 16px 80px; }

.comment-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #806FC2, #927CFF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-user-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-username {
  font-size: 13px;
  font-weight: 600;
  color: #F0ECFF;
}

.comment-content {
  font-size: 14px;
  color: #C7BBE8;
  line-height: 1.5;
  margin-top: 4px;
  word-break: break-word;
}

.comment-bottom-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.comment-time {
  font-size: 11px;
  color: #C7BBE8;
}

.comment-reply-btn {
  font-size: 11px;
  color: #C7BBE8;
  cursor: pointer;
}

.comment-reply-btn:active {
  color: #927CFF;
}

/* 帖子详情页隐藏底部导航栏的样式 */
#page-post-detail .comment-input-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #262242;
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 100;
}

.comment-input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 20px;
  color: #F0ECFF;
  font-size: 14px;
  outline: none;
}

.comment-send-btn {
  padding: 8px 18px;
  background: #927CFF;
  color: #F0ECFF;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.comment-send-btn:disabled {
  background: #555;
  cursor: not-allowed;
}

/* 卡片容器内发光 - 8%白色 */
.card-item, .post-item, .profile-card, .profile-stat-card, .profile-menu {
  box-shadow: inset 0 0 20px rgba(255,255,255,0.08);
}
