blob: 62576705df10bd795dc2469f2120347aa1b34a5b [file] [log] [blame] [edit]
/* 帖子详情页面容器 */
.post-detail {
max-width: 800px;
margin: 0 auto;
background: #fff;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* 加载状态 */
.loading-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60px 20px;
color: #666;
}
.loading-spinner {
width: 40px;
height: 40px;
border: 3px solid #f3f3f3;
border-top: 3px solid #ff4757;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 20px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* 错误状态 */
.error-container {
text-align: center;
padding: 60px 20px;
color: #666;
}
.error-container h2 {
margin-bottom: 16px;
color: #333;
}
/* 顶部导航栏 */
.post-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 20px;
border-bottom: 1px solid #eee;
background: #fff;
position: sticky;
top: 0;
z-index: 100;
}
.back-btn {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
border: none;
background: #f8f9fa;
border-radius: 20px;
cursor: pointer;
transition: background-color 0.2s;
font-size: 14px;
color: #333;
}
.back-btn:hover {
background: #e9ecef;
}
.header-actions {
display: flex;
gap: 8px;
}
.action-btn {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border: none;
background: #f8f9fa;
border-radius: 50%;
cursor: pointer;
transition: background-color 0.2s;
color: #666;
}
.action-btn:hover {
background: #e9ecef;
}
.action-btn.active {
background: #ff4757;
color: #fff;
}
/* 主要内容区 */
.post-content {
flex: 1;
padding: 20px;
}
/* 帖子标题 */
.post-title {
font-size: 28px;
font-weight: 700;
line-height: 1.3;
margin-bottom: 20px;
color: #2c3e50;
}
/* 作者信息和元数据 */
.post-meta {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 16px;
border-bottom: 1px solid #eee;
}
.author-info {
display: flex;
align-items: center;
gap: 12px;
}
.avatar {
width: 48px;
height: 48px;
border-radius: 50%;
background: linear-gradient(135deg, #ff4757, #ff6b7a);
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 18px;
font-weight: 600;
}
.author-details {
display: flex;
flex-direction: column;
gap: 4px;
}
.author-name {
font-size: 16px;
font-weight: 600;
color: #2c3e50;
}
.post-date {
font-size: 14px;
color: #7f8c8d;
}
.post-stats {
display: flex;
gap: 16px;
}
.stat-item {
display: flex;
align-items: center;
gap: 4px;
color: #7f8c8d;
font-size: 14px;
}
/* 标签 */
.post-tags {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 24px;
}
.tag {
padding: 4px 12px;
background: #f8f9fa;
border-radius: 12px;
font-size: 12px;
color: #666;
border: 1px solid #dee2e6;
}
/* 帖子正文 */
.post-body {
line-height: 1.8;
font-size: 16px;
color: #2c3e50;
margin-bottom: 24px;
}
.post-body p {
margin-bottom: 16px;
}
/* 类别信息 */
.post-category {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 16px;
background: #f8f9fa;
border-radius: 8px;
margin-bottom: 20px;
}
.category-label {
font-size: 14px;
color: #7f8c8d;
}
.category-name {
font-size: 14px;
font-weight: 600;
color: #ff4757;
}
/* 底部操作栏 */
.post-footer {
border-top: 1px solid #eee;
background: #fff;
position: sticky;
bottom: 0;
}
.action-bar {
display: flex;
justify-content: space-around;
padding: 12px 20px;
}
.action-button {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 8px 12px;
border: none;
background: transparent;
cursor: pointer;
transition: all 0.2s;
color: #7f8c8d;
font-size: 12px;
border-radius: 8px;
min-width: 60px;
}
.action-button:hover {
background: #f8f9fa;
color: #2c3e50;
}
.action-button.liked {
color: #ff4757;
}
.action-button.bookmarked {
color: #ffa726;
}
/* 响应式设计 */
@media (max-width: 768px) {
.post-detail {
margin: 0;
}
.post-title {
font-size: 24px;
}
.post-content {
padding: 16px;
}
.post-header {
padding: 12px 16px;
}
.post-meta {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.post-stats {
align-self: flex-end;
}
.action-bar {
padding: 8px 16px;
}
.action-button {
font-size: 11px;
min-width: 50px;
}
}
/* 平滑滚动 */
html {
scroll-behavior: smooth;
}
/* 选中文本样式 */
::selection {
background: rgba(255, 71, 87, 0.2);
color: #2c3e50;
}