/* Xiuno BBS Light Theme - Inspired by xiuno light themes */
:root {
  --primary: #2196f3;           /* 主色调 - 蓝色 */
  --primary-hover: #1976d2;     /* 主色悬停 */
  --secondary: #ff9800;         /* 次要色 - 橙色 */
  --success: #4caf50;           /* 成功色 */
  --danger: #f44336;            /* 危险色 */
  --warning: #ffc107;           /* 警告色 */
  --info: #00bcd4;              /* 信息色 */
  
  --bg-primary: #ffffff;        /* 主背景 */
  --bg-secondary: #f5f7fa;      /* 次要背景 */
  --bg-light: #f8f9fa;          /* 亮色背景 */
  --bg-dark: #343a40;           /* 暗色背景 */
  
  --text-primary: #333333;      /* 主要文字 */
  --text-secondary: #666666;    /* 次要文字 */
  --text-muted: #999999;        /* 弱化文字 */
  --text-light: #ffffff;        /* 亮色文字 */
  
  --border-color: #e0e0e0;      /* 边框颜色 */
  --border-light: #f1f1f1;      /* 浅边框 */
  --border-hover: #2196f3;      /* 边框悬停 */
  
  --shadow: 0 2px 10px rgba(0,0,0,0.08);
  --shadow-hover: 0 5px 20px rgba(0,0,0,0.12);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.1);
  
  --icon-size: 0.85em;          /* 图标大小 */
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 全局图标大小调整 */
.bi {
  font-size: var(--icon-size) !important;
}

/* 重置链接样式 */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* 引用块样式 */
.quote-block {
  position: relative;
  margin: 0.3rem 0;
  padding: 0.4rem 0.6rem;
  background-color: #f0f4f8;
  border-left: 2px solid #4dabf7;
  border-radius: 0 3px 3px 0;
  font-size: 0.8rem;
  line-height: 1.3;
  color: #495057;
}

.quote-author {
  font-weight: 600;
  color: #2c7be5;
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.2s ease;
  margin-right: 0.3rem;
}

.quote-author:hover {
  color: #1c64f2;
  text-decoration: underline;
}

.quote-block .quote-block {
  margin: 0.2rem 0 0 0;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  border-left-color: #adb5bd;
  background-color: #e9ecef;
}

.quote-block .quote-author {
  color: #495057;
}

/* 富文本编辑器引用块样式（用于回复） */
.rich-editor-quote {
  position: relative;
  margin: 0.3rem 0;
  padding: 0.4rem 0.6rem;
  background-color: #f0f4f8;
  border-left: 2px solid #4dabf7;
  border-radius: 0 3px 3px 0;
  font-size: 0.8rem;
  line-height: 1.3;
  color: #495057;
  font-style: normal;
}

.rich-editor-quote::before {
  content: "\"";
  font-family: serif;
  display: inline-block;
  font-size: 1.5rem;
  font-weight: bold;
  color: #4dabf7;
  margin-right: 0.5rem;
  opacity: 0.8;
  line-height: 0.8;
  vertical-align: top;
}

.rich-editor-quote .mention-link {
  font-weight: 600;
  color: #2c7be5;
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.2s ease;
  margin-right: 0.3rem;
}

.rich-editor-quote .mention-link:hover {
  color: #1c64f2;
  text-decoration: underline;
}

.rich-editor-quote .rich-editor-quote {
  margin: 0.2rem 0 0 0;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  border-left-color: #adb5bd;
  background-color: #e9ecef;
}

.rich-editor-quote .rich-editor-quote::before {
  color: #adb5bd;
  font-family: serif;
  font-size: 1.2rem;
  line-height: 0.8;
  vertical-align: top;
}

