.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  background: #2563eb;
  color: white;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.2s forwards;
}

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

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}
.post-card {
  background: var(--bg-secondary);
  border: none;
  border-radius: var(--radius);
  max-width: 470px;
  margin: 0 auto 30px;
  overflow: hidden;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 0 10px;
}

.post-header > a {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.post-avatar {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-hover);
  vertical-align: middle;
}

.post-avatar-placeholder {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.post-username {
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
}

.post-caption {
  padding: 0 0 8px;
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-caption-username {
  font-weight: 600;
  margin-right: 6px;
}

.post-time-dot {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 -4px;
  line-height: 1;
}

.post-time-inline {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 -2px;
  line-height: 1;
}

.post-follow-btn {
  margin-left: auto;
  padding: 4px 0;
  width: 56px;
  text-align: center;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: #4260EA;
  color: white;
  cursor: pointer;
  transition: background 0.15s;
}

.post-follow-btn:hover {
  background: #3A4BD7;
}

.post-follow-btn.following {
  background: rgb(240, 242, 245);
  color: var(--text-primary);
}

.post-follow-btn.following:hover {
  background: rgb(220, 222, 225);
}

.post-image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: pointer;
  border-radius: 8px;
}

.post-image-carousel {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.post-image-carousel::-webkit-scrollbar {
  display: none;
}

.post-image {
  width: 100%;
  height: auto;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  background: #000;
  scroll-snap-align: start;
}

.post-video-wrapper {
  position: relative;
  width: 100%;
  background: #000;
}

.post-video {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s ease;
}

.post-video-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.post-detail-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.post-image-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}

.post-image-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.2s;
  cursor: pointer;
}

.post-image-dot.active {
  background: white;
}

.post-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 3;
  padding: 0;
}

.post-detail-image-section:hover .post-carousel-btn {
  opacity: 1;
}

.post-carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.post-carousel-prev {
  left: 12px;
}

.post-carousel-next {
  right: 12px;
}

.post-zoom-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  border: none;
  border-radius: 6px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 3;
  padding: 0;
}

.post-detail-image-section:hover .post-zoom-btn {
  opacity: 1;
}

.post-zoom-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.post-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
}

.post-zoom-content {
  position: relative;
  width: 95vw;
  height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-zoom-carousel {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.post-zoom-carousel::-webkit-scrollbar {
  display: none;
}

.post-zoom-image {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: contain;
  scroll-snap-align: start;
  cursor: zoom-out;
}

.post-zoom-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}

.post-zoom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 5;
  padding: 0;
}

.post-zoom-nav:hover {
  background: rgba(255, 255, 255, 0.4);
}

.post-zoom-prev {
  left: 16px;
}

.post-zoom-next {
  right: 16px;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 4px;
  transition: opacity 0.15s;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
}

.post-action-btn:hover {
  opacity: 0.6;
}

.post-action-btn.liked {
  color: var(--danger);
}

.post-action-count {
  font-size: 14px;
  font-weight: 400;
  margin-left: 2px;
}

.post-action-btn.liked svg {
  fill: var(--danger);
}

.post-counts {
  padding: 0 16px 4px;
  display: flex;
  gap: 16px;
}

.post-count-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--text-secondary);
}

.post-count-item svg {
  width: 16px;
  height: 16px;
}

.post-title {
  padding: 0 16px 4px;
  font-weight: 600;
  font-size: 14px;
}

.post-description {
  padding: 0 16px 8px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

.post-description .post-desc-username {
  font-weight: 600;
  margin-right: 6px;
}

.post-time {
  padding: 0 16px 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Post Detail Modal */
.post-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes scaleOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}

.post-detail-overlay.closing {
  animation: fadeOut 0.2s ease forwards;
  pointer-events: none;
}

.post-detail-container.closing {
  animation: scaleOut 0.2s ease forwards;
}

.post-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.15s;
}

.post-detail-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.post-detail-mobile-header {
  display: none;
}

.post-detail-container {
  background: var(--bg-primary);
  border-radius: var(--radius);
  display: flex;
  width: 80vw;
  height: 80vh;
  overflow: hidden;
  animation: scaleIn 0.25s ease;
}

.post-detail-image-section {
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.post-detail-image-carousel {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.post-detail-image-carousel::-webkit-scrollbar {
  display: none;
}

.post-detail-image {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: contain;
  scroll-snap-align: start;
}

.post-detail-info {
  width: 45%;
  min-width: 360px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-color);
}

.post-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.post-detail-user-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.post-detail-dot {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.post-detail-follow-btn {
  margin-left: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: #3A4BD7;
  cursor: pointer;
}

.post-detail-follow-btn:hover {
  opacity: 0.7;
}

.post-detail-follow-btn.following {
  color: var(--text-secondary);
}

.post-detail-follow-btn.following:hover {
  opacity: 0.7;
}

.post-detail-title {
  padding: 12px 16px 4px;
  font-weight: 600;
  font-size: 15px;
}

.post-detail-description {
  padding: 0 16px 12px;
  font-size: 14px;
  line-height: 1.4;
}

.post-detail-comments {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 16px;
}

.post-detail-comment {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.post-detail-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.post-detail-comment-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.post-detail-comment-content {
  font-size: 14px;
}

.post-detail-comment-username {
  font-weight: 600;
  margin-right: 6px;
}

.post-detail-comment-avatar-link {
  flex-shrink: 0;
  text-decoration: none;
  align-self: flex-start;
}

.post-detail-comment-username-link {
  font-weight: 600;
  margin-right: 6px;
  text-decoration: none;
  color: var(--text-primary);
}

.post-detail-comment-username-link:hover {
  text-decoration: underline;
}

.post-detail-comment-time {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.comment-like-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 12px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  transition: color 0.15s;
}

.comment-like-btn:hover {
  color: var(--danger);
}

.comment-like-btn.liked {
  color: var(--danger);
}

.comment-delete-btn {
  padding: 2px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}

.post-edit-btn {
  padding: 2px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: none;
  transition: color 0.15s;
}

.post-edit-btn:hover {
  color: var(--accent);
}

.post-detail-comment:hover .comment-delete-btn {
  opacity: 1;
}

.comment-delete-btn:hover {
  color: var(--danger);
}

.comment-reply-tag {
  font-size: 14px;
  color: var(--accent);
  margin-right: 4px;
}

.comment-reply-preview {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-hover);
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.comment-highlight {
  animation: commentHighlight 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  border-radius: 8px;
}

@keyframes commentHighlight {
  0% { background: transparent; }
  15% { background: rgba(59, 130, 246, 0.12); }
  40% { background: rgba(59, 130, 246, 0.06); }
  100% { background: transparent; }
}

.comment-reply-btn {
  font-size: 12px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

.comment-reply-btn:hover {
  color: var(--text-primary);
}

.comment-collapse-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
  transition: color 0.15s;
}

.comment-collapse-btn:hover {
  color: var(--accent-hover);
}

.replying-to-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-hover);
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
}

.replying-to-bar button {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
}

.comment-reply-item {
  padding-left: 36px;
  margin-top: 4px;
}

.comment-reply-item .post-detail-comment-avatar-link {
  display: flex;
  align-items: flex-start;
}

.comment-reply-item .post-detail-comment-avatar,
.comment-reply-item .post-detail-comment-avatar-placeholder {
  width: 22px;
  height: 22px;
  font-size: 10px;
}

.post-detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-top: 1px solid var(--border-color);
}

