* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", "Hiragino Sans GB W3", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #111;
  background: #f6f6f1;
}

a {
  color: #37a;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Navbar */
.navbar {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 20px;
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand a {
  font-size: 20px;
  font-weight: bold;
  color: #072;
}

.navbar-menu {
  display: flex;
  gap: 20px;
}

.navbar-menu a {
  color: #072;
}

/* Container */
.container {
  max-width: 990px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Grid Layout */
.grid {
  display: flex;
  gap: 20px;
}

.grid-3 {
  display: flex;
  gap: 20px;
}

.grid-3> :first-child {
  flex: 1;
}

.grid-3> :last-child {
  width: 270px;
  flex-shrink: 0;
}

@media (max-width: 768px) {

  .grid,
  .grid-3 {
    flex-direction: column;
  }

  .grid-3> :last-child {
    width: 100%;
  }
}

/* Cards - 豆瓣风格 */
.card {
  background: #fff;
  border: 1px solid #e8e8e8;
  margin-bottom: 10px;
  padding: 15px;
}

.card-title {
  font-size: 14px;
  font-weight: normal;
  margin-bottom: 5px;
}

.card-title a {
  color: #37a;
}

.card-title a:hover {
  color: #072;
}

.card-meta {
  color: #999;
  font-size: 12px;
}

/* Topic Header in Card */
.topic-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.topic-header .avatar-sm {
  width: 24px;
  height: 24px;
}

/* Sidebar - 豆瓣风格 */
.sidebar {
  background: #faf9f5;
  border: 1px solid #e8e8e8;
  margin-bottom: 10px;
}

.sidebar-title {
  font-size: 14px;
  font-weight: bold;
  padding: 10px 15px;
  background: #f0efe8;
  border-bottom: 1px solid #e8e8e8;
  color: #072;
}

.sidebar-list {
  list-style: none;
  padding: 10px 15px;
}

.sidebar-list li {
  padding: 5px 0;
  border-bottom: 1px dotted #e8e8e8;
  font-size: 13px;
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-list a {
  color: #37a;
}

/* Buttons - 豆瓣风格 */
.btn {
  display: inline-block;
  padding: 5px 15px;
  border: 1px solid #c7deb8;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  background: linear-gradient(to bottom, #fff 0%, #f0f0f0 100%);
  color: #072;
}

.btn:hover {
  text-decoration: none;
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
}

.btn-primary {
  background: linear-gradient(to bottom, #64c83c 0%, #3ba726 100%);
  border-color: #3ba726;
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(to bottom, #5ab835 0%, #349920 100%);
}

/* Forms */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #666;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  font-size: 13px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #9bc07d;
  outline: none;
}

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

/* Avatar */
.avatar,
.avatar-sm,
.avatar-xs,
.avatar-lg {
  border-radius: 0;
  object-fit: cover;
}

.avatar {
  width: 48px;
  height: 48px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

.avatar-xs {
  width: 24px;
  height: 24px;
}

.avatar-lg {
  width: 64px;
  height: 64px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  color: #999;
  font-size: 12px;
}

/* Topic Page Layout */
.topic-page-layout {
  display: flex;
  gap: 20px;
}

.topic-page-layout .topic-detail {
  flex: 1;
  min-width: 0;
}

.topic-sidebar {
  width: 270px;
  flex-shrink: 0;
}

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

  .topic-sidebar {
    width: 100%;
  }
}

/* Sidebar Group Card */
.sidebar-group-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  margin-bottom: 15px;
}

.sidebar-group-header {
  display: flex;
  gap: 12px;
  padding: 15px;
}

.sidebar-group-icon {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}

.sidebar-group-info {
  flex: 1;
  min-width: 0;
}

.sidebar-group-name {
  display: block;
  font-size: 14px;
  color: #072;
  font-weight: bold;
  margin-bottom: 5px;
  line-height: 1.4;
}

.sidebar-group-name:hover {
  text-decoration: none;
  color: #37a;
}

.sidebar-group-desc {
  font-size: 12px;
  color: #999;
  line-height: 1.5;
  margin: 0;
}

.sidebar-group-stats {
  padding: 12px 15px;
  text-align: center;
  color: #072;
  font-size: 13px;
  border-top: 1px solid #e8e8e8;
}

.sidebar-group-stats strong {
  font-size: 16px;
}

.sidebar-join-btn {
  display: block;
  width: calc(100% - 30px);
  margin: 0 15px 15px;
  text-align: center;
}

.sidebar-member-status {
  padding: 0 15px 15px;
  text-align: center;
  color: #999;
  font-size: 12px;
}

/* Sidebar Latest Discussions */
.sidebar-latest {
  background: #fff;
  border: 1px solid #e8e8e8;
}

.sidebar-latest-header {
  padding: 12px 15px;
  font-size: 15px;
  font-weight: bold;
  color: #333;
  border-bottom: 1px solid #e8e8e8;
}

.sidebar-more {
  font-size: 12px;
  font-weight: normal;
  color: #37a;
}

.sidebar-latest-list {
  list-style: none;
  padding: 10px 15px;
  margin: 0;
}

.sidebar-latest-list li {
  padding: 8px 0;
  border-bottom: 1px dotted #e8e8e8;
  font-size: 13px;
  line-height: 1.5;
}

.sidebar-latest-list li:last-child {
  border-bottom: none;
}

.sidebar-topic-title {
  color: #37a;
}

.sidebar-topic-title:hover {
  color: #072;
}

.sidebar-topic-author {
  color: #999;
  font-size: 12px;
}

/* Feed Section - 随便看看 */
.feed-section {
  margin-bottom: 2rem;
}

.feed-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.feed-item:last-child {
  border-bottom: none;
}

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

.feed-item-body {
  flex: 1;
  min-width: 0;
}

.feed-item-header {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
}

.feed-item-user {
  color: #37a;
  font-weight: bold;
}

.feed-item-action {
  color: #999;
}

.feed-item-action a {
  color: #37a;
}

.feed-item-title {
  color: #37a;
  font-weight: bold;
  font-size: 14px;
}

.feed-item-preview {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  margin-top: 2px;
}

.feed-item-meta {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.feed-item-meta a {
  color: #999;
}

.feed-item-meta a:hover {
  color: #37a;
}

/* Topic Card - 豆瓣风格 */
.topic-card {
  display: flex;
  gap: 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  margin-bottom: 10px;
}

.topic-card-likes {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 15px 10px;
  border-right: 1px solid #e8e8e8;
  background: #faf9f5;
}

.topic-card-like-count {
  font-size: 20px;
  color: #e09015;
  font-weight: bold;
  line-height: 1;
}

.topic-card-like-label {
  font-size: 11px;
  color: #e09015;
  margin-top: 4px;
}

.topic-card-main {
  flex: 1;
  padding: 15px;
  min-width: 0;
}

.topic-card-title {
  font-size: 14px;
  font-weight: normal;
  margin-bottom: 8px;
}

.topic-card-title a {
  color: #37a;
}

.topic-card-title a:hover {
  color: #072;
}

.topic-card-preview {
  color: #666;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dotted #e8e8e8;
}

.topic-card-meta {
  color: #999;
  font-size: 12px;
}

.topic-card-meta a {
  color: #37a;
}

.topic-card-date {
  margin-left: 15px;
}

/* Topic Detail - 豆瓣风格 */
.topic-detail {
  background: #fff;
  border: 1px solid #e8e8e8;
}

.topic-detail .topic-header {
  padding: 15px;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 0;
}

.topic-group {
  color: #666;
  font-size: 12px;
}

.topic-group:hover {
  color: #072;
}

.group-icon-sm {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 5px;
}

.topic-title {
  font-size: 22px;
  font-weight: normal;
  padding: 20px 15px 10px;
  color: #007722;
}

.topic-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 15px 15px;
  color: #999;
  font-size: 12px;
  border-bottom: 1px solid #e8e8e8;
}

.topic-author {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #37a;
}

.topic-date {
  color: #999;
}

.topic-actions-inline {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
}

.topic-edit-link {
  color: #999;
  font-size: 12px;
}

.topic-edit-link:hover {
  color: #37a;
}

.topic-content {
  padding: 20px 15px;
  line-height: 1.8;
  color: #333;
  border-bottom: 1px solid #e8e8e8;
}

.topic-content p {
  margin-bottom: 0;
}

.topic-content p:empty,
.topic-content p>br:only-child {
  margin: 0;
  line-height: 1;
}

.topic-content img {
  max-width: 100%;
  height: auto;
  margin: 10px 0;
}

.topic-content pre {
  background: #2d2d2d;
  color: #ccc;
  border-radius: 3px;
  padding: 12px;
  font-size: 13px;
  overflow-x: auto;
  margin: 10px 0;
}

.topic-content blockquote {
  border-left: 3px solid #c7deb8;
  padding-left: 12px;
  color: #666;
  margin: 10px 0;
}

.topic-content ul,
.topic-content ol {
  padding-left: 24px;
  margin-bottom: 10px;
}

.topic-content code {
  background: #f0f0f0;
  padding: 2px 5px;
  border-radius: 2px;
  font-size: 12px;
}

.topic-content pre code {
  background: none;
  padding: 0;
}

/* Topic Like */
.topic-like-section {
  padding: 15px;
  border-bottom: 1px solid #e8e8e8;
}

.topic-like-btn {
  display: inline-block;
  padding: 6px 20px;
  border: 1px solid #e8e8e8;
  border-radius: 3px;
  background: #faf9f5;
  color: #666;
  cursor: pointer;
  font-size: 13px;
}

.topic-like-btn:hover {
  background: #f0efe8;
  border-color: #ccc;
}

.topic-like-btn.liked {
  background: #fff8f0;
  border-color: #e09015;
  color: #e09015;
}

.topic-like-btn.reposted {
  background: #f0f7ff;
  border-color: #4a9ade;
  color: #4a9ade;
}

.topic-like-btn.disabled {
  cursor: default;
}

.repost-count-link {
  background: none;
  border: none;
  color: #37a;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  margin-left: 8px;
}

.repost-count-link:hover {
  text-decoration: underline;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border: 1px solid #e8e8e8;
  width: 320px;
  max-height: 400px;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #e8e8e8;
  background: #faf9f5;
}

.modal-title {
  font-size: 14px;
  font-weight: bold;
  color: #072;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  overflow-y: auto;
  padding: 10px 15px;
}

.reposter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dotted #e8e8e8;
  color: #37a;
  font-size: 13px;
}

.reposter-item:last-child {
  border-bottom: none;
}

.reposter-item:hover {
  text-decoration: none;
  color: #072;
}

/* Comments - 豆瓣风格 */
.comments-section {
  padding: 15px;
}

.comments-section h2 {
  font-size: 14px;
  font-weight: bold;
  color: #072;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e8e8;
}

.comment-form {
  margin-bottom: 20px;
  padding: 15px;
  background: #faf9f5;
  border: 1px solid #e8e8e8;
}

.comment-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  font-size: 13px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.reply-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid #e8e8e8;
  font-size: 12px;
  color: #666;
}

.reply-hint strong {
  color: #37a;
}

.reply-preview {
  color: #999;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cancel-reply {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 12px;
}

.cancel-reply:hover {
  color: #666;
}

.comment-list {
  margin-top: 15px;
}

.comment-item {
  display: flex;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid #e8e8e8;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-avatar {
  flex-shrink: 0;
}

.comment-avatar .avatar {
  width: 48px;
  height: 48px;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 5px 10px;
  background: #f0f9eb;
  font-size: 12px;
}

.comment-author-name {
  color: #37a;
  font-weight: normal;
}

.comment-author-name:hover {
  color: #072;
}

.author-badge {
  display: inline-block;
  padding: 1px 6px;
  background: #fff;
  border: 1px solid #9bc07d;
  border-radius: 2px;
  color: #072;
  font-size: 11px;
}

.comment-date {
  color: #999;
  font-size: 12px;
}

.comment-quote {
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 3px solid #c7deb8;
  background: #faf9f5;
  font-size: 13px;
  color: #666;
}

.quote-content {
  margin-right: 8px;
}

.quote-author {
  color: #37a;
}

.comment-content {
  color: #333;
  line-height: 1.8;
  font-size: 14px;
  padding: 5px 0;
}

.comment-content p {
  margin-bottom: 8px;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.comment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 10px;
}

.comment-action-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.comment-action-btn:hover {
  color: #37a;
}

.comment-action-btn.liked {
  color: #f60;
}

.comment-action-btn.reposted {
  color: #4a9ade;
  cursor: default;
}

.comment-action-btn.disabled {
  cursor: default;
}

.comment-edit-form {
  margin-top: 10px;
}

.comment-edit-textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  font-size: 13px;
  min-height: 60px;
  resize: vertical;
  box-sizing: border-box;
}

.comment-edit-textarea:focus {
  border-color: #9bc07d;
  outline: none;
}

.comment-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.login-hint {
  color: #999;
  padding: 15px;
  background: #faf9f5;
  border: 1px solid #e8e8e8;
  margin-bottom: 15px;
}

.login-hint a {
  color: #072;
}

.no-comments {
  color: #999;
  text-align: center;
  padding: 30px;
}

/* Group Detail - 豆瓣风格 */
.group-detail {
  background: #fff;
  border: 1px solid #e8e8e8;
}

.group-header {
  display: flex;
  gap: 15px;
  padding: 20px;
  background: #faf9f5;
  border-bottom: 1px solid #e8e8e8;
}

.group-icon {
  width: 80px;
  height: 80px;
}

.group-info {
  flex: 1;
}

.group-info h1 {
  font-size: 20px;
  font-weight: normal;
  color: #072;
  margin-bottom: 8px;
}

.group-description {
  color: #666;
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.group-meta {
  display: flex;
  gap: 20px;
  color: #999;
  font-size: 12px;
}

.group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.group-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  color: #527a42;
  background: #f0f5ec;
  border-radius: 3px;
  text-decoration: none;
}

a.group-tag:hover {
  background: #e0edda;
  text-decoration: none;
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 15px;
}

.tag-group-list {
  display: flex;
  flex-direction: column;
}

.tag-group-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dotted #e8e8e8;
}

