

/* ===== 故事详情页面样式 ===== */

.viewer-image{
    max-width: 100%;
}

.story-title{
    font-size:20px;
    margin: 10px 0;
}
/* 发布者信息 */
.story-author-info {
    display: flex;
    align-items: center;
    margin: 8px 0 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.story-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e8e8e8;
    margin-right: 12px;
    flex-shrink: 0;
}

.story-author-details {
    display: flex;
    flex-direction: column;
}

.story-author-name {
    /* font-weight: 600; */
    /* font-size: 16px; */
    /* color: #1a1a1a; */
    /* margin-bottom: 4px; */
}

.story-publish-time {
    font-size: 13px;
    color: #a3a3a3;
}

/* 故事摘要 */
.story-summary {
    font-size: 15px;
    line-height: 1.6;
    color: #595959;
    margin-bottom: 24px;
    padding: 12px 16px;
    background-color: #fafafa;
    border-radius: 6px;
    border-left: 3px solid #1890ff;
}

/* 图片列表缩进 */
.story-images-container {
    margin-left: 60px; /* 根据发布者头像缩进 */
    /* margin-top: 20px; */
}

.story-images-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.story-image-item {
    width: 100%;
    /* border-radius: 8px; */
    overflow: hidden;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); */
}

.story-image-item img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 1px solid #888888;
    /* border-radius: 8px; */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .story-author-info {
        margin: 12px 0 20px;
    }
    
    .story-author-avatar {
        width: 40px;
        height: 40px;
    }
    
    .story-images-container {
        margin-left: 52px; /* 移动端稍小的缩进 */
    }
}

@media (max-width: 480px) {
    .story-images-container {
        margin-left: 0; /* 超小屏幕取消缩进 */
        margin-top: 16px;
    }
    
    .story-author-info {
        padding-bottom:8px;
        margin-bottom: 8px;
        /* flex-direction: column; */
        align-items: flex-start;
        gap: 8px;
    }
    
    .story-author-avatar {
        margin-right: 0;
        margin-bottom: 8px;
    }
}

/* 评论区域整体样式 */
.story-comments-container {
    padding-left: 60px;
}

/* 标题样式 */
.section-title {
    /* font-size: 22px; */
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
}

/* 标题样式 */
.section-more-title {
    margin: 20px 0;    
    display: flex;
    align-items: center;
    gap: 20px;  /* 文字与线的间距 */
}

.section-more-title::before,
.section-more-title::after {
  content: '';
  flex: 1;    /* 线条占据剩余空间 */
  height: 1px;
  background: #ccc;
}

.sub-section-title {
    /* font-size: 17px; */
    font-weight: 600;
    color: #2d3748;
    margin: 22px 0 16px;
}

/* 评论项样式 */
.comment-item {
    background: white;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid #f1f1f1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    position: relative;
}

/* 热门评论特殊样式 */
.hot-comment {
    border-left: 3px solid #f59e0b;
    background: linear-gradient(to right, rgba(245,158,11,0.02), white);
}

.hot-comment::before {
    content: '热门';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f59e0b;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
}

/* 作者信息 */
.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    margin-right: 10px;
}

.comment-author-name {
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
}

/* 点赞计数 */
.comment-likes-count {
    margin-left: auto;
    display: flex;
    align-items: center;
    background: #fef2f2;
    padding: 3px 8px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #dc2626;
}

.comment-likes-count svg {
    margin-right: 4px;
}

/* 评论内容（对齐优化） */
.comment-content {
    line-height: 1.5;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 10px;
    word-break: break-word;
    padding-left: 42px; /* 与作者名对齐 */
    margin-top: -2px;
}

/* 评论时间 */
.comment-time {
    font-size: 12px;
    color: #718096;
    padding-left: 42px; /* 与内容对齐 */
}

/* 无评论提示 */
.no-comments {
    /* text-align: center; */
    /* padding: 30px 20px; */
    background: #f8fafc;
    border-radius: 8px;
    margin: 20px 0;
}

.no-comments p {
    color: #64748b;
    font-size: 15px;
}

/* 评论表单区域 */
.comment-form-section {
    /* margin-top: 32px; */
    /* padding-top: 22px; */
    border-top: 1px solid #eaeaea;
}

.comment-form {
    background: #f8fafc;
    border-radius: 5px;
    /* padding: 20px; */
}

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

.comment-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #4f46e5; /* 统一边框颜色为 #4f46e5 */
    border-radius: 6px 6px 0 6px; /* 右下角为直角 */
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    display: block;
    margin: 0;
}

.comment-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); /* 增强聚焦效果 */
}

.comment-textarea::placeholder {
    color: #a0aec0;
}

.submit-comment-btn {
    background: #4f46e5;
    color: white;
    border: 1px solid #4f46e5; /* 添加边框与文本区域匹配 */
    border-top: none; /* 移除顶部边框，与文本区域连接 */
    padding: 10px 24px;
    border-radius: 0 0 6px 6px; /* 左上和右上为直角 */
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    float: right;
    margin: 0; /* 移除所有边距 */
    position: relative;
    z-index: 1;
}

.submit-comment-btn:hover {
    background: #4338ca;
    border-color: #4338ca;
}

/* 确保表单没有额外的内边距 */
.comment-form {
    background: #f8fafc;
    border-radius: 5px;
    padding: 0; /* 移除内边距 */
    margin: 0; /* 移除外边距 */
}

/* 清除浮动 */
.comment-form::after {
    content: "";
    display: table;
    clear: both;
}

/* 登录提示 */
.login-to-comment {
    text-align: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin: 16px 0;
}

.login-to-comment p {
    color: #64748b;
    font-size: 14px;
}

.login-to-comment a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    margin: 0 4px;
}

.login-to-comment a:hover {
    text-decoration: underline;
}

/* 评论列表间距调整 */
.hot-comments-list,
.other-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.comment-item {
    animation: fadeIn 0.3s ease forwards;
}

/* 滚动条美化 */
.other-comments-list {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

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

.other-comments-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.other-comments-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.other-comments-list::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .story-author-name{
        font-size: 13px;
    }

    .story-comments-container {
        padding-left: 52px;
        /* padding: 16px; */
    }
    
    .section-title {
        font-size: 22px;
        margin-bottom: 24px;
    }
    
    .comment-item {
        padding: 16px;
    }
    
    .comment-author-avatar {
        width: 28px;
        height: 28px;
    }
    
    .comment-author-name {
        font-size: 13px;
    }
    
    .comment-content {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .hot-comments-list,
    .other-comments-list {
        gap: 10px;
    }

    .story-comments-container {
        padding-left: 0;
    }
}