.post-detail-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
}

.post-detail-comments-disabled {
  padding: 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-hover);
}

.post-detail-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 4px;
}

.post-detail-input-locked {
  opacity: 0.5;
  cursor: pointer;
  user-select: none;
}

.post-detail-submit {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: opacity 0.15s;
}

.post-detail-submit:hover {
  opacity: 0.7;
}

.post-detail-submit:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .post-detail-overlay {
    padding: 0;
  }

  .post-detail-container {
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    overflow: hidden;
  }

  .post-detail-mobile-header {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 10px 12px 10px 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
  }

  .post-detail-mobile-user {
    flex: 1;
  }

  .post-detail-back-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px 4px 8px 8px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    margin-left: 0;
  }

  .post-detail-back-btn:hover {
    background: var(--bg-hover);
  }

  .post-detail-mobile-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
  }

  .post-detail-mobile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
  }

  .post-detail-mobile-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
  }

  .post-detail-mobile-username {
    font-size: 15px;
    font-weight: 600;
  }

  .post-detail-close {
    display: none;
  }

  .post-detail-image-section {
    flex: none;
    max-height: 40vh;
    min-height: 25vh;
  }

  .post-detail-info {
    width: 100%;
    min-width: 0;
    flex: 1;
    border-left: none;
    border-top: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .post-detail-header {
    display: none;
  }

  .post-detail-comments {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .comment-delete-btn {
    opacity: 1;
  }

  .post-edit-btn {
    display: flex;
  }
}

/* Share tooltip */
.share-tooltip {
  position: relative;
}

.share-tooltip-text {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  animation: fadeInOut 1.5s ease-in-out;
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* Confirm Dialog */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  animation: fadeIn 0.2s ease;
}

.confirm-overlay.closing {
  animation: fadeOut 0.2s ease forwards;
}

.confirm-modal {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 24px;
  width: 360px;
  max-width: 85vw;
  animation: scaleIn 0.2s ease;
}

.confirm-modal.closing {
  animation: scaleOut 0.2s ease forwards;
}

.confirm-modal-message {
  font-size: 15px;
  color: var(--text-primary);
  margin: 0 0 20px;
  text-align: center;
  line-height: 1.5;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-btn-cancel,
.confirm-btn-confirm {
  flex: 1;
  padding: 8px 0;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}

.confirm-btn-cancel {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.confirm-btn-cancel:hover {
  opacity: 0.85;
}

.confirm-btn-confirm {
  background: var(--danger);
  color: #fff;
}

.confirm-btn-confirm:hover {
  opacity: 0.85;
}

/* ============================================================
   登录提示弹窗 (LoginPrompt)
   z-index: 500 高于 ConfirmDialog(400) 和 PostDetail(200)
   ============================================================ */

.login-prompt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  animation: fadeIn 0.2s ease;
}

.login-prompt-overlay.closing {
  animation: fadeOut 0.2s ease forwards;
}

.login-prompt-modal {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: 340px;
  max-width: 85vw;
  text-align: center;
  animation: scaleIn 0.2s ease;
}

.login-prompt-modal.closing {
  animation: scaleOut 0.2s ease forwards;
}

.login-prompt-message {
  font-size: 15px;
  color: var(--text-primary);
  margin: 0 0 24px;
  line-height: 1.5;
}

.login-prompt-actions {
  display: flex;
  gap: 12px;
}

.login-prompt-btn-cancel,
.login-prompt-btn-go {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.login-prompt-btn-cancel {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.login-prompt-btn-cancel:hover {
  opacity: 0.85;
}

.login-prompt-btn-go {
  background: var(--accent);
  color: #fff;
}

.login-prompt-btn-go:hover {
  opacity: 0.85;
}
.home-layout {
  display: flex;
  margin: 0 auto;
  padding: 30px 60px 30px 120px;
  gap: 180px;
}

.home-feed {
  flex: 1;
  min-width: 0;
  max-width: 520px;
}

.home-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 30px;
  align-self: flex-start;
}

.recommend-card {
  background: transparent;
}

.recommend-header {
  padding-bottom: 16px;
  margin-bottom: 12px;
}

.recommend-user {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.recommend-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.recommend-avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
}

.recommend-username {
  font-size: 15px;
  font-weight: 600;
}

.recommend-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.recommend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recommend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.recommend-item.removing {
  opacity: 0;
  transform: translateX(20px);
}

.recommend-item-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  transition: opacity 0.15s;
}

.recommend-item-link:hover {
  opacity: 0.7;
}

.recommend-follow-btn {
  flex-shrink: 0;
  padding: 4px 12px;
  background: #4260EA;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.recommend-follow-btn:hover {
  background: #3A4BD7;
}

.recommend-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.recommend-item-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.recommend-item-info {
  min-width: 0;
}

.recommend-item-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommend-item-id {
  font-size: 12px;
  color: var(--text-secondary);
}

.recommend-empty {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  padding: 16px 0;
}

@media (max-width: 768px) {
  .home-layout {
    flex-direction: column;
    padding: 16px;
    gap: 0;
  }

  .home-feed {
    max-width: 100%;
    margin: 0 auto;
  }

  .home-sidebar {
    display: none;
  }
}

/* Pull-to-refresh: finger-following indicator */
.home-pull-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  pointer-events: none;
}

/* Progress circle (shown during pull, hidden during refresh) */
.home-pull-progress {
  display: block;
}

.home-pull-indicator.refreshing .home-pull-progress {
  display: none;
}

/* Spinner (hidden during pull, shown during refresh) */
.home-pull-spinner {
  display: none;
  width: 26px;
  height: 26px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: pull-spin 0.7s linear infinite;
}

.home-pull-indicator.refreshing .home-pull-spinner {
  display: block;
}

@keyframes pull-spin {
  to { transform: rotate(360deg); }
}

.home-icp {
  text-align: center;
  padding: 20px 0 30px;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.15s;
}

.home-icp:hover {
  opacity: 1;
  text-decoration: underline;
}
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: var(--sidebar-width-collapsed);
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  transition: width 0.2s ease;
  z-index: 100;
  overflow: hidden;
}

