@charset "UTF-8";
/**
 * 首页精选区块插件 样式
 * 修复：顶部与左右栏平齐（去掉 .hs-section 的 margin-top）
 */

:root {
    --hs-primary: #3b82f6;
    --hs-border: #e5e7eb;
    --hs-border-light: #f1f5f9;
    --hs-text: #1f2937;
    --hs-text-secondary: #6b7280;
    --hs-text-muted: #9ca3af;
    --hs-bg: #ffffff;
    --hs-bg-soft: #f9fafb;
    --hs-bg-hover: #f3f4f6;
    --hs-danger: #dc2626;
    --hs-success: #059669;
    --hs-radius: 8px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --hs-border: #374151;
        --hs-border-light: #1f2937;
        --hs-text: #f3f4f6;
        --hs-text-secondary: #d1d5db;
        --hs-text-muted: #9ca3af;
        --hs-bg: #111827;
        --hs-bg-soft: #1f2937;
        --hs-bg-hover: #374151;
    }
}

/* ================= 区块 ================= */
.hs-section {
    display: flex;
    align-items: flex-start;
    gap: 0;
    background: var(--hs-bg);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius);
    /* ★ 修复点：去掉 margin-top，使其与左侧栏/右侧栏顶部平齐；margin-bottom 保持与主题卡片间距一致 */
    margin: 0 0 16px 0;
    overflow: hidden;
}

/* 左：轮播 */
.hs-left {
    flex: 0 0 300px;
    max-width: 300px;
    padding: 12px 0 12px 12px;
    box-sizing: border-box;
}
.hs-rotator {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    min-height: 180px;
    border: 1px solid var(--hs-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--hs-bg-soft);
}
.hs-track { position: absolute; inset: 0; }
.hs-slide {
    position: absolute;
    inset: 0;
    display: none;
    text-decoration: none;
    color: inherit;
}
.hs-slide.is-active { display: block; }
.hs-slide img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hs-slide-title {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 20px 10px 8px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,.66), rgba(0,0,0,0));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hs-nav {
    position: absolute;
    right: 8px; bottom: 8px;
    display: flex;
    align-items: center;
    gap: 2px;
}
.hs-nav-btn {
    width: 24px; height: 24px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(0,0,0,.38);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hs-nav-btn:hover { background: rgba(0,0,0,.6); }
.hs-dots {
    position: absolute;
    left: 10px; bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.hs-dot {
    width: 7px; height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    transition: background-color .12s, width .12s;
}
.hs-dot.is-active {
    width: 16px;
    border-radius: 4px;
    background: #fff;
}

/* 右：Tab */
.hs-right {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px 12px;
}
.hs-radio {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.hs-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--hs-border-light);
}
.hs-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--hs-text-secondary);
    cursor: pointer;
    transition: color .12s, background-color .12s;
}
.hs-tab:hover { color: var(--hs-primary); background: var(--hs-bg-hover); }
.hs-tab-icon { font-style: normal; font-size: 12px; }

.hs-panes { padding-top: 6px; }
.hs-pane { display: none; }

/* CSS radio tab（最多 5 个） */
.hs-radio:nth-of-type(1):checked ~ .hs-tabs > .hs-tab:nth-child(1),
.hs-radio:nth-of-type(2):checked ~ .hs-tabs > .hs-tab:nth-child(2),
.hs-radio:nth-of-type(3):checked ~ .hs-tabs > .hs-tab:nth-child(3),
.hs-radio:nth-of-type(4):checked ~ .hs-tabs > .hs-tab:nth-child(4),
.hs-radio:nth-of-type(5):checked ~ .hs-tabs > .hs-tab:nth-child(5) {
    background: var(--hs-primary);
    color: #fff;
    font-weight: 500;
}
.hs-radio:nth-of-type(1):checked ~ .hs-panes > .hs-pane:nth-child(1),
.hs-radio:nth-of-type(2):checked ~ .hs-panes > .hs-pane:nth-child(2),
.hs-radio:nth-of-type(3):checked ~ .hs-panes > .hs-pane:nth-child(3),
.hs-radio:nth-of-type(4):checked ~ .hs-panes > .hs-pane:nth-child(4),
.hs-radio:nth-of-type(5):checked ~ .hs-panes > .hs-pane:nth-child(5) {
    display: block;
}

.hs-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.hs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 2px;
    border-bottom: 1px solid var(--hs-border-light);
}
.hs-item:last-child { border-bottom: none; }
.hs-item-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--hs-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hs-item-title:hover { color: var(--hs-primary); }
.hs-item-meta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    white-space: nowrap;
}
.hs-item-author { color: var(--hs-text-secondary); }
.hs-item-time { color: var(--hs-text-muted); }

.hs-foot {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
}
.hs-wall-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1px solid var(--hs-primary);
    border-radius: 6px;
    background: transparent;
    font-size: 13px;
    line-height: 1.4;
    color: var(--hs-primary);
    text-decoration: none;
    cursor: pointer;
    transition: background-color .12s, color .12s;
}
.hs-wall-btn:hover { background: rgba(59,130,246,.08); }
.hs-empty {
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: var(--hs-text-muted);
}

/* ================= 上墙页 / 通用页 ================= */
.hs-page, .hs-wall-page {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: var(--hs-bg);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius);
    color: var(--hs-text);
}
.hs-page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.hs-page-head h1 { margin: 0; font-size: 20px; }
.hs-page-back {
    font-size: 13px;
    color: var(--hs-primary);
    text-decoration: none;
}
.hs-page-back:hover { text-decoration: underline; }
.hs-page-intro, .hs-wall-intro {
    font-size: 13px;
    line-height: 1.7;
    color: var(--hs-text-secondary);
    margin: 0 0 14px;
}
.hs-page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hs-wall-stats {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 12.5px;
    color: var(--hs-text-muted);
}
.hs-wall-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--hs-border-light);
}
.hs-wall-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--hs-border-light);
}
.hs-wall-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13.5px;
    color: var(--hs-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hs-wall-title:hover { color: var(--hs-primary); }
.hs-wall-time {
    flex: 0 0 auto;
    font-size: 12.5px;
    color: var(--hs-text-muted);
}
.hs-wall-op { flex: 0 0 auto; }
.hs-wall-tag {
    font-size: 12.5px;
    color: var(--hs-primary);
    white-space: nowrap;
}
.hs-wall-form { display: inline; margin: 0; }
.hs-wall-btn-sm { padding: 4px 12px; font-size: 12.5px; }

.hs-alert {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}
.hs-alert-error {
    background: rgba(220,38,38,.08);
    border: 1px solid rgba(220,38,38,.3);
    color: var(--hs-danger);
}
.hs-alert-success {
    background: rgba(5,150,105,.08);
    border: 1px solid rgba(5,150,105,.3);
    color: var(--hs-success);
}

/* ================= 移动端 ================= */
@media (max-width: 768px) {
    .hs-section {
        flex-direction: column;
        align-items: stretch;
    }
    .hs-left {
        flex: 0 0 auto;
        max-width: none;
        padding: 0;
    }
    .hs-rotator {
        border-radius: 0;
        border-top: 0;
        border-right: 0;
        border-left: 0;
    }
    .hs-right { padding: 10px 12px 12px; }
    .hs-tabs { gap: 2px; }
    .hs-tab { padding: 6px 9px; }
    .hs-item { flex-wrap: nowrap; gap: 8px; }
    .hs-item-title { font-size: 13px; }
    .hs-item-time { display: none; }
}