.tag-group-item:last-child {
  border-bottom: none;
}

.tag-group-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.tag-group-info {
  flex: 1;
  min-width: 0;
}

.tag-group-name {
  display: block;
  font-size: 14px;
  color: #37a;
  font-weight: bold;
  margin-bottom: 4px;
}

.tag-group-desc {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  line-height: 1.5;
}

.group-actions {
  display: flex;
  align-items: flex-start;
}

.member-badge {
  background: #faf9f5;
  border: 1px solid #c7deb8;
  color: #072;
  padding: 5px 15px;
  font-size: 12px;
}

.group-content {
  padding: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e8e8;
}

.section-header h2 {
  font-size: 14px;
  font-weight: bold;
  color: #072;
}

.topic-list {
  display: flex;
  flex-direction: column;
}

.topic-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dotted #e8e8e8;
}

.topic-item:last-child {
  border-bottom: none;
}

.topic-info {
  flex: 1;
}

.topic-info h3 {
  font-size: 14px;
  font-weight: normal;
  margin-bottom: 3px;
}

.topic-info h3 a {
  color: #37a;
}

.topic-info h3 a:hover {
  color: #072;
}

.topic-info .topic-meta {
  display: flex;
  gap: 10px;
  padding: 0;
  border: none;
  color: #999;
  font-size: 12px;
}