.sidebar.expanded {
  width: var(--sidebar-width-expanded);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  margin: 4px 12px 12px;
  min-height: 48px;
}

.sidebar-brand-icon {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 24px;
  text-align: center;
}

.sidebar-brand-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
}

.sidebar.expanded .sidebar-brand-text {
  opacity: 1;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 12px;
  border-radius: var(--radius);
  transition: background 0.15s;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  background: none;
  width: 100%;
  font-size: 16px;
}

.sidebar-item:hover {
  background: var(--bg-hover);
}

.sidebar-item.active {
  font-weight: 600;
}

.sidebar-item.active .sidebar-item-icon {
  color: #4260ea;
}

.sidebar-item-icon {
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sidebar-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.sidebar-item-label {
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
}

.sidebar.expanded .sidebar-item-label {
  opacity: 1;
}

.sidebar-bottom {
  padding: 12px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: background 0.15s;
}

.sidebar-user:hover {
  background: var(--bg-hover);
}

.sidebar-avatar {
  --avatar-size: 28px !important;
  background: var(--bg-hover);
  min-width: 28px;
  max-width: none;
}

.sidebar-avatar-placeholder {
  --avatar-size: 28px !important;
  min-width: 28px;
}

.sidebar-username {
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
  font-size: 14px;
}

.sidebar.expanded .sidebar-username {
  opacity: 1;
}

/* Mobile bottom nav */
@media (max-width: 768px) {
  .sidebar {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(64px + var(--safe-area-bottom)) !important;
    flex-direction: row !important;
    border-right: none !important;
    border-top: 1px solid var(--border-color);
    padding: 0 !important;
    padding-bottom: var(--safe-area-bottom) !important;
    z-index: 200;
    transform: none !important;
    transition: none !important;
    background: rgba(255, 255, 255, 0.8) !important;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px) saturate(180%);
  }

  .sidebar.expanded {
    width: 100% !important;
    height: calc(64px + var(--safe-area-bottom)) !important;
  }

  .sidebar-brand,
  .sidebar-brand-text,
  .sidebar-username,
  .sidebar-bottom {
    display: none !important;
  }

  .sidebar-nav {
    flex: 1 !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    padding: 0 !important;
    gap: 0 !important;
    margin-top: 0 !important;
  }

  .sidebar-item {
    padding: 6px 0 !important;
    margin: 0 !important;
    flex-direction: column !important;
    gap: 2px !important;
    justify-content: center !important;
    -webkit-tap-highlight-color: transparent;
    background: transparent !important;
  }

  .sidebar-item:hover {
    background: transparent !important;
  }

  .sidebar-item-label {
    display: none !important;
  }

  .sidebar-item-search {
    display: none !important;
  }

  .sidebar-item-icon svg {
    width: 28px;
    height: 28px;
  }
}
.profile-container {
  max-width: 935px;
  margin: 0 auto;
  padding: 30px 20px;
  position: relative;
}

.profile-mobile-logout {
  display: none;
}

.profile-header {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
  align-items: center;
  justify-content: center;
}

.profile-avatar-section {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-avatar-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.profile-action-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.profile-follow-btn {
  padding: 12px 0;
  width: 200px;
  text-align: center;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  background: #4260EA;
  color: white;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.profile-follow-btn:hover {
  background: #3A4BD7;
}

.profile-follow-btn.following {
  background: rgb(240, 242, 245);
  color: var(--text-primary);
}

.profile-follow-btn.following:hover {
  background: rgb(220, 222, 225);
}


.profile-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.15s;
  background: var(--bg-hover);
}

.profile-avatar:hover {
  opacity: 0.8;
}

.profile-avatar-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.profile-avatar-placeholder:hover {
  opacity: 0.8;
}

.profile-info {
  flex: 0 1 auto;
  text-align: center;
}

.profile-top-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.profile-username {
  font-size: 24px;
  font-weight: 700;
}

.profile-edit-btn {
  padding: 12px 0;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  background: rgb(240, 242, 245);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  width: 200px;
  text-align: center;
}

.profile-edit-btn:hover {
  background: rgb(220, 222, 225);
}

.profile-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.profile-stat {
  font-size: 16px;
}

.profile-stat.clickable {
  cursor: pointer;
  transition: opacity 0.15s;
}

.profile-stat.clickable:hover {
  opacity: 0.7;
}

.profile-stat-count {
  font-weight: 600;
}

.profile-bio {
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.profile-bio-name {
  font-weight: 600;
}

/* Edit profile form */
.profile-edit-form {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}

.profile-edit-form h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

.profile-form-group {
  margin-bottom: 16px;
}

.profile-form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.profile-form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.profile-form-input:focus {
  border-color: var(--text-secondary);
}

.profile-form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.15s;
}

.profile-form-textarea:focus {
  border-color: var(--text-secondary);
}

.profile-form-actions {
  display: flex;
  gap: 12px;
}

.profile-save-btn {
  padding: 8px 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.profile-save-btn:hover {
  background: var(--accent-hover);
}

.profile-cancel-btn {
  padding: 8px 24px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-primary);
  cursor: pointer;
}

/* Posts grid */
.profile-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.profile-post-item {
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
}

.profile-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-post-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.profile-post-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}

