.posts-page {
  min-height: 100vh;
}

.hero-banner {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-banner:before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  z-index: -1;
  background: 
    radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
}

@keyframes rotateSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-text {
  text-align: center;
}

.hero-title {
  font-size: 2.2rem;
  margin-bottom: 12px;
  color: #1f2937;
  font-weight: 600;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #4b5563;
  margin: 0;
  line-height: 1.5;
}

.search-box {
  display: flex;
  gap: 12px;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

/* 优化的搜索框样式 */
.custom-input {
  flex: 1;
  height: 48px;
  border-radius: 8px;
  padding: 0 20px;
  font-size: 1rem;
  border: 1px solid rgba(124, 58, 237, 0.15);
  background-color: rgba(255, 255, 255, 0.7);
  color: #333;
  transition: all 0.3s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.custom-input:focus {
  border-color: #7c3aed;
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
  background: rgba(255, 255, 255, 0.85);
}

/* 搜索框内的按钮样式调整 */
.search-box .btn {
  min-width: 100px;
  height: 48px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: none;
  margin-top: 0; /* 覆盖 .btn 的默认 margin-top */
}

.create-button {
  min-width: 120px;
  height: 48px;
  border-radius: 24px;
  background-color: #10b981;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
}

.create-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3);
}

.create-button:active {
  transform: translateY(0);
}

/* 响应式调整 */
@media (min-width: 992px) {
  .hero-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .hero-text {
    text-align: left;
    flex-basis: 42%;
  }
  
  .search-box {
    flex-basis: 58%;
    margin: 0;
  }
}

