/* ========== 全局样式 ========== */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    max-width: 900px;
    margin: 40px auto;
    background: #f5f5f5;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
}

/* ========== 帖子卡片 ========== */
.issue-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.issue-card:hover {
    transform: translateY(-2px);
}

/* 帖子头部：头像+标题+时间 */
.issue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.issue-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.issue-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.issue-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.issue-time {
    color: #999;
    font-size: 0.9em;
    flex-shrink: 0;
}

/* ========== 帖子正文 ========== */
.issue-body {
    margin: 10px 0;
    white-space: pre-wrap;
    color: #333;
    max-height: 150px;       /* 默认高度 */
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: max-height 0.3s ease;
}

.issue-body.expanded {
    max-height: 2000px;
}

.issue-body::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
    pointer-events: none;
}

.issue-body.expanded::after {
    display: none;
}

/* ========== 标签 ========== */
.issue-labels {
    margin-bottom: 10px;
}

.issue-label {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 6px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: bold;
    color: #fff;
}

/* ========== 评论按钮 ========== */
.comments-toggle {
    cursor: pointer;
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    transition: background 0.3s, transform 0.3s;
}

.comments-toggle:hover {
    background: #0056b3;
}

/* 评论容器 */
.comments-container {
    display: none;
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* 单条评论 */
.comment {
    padding: 10px;
    border-radius: 10px;
    background: #f9f9f9;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: background 0.3s;
}

.comment:hover {
    background: #e8f0ff;
}

.comment img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment .author {
    font-weight: bold;
    color: #007bff;
    margin-right: 10px;
}

.comment .time {
    color: #999;
    font-size: 0.8em;
}

.comment-text {
    white-space: pre-wrap;
    color: #444;
    line-height: 1.5;
    max-height: 120px;       /* 默认高度 */
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: max-height 0.3s ease;
}

.comment-text.expanded {
    max-height: 2000px;
}

.comment-text::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, rgba(249,249,249,0), #f9f9f9);
    pointer-events: none;
}

.comment-text.expanded::after {
    display: none;
}

/* 评论区圆形图片 */
.comment-text img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    margin: 5px;
    transition: transform 0.2s;
}

.comment-text img:hover {
    transform: scale(1.1);
}

/* 帖子正文矩形图片 */
.issue-body img {
    max-width: 200px;
    cursor: pointer;
    border-radius: 8px;
    margin: 5px 0;
    display: block;
    transition: transform 0.2s;
}

.issue-body img:hover {
    transform: scale(1.05);
}