.profile-post-item:hover .profile-post-actions {
  opacity: 1;
}

.profile-post-edit,
.profile-post-delete {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.profile-post-edit:hover {
  background: var(--accent);
}

.profile-post-delete:hover {
  background: var(--danger);
}

.profile-edit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.profile-edit-modal {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 24px;
  width: 420px;
  max-width: 90vw;
}

.profile-edit-modal-lg {
  width: 560px;
  max-height: 85vh;
  overflow-y: auto;
}

.profile-edit-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.profile-edit-images .create-preview-item.new-file {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}

.profile-edit-images .create-preview-item.clickable {
  cursor: pointer;
}

.create-preview-item.marked-delete {
  opacity: 0.4;
}

.delete-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--danger);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}

.profile-edit-modal h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.profile-edit-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.profile-edit-textarea:focus {
  border-color: var(--accent);
}

.profile-edit-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.profile-post-item:hover .profile-post-overlay {
  opacity: 1;
}

.profile-post-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.profile-posts-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.profile-posts-empty-icon {
  margin-bottom: 12px;
}

.profile-posts-empty-text {
  font-size: 20px;
  font-weight: 300;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .profile-container {
    padding: 16px;
    padding-bottom: 72px;
    max-width: 100%;
    margin: 0 auto;
  }

  .profile-mobile-logout {
    display: flex;
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    z-index: 10;
  }

  .profile-mobile-logout:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .profile-avatar,
  .profile-avatar-placeholder {
    width: 100px;
    height: 100px;
    font-size: 40px;
  }

  .profile-top-row {
    justify-content: center;
  }

  .profile-stats {
    justify-content: center;
  }

  .profile-posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
  }
}

/* ============================================================
 * 编辑/创建帖子弹窗移动端样式
 * ============================================================ */

@media (max-width: 768px) {
  .profile-edit-overlay {
    align-items: flex-end;
  }

  .profile-edit-modal {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 12px 12px 0 0;
    padding: 20px 16px;
    overflow-y: auto;
  }

  .profile-edit-modal-lg {
    width: 100%;
    max-height: 90vh;
  }

  .create-step3 {
    flex-direction: column;
  }

  .create-step3-left {
    width: 100%;
    max-height: 40vh;
  }

  .create-step3-right {
    width: 100%;
  }
}

/* ============================================================
 * 粉丝/关注弹窗样式
 * ============================================================ */

.followers-modal {
  background: var(--bg-primary);
  border-radius: 12px;
  width: 480px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: scaleIn 0.2s ease;
}

.followers-modal.closing {
  animation: scaleOut 0.2s ease forwards;
}

.followers-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.followers-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  flex: 1;
}

.followers-modal-search {
  position: relative;
  padding: 12px 16px;
}

.followers-modal-search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.followers-modal-search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: none;
  border-radius: 18px;
  font-size: 14px;
  outline: none;
  background: #F3F5F7;
  line-height: 36px;
}

.followers-modal-search-input::placeholder {
  color: var(--text-secondary);
}

.followers-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.followers-modal-close:hover {
  background: var(--bg-hover);
}

.followers-modal-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.followers-modal-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.followers-modal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s;
}

.followers-modal-item:hover {
  background: var(--bg-hover);
}

.followers-modal-item-info {
  flex: 1;
  min-width: 0;
}

.followers-modal-item-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.followers-modal-item-bio {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.followers-modal-btn {
  padding: 4px 12px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.followers-modal-btn:hover {
  background: var(--accent-hover);
}

.followers-modal-btn.following {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.followers-modal-btn.following:hover {
  background: var(--bg-hover);
}

/* Create post */
.create-layout {
  display: flex;
  max-width: 900px;
  margin: 0 auto;
  min-height: 80vh;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.create-image-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  min-height: 400px;
  position: relative;
}

.create-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  padding: 40px;
  text-align: center;
}

.create-upload-icon {
  color: var(--text-secondary);
}

.create-upload-text {
  font-size: 20px;
  font-weight: 300;
  color: var(--text-secondary);
}

.create-upload-hint {
  font-size: 14px;
  color: var(--text-secondary);
}

.create-upload-btn {
  padding: 8px 20px;
  background: #4260ea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.create-upload-btns {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.create-video-preview-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.create-video-preview {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.create-video-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.create-video-remove:hover {
  background: var(--danger);
}

.create-edit-video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.create-cover-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.create-cover-left {
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.create-cover-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.create-cover-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.create-cover-placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 16px;
}

.create-cover-right {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border-left: 1px solid var(--border-color);
  overflow-y: auto;
}

.create-cover-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.create-cover-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.create-cover-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.create-cover-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border-color);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.create-cover-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.create-cover-time {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 36px;
  text-align: right;
}

.create-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.create-preview-multi {
  width: 100%;
  height: 100%;
  padding: 12px;
  overflow-y: auto;
}

.create-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
}

.create-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: grab;
  transition: opacity 0.15s;
  min-height: 0;
  -webkit-user-drag: none;
}

.create-preview-item.dragging {
  opacity: 0.8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 10;
  will-change: transform;
}

.create-preview-index {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 11px;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-zoom-img {
  cursor: zoom-in;
}

.preview-zoom-area {
  position: absolute;
  inset: 0;
  cursor: zoom-in;
  z-index: 2;
}

.preview-delete-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.15s;
}