.rich-editor-quote .rich-editor-quote .mention-link {
  color: #495057;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .quote-block {
    margin: 0.25rem 0;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
  }

  .quote-author {
    font-size: 0.7rem;
  }
  
  /* 通用容器响应式 */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* 卡片响应式 */
  .card {
    border-radius: 6px;
  }
  
  .card-header {
    padding: 0.75rem 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* 按钮响应式 */
  .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
  
  /* 表单元素响应式 */
  .form-control {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }
  
  /* 标题响应式 */
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.25rem;
  }
  
  h3 {
    font-size: 1.1rem;
  }
  
  h4, h5, h6 {
    font-size: 1rem;
  }
  
  /* 帖子列表响应式 */
  .post-item {
    padding: 1rem;
  }
  
  .post-title {
    font-size: 1rem;
  }
  
  .post-meta {
    font-size: 0.75rem;
  }
  
  /* 回复列表响应式 */
  .reply-item {
    padding: 1rem 1.25rem;
  }
  
  .reply-header-info {
    gap: 0.5rem;
  }
  
  .reply-user-info {
    gap: 0.5rem;
  }
  
  /* 用户信息卡片响应式 */
  .user-info-card {
    margin-bottom: 1rem;
  }
  
  .user-info-card .card-body {
    padding: 1rem;
  }
  
  .user-info-card .avatar-container img {
    width: 60px;
    height: 60px;
  }
  
  .user-info-card h5 {
    font-size: 1rem;
    margin-top: 0.5rem;
  }
  
  .user-info-card .user-stats .row {
    gap: 0.5rem;
  }
  
  .user-info-card .user-stats .col-4 {
    padding: 0 0.25rem;
  }
  
  .user-info-card .stat-value {
    font-size: 1rem;
  }
  
  .user-info-card .stat-label {
    font-size: 0.7rem;
  }
  
  /* 用户操作按钮响应式 */
  .user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .user-actions .btn {
    width: 100%;
    margin: 0;
  }
  
  .user-actions .btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
  }
  
  /* 帖子操作按钮响应式 */
  .card:nth-child(3) > .card-body > .d-flex.justify-content-between.align-items-center.flex-wrap {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 0.5rem !important;
    width: 100% !important;
    min-width: 100% !important;
  }
  
  .card:nth-child(3) > .card-body > .d-flex.justify-content-between.align-items-center.flex-wrap > div {
    display: flex !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
  }
  
  .card:nth-child(3) > .card-body > .d-flex.justify-content-between.align-items-center.flex-wrap > div:first-child {
    justify-content: flex-start !important;
  }
  
  .card:nth-child(3) > .card-body > .d-flex.justify-content-between.align-items-center.flex-wrap > div:last-child {
    justify-content: flex-end !important;
  }
  
  .card:nth-child(3) > .card-body > .d-flex.justify-content-between.align-items-center.flex-wrap > div > * {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  
  /* 隐藏横向滚动条但保留滚动功能 */
  .card:nth-child(3) > .card-body > .d-flex.justify-content-between.align-items-center.flex-wrap {
    scrollbar-width: none !important; /* Firefox */
  }
  
  .card:nth-child(3) > .card-body > .d-flex.justify-content-between.align-items-center.flex-wrap::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Edge */
  }
  
  /* 按钮样式 */
  .card:nth-child(3) > .card-body > .d-flex.justify-content-between.align-items-center.flex-wrap > div > .btn {
    padding: 0.35rem 0.7rem !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  
  /* 下拉菜单按钮样式 */
  .card:nth-child(3) > .card-body > .d-flex.justify-content-between.align-items-center.flex-wrap > div > .dropdown > .btn {
    padding: 0.35rem 0.7rem !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  
  .card-body .btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .card-body .btn i {
    font-size: 0.8rem;
    margin-right: 0.3rem;
  }
  
  .card-body .btn span {
    font-size: 0.75rem;
  }
  
  /* 隐藏横向滚动条但保留滚动功能 */
  .card-body .d-flex.justify-content-between.align-items-center.flex-wrap {
    scrollbar-width: none; /* Firefox */
  }
  
  .card-body .d-flex.justify-content-between.align-items-center.flex-wrap::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
  }
  
  .card-body .d-flex.gap-2.flex-wrap {
    scrollbar-width: none; /* Firefox */
  }
  
  .card-body .d-flex.gap-2.flex-wrap::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
  }
  
  /* 定义btn-sm-sm类 */
  .btn-sm-sm {
    padding: 0.35rem 0.7rem !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  
  /* 附件响应式样式 */
  .attachment-item {
    max-width: 100%;
  }
  
  .attachment-btn {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .attachment-size {
    font-size: 0.7rem;
  }
  
  .reply-avatar {
    width: 32px !important;
    height: 32px !important;
  }
  
  .reply-username {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
  }
  
  .reply-time {
    font-size: 0.75rem;
    white-space: nowrap;
  }
  
  .reply-floor-actions {
    gap: 0.5rem;
  }
  
  .reply-actions {
    gap: 0.5rem;
  }
  
  .like-btn, .quote-btn {
    font-size: 0.75rem;
  }
  
  .like-btn i, .quote-btn i {
    font-size: 0.85rem;
  }
  
  .reply-floor {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    min-width: 45px;
  }
  
  .floor-number {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }
}

@media (max-width: 480px) {
  /* 更小屏幕的响应式 */
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* 卡片响应式 */
  .card-header {
    padding: 0.6rem 0.8rem;
  }
  
  .card-body {
    padding: 0.8rem;
  }
  
  /* 按钮响应式 */
  .btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
  }
  
  /* 表单元素响应式 */
  .form-control {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }
  
  /* 标题响应式 */
  h1 {
    font-size: 1.35rem;
  }
  
  h2 {
    font-size: 1.15rem;
  }
  
  h3 {
    font-size: 1rem;
  }
  
  /* 帖子列表响应式 */
  .post-item {
    padding: 0.875rem;
  }
  
  .post-title {
    font-size: 0.95rem;
  }
  
  .post-meta {
    font-size: 0.7rem;
  }
  
  /* 回复列表响应式 */
  .reply-item {
    padding: 0.875rem 1rem;
  }
  
  .reply-avatar {
    width: 28px !important;
    height: 28px !important;
  }
  
  .reply-username {
    font-size: 0.85rem;
  }
  
  .badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.3rem;
  }
  
  .reply-time {
    font-size: 0.7rem;
  }
  
  .like-btn, .quote-btn {
    font-size: 0.7rem;
  }
  
  .like-btn i, .quote-btn i {
    font-size: 0.8rem;
  }
  
  .reply-floor {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    min-width: 40px;
  }
  
  .floor-number {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }
}