.no-content {
  color: #999;
  text-align: center;
  padding: 40px;
}

/* Home Page Specific */
.main-content h2 {
  font-size: 14px;
  font-weight: bold;
  color: #072;
  padding-bottom: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid #e8e8e8;
}

/* User Profile - 豆瓣风格 */
.user-profile {
  background: #fff;
  border: 1px solid #e8e8e8;
}

.profile-header {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: #faf9f5;
  border-bottom: 1px solid #e8e8e8;
}

.profile-info h1 {
  font-size: 20px;
  font-weight: normal;
  color: #072;
  margin-bottom: 5px;
}

.profile-username {
  color: #999;
  font-size: 13px;
  margin-bottom: 10px;
}

.profile-bio {
  color: #666;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.profile-meta {
  color: #999;
  font-size: 12px;
}

.profile-content {
  padding: 20px;
}

.profile-section {
  margin-bottom: 25px;
}

.profile-section h2 {
  font-size: 14px;
  font-weight: bold;
  color: #072;
  padding-bottom: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid #e8e8e8;
}

.topic-simple-list,
.comment-simple-list,
.group-simple-list,
.people-grid {
  list-style: none;
}

.profile-list-page {
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 20px;
}

.profile-list-page h1 {
  font-size: 14px;
  font-weight: bold;
  color: #072;
  margin: 0 0 15px 0;
}