.create-preview-item:hover .preview-delete-x {
  opacity: 1;
}

.preview-delete-x:hover {
  background: var(--danger);
}

.create-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 5;
}

.create-preview-remove:hover {
  background: var(--danger);
}

.create-preview-add {
  aspect-ratio: 1;
  border: 2px dashed var(--border-color);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 12px;
  transition: border-color 0.15s, color 0.15s;
}

.create-preview-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.create-form-section {
  width: 340px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-color);
}

.create-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.create-form-header h3 {
  font-size: 16px;
}

.create-share-btn {
  padding: 6px 16px;
  background: #4260ea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.create-share-btn:hover {
  background: #3550d4;
}

.create-share-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.create-form-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.create-form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}

.create-form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 150px;
  flex: 1;
}

@media (max-width: 768px) {
  .create-layout {
    flex-direction: column;
    min-height: auto;
  }

  .create-image-section {
    min-height: 300px;
  }

  .create-form-section {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }
}

/* Explore grid */
.explore-container {
  max-width: 935px;
  margin: 0 auto;
  padding: 30px 20px;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.explore-item {
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
}

.explore-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explore-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  transition: opacity 0.15s;
}

.explore-item:hover .explore-item-overlay {
  opacity: 1;
}

.explore-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.explore-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px;
  color: var(--text-secondary);
}

/* Create post overlay */
.create-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.create-overlay.closing {
  animation: fadeOut 0.2s ease forwards;
}

.create-dialog {
  width: 64vw;
  height: 80vh;
  background: var(--bg-primary);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: scaleIn 0.2s ease;
}

.create-dialog.closing {
  animation: scaleOut 0.2s ease forwards;
}

.create-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.create-overlay-title {
  font-size: 16px;
  font-weight: 600;
}

.create-overlay-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-primary);
  transition: background 0.15s;
}

.create-overlay-btn:hover {
  background: var(--bg-hover);
}

.create-overlay-btn.primary {
  background: #4260ea;
  color: white;
}

.create-overlay-btn.primary:hover {
  background: #3550d4;
}

.create-overlay-btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.create-overlay-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.create-overlay-body .create-upload-area {
  width: 100%;
  max-width: 600px;
}

.create-overlay-body .create-preview-grid {
  max-width: 700px;
  max-height: 100%;
  margin: 0 auto;
  aspect-ratio: 1;
  overflow: hidden;
}

/* Step 1: 9-Grid layout */
.create-grid-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px;
  box-sizing: border-box;
}

.create-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 450px;
  overflow: hidden;
}

.create-grid-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: grab;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  background: var(--bg-secondary);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.create-grid-item:active {
  cursor: grabbing;
}

.create-grid-item.pressing {
  transform: scale(1.05);
}

.create-grid-item.dragging-source {
  opacity: 0.3;
}

.create-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  display: block;
}

.grid-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.15s;
}

.create-grid-item:hover .grid-delete-btn {
  opacity: 1;
}

.grid-delete-btn:hover {
  background: var(--danger);
}

.grid-index {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 11px;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.create-grid-add {
  aspect-ratio: 1;
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 12px;
  transition: border-color 0.15s, color 0.15s;
  background: transparent;
}

.create-grid-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.create-grid-new-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}

/* Dragged item (portal) styles */
.create-grid-dragging {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  border-radius: 10px;
  overflow: hidden;
  opacity: 0.85;
  transform: scale(0.85);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  will-change: transform;
}

.create-grid-dragging img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Step 2: Edit layout */
.create-edit-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.create-edit-left {
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 0;
}

.create-edit-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-edit-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.create-edit-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.create-edit-nav:hover {
  background: rgba(0, 0, 0, 0.7);
}

.create-edit-prev {
  left: 12px;
}

.create-edit-next {
  right: 12px;
}

.create-edit-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.create-edit-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.15s;
}

.create-edit-dot.active {
  background: white;
}

.create-edit-right {
  width: 300px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-color);
  flex-shrink: 0;
}

.create-edit-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
}

.create-edit-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.create-edit-avatar-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.create-edit-username {
  font-size: 14px;
  font-weight: 600;
}

.create-edit-desc-wrapper {
  flex: 5;
  display: flex;
  flex-direction: column;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border-color);
}

.create-edit-textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  font-family: inherit;
  background: transparent;
  color: var(--text-primary);
  min-height: 100px;
}

.create-edit-textarea::placeholder {
  color: var(--text-secondary);
}

.create-edit-desc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.create-edit-char-count {
  font-size: 12px;
  color: var(--text-secondary);
}

.create-edit-advanced {
  flex: 5;
  border-bottom: 1px solid var(--border-color);
}

.create-edit-advanced-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
}

.create-edit-advanced-toggle:hover {
  background: var(--bg-hover);
}

.create-edit-advanced-options {
  padding: 0 20px 16px;
}

.create-edit-toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  cursor: pointer;
}

.create-edit-toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--bg-hover);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.create-edit-toggle.on {
  background: #4260ea;
}

.create-edit-toggle-knob {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
}

.create-edit-toggle.on .create-edit-toggle-knob {
  transform: translateX(20px);
}

@media (max-width: 768px) {
  .create-overlay {
    align-items: flex-end;
  }

  .create-dialog {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .create-overlay-header {
    padding: 12px 16px;
  }

  .create-overlay-btn {
    background: #F3F5F7;
    border-radius: 8px;
    padding: 8px 16px;
  }

  .create-overlay-btn:hover {
    background: #e5e7eb;
  }

  .create-overlay-btn.primary {
    background: #4260ea;
    color: white;
  }

  .create-overlay-btn.primary:hover {
    background: #3550d4;
  }

  .create-overlay-body {
    padding: 16px;
  }

  .create-edit-layout {
    flex-direction: column;
  }

  .create-edit-left {
    width: 100%;
    height: auto;
    max-height: 40vh;
  }

  .create-edit-right {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-color);
    flex: 1;
    overflow-y: auto;
  }

  .create-edit-image-wrapper {
    max-height: 35vh;
  }

  .create-edit-textarea {
    min-height: 100px;
  }

  .create-cover-layout {
    flex-direction: column;
  }

  .create-cover-left {
    width: 100%;
    height: auto;
    max-height: 50vh;
  }

  .create-cover-preview {
    padding: 12px;
  }

  .create-cover-right {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding: 16px;
    flex-shrink: 0;
  }
}
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  padding: 20px;
}

