blob: 6a0dae8b4d0283e97f1dc7ac2e627a2d6826b67a [file] [log] [blame]
/* HelpDetail.css - 个性化版本 */
.help-detail-container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
/* 返回按钮 - 渐变风格 */
.back-button {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
color: white;
border: none;
border-radius: 6px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
margin-bottom: 25px;
box-shadow: 0 2px 8px rgba(30, 60, 114, 0.2);
}
.back-button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}
.back-button::before {
content: "←";
}
/* 帖子卡片 - 3D悬浮效果 */
.help-post {
background: white;
border-radius: 12px;
padding: 25px;
margin-bottom: 30px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
transition: transform 0.3s, box-shadow 0.3s;
position: relative;
overflow: hidden;
}
.help-post:hover {
transform: translateY(-5px);
box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}
.help-post.solved::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 5px;
height: 100%;
background: linear-gradient(to bottom, #52c41a, #a0d911);
}
/* 帖子头部 - 圆形头像+渐变背景 */
.post-header {
display: flex;
align-items: center;
margin-bottom: 20px;
position: relative;
}
.post-avatar {
width: 50px;
height: 50px;
border-radius: 50%;
margin-right: 15px;
object-fit: cover;
border: 3px solid rgba(30, 60, 114, 0.2);
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 20px;
}
.post-meta {
flex: 1;
}
.post-author {
font-weight: 700;
color: #1e3c72;
font-size: 18px;
}
.post-date {
color: #666;
font-size: 14px;
margin-top: 3px;
}
/* 已解决徽章 - 闪光效果 */
.solved-badge {
background: linear-gradient(135deg, #52c41a 0%, #a0d911 100%);
color: white;
padding: 4px 12px;
border-radius: 20px;
font-size: 14px;
font-weight: 600;
position: absolute;
right: 0;
top: 0;
box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(82, 196, 26, 0.4); }
70% { box-shadow: 0 0 0 10px rgba(82, 196, 26, 0); }
100% { box-shadow: 0 0 0 0 rgba(82, 196, 26, 0); }
}
/* 删除按钮 - 危险色 */
.delete-button {
position: absolute;
right: 0;
bottom: 0;
padding: 6px 12px;
background: linear-gradient(135deg, #ff5e62 0%, #ff2400 100%);
color: white;
border: none;
border-radius: 4px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
}
.delete-button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(255, 94, 98, 0.3);
}
/* 帖子标题 - 渐变文字 */
.post-title {
font-size: 28px;
margin: 0 0 20px;
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: 800;
}
/* 帖子内容 - 更好的阅读体验 */
.post-content {
line-height: 1.8;
color: #333;
font-size: 16px;
margin-bottom: 25px;
}
.post-content p {
margin-bottom: 15px;
}
/* 图片容器 - 圆角+阴影 */
.post-image-container, .comment-image-container {
margin: 20px 0;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
transition: transform 0.3s;
}
.post-image-container:hover, .comment-image-container:hover {
transform: scale(1.02);
}
.post-image, .comment-image {
width: 100%;
height: auto;
max-height: 500px;
object-fit: contain;
display: block;
}
/* 帖子操作按钮 - 悬浮效果 */
.post-actions {
display: flex;
gap: 15px;
margin-top: 25px;
}
.like-button, .solve-button {
padding: 10px 20px;
border: none;
border-radius: 6px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
display: flex;
align-items: center;
gap: 8px;
}
.like-button {
background: linear-gradient(135deg, #f6f7f9 0%, #e9ebee 100%);
color: #666;
}
.like-button:hover {
background: linear-gradient(135deg, #ebedf0 0%, #d8dadf 100%);
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.like-button.liked {
background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
color: #1890ff;
}
.solve-button {
background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
color: #52c41a;
}
.solve-button:hover {
background: linear-gradient(135deg, #e6ffd1 0%, #b7eb8f 100%);
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(82, 196, 26, 0.2);
}
.solve-button.solved {
background: linear-gradient(135deg, #52c41a 0%, #a0d911 100%);
color: white;
}
/* 评论区域 */
.comments-section {
background: white;
border-radius: 12px;
padding: 25px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.comments-section h2 {
font-size: 22px;
color: #1e3c72;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #f0f2f5;
}
/* 评论表单 - 现代设计 */
.comment-form {
margin-bottom: 30px;
}
.comment-form textarea {
width: 100%;
padding: 15px;
border: 2px solid #f0f2f5;
border-radius: 8px;
resize: vertical;
min-height: 100px;
margin-bottom: 15px;
font-size: 15px;
transition: all 0.3s;
}
.comment-form textarea:focus {
border-color: #1e3c72;
box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.2);
outline: none;
}
.comment-form button[type="submit"] {
padding: 12px 24px;
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
color: white;
border: none;
border-radius: 6px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
}
.comment-form button[type="submit"]:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}
/* 图片上传按钮 - 现代风格 */
.upload-image-btn {
position: relative;
margin-bottom: 15px;
}
.upload-image-btn input[type="file"] {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.upload-image-btn label {
display: inline-block;
padding: 8px 16px;
background: #f0f2f5;
border-radius: 6px;
color: #666;
font-size: 14px;
cursor: pointer;
transition: all 0.3s;
}
.upload-image-btn label:hover {
background: #e4e6eb;
}
/* 评论列表 - 卡片式设计 */
.comment-list {
margin-top: 25px;
}
.comment-item {
display: flex;
padding: 20px;
margin-bottom: 20px;
background: #f9fafc;
border-radius: 10px;
transition: all 0.3s;
position: relative;
}
.comment-item:hover {
background: #f0f4f8;
transform: translateX(5px);
}
.comment-avatar {
width: 50px;
height: 50px;
border-radius: 50%;
margin-right: 15px;
object-fit: cover;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 20px;
flex-shrink: 0;
}
.comment-content {
flex: 1;
}
.comment-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.comment-user {
font-weight: 700;
color: #1e3c72;
}
.reply-to {
color: #666;
font-size: 14px;
margin-left: 10px;
}
.comment-time {
color: #888;
font-size: 13px;
}
.comment-text {
line-height: 1.7;
color: #333;
margin-bottom: 15px;
}
.comment-actions {
display: flex;
gap: 15px;
}
.comment-actions button {
background: none;
border: none;
color: #666;
font-size: 14px;
cursor: pointer;
transition: all 0.3s;
padding: 5px 10px;
border-radius: 4px;
display: flex;
align-items: center;
gap: 5px;
}
.comment-actions button:hover {
color: #1e3c72;
background: rgba(30, 60, 114, 0.1);
}
.delete-comment-btn {
color: #ff4d4f !important;
}
.delete-comment-btn:hover {
background: rgba(255, 77, 79, 0.1) !important;
}
/* 回复弹窗 - 现代化设计 */
.reply-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
backdrop-filter: blur(5px);
}
.reply-modal {
background: white;
padding: 25px;
border-radius: 12px;
width: 500px;
max-width: 90%;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
position: relative;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.modal-header h3 {
margin: 0;
color: #1e3c72;
font-size: 20px;
}
.close-modal {
background: none;
border: none;
font-size: 24px;
color: #666;
cursor: pointer;
transition: all 0.3s;
}
.close-modal:hover {
color: #1e3c72;
transform: rotate(90deg);
}
.reply-modal textarea {
width: 100%;
padding: 15px;
border: 2px solid #f0f2f5;
border-radius: 8px;
resize: vertical;
min-height: 120px;
margin-bottom: 15px;
font-size: 15px;
transition: all 0.3s;
}
.reply-modal textarea:focus {
border-color: #1e3c72;
box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.2);
outline: none;
}
.modal-actions {
display: flex;
justify-content: flex-end;
gap: 15px;
}
.cancel-btn {
padding: 10px 20px;
background: #f5f5f5;
color: #666;
border: none;
border-radius: 6px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
}
.cancel-btn:hover {
background: #e0e0e0;
}
.submit-btn {
padding: 10px 20px;
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
color: white;
border: none;
border-radius: 6px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
}
.submit-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}
/* 响应式设计 */
@media (max-width: 768px) {
.help-detail-container {
padding: 15px;
}
.post-title {
font-size: 24px;
}
.post-actions {
flex-direction: column;
}
.comment-item {
flex-direction: column;
}
.comment-avatar {
margin-bottom: 15px;
}
}
/* 动画效果 */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.help-post, .comments-section {
animation: fadeIn 0.5s ease-out forwards;
}