.community-login-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.community-login-modal {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 14px;
  padding: 18px 20px 14px 20px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  width: 80%;
  max-width: 320px;
  color: #e5e7eb;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
}

.community-login-modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.community-login-modal-text {
  font-size: 13px;
  margin-bottom: 12px;
  color: #9ca3af;
}

.community-login-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.community-login-modal-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.community-login-modal-btn-cancel {
  background: transparent;
  color: #9ca3af;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.community-login-modal-btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #f9fafb;
}

/* 社区分类大标题区域（目前默认隐藏，仅保留结构） */
.community-category-header {
  display: none;
  position: relative;
  margin: 0 -20px 20px -20px;
  padding: 40px 20px 20px 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%);
  border-radius: 0 0 15px 15px;
  overflow: hidden;
}

.community-category-header-inner {
  position: relative;
  z-index: 1;
}

.community-category-title {
  margin: 0 0 10px 0;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
}

.community-category-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.community-category-count {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.community-category-back {
  display: none;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
}

/* 社区顶部 tabs + 发布按钮 */
.community-tabs-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.community-post-create-btn {
  margin-left: 4px;
}

/* 社区帖子列表"加载更多"按钮样式已统一到 common.css */
/* 社区帖子列表"加载更多"容器样式已统一到 common.css */

/* 社区发帖卡片结构 */
.post-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.post-author-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.post-author-name {
  font-size: 13px;
  color: #f9fafb;
}

.post-time {
  font-size: 11px;
  color: var(--text-light);
}

.post-category-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #f9fafb;
  white-space: nowrap;
}

.post-title {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 三图布局 */
.post-thumbs {
  margin: 8px 0;
}

.post-thumbs-inner {
  display: flex;
  gap: 4px;
  align-items: stretch;
}

.post-thumb-main,
.post-thumb-sub {
  overflow: hidden;
  border-radius: 8px;
}

.post-thumb-main {
  flex: 2;
}

.post-thumb-sub-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-thumb-img {
  width: 100%;
  aspect-ratio: 1.77;
  object-fit: cover;
  display: block;
}

/* 社区详情页样式 */
#community-detail-page .content {
  background: radial-gradient(circle at top, #0f172a 0%, #020617 55%, #000 100%);
  color: #e5e7eb;
  min-height: 100vh;
}

.community-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px 20px;
}

.community-detail-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-detail-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
}

.community-detail-author {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.community-detail-author-name {
  font-size: 14px;
  font-weight: 500;
}

.community-detail-time {
  font-size: 12px;
  color: #9ca3af;
}

.community-detail-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.community-detail-category {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.5);
  color: #e5e7eb;
  white-space: nowrap;
}

.community-detail-back {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #64748b 0%, #0f172a 100%);
  color: #e5e7eb;
  text-decoration: none;
  border: 1px solid rgba(148,163,184,0.6);
}

.community-detail-back:hover {
  background: linear-gradient(135deg, #818cf8 0%, #4f46e5 100%);
  color: #f9fafb;
}

.community-detail-title {
  padding: 0 20px 10px 20px;
  font-size: 18px;
  font-weight: 600;
  color: #f9fafb;
}

.community-detail-content {
  padding: 0 0 30px 0;
  font-size: 14px;
  line-height: 1.7;
  color: #e5e7eb;
  word-break: break-word;
}

.community-detail-content p {
  margin: 0 0 10px 0;
}

.community-detail-content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  margin: 4px 0;
}

.community-video-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 3;
}

.community-video-lock-cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: blur(8px);
  transform: scale(1.05);
  z-index: 1;
}

.community-video-lock-overlay-inner {
  max-width: 90%;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #e5e7eb;
  font-size: 13px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.community-video-lock-icon {
  font-size: 20px;
}

.community-video-lock-info {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148,163,184,0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #e5e7eb;
}

.community-video-lock-info-icon {
  font-size: 22px;
  line-height: 1;
}

.community-video-lock-info-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.community-video-lock-info-title {
  font-weight: 600;
}

.community-video-lock-info-desc {
  font-size: 12px;
  color: #cbd5f5;
}

.community-video-lock-info-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  background: linear-gradient(135deg,#4f46e5,#6366f1);
  color: #f9fafb;
  white-space: nowrap;
}

.community-detail-meta {
  margin: 4px 0 12px 0;
  padding: 8px 20px;
  border-radius: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #e5e7eb;
  width: 100%;
  box-sizing: border-box;
}

.community-detail-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-detail-meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.community-detail-meta-btn {
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  background: rgba(31, 41, 55, 0.9);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 社区解锁确认弹窗：在登录弹窗基础上稍作调整，使其更精致 */
#community-confirm-modal .login-modal-content {
  width: 88%;
  max-width: 400px;
  padding: 20px 18px 16px 18px;
  background: radial-gradient(circle at top, #0b1120 0%, #020617 55%, #000 100%);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.95);
}

#community-confirm-modal .login-modal-title {
  font-size: 16px;
  text-align: center;
  margin-bottom: 10px;
  color: #e5e7eb;
  letter-spacing: 0.03em;
}

#community-confirm-modal .login-modal-text {
  font-size: 13px;
  line-height: 1.7;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22) 0%, rgba(15, 23, 42, 0.98) 55%, rgba(15, 23, 42, 1) 100%);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(59, 130, 246, 0.7);
  margin-bottom: 10px;
  color: #e5e7eb;
}

/* 文案行：第一行作为当前社区标题，下面为说明文字 */
#community-confirm-modal .community-confirm-line-main {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

#community-confirm-modal .community-confirm-line-sub {
  font-size: 13px;
}

/* 底部按钮横排靠右显示，仅影响社区确认弹窗 */
#community-confirm-modal .community-confirm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
}

#community-confirm-modal .login-modal-close,
#community-confirm-modal .login-modal-btn {
  width: auto;
  padding: 8px 18px;
  font-size: 13px;
}

@media (min-width: 768px) {
  .community-detail-title {
    font-size: 20px;
  }
  .community-detail-content {
    font-size: 15px;
  }
}

/* 社区空状态/错误状态 */
.community-empty-message,
.community-board-empty-message {
  padding: 20px;
  text-align: center;
  width: 100%;
  color: #999;
}

/* 让“暂无社区板块”在社区网格中占满整行，真正居中 */
.community-grid .community-board-empty-message {
  grid-column: 1 / -1;
}

.community-error-message {
  padding: 20px;
  text-align: center;
  color: #f87171;
}