.auth-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 350px;
  text-align: center;
}

.auth-logo {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 24px;
  line-height: 1.4;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  background: var(--bg-secondary);
  outline: none;
  transition: border-color 0.15s;
}

.auth-input:focus {
  border-color: var(--text-secondary);
}

.auth-button {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 8px;
}

.auth-button:hover {
  background: var(--accent-hover);
}

.auth-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-error {
  color: var(--danger);
  font-size: 14px;
  margin-bottom: 8px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-link {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-link a {
  color: var(--accent);
  font-weight: 600;
}

.auth-icp {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.15s;
}

.auth-icp:hover {
  opacity: 1;
  text-decoration: underline;
}
/* ============================================================
 * 搜索页样式 (Search Page)
 * ============================================================ */

.search-page {
  width: 100%;
  min-height: 100%;
  padding: 0 20px 40px;
}

/* 搜索框区域 */
.search-box-wrapper {
  display: flex;
  justify-content: center;
  padding: 40px 0 32px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-primary);
}

.search-input-container {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.search-input-icon {
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 18px 0 44px;
  border: none;
  border-radius: 20px;
  font-size: 15px;
  outline: none;
  background: #F3F5F7;
  transition: box-shadow 0.2s;
  line-height: 40px;
}

.search-input:focus {
  box-shadow: 0 0 0 2px rgba(66, 96, 234, 0.15);
  background: #F3F5F7;
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.search-clear-btn:hover {
  background: var(--bg-hover);
}

/* 搜索结果信息 */
.search-result-info {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* 帖子网格 */
.search-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  max-width: 1200px;
  margin: 0 auto;
}

.search-grid-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-secondary);
}

.search-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.search-grid-item:hover img {
  transform: scale(1.03);
}

.search-grid-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  transition: opacity 0.2s;
}

.search-grid-item:hover .search-grid-overlay {
  opacity: 1;
}

.search-grid-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-weight: 700;
  font-size: 15px;
}

/* 视频标识 */
.search-grid-video-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 多图标识 */
.search-grid-multi-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  color: white;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* 加载更多 */
.search-load-more {
  display: flex;
  justify-content: center;
  padding: 32px 0;
}

.search-load-more-btn {
  padding: 10px 32px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.15s;
}

.search-load-more-btn:hover {
  background: var(--bg-hover);
}

/* 空状态 */
.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.search-empty-icon {
  opacity: 0.3;
  margin-bottom: 16px;
}

.search-empty-text {
  font-size: 18px;
  font-weight: 300;
}

.search-empty-hint {
  font-size: 14px;
  margin-top: 8px;
}

/* 加载状态 */
.search-loading {
  display: flex;
  justify-content: center;
  padding: 60px 0;
  color: var(--text-secondary);
}

/* 响应式 */
@media (max-width: 768px) {
  .search-box-wrapper {
    padding: 20px 0 16px;
  }

  .search-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    max-width: 100%;
  }

  .search-input {
    font-size: 14px;
    padding: 0 16px 0 44px;
  }
}

@media (max-width: 480px) {
  .search-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
  }
}
.messages-layout {
  display: flex;
  height: 100vh;
  background: var(--bg-primary);
}

.messages-sidebar {
  width: 350px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.messages-sidebar-header {
  padding: 17px 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 2;
}

.messages-sidebar-title {
  font-size: 20px;
  font-weight: 700;
}

.messages-follow-search {
  position: relative;
  padding: 8px 12px;
}

.messages-follow-search-input-wrapper {
  position: relative;
}

.messages-follow-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.messages-follow-search-input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  border: none;
  border-radius: 17px;
  font-size: 13px;
  outline: none;
  background: #F3F5F7;
  line-height: 34px;
}

.messages-follow-search-input::placeholder {
  color: var(--text-secondary);
}

.messages-follow-results {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 240px;
  overflow-y: auto;
  z-index: 10;
}

.messages-follow-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}

@media (hover: hover) {
  .messages-follow-item:hover {
    background: var(--bg-hover);
  }
}

.messages-follow-item-name {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages-list {
  flex: 1;
  overflow-y: auto;
}

.messages-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.messages-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.messages-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

@media (hover: hover) {
  .messages-tab:hover {
    color: var(--text-primary);
  }
}

.message-item.unread {
  background: rgba(0, 149, 246, 0.05);
}

.message-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.message-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  border-radius: 8px;
  background: none;
  width: 100%;
  text-align: left;
}

@media (hover: hover) {
  .message-item:hover {
    background: var(--bg-hover);
  }
}

.message-item.active {
  background: var(--bg-hover);
}

.message-item-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.message-item-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}

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

.message-item-username {
  font-size: 14px;
  font-weight: 600;
}

.message-item-preview {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-item-time {
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.unread-badge {
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* Chat area */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
}

.chat-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-header-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.chat-header-username {
  font-weight: 600;
  font-size: 16px;
}

.chat-clear-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
}

@media (hover: hover) {
  .chat-clear-btn:hover {
    color: var(--danger);
    background: rgba(255, 0, 0, 0.08);
  }
}

.chat-back-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 4px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  margin-right: 2px;
}

@media (hover: hover) {
  .chat-back-btn:hover {
    background: var(--bg-hover);
  }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 72px 20px 72px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chat-messages::-webkit-scrollbar {
  display: none;
}

.chat-message-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.chat-message-row.sent {
  flex-direction: row-reverse;
}

.chat-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  align-self: flex-start;
}

.chat-msg-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  align-self: flex-start;
}

.chat-bubble-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 60%;
}

.chat-bubble-wrapper.sent {
  align-items: flex-end;
}

.chat-bubble-wrapper.received {
  align-items: flex-start;
}