.people-grid {
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.people-grid li {
  margin: 0;
}

.people-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #eee;
  background: #fafafa;
  text-decoration: none;
  color: inherit;
}

.people-card:hover {
  background: #f5f5f5;
  border-color: #e0e0e0;
  text-decoration: none;
}

.people-card .avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  flex-shrink: 0;
}

.person-meta {
  min-width: 0;
}

.person-name {
  display: block;
  font-weight: 600;
  color: #37a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-handle {
  display: block;
  color: #999;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* follow-stats removed (redundant with profile section links) */

.group-simple-list li {
  padding: 8px 0;
  border-bottom: 1px dotted #e8e8e8;
}

.group-simple-list li:last-child {
  border-bottom: none;
}

.group-simple-list .group-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.group-simple-list .group-item:hover {
  text-decoration: none;
}

.group-simple-list .group-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.group-simple-list .group-name {
  color: #37a;
  font-weight: 500;
  display: block;
}

.group-simple-list .group-desc {
  color: #999;
  font-size: 12px;
  display: block;
}

.topic-simple-list li,
.comment-simple-list li {
  padding: 8px 0;
  border-bottom: 1px dotted #e8e8e8;
}

.topic-simple-list li:last-child,
.comment-simple-list li:last-child {
  border-bottom: none;
}

.topic-simple-list a {
  color: #37a;
}

.topic-simple-list .meta,
.comment-simple-list .meta {
  color: #999;
  font-size: 12px;
  margin-left: 10px;
}

.comment-preview {
  color: #666;
  font-size: 13px;
  margin-bottom: 5px;
}

/* New Topic Page */
.new-topic-page {
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 20px;
}

.page-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e8e8e8;
}

