/* Blog detail page styles */

/* Back link */
.blog-back-link {
    color: #0D9488;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 32px 0 20px;
    transition: color 0.2s;
}
.blog-back-link:hover {
    color: #0F766E;
}

/* Article card */
.blog-detail-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(13,148,136,0.08);
    border: 1px solid #E2E8F0;
}

/* Cover */
.blog-detail-cover {
    position: relative;
    overflow: hidden;
}
.blog-detail-cover img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.blog-detail-cover:hover img {
    transform: scale(1.02);
}
.blog-detail-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
}

/* Article body */
.blog-detail-body {
    padding: 48px 56px;
}

/* Breadcrumb */
.blog-breadcrumb {
    font-size: 13px;
    color: #94A3B8;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.blog-breadcrumb a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.2s;
}
.blog-breadcrumb a:hover {
    color: #0D9488;
}
.blog-breadcrumb .sep {
    color: #CBD5E1;
}

/* Banned notice */
.blog-banned-notice {
    background: linear-gradient(135deg, #FEF2F2, #FECACA);
    border: 1px solid #FCA5A5;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.blog-banned-notice .icon {
    font-size: 24px;
}
.blog-banned-notice .title {
    font-size: 15px;
    font-weight: 600;
    color: #991B1B;
    margin-bottom: 2px;
}
.blog-banned-notice .desc {
    font-size: 12px;
    color: #B91C1C;
}

/* Article title */
.blog-detail-title {
    margin: 0 0 20px;
    font-size: 32px;
    line-height: 1.35;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.02em;
}

/* Article meta */
.blog-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #F1F5F9;
}
.blog-meta-tag {
    background: linear-gradient(135deg, #0D9488, #14B8A6);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.blog-meta-author {
    font-size: 13px;
    color: #0D9488;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.blog-meta-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.blog-meta-admin {
    font-size: 13px;
    color: #F59E0B;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}
.blog-meta-official {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}
.blog-meta-info {
    font-size: 13px;
    color: #94A3B8;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.blog-meta-region {
    font-size: 11px;
    color: #94A3B8;
    background: #F1F5F9;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Article content */
.blog-content {
    font-size: 16px;
    line-height: 2;
    color: #334155;
}
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 20px 0;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-content img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.blog-content p {
    margin-bottom: 20px;
}
.blog-content h2, .blog-content h3 {
    margin-top: 32px;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 4px solid #0D9488;
    color: #1E293B;
}
.blog-content blockquote {
    border-left: 4px solid #0D9488;
    background: #F0FDFA;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    color: #475569;
}
.blog-content code {
    background: #F1F5F9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #E11D48;
}
.blog-content pre {
    background: #1E293B;
    color: #E2E8F0;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 20px 0;
}
.blog-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}
.blog-content ul, .blog-content ol {
    margin-bottom: 18px;
    padding-left: 24px;
}
.blog-content li {
    margin-bottom: 8px;
}
.blog-content a {
    color: #0D9488;
    text-decoration: none;
    border-bottom: 1px solid #99F6E4;
    transition: color 0.2s;
}
.blog-content a:hover {
    color: #0F766E;
    border-bottom-color: #0F766E;
}
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.blog-content th, .blog-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #E2E8F0;
}
.blog-content th {
    background: #F8FAFC;
    font-weight: 600;
    color: #475569;
}
.blog-content tr:last-child td {
    border-bottom: none;
}

/* Prev/Next navigation */
.blog-prev-next {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #F1F5F9;
}
.blog-prev-next .prev, .blog-prev-next .next {
    flex: 1;
    min-width: 0;
}
.blog-prev-next .next {
    text-align: right;
}
.blog-prev-next a {
    color: #475569;
    text-decoration: none;
    display: block;
    padding: 20px 24px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    transition: all 0.25s ease;
}
.blog-prev-next a:hover {
    background: #fff;
    border-color: #99F6E4;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13,148,136,0.12);
    color: #0D9488;
}
.blog-prev-next .label {
    font-size: 12px;
    color: #94A3B8;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-weight: 500;
}
.blog-prev-next .next .label {
    justify-content: flex-end;
}
.blog-prev-next .title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}
.blog-prev-next a:hover .title {
    color: #0D9488;
}
.blog-prev-next .empty {
    display: block;
    padding: 20px 24px;
    color: #CBD5E1;
    font-size: 14px;
    background: #F8FAFC;
    border: 1px dashed #E2E8F0;
    border-radius: 14px;
}

/* Back to list button */
.blog-back-list {
    text-align: center;
    margin-top: 28px;
}

