/* 技术社区页面 */
.askc-bg {
    padding-top: 16px;
    background: #f5f6f8;
}

.askc-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px 50px;
    color: #3f3f46;
    font-size: 14px;
}

.askc-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, .05);
}

.askc-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.askc-row-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 600;
    color: #18181b;
}

.askc-row-title i {
    color: #165DFF;
    font-size: 19px;
}

/* 分类横向滚动 */
.askc-cate-card {
    padding: 14px 18px 16px;
    margin-bottom: 16px;
}

.askc-cate-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-top: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.askc-cate-scroll::-webkit-scrollbar {
    display: none;
}

.askc-cate-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 170px;
    padding: 11px 14px;
    border: 1px solid #eef0f4;
    border-radius: 10px;
    background: #fafbfc;
    transition: .2s;
}

.askc-cate-item:hover {
    border-color: #165DFF;
    background: #f3f6ff;
    transform: translateY(-2px);
}

.askc-cate-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.askc-cate-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #27272a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.askc-cate-count {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #a1a1aa;
}

/* 公告栏 */
.askc-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    margin-bottom: 16px;
}

.askc-notice-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.askc-badge {
    flex: none;
    padding: 3px 10px;
    border-radius: 6px;
    background: #165DFF;
    color: #fff;
    font-size: 12px;
}

.askc-notice-text {
    min-width: 0;
    color: #52525b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.askc-notice-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.askc-ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    color: #3f3f46;
    font-size: 14px;
    transition: .2s;
}

.askc-ghost-btn i {
    color: #165DFF;
}

.askc-ghost-btn:hover {
    border-color: #165DFF;
    color: #165DFF;
    background: #f3f6ff;
}

/* 头条 + 动态 */
.askc-top-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.askc-headline {
    padding: 18px;
}

.askc-headline-inner {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

.askc-cover {
    position: relative;
    display: block;
    height: 230px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #165DFF, #60a5fa);
}

.askc-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.askc-cover-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 12px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .75));
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.askc-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-size: 20px;
    letter-spacing: 2px;
}

.askc-headline-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.askc-headline-item {
    padding-bottom: 12px;
    border-bottom: 1px dashed #eceef3;
}

.askc-headline-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.askc-headline-title {
    display: block;
    color: #27272a;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
}

.askc-headline-title:hover {
    color: #165DFF;
}

.askc-headline-title.is-top {
    color: #e11d48;
}

.askc-headline-desc {
    margin: 6px 0;
    color: #71717a;
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.askc-meta {
    color: #a1a1aa;
    font-size: 12px;
}

.askc-dynamic {
    padding: 18px;
}

.askc-dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.askc-dynamic-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.askc-dynamic-title {
    flex: 1;
    min-width: 0;
    color: #3f3f46;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.askc-dynamic-item:hover .askc-dynamic-title {
    color: #165DFF;
}

.askc-dynamic-date {
    flex: none;
    color: #a1a1aa;
    font-size: 12px;
}

/* 主体：文章列表 + 侧栏 */
.askc-main-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 16px;
    align-items: start;
}

.askc-list-card {
    padding: 4px 18px 18px;
}

.askc-article {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px dashed #eceef3;
}

.askc-article:last-child {
    border-bottom: 0;
}

.askc-avatar {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    background: #f4f4f5;
}

.askc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.askc-article-main {
    flex: 1;
    min-width: 0;
}

.askc-article-title {
    display: block;
    margin-bottom: 6px;
    color: #27272a;
    font-size: 17px;
    line-height: 1.5;
}

.askc-article-title:hover {
    color: #165DFF;
}

.askc-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    color: #a1a1aa;
    font-size: 13px;
}

.askc-article-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

.askc-views {
    color: #a1a1aa;
    font-size: 13px;
}

.askc-tag-top,
.askc-tag-fine {
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    line-height: 18px;
}

.askc-tag-top {
    background: #3f3f46;
}

.askc-tag-fine {
    background: #ef4444;
}

.askc-empty {
    padding: 40px 0;
    text-align: center;
    color: #a1a1aa;
    font-size: 14px;
}

/* 分页 */
.askc-pagination {
    display: flex;
    justify-content: center;
    padding: 20px 0 4px;
}

.askc-pagination ul.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.askc-pagination li a,
.askc-pagination li span {
    display: block;
    min-width: 34px;
    padding: 6px 11px;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    background: #fff;
    color: #3f3f46;
    text-align: center;
    font-size: 14px;
}

.askc-pagination li a:hover {
    border-color: #165DFF;
    color: #165DFF;
}

.askc-pagination li.active span {
    border-color: #165DFF;
    background: #165DFF;
    color: #fff;
}

.askc-pagination li.disabled span {
    background: #fafafa;
    color: #b8b8bf;
}