.chat-message {
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.chat-message.sent {
  background: var(--accent);
  color: white;
}

.chat-message.received {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.chat-message-time {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  padding: 0 4px;
}

.chat-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
}

.chat-image-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

@media (hover: hover) {
  .chat-image-btn:hover {
    color: var(--accent);
    background: rgba(0, 149, 246, 0.08);
  }
}

.chat-image-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-message-image {
  max-width: 240px;
  max-height: 240px;
  border-radius: 12px;
  object-fit: cover;
  cursor: pointer;
}

.chat-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  animation: fadeIn 0.2s ease;
}

.chat-zoom-overlay.closing {
  animation: fadeOut 0.2s ease forwards;
}

.chat-zoom-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.15s;
}

@media (hover: hover) {
  .chat-zoom-close:hover {
    background: rgba(255, 255, 255, 0.15);
  }
}

.chat-zoom-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  animation: scaleIn 0.2s ease;
}

.chat-zoom-image.closing {
  animation: scaleOut 0.2s ease forwards;
}

.chat-input-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2px 8px 2px 4px;
  transition: border-color 0.15s;
  min-width: 0;
  overflow: hidden;
  background: var(--bg-primary);
}

.chat-input-container > div {
  flex-shrink: 0;
}

.chat-input-container:focus-within {
  border-color: var(--text-secondary);
}

.chat-input {
  flex: 1;
  border: none;
  padding: 8px 6px;
  font-size: 14px;
  outline: none;
  min-width: 0;
  width: 0;
  background: transparent;
}

.chat-input:focus {
  border-color: var(--text-secondary);
}

.chat-send-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

@media (hover: hover) {
  .chat-send-btn:hover {
    background: var(--accent-hover);
  }
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  gap: 12px;
}