@media (max-width: 768px) {
  .post-actions {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .post-meta {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  
  .post-info {
    width: 100%;
  }
  
  .hero-banner {
    padding: 1.5rem;
    margin-top: 15px;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .header-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .header-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  
  .search-box {
    width: 100%;
    max-width: none;
  }
  
  .delete-confirm-modal {
    width: 90%;
  }
  
  .post-content-area {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .hero-banner {
    padding: 25px 20px;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .search-box .btn {
    min-width: 48px;
    width: 48px;
    padding: 0;
  }
  
  .search-text,
  .create-text {
    display: none;
  }
  
  .search-box {
    gap: 8px;
  }
  
  .custom-input {
    height: 45px;
    padding: 0 15px;
  }
}

.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.main-content {
  padding: 20px 0;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 0;
}

.spinner {
  width: 4rem;
  height: 4rem;
  border: 0.25rem solid rgba(124, 58, 237, 0.3);
  border-radius: 50%;
  border-top-color: #7c3aed;
  animation: spin 1.2s linear infinite, pulse 2s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.4));
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.empty-icon {
  font-size: 60px;
  margin-bottom: 20px;
  color: #7c3aed;
}

.empty-state p {
  font-size: 18px;
  color: #4b5563;
  margin-bottom: 10px;
}

.sub-text {
  font-size: 14px;
  color: #6b7280;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 15px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: left 0.7s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  color: white;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

.posts-layout {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(0, 4fr);
  gap: 30px;
  min-height: 600px;
  transition: all 0.3s ease;
  position: relative;
}

/* 在PC端，完全隐藏侧边栏 */
.posts-layout.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

/* 添加一个占位div用于触发鼠标悬停展开侧边栏 */
.sidebar-hover-area {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  z-index: 10;
  display: none;
}

/* 左侧文章导航栏 */
.posts-sidebar {
  background: rgba(255, 255, 255, 0.95); /* 增加不透明度，与PC端保持一致 */
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

/* PC端侧边栏收缩状态的样式 */
.posts-sidebar.collapsed {
  width: 0;
  min-width: 0;
  opacity: 0;
  border: none;
  box-shadow: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: width 0.3s ease, opacity 0.2s ease, min-width 0.3s ease;
}

/* 悬停时展开侧边栏 - 全局规则，将被PC模式下的规则覆盖 */
.sidebar-hover-area:hover + .posts-sidebar.collapsed,
.posts-sidebar.collapsed:hover {
  width: 280px;
  min-width: 280px;
  opacity: 1;
  background: rgba(255, 255, 255, 0.95); /* 与PC端一致，使用高不透明度 */
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  z-index: 1001;
  border-radius: 16px;
  overflow: visible;
  transition-delay: 0s;
  pointer-events: all;
}

/* 创建一个扩展区域，防止鼠标移出时立即消失 */
.sidebar-hover-area:hover + .posts-sidebar.collapsed::after,
.posts-sidebar.collapsed:hover::after {
  content: '';
  position: absolute;
  left: -40px;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 9;
}

/* 悬停时显示侧边栏内容 */
.posts-sidebar.collapsed:hover .sidebar-header h3,
.sidebar-hover-area:hover + .posts-sidebar.collapsed .sidebar-header h3 {
  display: block;
}

.posts-sidebar.collapsed:hover .posts-list,
.sidebar-hover-area:hover + .posts-sidebar.collapsed .posts-list {
  display: block;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  color: #1f2937;
}

.sidebar-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.toggle-sidebar-btn {
  background: none;
  border: none;
  color: #6d28d9;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.toggle-sidebar-btn:hover {
  background-color: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.posts-sidebar.collapsed .sidebar-header h3 {
  display: none;
}

.posts-sidebar.collapsed .posts-list {
  display: none;
}

.posts-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.posts-list::-webkit-scrollbar {
  width: 6px;
}

.posts-list::-webkit-scrollbar-track {
  background: rgba(243, 244, 246, 0.5);
  border-radius: 3px;
}

.posts-list::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.3);
  border-radius: 3px;
}

.posts-list::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.5);
}

.category-group {
  margin-bottom: 4px;
}

.category-group .category-articles {
  margin-bottom: 10px;
}

.category-title {
  padding: 10px 15px;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
  display: block;
  border-bottom: 1px solid rgba(229, 231, 235, 0.4);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background-color: rgba(249, 250, 251, 0.5);
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  position: relative;
  padding-left: 30px;
}

.category-title:hover {
  background-color: rgba(243, 244, 246, 0.6);
  color: #6d28d9;
}

.category-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  transition: transform 0.2s ease;
  color: #7c3aed;
  font-size: 0.8rem;
}

.category-icon.expanded {
  transform: translateY(-50%) rotate(90deg);
}

.category-articles {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  width: 100%;
  border-left: none;
  margin-left: 0;
}

.root-articles {
  padding-left: 0; 
  border-left: none;
  margin-left: 0;
  width: 100%;
}

.category-articles:not(.root-articles) .article-item {
  padding-left: 20px;
  position: relative;
  border-left: none;
}

.category-articles:not(.root-articles) .article-item::before {
  position: absolute;
  left: 8px;
  color: #9ca3af;
}

.root-articles .article-item {
  padding-left: 15px;
  border-left: none;
}

.article-item {
  padding: 8px 12px;
  padding-right: 0;
  transition: all 0.2s ease;
  cursor: pointer;
  display: block;
  position: relative;
  border-left: none;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9rem;
  font-weight: 400;
  color: #6b7280;
  word-break: break-word;
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-item:hover {
  background-color: rgba(243, 244, 246, 0.8);
  color: #4b5563;
}

.article-item.active {
  background-color: rgba(139, 92, 246, 0.08);
  color: #6d28d9;
  font-weight: 500;
}

.post-content-area {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.post-content-area::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  z-index: -1;
  background: 
    radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
}

.post-header {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 15px;
  width: 100%;
}

.post-info {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.post-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  min-width: 120px;
}

/* 单个按钮的容器样式 */
.post-actions.single-action {
  min-width: auto;
}

/* 管理员按钮容器 */
.post-actions.admin-actions {
  flex-wrap: wrap;
}

.post-author, .post-date {
  font-size: 0.9rem;
  color: #4b5563;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.post-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  color: #7c3aed;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.post-description {
  font-size: 1rem;
  color: #4b5563;
  font-style: italic;
  margin-bottom: 15px;
  padding: 10px 15px;
  background-color: rgba(243, 244, 246, 0.7);
  border-radius: 8px;
  border-left: 3px solid #7c3aed;
}

.post-content {
  flex: 1;
  overflow-y: auto;
  line-height: 1.6;
  max-height: 70vh;
  padding-right: 15px;
}

.post-content::-webkit-scrollbar {
  width: 6px;
}

.post-content::-webkit-scrollbar-track {
  background: rgba(243, 244, 246, 0.5);
  border-radius: 3px;
}

.post-content::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.3);
  border-radius: 3px;
}

.post-content::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.5);
}

.select-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: #6b7280;
}

.arrow-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  animation: pulse 1.5s infinite alternate;
}