.page-header h1 {
  font-size: 18px;
  font-weight: normal;
  color: #072;
  margin-bottom: 5px;
}

.page-subtitle {
  color: #999;
  font-size: 13px;
}

.topic-form .form-group {
  margin-bottom: 20px;
}

.topic-form label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: bold;
}

.topic-form input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.topic-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
  min-height: 200px;
}

.topic-form input:focus,
.topic-form textarea:focus {
  border-color: #9bc07d;
  outline: none;
}

.form-option {
  margin-bottom: 15px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

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

/* Quill Editor */
#editor {
  min-height: 250px;
  font-size: 14px;
  line-height: 1.8;
}

#editor .ql-editor {
  min-height: 250px;
}

.ql-toolbar.ql-snow {
  border-color: #ccc;
  background: #faf9f5;
}

.ql-container.ql-snow {
  border-color: #ccc;
}

.ql-editor:focus {
  outline: none;
}

.ql-snow .ql-editor img {
  max-width: 100%;
}

.ql-snow .ql-editor pre.ql-syntax {
  background: #2d2d2d;
  color: #ccc;
  border-radius: 3px;
  padding: 12px;
  font-size: 13px;
  overflow-x: auto;
}

/* NeoDB Card */
.neodb-card {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
  background: #faf9f5;
}

