/* 详情页共享内链布局（影视 + 文章） */
.post-top-nav {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.post-top-nav a {
    color: #64748b;
    text-decoration: none;
}

.post-top-nav a:hover {
    color: var(--inlink-accent, #2563eb);
}

.post-top-nav .current {
    color: #475569;
}

.post-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 1.75rem;
    align-items: start;
}

.post-inlinks-sidebar {
    position: sticky;
    top: 72px;
}

.inlink-block {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.inlink-block-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.65rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #eef2f6;
}

.inlink-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.1rem;
}

.inlink-cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.42rem 0.5rem;
    border-radius: 7px;
    text-decoration: none;
    color: #475569;
    font-size: 0.86rem;
    transition: background 0.2s, color 0.2s;
}

.inlink-cat-list li.is-current a,
.inlink-cat-list a:hover {
    background: #f0f7ff;
    color: #2563eb;
}

.inlink-cat-list .count {
    font-size: 0.7rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 0.08rem 0.38rem;
    border-radius: 999px;
}

.inlink-hot-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.inlink-hot-list li {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.inlink-hot-list .rank {
    flex-shrink: 0;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 5px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.inlink-hot-list li:nth-child(-n+3) .rank {
    background: #fef3c7;
    color: #b45309;
}

.inlink-hot-list a {
    color: #475569;
    text-decoration: none;
    font-size: 0.84rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.inlink-hot-list a:hover {
    color: #2563eb;
}

.inlink-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.inlink-tag-cloud .cloud-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.22rem 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 0.76rem;
    color: #475569;
    text-decoration: none;
}

.inlink-tag-cloud .cloud-tag em {
    font-style: normal;
    font-size: 0.65rem;
    color: #94a3b8;
}

.inlink-tag-cloud .cloud-tag:hover {
    border-color: #93c5fd;
    color: #2563eb;
}

.inlink-quick {
    display: grid;
    gap: 0.35rem;
}

.inlink-quick a {
    display: block;
    padding: 0.45rem 0.6rem;
    background: #f8fafc;
    border-radius: 7px;
    text-decoration: none;
    color: #475569;
    font-size: 0.84rem;
    border: 1px solid transparent;
}

.inlink-quick a:hover {
    border-color: #bfdbfe;
    color: #2563eb;
}

.post-inlinks-footer {
    margin-top: 0.5rem;
}

.inlink-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 1rem;
}

.inlink-pager .pager-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1.15rem;
    text-decoration: none;
    color: inherit;
    border-right: 1px solid #e8edf3;
    transition: background 0.2s;
}

.inlink-pager .pager-item.next {
    border-right: none;
    text-align: right;
}

.inlink-pager .pager-item:hover {
    background: #f8fafc;
}

.inlink-pager .pager-item.is-empty {
    pointer-events: none;
}

.inlink-pager .pager-label {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

.inlink-pager .pager-title {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.45;
}

.inlink-pager .pager-item:hover .pager-title {
    color: #2563eb;
}

.inlink-related {
    padding: 0.25rem 0 0;
}

.inlink-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.85rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #eef2f6;
}

.inlink-related-text {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.inlink-related-text li + li {
    border-top: 1px solid #f1f5f9;
}

.inlink-related-text a {
    display: block;
    padding: 0.85rem 1rem;
    text-decoration: none;
    transition: background 0.2s;
}

.inlink-related-text a:hover {
    background: #f8fafc;
}

.related-text-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.45;
    margin-bottom: 0.25rem;
}

.inlink-related-text a:hover .related-text-title {
    color: #2563eb;
}

.related-text-meta {
    font-size: 0.75rem;
    color: #94a3b8;
}

.inlink-related-media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.related-media-card {
    display: flex;
    gap: 0.65rem;
    padding: 0.6rem;
    border: 1px solid #ececec;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.related-media-card:hover {
    border-color: #ffb8b8;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.08);
}

.related-media-card img,
.related-media-placeholder {
    width: 56px;
    height: 78px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e5e5e5;
}

.related-media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #888;
    font-size: 1.1rem;
}

.related-media-title {
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.4;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-media-meta {
    margin-top: 0.3rem;
    font-size: 0.72rem;
    color: #999;
    display: flex;
    gap: 0.45rem;
}

.related-media-meta .score {
    color: #d48806;
    font-weight: 600;
}

@media (max-width: 960px) {
    .post-detail-layout {
        grid-template-columns: 1fr;
    }

    .post-inlinks-sidebar {
        position: static;
    }

    .inlink-related-media {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .inlink-pager {
        grid-template-columns: 1fr;
    }

    .inlink-pager .pager-item {
        border-right: none;
        border-bottom: 1px solid #e8edf3;
    }

    .inlink-pager .pager-item.next {
        text-align: left;
        border-bottom: none;
    }
}