@media (max-width: 992px) {
  .posts-layout {
    grid-template-columns: 1fr !important;
  }
  
  .posts-layout.sidebar-collapsed {
    grid-template-columns: 1fr !important;
  }
  
  .sidebar-hover-area {
    display: none !important;
  }
  
  .posts-sidebar {
    all: unset; /* 重置所有样式 */
    /* 重新定义基础样式 */
    display: flex !important;
    flex-direction: column !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    overflow: hidden !important;
    width: 100% !important;
    min-width: 100% !important;
    height: auto !important;
    max-height: 300px !important;
    margin-bottom: 20px !important;
    /* 使用更平滑的过渡效果，确保高度变化稳定 */
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  
  .posts-sidebar.collapsed {
    all: unset; /* 重置所有样式 */
    /* 重新定义收缩状态样式，保持与展开状态相同的视觉样式，只改变高度 */
    display: flex !important;
    flex-direction: column !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    overflow: hidden !important;
    width: 100% !important;
    min-width: 100% !important;
    /* 固定标题栏高度，避免抖动 */
    max-height: 50px !important;
    min-height: 50px !important;
    margin-bottom: 20px !important;
    /* 使用相同的过渡函数确保展开和折叠效果一致 */
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  
  /* 确保标题栏始终正常显示 */
  .posts-sidebar .sidebar-header,
  .posts-sidebar.collapsed .sidebar-header {
    display: flex !important;
    height: 50px !important; /* 固定高度，避免闪烁 */
    box-sizing: border-box !important;
    padding: 15px !important;
  }
  
  .posts-sidebar.collapsed .sidebar-header h3 {
    display: block !important;
  }
  
  /* 确保目录内容区域始终隐藏在折叠状态 */
  .posts-sidebar.collapsed .posts-list {
    display: none !important;
    overflow: hidden !important;
  }
  
  .toggle-sidebar-btn i.bi-chevron-up,
  .toggle-sidebar-btn i.bi-chevron-down {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  
  .post-content-area {
    min-height: 400px !important;
    padding: 1.5rem !important;
  }
  
  .editor-modal {
    width: 90% !important;
  }
}

@media (max-width: 576px) {
  .post-actions {
    width: 100%;
    justify-content: flex-start;
  }
  
  .post-actions .btn {
    flex: 0 1 auto;
    min-width: 80px;
    text-align: center;
    justify-content: center;
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  
  .post-actions .btn i {
    margin-right: 4px;
  }
  
  /* 单个按钮样式优化 */
  .post-actions.single-action {
    justify-content: flex-start;
    width: auto;
  }
  
  .post-actions.single-action .btn {
    width: auto;
    max-width: 100px;
  }
  
  .post-content-area {
    padding: 1rem;
  }
  
  .post-content {
    font-size: 0.95rem;
  }
  
  .hero-banner {
    border-radius: 12px;
    padding: 1.25rem;
  }
  
  .page-title {
    font-size: 1.75rem;
  }
}

/* Modal 样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.modal-container {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
  z-index: 1;
  max-width: 90%;
  max-height: 90vh;
}

.delete-confirm-modal {
  width: 450px;
}

.editor-modal {
  width: 90%;
  max-width: 1400px;
}

.modal-header {
  background: linear-gradient(135deg, #4c1d95 0%, #2563eb 100%);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: all 0.2s;
}

.close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 20px;
}

.warning-icon {
  font-size: 48px;
  color: #f59e0b;
  margin-bottom: 15px;
}

.delete-confirm-content {
  text-align: center;
  margin-bottom: 20px;
}

.warning-text {
  color: #ef4444;
  font-weight: 500;
  margin-top: 10px;
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.btn-secondary {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  color: white;
  box-shadow: 0 4px 10px rgba(107, 114, 128, 0.3);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(107, 114, 128, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(220, 38, 38, 0.4);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.loading-content .spinner {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
}

/* 为992px以上的屏幕专门优化侧边栏悬停行为 */
@media (min-width: 992px) {
  /* 折叠时的悬停区域显示 */
  .posts-layout.sidebar-collapsed .sidebar-hover-area {
    display: block;
  }
  
  /* 扩大悬停触发区域 */
  .sidebar-hover-area {
    width: 40px; /* 更宽的触发区域 */
  }
  
  /* 悬停时确保侧边栏保持展开状态 */
  .sidebar-hover-area:hover + .posts-sidebar.collapsed,
  .posts-sidebar.collapsed:hover {
    width: 280px; /* 稍微宽一点 */
    min-width: 280px;
  }
  
  /* 扩大隐形保护区 */
  .sidebar-hover-area:hover + .posts-sidebar.collapsed::after,
  .posts-sidebar.collapsed:hover::after {
    width: 40px;
    left: -40px;
  }
}

.toggle-sidebar-btn i.bi-chevron-up,
.toggle-sidebar-btn i.bi-chevron-down {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.post-content-area {
  min-height: 400px !important;
  padding: 1.5rem !important;
}

.editor-modal {
  width: 90% !important;
}

/* PC端样式-开始 */
@media (min-width: 993px) {
  /* 确保PC端样式不受移动端影响 */
  .posts-layout {
    grid-template-columns: minmax(200px, 1fr) minmax(0, 4fr);
    position: relative;
  }
  
  .posts-layout.sidebar-collapsed {
    grid-template-columns: 0 1fr;
  }
  
  /* 添加鼠标悬停触发区域 - 确保在PC端可见 */
  .sidebar-hover-area {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    display: none; /* 默认隐藏 */
    z-index: 10;
  }
  
  /* 在侧边栏折叠时显示悬停区域 */
  .posts-layout.sidebar-collapsed .sidebar-hover-area {
    display: block !important;
  }
  
  /* 完整的侧边栏样式 */
  .posts-sidebar {
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    min-width: 0 !important;
    max-height: none !important;
    min-height: auto !important;
    margin-bottom: 0 !important;
    background-color: rgba(255, 255, 255, 0.95) !important; /* 完全不透明 */
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
  }
  
  /* 确保标题栏文字不换行 */
  .posts-sidebar .sidebar-header {
    white-space: nowrap !important;
    width: 100% !important;
  }
  
  .posts-sidebar .sidebar-header h3 {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  /* 折叠状态时的侧边栏样式 */
  .posts-sidebar.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    opacity: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }
  
  /* 确保在折叠状态下内容不可见 */
  .posts-sidebar.collapsed .sidebar-header h3,
  .posts-sidebar.collapsed .posts-list {
    display: none !important;
  }
  
  /* 悬停时展开侧边栏 */
  .sidebar-hover-area:hover + .posts-sidebar.collapsed,
  .posts-sidebar.collapsed:hover {
    display: flex !important;
    flex-direction: column !important;
    width: 280px !important;
    min-width: 280px !important;
    opacity: 1 !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    overflow: visible !important;
    pointer-events: auto !important;
    z-index: 1001 !important;
    border-radius: 16px !important;
  }
  
  /* 悬停时确保侧边栏内容可见 */
  .sidebar-hover-area:hover + .posts-sidebar.collapsed .sidebar-header h3,
  .posts-sidebar.collapsed:hover .sidebar-header h3 {
    display: block !important;
  }
  
  .sidebar-hover-area:hover + .posts-sidebar.collapsed .posts-list,
  .posts-sidebar.collapsed:hover .posts-list {
    display: block !important;
  }
}
/* PC端样式-结束 */

/* 文章标题 */
.post-title {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 按钮样式 */
.btn-info {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.btn-info:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(14, 165, 233, 0.4);
}

/* 分享对话框 */
.share-dialog {
  max-width: 500px;
  width: 90%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.7);
}

.share-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #f1effe;
  color: #6d28d9;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

.share-header h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #6d28d9;
  font-weight: 600;
}

.share-body {
  padding: 1.5rem;
  background: #fcfbfe;
}

.share-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.share-content p {
  font-size: 1rem;
  color: #4b5563;
  margin: 0;
}

.share-content input {
  padding: 0.8rem 1rem;
  border: 1px solid rgba(124, 58, 237, 0.1);
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.3s;
}

.share-content input:focus {
  border-color: rgba(124, 58, 237, 0.2);
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.05);
}

.copy-btn {
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(99, 102, 241, 0.25) 100%);
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.1);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  align-self: flex-end;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.05);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-btn:hover {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25) 0%, rgba(79, 70, 229, 0.3) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(99, 102, 241, 0.1);
}

.copy-btn:active {
  transform: translateY(0);
}

.share-success {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 0.8rem;
  background: rgba(16, 185, 129, 0.05);
  color: #065f46;
  border-radius: 8px;
  border-left: 3px solid rgba(16, 185, 129, 0.3);
  animation: fadeIn 0.5s ease;
}

.share-success i {
  font-size: 1.2rem;
  color: rgba(16, 185, 129, 0.6);
}

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

@media (max-width: 576px) {
  .share-dialog {
    width: 95%;
  }
  
  .share-header {
    padding: 0.8rem 1rem;
  }
  
  .share-header h2 {
    font-size: 1.2rem;
  }
  
  .share-body {
    padding: 1rem;
  }
  
  .copy-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }
}

/* 分享对话框的关闭按钮 */
.share-dialog .close-btn {
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid rgba(124, 58, 237, 0.1);
  color: #6d28d9;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: all 0.2s;
  opacity: 0.8;
}

.share-dialog .close-btn:hover {
  background-color: rgba(124, 58, 237, 0.1);
  opacity: 1;
}