.neodb-card a {
  display: flex;
  gap: 12px;
  padding: 12px;
  text-decoration: none !important;
  color: inherit;
}

.neodb-card a:hover {
  background: #f0efe8;
  text-decoration: none !important;
}

.neodb-card img {
  width: 75px;
  height: auto;
  max-height: 110px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 2px;
  margin: 0 !important;
}

.neodb-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.neodb-card-title {
  font-size: 14px;
  font-weight: bold;
  color: #37a;
  line-height: 1.4;
}

.neodb-card-rating {
  font-size: 13px;
  color: #e09015;
}

.neodb-card-meta {
  font-size: 12px;
  color: #999;
}

.neodb-card-brief {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Quill editor NeoDB card */
.ql-editor .neodb-card {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
  background: #faf9f5;
}

.ql-editor .neodb-card a {
  display: flex;
  gap: 12px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
}

/* NeoDB toolbar button */
button.ql-neodb {
  width: auto !important;
  padding: 0 8px !important;
  cursor: pointer;
}

button.ql-neodb::after {
  content: '书影音';
  font-size: 12px;
  color: #444;
}

button.ql-neodb:hover::after {
  color: #072;
}

/* Toot Card - Mastodon toot preview */
.toot-card {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
  background: #faf9f5;
}

.toot-card a,
.toot-card-link {
  display: block;
  padding: 12px;
  text-decoration: none !important;
  color: inherit;
}

.toot-card a:hover,
.toot-card-link:hover {
  background: #f0efe8;
  text-decoration: none !important;
}

.toot-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.toot-card-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  max-width: 44px !important;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin: 0 !important;
}

.toot-card-avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e8e8e8;
  flex-shrink: 0;
}

