#toast-container {
    position: fixed;
    z-index: 99999;
    width: 100%;
    pointer-events: none;
}

/* PC 端默认右上角 */
@media (min-width: 769px) {
    #toast-container {
        top: 20px;
        right: 20px;
        width: auto;
    }
}

/* 移动端底部居中 */
@media (max-width: 768px) {
    #toast-container {
        bottom: 60px;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
    }
}

.toast {
    display: inline-block;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 8px 14px;
    margin: 6px;
    border-radius: 6px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
    0% {opacity:0; transform: translateY(20px);}
    10% {opacity:1; transform: translateY(0);}
    90% {opacity:1; transform: translateY(0);}
    100% {opacity:0; transform: translateY(-20px);}
}


/* ---------------- PC / 移动端基础样式 ---------------- */
#modern-comments { max-width: 800px; margin:0 auto; color:#333; font-family: sans-serif; }

/* 评论卡片 */
.comment-card, .comment-reply-card { background:#fff; border-radius:8px; padding:12px 16px; margin-bottom:12px; transition: all 0.3s ease; }
.comment-card.pending, .comment-reply-card.pending { background:#f5f5f5; border-left:3px solid #ccc; color:#999; font-style:italic; }
.comment-content { font-size:14px; line-height:1.6; margin-bottom:8px; word-break:break-word; }

/* 作者高亮 */
.author-reply { background:#f5f8fa; border-left:3px solid #1da1f2; padding:8px 12px; border-radius:6px; font-size:13px; color:#555; }

/* 评论操作 */
.comment-actions { display:flex; align-items:center; gap:12px; font-size:13px; }
.btn-like { border:none; background:transparent; cursor:pointer; color:#666; display:inline-flex; align-items:center; gap:4px; position:relative; overflow:visible; }
.btn-like.liked { color:#e0245e; }
.btn-like.liked i { animation:heart-bounce 0.3s ease; }
@keyframes heart-bounce {0%{transform:scale(1);}30%{transform:scale(1.4);}60%{transform:scale(0.9);}100%{transform:scale(1);}}

/* 点赞爆炸动画 */
.heart-burst { position:absolute; top:50%; left:50%; width:6px; height:6px; background:#e0245e; border-radius:50%; opacity:0; pointer-events:none; animation:burst 0.6s ease forwards; }
@keyframes burst {0%{transform:scale(1) translate(-50%,-50%);opacity:1;}100%{transform:scale(5) translate(-50%,-50%);opacity:0;}}

/* 回复折叠 */
.expand-replies { background:none; border:none; cursor:pointer; color:#999; font-weight:bold; padding:2px 0; }
.comment-reply-card { background:#f9f9f9; border-radius:6px; padding:8px 12px; margin-top:6px; font-size:13px; position:relative; opacity:0; transform:translateY(10px); transition:all 0.3s ease; }
.comment-reply-card::before { content:''; position:absolute; top:10px; left:-10px; width:8px; height:8px; background:#1da1f2; border-radius:50%; }
.replies-container { overflow:hidden; max-height:0; opacity:0; transition:max-height 0.3s ease, opacity 0.3s ease; }
.replies-container.open { max-height:1000px; opacity:1; }
.replies-container.open .comment-reply-card { opacity:1; transform:translateY(0); }

/* 评论表单（PC端） */
#comment-form { margin-top:20px; display:flex; flex-direction:column; gap:8px; }
#comment-form textarea { width:100%; min-height:60px; padding:8px 12px; border-radius:6px; border:1px solid #ccc; resize:vertical; font-size:14px; }
#comment-form button { align-self:flex-end; background:#999; color:#fff; border:none; padding:6px 16px; border-radius:6px; cursor:pointer; transition:background 0.2s ease; }
#comment-form button:hover { background:#b1191a; }
#comment-form textarea:not(:placeholder-shown) + button {background: #b1191a;}



/* 嵌入回复框 */
.reply-form { margin-top:8px; padding:8px; border:1px solid #e5e5e5; border-radius:8px; background:#fafafa; }
.reply-form .reply-content { width:100%; min-height:60px; resize:vertical; padding:6px 10px; border:1px solid #ddd; border-radius:6px; font-size:14px; line-height:1.4; outline:none; }
.reply-form .reply-content:focus { border-color:#d1191a; box-shadow:0 0 4px rgba(64,158,255,0.3); }
.reply-form .reply-actions { margin-top:6px; text-align:right; }
.reply-form .submit-reply { padding:4px 12px; font-size:13px; background:#d1191a; color:#fff; border:none; border-radius:4px; cursor:pointer; transition:background 0.2s; }
.reply-form .submit-reply:hover { background:#b01818; }

/* 增强主评论框焦点效果 */
#comment-content:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    outline: none;
    transform: translateY(-1px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 移动端底部回复框的焦点样式 */
#mobile-reply-form textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0);
    outline: none;
}

/* 回复框的焦点样式 */
.reply-form .reply-content:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0);
    outline: none;
}

/* 为所有输入框添加一致的过渡效果 */
#comment-content,
#mobile-reply-form textarea,
.reply-form .reply-content {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e1e1e1;
}

#comment-content:focus,
#mobile-reply-form textarea:focus,
.reply-form .reply-content:focus {
    border-width: 2px;
    border-color: #007bff;
}
/* 聚焦时的脉动效果 */
@keyframes input-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.comment-input-highlight {
    animation: comment-highlight 1.2s ease-out;
}

#mobile-reply-form {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 8px;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
    z-index: 9999;
    flex-direction: column;
    gap: 4px;
}

#mobile-reply-form textarea {
    width: 100%;
    min-height: 50px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    resize: vertical;
}

#mobile-reply-form button {
    align-self: flex-end;
    background: #d1191a;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
}

/* PC / 移动端切换 */
@media (max-width:768px){
    .reply-form { display:none; }
}
/* 加载更多按钮 */
#load-more-comments { display:block; margin:12px auto; padding:6px 16px; border:none; border-radius:6px; background:#f0f0f0; cursor:pointer; }

.post-like-container {
    display: flex;
    justify-content: center;
    position: relative; /* 用于心形粒子绝对定位 */
    overflow: visible;
}
.rfj-favorite-btn .fa.fa-star, .rfj-favorite-btn .fas.fa-star,
.rfj-favorite-mobile-btn .fa.fa-star, .rfj-favorite-mobile-btn .fas.fa-star{
    color:#FFA70E;
}
.rfj-favorite-btn, .like-btn, .rfj-comment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.25s ease;
    outline: none;
    gap: 5px;
}

.rfj-favorite-btn i, .like-btn i, .rfj-comment-btn i{
    font-size: 18px;
    transition: transform 0.25s ease, color 0.25s ease;
}

.like-btn .like-count {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* liked 状态 */
.like-btn.liked i {
    color: #ff2d55;
    transform: scale(1.18);
}

.like-btn.liked .like-count {
    color: #ff2d55;
}

.rfj-favorite-btn:hover i {
    transform: scale(1.08);
    color: #FFA70E;
}

/* 悬浮效果 */
.like-btn:hover i {
    transform: scale(1.08);
    color: #ff2d55;
}

/* 点击动画微缩 */
.rfj-favorite-btn:active i, .like-btn:active i {
    transform: scale(0.95);
}

/* 心形粒子样式 */
.heart-particle {
    position: absolute;
    width: 14px;
    height: 14px;
    pointer-events: none;
    transform-origin: center;
    opacity: 0.95;
    will-change: transform, opacity;
}

/* 使用CSS变量设置动画终点 */
@keyframes heartFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    60% {
        opacity: 1;
    }
    100% {
        transform: translateY(-80px) scale(0.6);
        opacity: 0;
    }
}

/* 点赞和收藏外层容器：横向排列 */
.rfj-actions-container {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* 靠右 */
    gap: 15px; /* 两个按钮的间距 */
}