/* 附件样式 */
.post-attachments,
.reply-attachments {
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.attachment-item {
  margin-bottom: 0.5rem;
}

.attachment-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
  border-radius: 6px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  text-decoration: none;
  user-select: none;
  border: 1px solid transparent;
}

.attachment-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.attachment-size {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* 不同类型文件的按钮样式 */
.btn-outline-primary.attachment-btn {
  color: #0d6efd;
  border-color: #0d6efd;
}

.btn-outline-primary.attachment-btn:hover {
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-outline-success.attachment-btn {
  color: #198754;
  border-color: #198754;
}

.btn-outline-success.attachment-btn:hover {
  color: #fff;
  background-color: #198754;
  border-color: #198754;
}

.btn-outline-danger.attachment-btn {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-outline-danger.attachment-btn:hover {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-outline-warning.attachment-btn {
  color: #ffc107;
  border-color: #ffc107;
}

.btn-outline-warning.attachment-btn:hover {
  color: #000;
  background-color: #ffc107;
  border-color: #ffc107;
}

.btn-outline-info.attachment-btn {
  color: #0dcaf0;
  border-color: #0dcaf0;
}

.btn-outline-info.attachment-btn:hover {
  color: #000;
  background-color: #0dcaf0;
  border-color: #0dcaf0;
}

.btn-outline-secondary.attachment-btn {
  color: #6c757d;
  border-color: #6c757d;
}

.btn-outline-secondary.attachment-btn:hover {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

/* 导航栏样式 - Xiuno风格 */
.navbar {
  background: var(--bg-primary);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  border-bottom: 1px solid var(--border-light);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary) !important;
}

.navbar-brand:hover {
  color: var(--primary-hover) !important;
}

.navbar-nav .nav-link {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--primary);
  background-color: rgba(33, 150, 243, 0.1);
}

.navbar-nav .nav-link.active {
  color: var(--primary);
  background-color: rgba(33, 150, 243, 0.15);
}

/* 卡片样式 - 现代简洁风格 */
.card {
  background: var(--bg-primary);
  border: none;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
  margin-bottom: 15px;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.card-header {
  border-bottom: 1px solid rgba(0,0,0,0.05);
  background: linear-gradient(to right, #f8f9fa, white);
}

.card-body {
  padding: 1rem;
}

/* 三栏布局优化 */
.row.g-2 > [class^="col-"] {
  padding: 0 8px;
}

@media (max-width: 992px) {
  .row.g-2 > [class^="col-"] {
    padding: 0;
  }
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 1.25rem;
}

/* 版块卡片 */
.forum-card {
  transition: all 0.3s ease;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  background: var(--bg-primary);
}

.forum-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

/* 列表组样式 */
.list-group-item {
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.list-group-item:hover {
  background-color: rgba(33, 150, 243, 0.05);
  border-color: var(--border-hover);
}

.list-group-item-action {
  color: var(--text-primary);
}

.list-group-item-action:hover {
  color: var(--primary);
  background-color: rgba(33, 150, 243, 0.08);
}

/* 按钮样式 */
.btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* 徽章样式 */
.badge {
  font-weight: 500;
  border-radius: 12px;
  padding: 0.35em 0.65em;
}

/* 表单样式 */
.form-control {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

/* 警告框样式 */
.alert {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 1rem 1.25rem;
}

.alert-success {
  background-color: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.2);
  color: #2e7d32;
}

.alert-danger {
  background-color: rgba(244, 67, 54, 0.1);
  border-color: rgba(244, 67, 54, 0.2);
  color: #d32f2f;
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.2);
  color: #f57c00;
}

/* 页脚样式 - 与导航栏配色一致 */
footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

footer a {
  color: var(--text-secondary);
  transition: all 0.2s ease;
  text-decoration: none;
}

footer a:hover {
  color: var(--primary);
  text-decoration: none;
}

footer .text-muted {
  color: var(--text-muted) !important;
}

footer .text-muted:hover {
  color: var(--primary) !important;
}

/* 页脚响应式优化 */
@media (max-width: 768px) {
  footer .row {
    text-align: center;
  }
  
  footer .col-md-4 {
    margin-bottom: 1.5rem;
  }
  
  footer .d-flex {
    justify-content: center;
  }
  
  footer .me-3 {
    margin-right: 1rem !important;
    margin-bottom: 0.5rem;
  }
}

/* 三栏布局 */
.main-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* 侧边栏固定 */
.sticky-sidebar {
  position: sticky;
  top: 90px;
}

/* 响应式调整 */
@media (max-width: 992px) {
  .order-lg-1, 
  .order-lg-2, 
  .order-lg-3 {
    order: 0;
  }
  
  .sticky-sidebar {
    position: static;
  }
  
  .container {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .forum-stats {
    display: none;
  }
  
  .navbar-nav .nav-link {
    padding: 0.5rem 0.75rem;
  }
  
  .card-body {
    padding: 1rem;
  }
}

/* Xiuno特色样式 */
.thread-item {
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.thread-item:hover {
  border-left-color: var(--primary);
  background-color: rgba(33, 150, 243, 0.03);
}

.user-avatar {
  border-radius: 50%;
  border: 2px solid var(--border-light);
  transition: border-color 0.2s ease;
}

.user-avatar:hover {
  border-color: var(--primary);
}

/* 论坛页面微调 */
.forum-card .card-header {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-light));
  border-bottom: 1px solid var(--border-light);
}

.forum-card .card-header h6 {
  margin-bottom: 0;
  line-height: 1.4;
}

.forum-stats .badge {
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  background-color: rgba(108, 117, 125, 0.1);
  color: var(--text-secondary);
}

.sub-forums .list-group-item {
  border: none;
  border-left: 2px solid transparent;
  margin: 0.1rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}

.sub-forums .list-group-item:hover {
  border-left-color: var(--primary);
  background-color: rgba(33, 150, 243, 0.05);
}

/* 新版块卡片优化 */
.forum-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px !important;
  overflow: hidden;
  width: 100%;
}

.forum-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.bg-gradient-light {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
}

/* 稳定布局优化 */
.row.gx-3.gy-4 {
  row-gap: 1.5rem;
  column-gap: 1rem;
}

.row.gx-3.gy-4 > * {
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
}

/* 新版块列宽设置 */
.col-xxl-3 {
  flex: 0 0 25%;
  max-width: 25%;
}

.col-xl-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
}

.col-lg-5 {
  flex: 0 0 41.666667%;
  max-width: 41.666667%;
}

.col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

@media (max-width: 768px) {
  .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.forum-card .card-body {
  padding: 1rem 1.25rem;
}

/* 徽章样式优化 */
.forum-stats .badge.border {
  border: 1px solid #dee2e6 !important;
  background-color: white !important;
}

.bg-body-secondary {
  background-color: #e9ecef !important;
}

/* 响应式优化 */
@media (max-width: 1199px) {
  .col-xl-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 992px) {
  .col-lg-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .col-xl-4, .col-lg-6, .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .forum-stats {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.5rem !important;
  }
  
  .forum-stats .badge {
    margin-bottom: 0.25rem;
  }
  
  .forum-card .card-body {
    padding: 1rem;
  }
  
  .row.g-4 {
    row-gap: 1rem;
  }
}

/* 响应式布局 - 移动端优化 */
@media (max-width: 992px) {
  /* 通用响应式调整 */
  .order-lg-1, 
  .order-lg-2, 
  .order-lg-3 {
    order: 0;
  }
  
  .sticky-sidebar {
    position: static;
  }
  
  .container {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  
  /* 首页特定布局 */
  .col-lg-3 { /* 侧边栏 */
    display: none !important;
  }
  
  .col-lg-6 { /* 主内容区域 */
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* 小屏幕额外优化 */
@media (max-width: 576px) {
  .forum-card .card-header {
    padding: 1rem;
  }
}

/* 楼层样式 */
.floor-number {
  font-size: 0.45rem;
  padding: 0.5px 2px;
  border-radius: 4px;
  background-color: #e9ecef;
  color: #495057;
  line-height: 1.1;
  display: inline-block;
  min-width: auto;
}
.floor-sofa { background-color: #ff6b6b; color: white; }
.floor-chair { background-color: #4ecdc4; color: white; }
.floor-stool { background-color: #45b7d1; color: white; }
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

.bg-primary { background-color: var(--primary) !important; }      
.bg-secondary { background-color: var(--secondary) !important; }  
.bg-success { background-color: var(--success) !important; }      
.bg-danger { background-color: var(--danger) !important; }        
.bg-warning { background-color: var(--warning) !important; }      
.bg-info { background-color: var(--info) !important; } 

/* 置顶标记样式优化 */
/* 基础置顶标记样式 */
.sticky-badge {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  border: 2px solid var(--bg-primary) !important;
  border-radius: 50% !important;
  width: 22px !important;
  height: 22px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.7rem !important;
  transform: translate(20%, -20%) !important;
  z-index: 10 !important;
}

/* 全站置顶 - 红色 */
.sticky-badge.sticky-global {
  background-color: var(--danger) !important;
}

/* 板块置顶 - 蓝色 */
.sticky-badge.sticky-forum {
  background-color: var(--primary) !important;
}

/* 确保置顶标记可见 */
.position-relative .sticky-badge {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* 头像容器优化 - 避免置顶标记重叠 */
.avatar-container {
  position: relative;
  width: 40px;
  height: 40px;
  margin-right: 12px;
}

/* 嵌套下拉菜单样式 - Bootstrap 5支持 */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
  margin-left: .125rem;
}

/* 改善下拉菜单的显示效果 */
.dropdown-menu {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 0.5rem !important;
  padding: 0.5rem !important;
}

.dropdown-item {
  padding: 0.5rem 1rem !important;
  border-radius: 0.25rem !important;
  transition: background-color 0.2s ease !important;
}

.dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

.dropdown-item:active {
  background-color: rgba(0, 0, 0, 0.1) !important;
}

/* 调整置顶标记位置，避免与头像重叠 */
.position-relative.me-3 .badge {
  transform: translate(20%, -20%) !important;
  top: -4px !important;
}

/* 回复列表样式 - 现代设计 */
.reply-list.modern {
  background: var(--bg-primary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.reply-item {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.2s ease;
  position: relative;
  background: var(--bg-primary);
}

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

.reply-item:hover {
  background-color: rgba(33, 150, 243, 0.03);
  border-left: 3px solid var(--primary);
}

.reply-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.reply-header-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: nowrap !important;
  min-width: 0;
  width: 100%;
}

.reply-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.reply-floor-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.reply-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 楼层样式 */
.reply-floor {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  padding: 0.3rem 0.75rem;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 50px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .reply-item {
    padding: 1rem 1.25rem;
  }
  
  .reply-header-info {
    gap: 0.5rem;
    flex-wrap: nowrap !important;
  }
  
  .reply-user-info {
    gap: 0.5rem;
    min-width: 0;
  }
  
  .reply-avatar {
    width: 32px !important;
    height: 32px !important;
  }
  
  .reply-username {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
  }
  
  .badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.3rem;
    flex-shrink: 0;
  }
  
  .reply-time {
    font-size: 0.7rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .reply-floor-actions {
    gap: 0.4rem;
    flex-shrink: 0;
  }
  
  .reply-actions {
    gap: 0.4rem;
    flex-shrink: 0;
  }
  
  .like-btn, .quote-btn {
    font-size: 0.7rem;
    white-space: nowrap;
  }
  
  .like-btn i, .quote-btn i {
    font-size: 0.75rem;
  }
  
  .reply-floor {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    min-width: 35px;
    flex-shrink: 0;
  }
  
  .floor-number {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
  }
}

@media (max-width: 480px) {
  .reply-item {
    padding: 0.875rem 1rem;
  }
  
  .reply-header-info {
    gap: 0.4rem;
    flex-wrap: nowrap !important;
  }
  
  .reply-user-info {
    gap: 0.4rem;
  }
  
  .reply-avatar {
    width: 28px !important;
    height: 28px !important;
  }
  
  .reply-username {
    font-size: 0.8rem;
  }
  
  .badge {
    font-size: 0.6rem;
    padding: 0.08rem 0.25rem;
  }
  
  .reply-time {
    font-size: 0.65rem;
  }
  
  .like-btn, .quote-btn {
    font-size: 0.65rem;
  }
  
  .like-btn i, .quote-btn i {
    font-size: 0.7rem;
  }
  
  .reply-floor {
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
    min-width: 30px;
  }
  
  .floor-number {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
  }
}
.floor-number {
  font-size: 0.8rem;
}

/* 用户信息 */
.reply-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

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

.reply-avatar img {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-light);
  transition: border-color 0.2s ease;
  object-fit: cover;
}

.reply-avatar img:hover {
  border-color: var(--primary);
}

/* 头像角标样式 */
.avatar-with-badge {
  position: relative;
  display: inline-block;
}

.group-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  border: 2px solid white;
}

.group-badge i {
  font-size: 0.7rem;
  line-height: 1;
}

/* 楼层样式 */
.floor-number {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background-color: #f8f9fa;
  color: #6c757d;
}

.floor-sofa {
  background-color: #ff6b6b;
  color: white;
}

.floor-chair {
  background-color: #4ecdc4;
  color: white;
}

.floor-stool {
  background-color: #45b7d1;
  color: white;
}

.reply-username {
  color: var(--text-primary);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-time {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

/* 回复操作 */
.reply-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.like-btn, .quote-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.like-btn:hover {
  color: var(--primary);
  text-decoration: none;
  background-color: rgba(33, 150, 243, 0.1);
}

.quote-btn:hover {
  color: var(--primary);
  text-decoration: none;
  background-color: rgba(33, 150, 243, 0.1);
}

/* @Ta按钮样式 */
.at-ta-button {
  border-radius: 12px !important;
  font-size: 0.7rem !important;
  padding: 1px 6px !important;
  height: 20px !important;
  line-height: 1.2 !important;
  transition: all 0.2s ease !important;
  display: inline-block !important;
}

.at-ta-button:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* 回复内容 */
.reply-content {
  color: var(--text-primary);
  line-height: 1.7;
  padding: 0 0.25rem;
  font-size: 0.95rem;
  word-break: break-word;
  margin-left: 50px;
}

/* @用户链接样式 */
.mention-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(33, 150, 243, 0.3);
  padding-bottom: 1px;
  transition: all 0.2s ease;
}

.mention-link:hover {
  color: var(--primary-hover);
  border-bottom-color: var(--primary-hover);
  text-decoration: none;
  background-color: rgba(33, 150, 243, 0.08);
  border-radius: 2px;
  padding: 0 2px;
  margin: 0 -2px;
}

.reply-content p {
  margin-bottom: 0.5rem;
}

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

/* 回复附件 */
.reply-attachments {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  margin-left: 50px;
}

.reply-attachments h6 {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.attachment-item {
  margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .reply-item {
    padding: 1rem;
  }
  
  .reply-header-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .reply-floor {
    align-self: flex-start;
  }
  
  .reply-actions {
    align-self: flex-start;
  }
  
  .reply-content, .reply-attachments {
    margin-left: 0;
  }
  
  .reply-user-info {
    width: 100%;
  }
  
  .reply-username {
    max-width: 150px;
  }
}

@media (max-width: 576px) {
  .reply-item {
    padding: 0.875rem;
  }
  
  .reply-content {
    font-size: 0.9rem;
  }
  
  .reply-avatar img {
    width: 36px;
    height: 36px;
  }
  
  .reply-username {
    max-width: 120px;
    font-size: 0.9rem;
  }
}

/* 帖子内容卡片样式 - 确保能够显示足够内容且自动延展 */
.card.post-content-card {
    min-height: auto;
    max-height: none;
    overflow: visible;
    word-wrap: break-word;
    word-break: break-word;
}

.card.post-content-card .card-body {
    min-height: auto;
    max-height: none;
    overflow: visible;
    word-wrap: break-word;
    word-break: break-word;
}

/* 帖子内容样式 */
.post-content {
    line-height: 1.8;
    overflow: visible;
    word-wrap: break-word;
    word-break: break-word;
}

/* 修复帖子详情页中rich-editor-content的滚动条问题 */
.post-content .rich-editor-content {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

/* 确保帖子详情页中嵌套的rich-editor-content也没有滚动条 */
.post-content .rich-editor-content .rich-editor-content {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