.toot-card-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.toot-card-name {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toot-card-handle {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toot-card-content {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 10px;
  word-wrap: break-word;
}

.toot-card-images {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.toot-card-images img {
  max-width: 50%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 4px;
}

.toot-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toot-card-domain {
  font-size: 12px;
  color: #999;
}

/* Quill editor Toot card */
.ql-editor .toot-card {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
  background: #faf9f5;
}

.ql-editor .toot-card a {
  display: block;
  padding: 12px;
  text-decoration: none;
  color: inherit;
}

.topic-table {
  width: 100%;
  border-collapse: collapse;
}

.topic-table th {
  text-align: left;
  font-size: 12px;
  font-weight: normal;
  color: #999;
  padding: 8px 0;
  border-bottom: 1px solid #e8e8e8;
}

.topic-table td {
  padding: 10px 0;
  border-bottom: 1px dotted #e8e8e8;
  vertical-align: middle;
}

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

.topic-table-title {
  width: auto;
}

.topic-table-title a {
  color: #37a;
  font-size: 14px;
}

.topic-table-title a:hover {
  color: #072;
}

.topic-table-author {
  width: 100px;
  text-align: center;
}

.topic-table-author a {
  color: #666;
  font-size: 12px;
}

.topic-table-count {
  width: 50px;
  text-align: center;
  color: #999;
  font-size: 12px;
}

.topic-table-date {
  width: 100px;
  text-align: right;
  color: #999;
  font-size: 12px;
}

@media (max-width: 768px) {

  .topic-table-author,
  .topic-table-count {
    display: none;
  }

  .topic-table th:nth-child(2),
  .topic-table th:nth-child(3) {
    display: none;
  }
}

/* 提醒系统 */
.notification-bell {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

.notification-page {
  max-width: 700px;
}

.notification-page h1 {
  font-size: 20px;
  margin-bottom: 16px;
}

.notification-list {
  display: flex;
  flex-direction: column;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.notification-item:hover {
  background: #f9f9f9;
}

.notification-item.unread {
  background: #f0f7ff;
}

.notification-item.unread:hover {
  background: #e5f0fa;
}

.notification-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.notification-text {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

.notification-time {
  font-size: 12px;
  color: #999;
}

/* 评论区头部 */
.comments-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.comments-header h2 {
  margin: 0;
}

.btn-text {
  background: none;
  border: none;
  color: #007722;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.btn-text:hover {
  text-decoration: underline;
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.pagination-link {
  color: #007722;
  text-decoration: none;
}

.pagination-link:hover {
  text-decoration: underline;
}

.pagination-info {
  color: #666;
  font-size: 14px;
}

/* Edit Profile Page */
.edit-profile-link {
  margin-left: 15px;
  color: #37a;
  font-size: 12px;
}

.edit-profile-link:hover {
  color: #072;
}

.edit-profile-page {
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 20px;
  max-width: 600px;
}

.edit-profile-page h1 {
  font-size: 18px;
  font-weight: normal;
  color: #072;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e8e8e8;
}

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

.edit-profile-form label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: bold;
  font-size: 14px;
}

.edit-profile-form input[type="text"],
.edit-profile-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
  box-sizing: border-box;
}

.edit-profile-form input:focus,
.edit-profile-form textarea:focus {
  border-color: #9bc07d;
  outline: none;
}

.avatar-upload {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  flex-wrap: wrap;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e8e8e8;
}

.avatar-upload input[type="file"] {
  font-size: 13px;
}

.form-hint {
  color: #999;
  font-size: 12px;
  margin-top: 5px;
}

.edit-profile-form .form-actions {
  display: flex;
  gap: 10px;
  padding-top: 10px;
}

.btn-primary {
  background: #9bc07d;
  color: #072;
  border: none;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary:hover {
  background: #8ab56c;
}

.btn-secondary {
  background: #faf9f5;
  color: #666;
  border: 1px solid #ccc;
  padding: 8px 20px;
  font-size: 14px;
  text-decoration: none;
}

.btn-secondary:hover {
  background: #f0efe8;
}

/* Nostr 设置 */
.nostr-identity-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 20px;
  margin-bottom: 16px;
}

.nostr-identity-card h2 {
  font-size: 15px;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.nostr-field {
  margin-bottom: 16px;
}

.nostr-field:last-child {
  margin-bottom: 0;
}

.nostr-field label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
}

.nostr-value {
  background: #faf9f5;
  border: 1px solid #e8e8e8;
  padding: 8px 12px;
  border-radius: 2px;
  word-break: break-all;
}

.nostr-value code {
  font-size: 13px;
  color: #333;
}

.nostr-nsec {
  background: #fff8f0;
  border-color: #f0c060;
}

.nostr-status-on {
  color: #2e7d32;
  font-weight: bold;
  font-size: 14px;
}

.nostr-status-off {
  color: #999;
  font-size: 14px;
}

.nostr-info-box {
  background: #faf9f5;
  border: 1px solid #e8e8e8;
  padding: 20px;
  margin-bottom: 16px;
}

.nostr-info-box h2 {
  font-size: 15px;
  margin: 0 0 12px;
}

.nostr-info-box p {
  font-size: 14px;
  color: #555;
  margin: 0 0 8px;
  line-height: 1.6;
}

.nostr-info-box ul {
  padding-left: 20px;
  margin: 8px 0 0;
}

.nostr-info-box li {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
  line-height: 1.5;
}

.nostr-actions {
  margin-top: 16px;
}

.nostr-warning {
  background: #fff3e0;
  border: 1px solid #f0c060;
  color: #8b6914;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.nostr-message {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}