/* 侧栏 */
.askc-side-card {
    margin-bottom: 16px;
    padding: 16px 18px;
}

.askc-side-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f3;
    color: #18181b;
    font-size: 16px;
    font-weight: 600;
}

.askc-side-title i {
    color: #165DFF;
}

.askc-notice-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.askc-notice-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.askc-notice-item-text {
    flex: 1;
    min-width: 0;
    color: #52525b;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.askc-notice-item-date {
    flex: none;
    color: #a1a1aa;
    font-size: 12px;
}

.askc-label-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.askc-label {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    line-height: 18px;
}

.askc-hot-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.askc-hot-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.askc-hot-title {
    flex: 1;
    min-width: 0;
    color: #3f3f46;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.askc-hot-item:hover .askc-hot-title {
    color: #165DFF;
}

.askc-hot-count {
    flex: none;
    color: #a1a1aa;
    font-size: 12px;
}

.askc-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.askc-link-list a {
    color: #165DFF;
    font-size: 13px;
}

/* 响应式 */
@media (max-width: 992px) {
    .askc-top-grid,
    .askc-main-grid {
        grid-template-columns: 1fr;
    }

    .askc-headline-inner {
        grid-template-columns: 1fr;
    }

    .askc-cover {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .askc-page {
        padding: 0 12px 30px;
    }

    .askc-notice-actions {
        width: 100%;
    }

    .askc-article-right {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    .askc-article-meta {
        gap: 8px;
    }
}

/* ============ 社区详情页 ============ */
.askd-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 16px;
    align-items: start;
}

.askd-main {
    min-width: 0;
}

.askd-sidebar {
    min-width: 0;
}

/* 文章主体 */
.askd-article {
    padding: 24px 26px 28px;
    margin-bottom: 16px;
}

.askd-title {
    margin: 0;
    color: #18181b;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
    word-break: break-word;
}

.askd-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 18px;
}

.askd-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 5px;
    background: #eef4ff;
    color: #165DFF;
    font-size: 12px;
    line-height: 18px;
}

.askd-tag:hover {
    background: #165DFF;
    color: #fff;
}

.askd-tag-top {
    background: #3f3f46;
    color: #fff;
}

.askd-tag-fine {
    background: #ef4444;
    color: #fff;
}

.askd-tag-plain {
    background: #f4f4f5;
    color: #a1a1aa;
}

/* 作者信息行 */
.askd-author {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid #f0f0f3;
    border-bottom: 1px solid #f0f0f3;
}

.askd-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.askd-avatar {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: #f4f4f5;
}

.askd-author-name {
    color: #27272a;
    font-size: 15px;
    font-weight: 500;
}

.askd-author-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
    color: #a1a1aa;
    font-size: 12px;
}

.askd-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.askd-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    background: #fff;
    color: #52525b;
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
}

.askd-action i {
    color: #a1a1aa;
}

.askd-action:hover {
    border-color: #165DFF;
    color: #165DFF;
    background: #f3f6ff;
}

.askd-action.is-active {
    border-color: #165DFF;
    color: #165DFF;
    background: #f3f6ff;
}

.askd-action.is-active i {
    color: #165DFF;
}

/* 正文 */
.askd-content {
    padding-top: 18px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.85;
    word-break: break-word;
}

.askd-content p {
    margin: 0 0 16px;
}

.askd-content img {
    max-width: 100%;
    height: auto;
}

.askd-content pre {
    margin: 16px 0;
    padding: 14px 16px;
    border-radius: 8px;
    background: #1D2129;
    color: #fff;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.7;
}

.askd-content pre::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.askd-content code:not([class*="language-"]) {
    padding: 2px 6px;
    border-radius: 4px;
    background: #f4f4f5;
    color: #e11d48;
    font-size: 13px;
}

.askd-content ul,
.askd-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.askd-content li {
    margin-bottom: 6px;
}

.askd-content blockquote {
    margin: 0 0 16px;
    padding: 10px 16px;
    border-left: 3px solid #165DFF;
    background: #f7f9ff;
    color: #6b7280;
}

.askd-content table {
    width: 100%;
    margin-bottom: 16px;
    border-collapse: collapse;
}

.askd-content th,
.askd-content td {
    padding: 8px 10px;
    border: 1px solid #e4e4e7;
}

/* 评论区 */
.askd-comments {
    padding: 22px 26px 26px;
}

.askd-comments-title {
    margin: 0 0 16px;
    color: #18181b;
    font-size: 18px;
    font-weight: 600;
}

.askd-comment-form {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f3;
}

.askd-textarea {
    display: block;
    width: 100%;
    height: 108px;
    padding: 12px 14px;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    outline: none;
    resize: vertical;
    color: #3f3f46;
    font-size: 14px;
    line-height: 1.7;
    transition: .2s;
}