/* Related articles */
.blog-related {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #F1F5F9;
}
.blog-related-title {
    font-size: 20px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.blog-related-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #0D9488, #14B8A6);
    border-radius: 2px;
}
.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.blog-related-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: #F8FAFC;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s;
    border: 1px solid transparent;
}
.blog-related-item:hover {
    background: #fff;
    border-color: #99F6E4;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13,148,136,0.1);
}
.blog-related-cover {
    width: 100px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #F0FDFA, #CCFBF1);
}
.blog-related-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.blog-related-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.blog-related-item:hover .blog-related-item-title {
    color: #0D9488;
}
.blog-related-item-meta {
    font-size: 12px;
    color: #94A3B8;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Comment section */
.blog-comment-section {
    max-width: 860px;
    margin: 40px auto 0;
}
.blog-comment-title {
    font-size: 20px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #E2E8F0;
}
.blog-comment-title .count {
    font-size: 14px;
    color: #94A3B8;
    font-weight: 400;
}

/* Comment input */
.blog-comment-input {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
    color-scheme: light;
}
.blog-comment-input:focus-within {
    border-color: #0D9488;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.08);
}
.blog-emoji-wrap {
    position: relative;
}
.blog-comment-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.blog-emoji-hint {
    font-size: 12px;
    color: #94A3B8;
}
.blog-comment-input textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 14px;
    color: #1E293B;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.6;
    color-scheme: light;
}
.blog-comment-input textarea:focus {
    border-color: #0D9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}
.blog-comment-input .blog-comment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    background: none;
}
.blog-comment-input .tip,
.blog-reply-box .tip {
    font-size: 12px;
    color: #94A3B8;
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}
.blog-comment-input .tip .count-num,
.blog-reply-box .tip .count-num {
    font-weight: 600;
    color: #0D9488;
    font-variant-numeric: tabular-nums;
    min-width: 20px;
    text-align: right;
}
.blog-comment-input .tip .count-num.over,
.blog-reply-box .tip .count-num.over {
    color: #EF4444;
}
.blog-comment-input .tip .count-max,
.blog-reply-box .tip .count-max {
    color: #CBD5E1;
}
.blog-emoji-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}
.blog-emoji-btn:hover {
    background: #E2E8F0;
}
.blog-emoji-panel {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    width: 360px;
}
.blog-emoji-panel .grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    max-height: 240px;
    overflow-y: auto;
}
.blog-emoji-panel .grid button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.blog-emoji-panel .grid button:hover {
    background: #F1F5F9;
}

/* Comment list */
.blog-comment-item {
    padding: 16px 0;
    border-bottom: 1px solid #F1F5F9;
    display: flex;
    gap: 12px;
}
.blog-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.blog-comment-body {
    flex: 1;
    min-width: 0;
}
.blog-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.blog-comment-username {
    font-weight: 600;
    color: #1E293B;
    font-size: 14px;
    text-decoration: none;
}
.blog-comment-time {
    font-size: 12px;
    color: #94A3B8;
}
.blog-comment-content {
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
    word-break: break-all;
}
.blog-comment-actions {
    margin-top: 8px;
}
.blog-comment-reply-btn {
    font-size: 12px;
    color: #0D9488;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.blog-comment-reply-btn:hover {
    text-decoration: underline;
}

/* 回复项内“回复”按钮（回复某条回复） */
.blog-reply-actions {
    margin-top: 6px;
}
.blog-reply-btn {
    font-size: 12px;
    color: #0D9488;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.blog-reply-btn:hover {
    text-decoration: underline;
}

/* Reply box */
.blog-reply-box {
    display: none;
    margin-top: 12px;
}
.blog-reply-box textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 13px;
    color: #1E293B;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.6;
    transition: border-color 0.2s, box-shadow 0.2s;
    color-scheme: light;
}
.blog-reply-box textarea:focus {
    border-color: #0D9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}
.blog-reply-box .blog-comment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    background: none;
}
.blog-reply-box .blog-comment-footer .actions-btns {
    display: flex;
    gap: 8px;
}

/* Reply list */
.blog-reply-list {
    margin-top: 12px;
    background: #F8FAFC;
    border-radius: 8px;
    padding: 12px;
}
.blog-reply-item {
    padding: 8px 0;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    gap: 8px;
}
.blog-reply-item:last-child {
    border-bottom: none;
}
.blog-reply-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.blog-reply-body {
    flex: 1;
    min-width: 0;
}
.blog-reply-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.blog-reply-username {
    font-weight: 600;
    color: #1E293B;
    font-size: 13px;
    text-decoration: none;
}
.blog-reply-to {
    font-size: 12px;
    color: #94A3B8;
}
.blog-reply-to-user {
    font-weight: 600;
    color: #0D9488;
    font-size: 13px;
}
.blog-reply-time {
    font-size: 11px;
    color: #94A3B8;
}
.blog-reply-content {
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
}

/* Empty comment */
.blog-comment-empty {
    text-align: center;
    padding: 40px;
    color: #94A3B8;
}
.blog-comment-empty .icon {
    font-size: 40px;
    margin-bottom: 12px;
}

/* Comment locked */
.blog-comment-locked {
    text-align: center;
    padding: 30px;
    color: #94A3B8;
}
.blog-comment-locked .icon {
    font-size: 36px;
    margin-bottom: 12px;
}

/* Login prompt */
.blog-login-prompt {
    text-align: center;
    padding: 20px;
    color: #64748B;
}
.blog-login-prompt p {
    margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-detail-body {
        padding: 24px 20px;
    }
    .blog-detail-title {
        font-size: 22px;
    }
    .blog-detail-cover img {
        height: 200px;
    }
    .blog-related-grid {
        grid-template-columns: 1fr;
    }
    .blog-prev-next {
        flex-direction: column;
        gap: 12px;
    }
    .blog-prev-next .next {
        text-align: left;
    }
    .blog-content {
        font-size: 15px;
    }
}

/* @ 提及高亮：评论里显示谁@了谁 */
.comment-at {
    color: #667eea !important;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
a.comment-at:hover {
    text-decoration: underline;
    color: #4f46e5 !important;
}

/* 评论/回复封禁头像占位（小头像） */
.blog-comment-avatar.banned-avatar-mini,
.blog-reply-avatar.banned-avatar-mini {
    background: linear-gradient(160deg, #e2e8f0, #cbd5e1);
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #64748b;
    border: 1px solid #94a3b8;
    text-indent: 0;
}
.blog-comment-avatar.banned-avatar-mini::after,
.blog-reply-avatar.banned-avatar-mini::after {
    content: "🚫";
}