.chat-empty-icon {
  width: 64px;
  height: 64px;
  border: 2px solid var(--text-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-empty-text {
  font-size: 20px;
  font-weight: 300;
}

.chat-empty-sub {
  font-size: 14px;
}

@media (max-width: 768px) {
  .messages-layout {
    position: relative;
    height: calc(100vh - 64px - var(--safe-area-bottom));
    flex-direction: column;
    overflow: hidden;
  }

  .messages-page {
    padding-bottom: 0 !important;
  }

  .messages-sidebar {
    width: 100%;
    height: 100%;
    border-right: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
  }

  .messages-sidebar-header {
    padding: 16px 16px;
  }

  .messages-sidebar-title {
    font-size: 22px;
  }

  .messages-follow-search {
    padding: 8px 12px;
  }

  .messages-follow-search-input {
    height: 38px;
    font-size: 14px;
    line-height: 38px;
    border-radius: 19px;
  }

  .messages-follow-results {
    left: 12px;
    right: 12px;
    max-height: 200px;
  }

  .messages-follow-item {
    padding: 6px 10px;
    gap: 8px;
  }

  .messages-follow-item-name {
    font-size: 13px;
  }

  .messages-tabs {
    padding: 0 8px;
  }

  .messages-tab {
    padding: 10px 12px;
    font-size: 13px;
  }

  .messages-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .messages-list::-webkit-scrollbar {
    display: none;
  }

  .message-item {
    padding: 10px 16px;
    -webkit-tap-highlight-color: transparent;
  }

  .message-item-avatar {
    width: 40px !important;
    height: 40px !important;
  }

  .message-item-username {
    font-size: 14px;
  }

  .message-item-preview {
    font-size: 12px;
  }

  .message-item-time {
    font-size: 11px;
  }

  .chat-area {
    display: none;
  }

  .chat-area.has-partner {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 201;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
  }

  .chat-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 16px 10px 8px;
    min-height: 52px;
    gap: 4px;
    z-index: 2;
  }

  .chat-back-btn {
    display: flex;
    margin: 0;
    padding: 2px;
  }

  .chat-header-avatar {
    margin-left: 0;
  }

  .chat-back-btn {
    display: flex;
    margin-right: 0;
  }

  .chat-header-avatar {
    width: 36px !important;
    height: 36px !important;
  }

  .chat-header-username {
    font-size: 15px;
  }

  .chat-msg-avatar {
    width: 28px !important;
    height: 28px !important;
  }

  .chat-messages {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 56px;
    overflow-y: auto;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .chat-messages::-webkit-scrollbar {
    display: none;
  }

  .chat-message {
    font-size: 14px;
    padding: 8px 12px;
    max-width: 75vw;
  }

  .chat-message-image {
    max-width: 65vw;
    max-height: 50vw;
  }

  .chat-input-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 10px;
    gap: 6px;
    border-top: 1px solid var(--border-color);
    z-index: 2;
  }

  .chat-input-container {
    padding: 2px 6px 2px 2px;
    min-width: 0;
  }

  .chat-input {
    font-size: 14px;
    padding: 8px 4px;
    min-width: 0;
    width: 0;
  }

  .chat-send-btn {
    width: 36px;
    height: 36px;
  }

  .chat-image-btn {
    width: 36px;
    height: 36px;
  }

  .chat-clear-btn {
    width: 36px;
    height: 36px;
  }

  .unread-badge {
    font-size: 10px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes scaleOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}
/* Admin Page */
.admin-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px;
}

.admin-header {
  margin-bottom: 24px;
}

.admin-title {
  font-size: 24px;
  font-weight: 700;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.admin-tab:hover {
  color: var(--text-primary);
}

.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  flex: 1;
  max-width: 360px;
}

.admin-search input {
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  flex: 1;
  color: var(--text-primary);
}

.admin-search svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.admin-table-wrapper {
  overflow-x: auto;
  background: var(--bg-primary);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: var(--bg-hover);
}

.admin-role {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.admin-role.admin {
  background: #e8f0fe;
  color: #1a73e8;
}

.admin-role.user {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.admin-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.admin-action-btn:hover {
  background: var(--border-color);
}

.admin-action-btn.del:hover {
  background: #fee2e2;
  color: var(--danger);
}

.admin-action-btn.pw:hover {
  background: #e8f0fe;
  color: #1a73e8;
}

.admin-post-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

.admin-desc {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
}

.admin-pagination button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  cursor: pointer;
  transition: background 0.15s;
  color: var(--text-primary);
}

.admin-pagination button:hover:not(:disabled) {
  background: var(--bg-hover);
}

.admin-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Send form */
.admin-send-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.admin-send-btn:hover {
  opacity: 0.85;
}

.admin-send-form {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-send-form input,
.admin-send-form textarea,
.admin-send-form select {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.admin-send-form input:focus,
.admin-send-form textarea:focus,
.admin-send-form select:focus {
  border-color: var(--accent);
}

.admin-send-form textarea {
  resize: vertical;
  min-height: 100px;
}

.admin-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.admin-confirm-btn {
  padding: 8px 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.admin-confirm-btn:hover {
  opacity: 0.85;
}

.admin-cancel-btn {
  padding: 8px 24px;
  background: var(--bg-hover);
  color: var(--text-primary);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.admin-cancel-btn:hover {
  opacity: 0.85;
}

/* Modal */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  animation: fadeIn 0.2s ease;
}

.admin-modal {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 24px;
  width: 400px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: scaleIn 0.2s ease;
}

.admin-modal h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.admin-modal input {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.admin-modal input:focus {
  border-color: var(--accent);
}

/* Announcement Page */
.announcement-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 30px 20px;
}

.announcement-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.announcement-header h1 {
  font-size: 24px;
  font-weight: 700;
}

.announcement-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.announcement-empty svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

.announcement-empty p {
  font-size: 16px;
}

.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.announcement-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.announcement-card:hover {
  border-color: var(--accent);
}

.announcement-card.unread {
  border-left: 3px solid var(--accent);
}

.announcement-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.announcement-card-title {
  font-size: 16px;
  font-weight: 600;
}

.announcement-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.announcement-card-content {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.announcement-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

/* 用户搜索选择器 */
.ann-search-wrapper {
  position: relative;
}

.ann-search-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  transition: border-color 0.15s;
}

.ann-search-input-row:focus-within {
  border-color: var(--accent);
}

.ann-search-input-row svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.ann-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  padding: 0;
}

.ann-search-clear {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.ann-search-clear:hover {
  color: var(--text-primary);
}

.ann-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ann-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.1s;
}

.ann-search-item:hover {
  background: var(--bg-hover);
}

.ann-search-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.ann-search-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.ann-search-username {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.ann-search-id {
  font-size: 12px;
  color: var(--text-secondary);
}

.ann-search-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.ann-search-selected {
  font-size: 13px;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 500;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .admin-page {
    padding: 16px;
    padding-bottom: 72px;
    max-width: 100%;
  }

  .admin-header {
    margin-bottom: 16px;
  }

  .admin-title {
    font-size: 20px;
  }

  .admin-tabs {
    overflow-x: auto;
    gap: 0;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-tab {
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .admin-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .admin-search {
    width: 100%;
    min-width: 0;
  }

  .admin-send-btn {
    width: 100%;
    justify-content: center;
  }

  .admin-send-form {
    padding: 16px;
  }

  .admin-send-form input,
  .admin-send-form textarea {
    font-size: 16px; /* 防止 iOS 自动缩放 */
  }

  .admin-form-actions {
    flex-direction: column;
    gap: 8px;
  }

  .admin-confirm-btn,
  .admin-cancel-btn {
    width: 100%;
    padding: 12px;
  }

  .admin-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }

  .admin-table-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .admin-table {
    min-width: 500px;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 6px;
    font-size: 12px;
  }

  .admin-modal-overlay {
    align-items: flex-end;
  }

  .admin-modal {
    width: 100%;
    max-width: 100%;
    padding: 20px 16px;
    border-radius: 16px 16px 0 0;
    max-height: 80vh;
    overflow-y: auto;
  }

  .admin-modal input {
    font-size: 16px;
  }

  .admin-pagination {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .admin-pagination button {
    padding: 8px 14px;
    font-size: 13px;
  }

  .admin-action-btn {
    padding: 6px;
  }

  /* 搜索下拉框移动端 */
  .ann-search-dropdown {
    max-height: 200px;
  }

  .ann-search-item {
    padding: 10px 12px;
  }
}
@font-face {
  font-family: 'MiSans';
  src: url('/assets/MiSans-Regular-ES4DrbaF.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MiSans';
  src: url('/assets/MiSans-Semibold-B34HIk9C.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #ffffff;
  --bg-hover: #f5f5f5;
  --border-color: #dbdbdb;
  --text-primary: #262626;
  --text-secondary: #8e8e8e;
  --accent: #0095f6;
  --accent-hover: #1877f2;
  --danger: #ed4956;
  --sidebar-width-collapsed: 72px;
  --sidebar-width-expanded: 244px;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'MiSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: 16px;
}

button, a {
  touch-action: manipulation;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea {
  font-family: inherit;
}

img {
  max-width: 100%;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  margin-left: var(--sidebar-width-collapsed);
  flex: 1;
  min-height: 100vh;
  padding: 0;
}

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }

  .main-content {
    margin-left: 0;
    padding-bottom: calc(72px + var(--safe-area-bottom));
    width: 100%;
  }

  /* 确保所有页面容器居中并给底部导航栏留空间 */
  .admin-page,
  .profile-container,
  .home-layout,
  .messages-page,
  .announcement-page {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: calc(72px + var(--safe-area-bottom)) !important;
    box-sizing: border-box !important;
  }

  /* 防止页面整体溢出 */
  body {
    overflow-x: hidden;
  }
}

/* 隐藏所有滚动条（App端不需要） */
html {
  -ms-overflow-style: none;
  scrollbar-width: none !important;
}

html::-webkit-scrollbar,
html::-webkit-scrollbar-track,
html::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-corner,
body::-webkit-scrollbar,
body::-webkit-scrollbar-track,
body::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-corner,
#root::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

*, *::before, *::after {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

*::-webkit-scrollbar,
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-corner {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}