.askd-textarea:focus {
    border-color: #165DFF;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, .12);
}

.askd-textarea-sm {
    height: 80px;
    font-size: 13px;
}

.askd-comment-form-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.askd-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border: 0;
    border-radius: 8px;
    background: #165DFF;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: .2s;
}

.askd-btn-primary:hover {
    background: #0e49d8;
}

.askd-btn-plain {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    background: #fff;
    color: #52525b;
    font-size: 14px;
    cursor: pointer;
    transition: .2s;
}

.askd-btn-plain:hover {
    border-color: #165DFF;
    color: #165DFF;
}

.askd-btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.askd-login-tips {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #a1a1aa;
    font-size: 13px;
}

/* 评论列表 */
.askd-comment-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.askd-comment-item {
    display: flex;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #eceef3;
}

.askd-comment-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.askd-comment-avatar {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #f4f4f5;
}

.askd-comment-body {
    flex: 1;
    min-width: 0;
}

.askd-comment-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.askd-comment-name {
    color: #27272a;
    font-size: 14px;
    font-weight: 500;
}

.askd-louzhu {
    padding: 1px 6px;
    border-radius: 4px;
    background: #eef4ff;
    color: #165DFF;
    font-size: 12px;
}

.askd-reply-to {
    color: #a1a1aa;
    font-size: 12px;
}

.askd-reply-to em {
    color: #165DFF;
    font-style: normal;
}

.askd-comment-time {
    color: #a1a1aa;
    font-size: 12px;
}

.askd-comment-text {
    margin: 6px 0 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.75;
    word-break: break-word;
    white-space: pre-wrap;
}

.askd-comment-ops {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.askd-op {
    color: #a1a1aa;
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
}

.askd-op:hover {
    color: #165DFF;
}

/* 楼中楼 */
.askd-children {
    margin-top: 12px;
    padding-left: 14px;
    border-left: 2px solid #eceef3;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.askd-child {
    display: flex;
    gap: 10px;
}

.askd-child-avatar {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    background: #f4f4f5;
}

.askd-child-body {
    flex: 1;
    min-width: 0;
}

.askd-child-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* 内联回复框 */
.askd-reply-box {
    margin-top: 12px;
}

.askd-reply-bar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

/* 侧栏：推荐产品 */
.askd-goods-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.askd-goods {
    display: flex;
    gap: 12px;
    align-items: center;
}

.askd-goods img {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: #f4f4f5;
}

.askd-goods-info {
    min-width: 0;
}

.askd-goods-name {
    color: #27272a;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.askd-goods:hover .askd-goods-name {
    color: #165DFF;
}

.askd-goods-desc {
    margin-top: 4px;
    color: #a1a1aa;
    font-size: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 侧栏：排行榜 */
.askd-rank-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.askd-rank {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.askd-rank-num {
    flex: none;
    color: #a1a1aa;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.askd-rank-num.top {
    color: #f97316;
}

.askd-rank-title {
    flex: 1;
    min-width: 0;
    color: #3f3f46;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.askd-rank:hover .askd-rank-title {
    color: #165DFF;
}

/* 侧栏：分类 */
.askd-cate-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.askd-cate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 8px;
    background: #fafbfc;
    transition: .2s;
}

.askd-cate:hover {
    background: #f3f6ff;
}

.askd-cate-name {
    color: #3f3f46;
    font-size: 14px;
}

.askd-cate:hover .askd-cate-name {
    color: #165DFF;
}

.askd-cate-count {
    flex: none;
    color: #a1a1aa;
    font-size: 12px;
}

/* ============ 分类/标签列表页 ============ */
.askc-page-head {
    padding: 20px 24px;
    margin-bottom: 16px;
}

.askc-page-head-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #18181b;
    font-size: 20px;
    font-weight: 700;
}

.askc-page-head-title i {
    color: #165DFF;
    font-size: 20px;
}

.askc-page-head-desc {
    margin-top: 6px;
    color: #a1a1aa;
    font-size: 13px;
}

/* 侧栏广告位 */
.askc-poster {
    padding: 10px;
}

.askc-poster a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.askc-poster img {
    display: block;
    width: 100%;
    height: auto;
}

/* 侧栏分类当前高亮 */
.askd-cate.is-active {
    background: #f3f6ff;
}

.askd-cate.is-active .askd-cate-name {
    color: #165DFF;
    font-weight: 600;
}

/* 详情页响应式 */
@media (max-width: 992px) {
    .askd-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .askd-article,
    .askd-comments {
        padding: 18px 16px;
    }

    .askd-author {
        flex-direction: column;
        align-items: flex-start;
    }

    .askd-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}
