/*
Theme Name: SkillHub
Theme URI: https://hub.cocoloop.cn/
Description: 运营 Skills 商店主题 - 深色霓虹风格
Version: 1.0.0
Author: SeekPush
*/

:root {
    --bg: #08080a;
    --bg-soft: #0f0f12;
    --bg-surface: rgba(255, 255, 255, .04);
    --bg-panel: #151515;
    --surface: rgba(255, 255, 255, .05);
    --surface-hover: rgba(255, 255, 255, .08);
    --surface-2: rgba(255, 255, 255, .03);
    --border: rgba(255, 255, 255, .08);
    --border-dim: rgba(255, 255, 255, .06);
    --border-glass: rgba(255, 255, 255, .10);
    --border-strong: rgba(255, 255, 255, .16);
    --text: #ffffff;
    --text-2: rgba(255, 255, 255, .64);
    --text-3: rgba(255, 255, 255, .48);
    --text-4: rgba(255, 255, 255, .32);
    --cyan: #00eeff;
    --mint: #5cffcb;
    --violet: #c35cff;
    --yellow: #ffe780;
    --orange: #ffaf62;
    --danger: #ff7d7d;
    --gold: #f6cb57;
    --radius: 12px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --max: 1080px;
    --font-mono: "Barlow", "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
    --hero: radial-gradient(46% 70% at 50% 0%, rgba(0, 238, 255, .05) 0%, rgba(0, 238, 255, 0) 72%),
            linear-gradient(180deg, #0a0a0c, #08080a);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

svg.i {
    display: inline-block;
    vertical-align: -.15em;
    flex-shrink: 0;
}

.cover-svg {
    display: block;
    width: 100%;
    height: 100%;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    padding: 16px 24px 0;
    background: transparent;
}

.site-header__inner {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 6px 30px 5px rgba(0, 0, 0, .05), 0 8px 10px -5px rgba(0, 0, 0, .08);
}

body {
    padding-top: 88px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .2px;
    flex-shrink: 0;
}

.brand__logo {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(0, 238, 255, .10);
    border: 1px solid rgba(0, 238, 255, .32);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--cyan);
    font-weight: 800;
}

.nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
}

.nav a {
    color: var(--text-2);
    font-size: 16px;
    font-weight: 500;
    transition: color .2s ease;
    white-space: nowrap;
}

.nav a:hover,
.nav a.is-active {
    color: var(--text);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0 14px;
    height: 38px;
    min-width: 190px;
}

.header-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13px;
    min-width: 0;
}

.header-search input::placeholder {
    color: var(--text-4);
}

.header-search svg {
    width: 15px;
    height: 15px;
    color: var(--text-3);
    flex-shrink: 0;
}

.header-cta {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    background: var(--cyan);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

html[data-theme="dark"] .header-cta {
    color: #04121a;
}

.nav-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: var(--hero);
    padding: 24px 0 48px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-dim);
}

.hero__inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 12px;
    letter-spacing: .4px;
    margin-bottom: 22px;
}

.hero__eyebrow svg {
    color: var(--cyan);
}

.hero__title {
    font-size: 48px;
    line-height: 56px;
    font-weight: 600;
    letter-spacing: 0;
    margin-bottom: 16px;
}

.hero__title em {
    font-style: normal;
    color: var(--cyan);
}

.hero__desc {
    max-width: 640px;
    margin: 0 auto 32px;
    color: var(--text-2);
    font-size: 16px;
    line-height: 24px;
}

.hero__actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 44px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 28px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    transition: transform .2s, box-shadow .2s, background .2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn--primary {
    background: var(--cyan);
    color: #ffffff;
}

html[data-theme="dark"] .btn--primary {
    color: #04121a;
}

.btn--ghost {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
}

.hero__stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero__stat {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hero__stat + .hero__stat::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 76px;
    background: rgba(255, 255, 255, .1);
}

.hero__stat strong {
    font-family: var(--font-mono);
    font-size: 40px;
    line-height: 48px;
    font-weight: 500;
    color: var(--text);
}

.hero__stat span {
    font-size: 16px;
    line-height: 24px;
    color: var(--text-2);
    letter-spacing: 0;
    white-space: nowrap;
}

/* ---------- 通用区块 ---------- */
.section {
    padding: 48px 0;
}

.section--tight {
    padding: 40px 0;
}

.section__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 24px;
}

.section__title {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 24px;
    color: var(--text);
}

.section__title::before,
.section__title::after {
    content: "";
    width: 50px;
    height: 1px;
    flex-shrink: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28));
}

.section__title::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, .28), transparent);
}

.section__desc {
    margin-top: 6px;
    color: var(--text-3);
    font-size: 13px;
}

.section__more {
    color: var(--cyan);
    font-size: 13px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ---------- 榜单 ---------- */
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: background .2s, border-color .2s, transform .2s;
}

.rank-item:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
    transform: translateX(3px);
}

.rank-item__no {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-3);
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.rank-item:nth-child(1) .rank-item__no {
    background: #f6cb57;
    color: #2a1d00;
    border-color: transparent;
}

.rank-item:nth-child(2) .rank-item__no {
    background: #c9d3e0;
    color: #232c38;
    border-color: transparent;
}

.rank-item:nth-child(3) .rank-item__no {
    background: #d99a5b;
    color: #2a1700;
    border-color: transparent;
}

.rank-item__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
}

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

.rank-item__main {
    flex: 1;
    min-width: 0;
}

.rank-item__name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-item__desc {
    font-size: 12.5px;
    color: var(--text-3);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-item__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    font-size: 12.5px;
    color: var(--text-3);
}

.rank-item__meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ---------- 榜单面板（对齐原站 200px + 1fr 结构） ---------- */
.rank-panel {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    background: var(--bg-panel);
    border: .75px solid var(--border-glass);
    border-radius: 24px;
    overflow: hidden;
}

.rank-side {
    padding: 24px;
    border-right: 1px solid var(--border-dim);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rank-side__item {
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    padding: 12px 14px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    color: var(--text-2);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s;
}

.rank-side__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    flex-shrink: 0;
    transition: color .2s;
}

.rank-side__item.is-active .rank-side__icon {
    color: var(--cyan);
}

.rank-side__item:hover .rank-side__icon {
    color: var(--text);
}

.rank-side__item:hover {
    background: rgba(255, 255, 255, .05);
    color: var(--text);
}

.rank-side__item.is-active {
    background: rgba(0, 238, 255, .12);
    border-color: rgba(0, 238, 255, .35);
    color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 238, 255, .10), inset 0 0 12px rgba(0, 238, 255, .06);
}

.rank-main {
    padding: 14px 16px;
    display: none;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.rank-main.is-active {
    display: flex;
}

.rank-row {
    height: 52px;
    padding: 2px 14px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 26px 32px minmax(0, 1fr) 182px;
    align-items: center;
    column-gap: 14px;
    color: var(--text);
    transition: background .2s;
}

.rank-row:hover {
    background: rgba(255, 255, 255, .04);
}

.rank-row__no {
    width: 26px;
    text-align: center;
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
}

.rank-row__icon {
    font-size: 22px;
    line-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rank-row__icon img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-row__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rank-row__main b {
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-row__main i {
    font-style: normal;
    font-size: 12.5px;
    line-height: 15px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-row__metrics {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.rank-row__metrics em {
    font-style: normal;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    line-height: 17px;
    color: var(--text-2);
    white-space: nowrap;
}

.rank-divider {
    height: 1px;
    background: var(--border-dim);
}

/* ---------- 热门 Tab 条 ---------- */
.hot-tabs {
    display: flex;
    align-items: stretch;
    gap: 3px;
    padding: 6px;
    height: auto;
    background: var(--surface-2);
    border: 1px solid var(--border-dim);
    border-radius: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 26px;
}

.hot-tabs::-webkit-scrollbar {
    display: none;
}

.hot-tab {
    flex: 1 1 0;
    width: auto;
    min-width: 82px;
    height: 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
    transition: background .18s, color .18s, box-shadow .18s;
}

.hot-tab:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.hot-tab.is-active {
    background: var(--bg-surface);
    border-color: var(--border-dim);
    color: var(--text);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .08);
}

html[data-theme="dark"] .hot-tab.is-active {
    background: rgba(0, 238, 255, .14);
    border-color: rgba(0, 238, 255, .30);
    color: var(--cyan);
    box-shadow: none;
}

.hot-tab__icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hot-tab.is-active .hot-tab__icon {
    color: var(--cyan);
}

.hot-tab__label {
    font-size: 12.5px;
    font-weight: 500;
    line-height: 17px;
    white-space: nowrap;
}

.hot-tab.is-active .hot-tab__label {
    font-weight: 600;
}

.hot-tab__sep {
    width: 1px;
    height: 30px;
    border-radius: 9999px;
    background: var(--border);
    flex-shrink: 0;
    align-self: center;
    margin: 0 5px;
}

.hot-panel[hidden] {
    display: none !important;
}

/* ---------- 标签 ---------- */
.tag {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .2px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-2);
    white-space: nowrap;
}

.tag--safe {
    background: rgba(92, 255, 203, .10);
    border-color: rgba(92, 255, 203, .26);
    color: var(--mint);
}

.tag--gold {
    background: rgba(246, 203, 87, .12);
    border-color: rgba(246, 203, 87, .28);
    color: var(--gold);
}

/* ---------- 专题 ---------- */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.topic-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-surface);
    border: .75px solid var(--border-glass);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.topic-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
}

.topic-card__cover {
    order: 1;
    margin-top: 0;
    width: 100%;
    height: 168px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-3);
    background-size: cover;
    background-position: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    overflow: hidden;
}

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

.topic-card__cover svg {
    width: 100%;
    height: 100%;
    display: block;
}

.topic-card__body {
    order: 2;
    padding: 0;
}

.topic-card__title {
    color: var(--text);
    font-size: 19px;
    line-height: 28px;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-card__desc {
    color: var(--text-2);
    font-size: 14px;
    line-height: 20px;
    min-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 卡片网格 ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.skill-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 22px;
    transition: transform .25s, border-color .25s, background .25s;
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.skill-card__top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.skill-card__icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 13px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    overflow: hidden;
}

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

.skill-card__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.skill-card__sub {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 3px;
}

.skill-card__desc {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.75;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 46px;
}

.skill-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.skill-card__foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text-3);
}

.skill-card__foot span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ---------- 筛选栏 ---------- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.chip {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 13px;
    transition: all .2s;
}

.chip:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.chip.is-active {
    background: rgba(0, 238, 255, .12);
    border-color: rgba(0, 238, 255, .32);
    color: var(--cyan);
}

/* ---------- 列表页 ---------- */
.page-hero {
    padding: 52px 0 34px;
    background: var(--hero);
    border-bottom: 1px solid var(--border);
}

.page-hero__title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.4px;
}

.page-hero__desc {
    margin-top: 10px;
    color: var(--text-2);
    font-size: 14px;
    max-width: 640px;
    line-height: 1.85;
}

/* ---------- 详情页 ---------- */
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
    padding: 40px 0 70px;
}

.detail-head {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
}

.detail-head::before {
    content: none;
}

.detail-head__top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.detail-head__icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.detail-head__title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.4px;
    line-height: 1.3;
}

.detail-head__tagline {
    color: var(--text-2);
    font-size: 14px;
    margin-top: 6px;
    line-height: 1.8;
}

.detail-head__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

.file-item__icon {
    font-size: 16px;
    flex-shrink: 0;
}

.file-item__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.file-item__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
}

.file-item__desc {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
}

.detail-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--border);
}

.detail-stats div {
    font-size: 12px;
    color: var(--text-3);
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    min-width: 0;
}

.detail-stats strong {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 2px;
}

.detail-stats strong svg {
    color: var(--text-3);
    flex-shrink: 0;
}

.detail-body {
    padding: 32px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
}

.detail-body h2 {
    font-size: 20px;
    font-weight: 800;
    margin: 34px 0 14px;
    padding-left: 13px;
    position: relative;
}

.detail-body h2:first-child {
    margin-top: 0;
}

.detail-body h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 3px;
    border-radius: 2px;
    background: var(--cyan);
}

.detail-body h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 24px 0 10px;
    color: var(--text);
}

.detail-body p {
    color: var(--text-2);
    margin-bottom: 14px;
    line-height: 1.9;
}

.detail-body ul,
.detail-body ol {
    margin: 0 0 16px 20px;
    color: var(--text-2);
}

.detail-body li {
    margin-bottom: 8px;
    line-height: 1.85;
}

.detail-body a {
    color: var(--cyan);
    border-bottom: 1px dashed rgba(51, 241, 255, .4);
}

.detail-body strong {
    color: var(--text);
}

.detail-body blockquote {
    margin: 18px 0;
    padding: 14px 18px;
    border-left: 3px solid var(--border-strong);
    background: var(--surface-2);
    border-radius: 0 10px 10px 0;
    color: var(--text-2);
}

.detail-body code {
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 12.5px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    color: var(--mint);
}

.detail-body pre {
    background: #0d1014;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    overflow-x: auto;
    margin-bottom: 18px;
}

.detail-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: #c9d4e0;
    font-size: 13px;
    line-height: 1.7;
}

.detail-body img {
    border-radius: 12px;
    margin: 16px 0;
}

.detail-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 13px;
}

.detail-body th,
.detail-body td {
    border: 1px solid var(--border);
    padding: 10px 14px;
    text-align: left;
    color: var(--text-2);
}

.detail-body th {
    background: var(--surface-2);
    color: var(--text);
    font-weight: 700;
}

/* ---------- 侧栏 ---------- */
.side-box {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 18px;
}

.side-box__title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.side-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    padding: 7px 0;
}

.side-row span {
    color: var(--text-3);
}

.side-row b {
    font-weight: 600;
    color: var(--text-2);
}

.side-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.side-link {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.side-link__icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.side-link__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.side-link__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-link__meta {
    font-size: 11.5px;
    color: var(--text-4);
    margin-top: 2px;
}

/* ---------- 分页 ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination .page-navigator {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination .page-navigator li {
    list-style: none;
    display: flex;
    margin: 0;
}

.pagination .page-navigator li a,
.pagination .page-navigator li span {
    min-width: 38px;
    height: 38px;
    padding: 0 13px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.pagination .page-navigator li a:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.pagination .page-navigator li.current a,
.pagination .page-navigator li.current span {
    background: rgba(0, 238, 255, .12);
    border-color: rgba(0, 238, 255, .32);
    color: var(--cyan);
}

.pagination a,
.pagination span {
    min-width: 38px;
    height: 38px;
    padding: 0 13px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.pagination a:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.pagination .current {
    background: rgba(0, 238, 255, .12);
    border-color: rgba(0, 238, 255, .32);
    color: var(--cyan);
}

/* ---------- 空状态 ---------- */
.empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-3);
}

.empty__icon {
    font-size: 40px;
    margin-bottom: 14px;
    color: var(--text-3);
    opacity: .7;
}

/* ---------- 页脚 ---------- */
.site-footer {
    margin-top: 20px;
    padding: 46px 0 34px;
    border-top: 1px solid var(--border);
    background: #050507;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 32px;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--border);
}

.footer-brand__desc {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--text-3);
    line-height: 1.85;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text);
}

.footer-col a {
    display: block;
    font-size: 12.5px;
    color: var(--text-3);
    padding: 5px 0;
    transition: color .2s;
}

.footer-col a:hover {
    color: var(--cyan);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
}

.footer-links-grid a {
    padding: 4px 0;
}

.footer-social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.footer-col .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 12.5px;
    color: var(--text-2);
}

.footer-col .footer-social a:hover {
    border-color: rgba(0, 238, 255, .34);
    color: var(--cyan);
}

.footer-rss {
    padding-top: 2px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 22px;
    font-size: 12px;
    color: var(--text-4);
}

/* ---------- 评论 ---------- */
.comments {
    margin-top: 22px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .comment-body {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.comment-author {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.comment-author cite {
    font-style: normal;
}

.comment-meta {
    font-size: 11.5px;
    color: var(--text-4);
    margin-left: 8px;
}

.comment-content {
    font-size: 13px;
    color: var(--text-2);
    margin-top: 8px;
    line-height: 1.8;
}

.comment-reply a {
    font-size: 12px;
    color: var(--cyan);
}

#respond textarea,
#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"] {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    margin-bottom: 10px;
}

#respond textarea:focus,
#respond input:focus {
    border-color: rgba(51, 241, 255, .4);
}

#respond button[type="submit"] {
    height: 38px;
    padding: 0 22px;
    border-radius: var(--radius-pill);
    background: var(--cyan);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

html[data-theme="dark"] #respond button[type="submit"] {
    color: #04121a;
}

/* ---------- 文章页（精选专题）---------- */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 32px;
    align-items: start;
    padding: 36px 0 70px;
}

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

.article-side,
.detail-side {
    position: sticky;
    top: 92px;
    align-self: start;
}

.article-hero {
    margin-bottom: 20px;
    padding: 32px 36px 30px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, .04);
}

.article-hero__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.article-hero__date {
    font-size: 12.5px;
    color: var(--text-3);
}

.article-hero__title {
    font-size: 38px;
    line-height: 1.32;
    font-weight: 700;
    letter-spacing: -.8px;
    color: var(--text);
    margin-bottom: 16px;
}

.article-hero__lead {
    font-size: 15px;
    line-height: 1.85;
    color: var(--text-2);
    max-width: 100%;
    margin-bottom: 0;
}

.article-hero__cover {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 16 / 7;
    background: var(--surface-2);
}

.article-hero__cover img,
.article-hero__cover svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.article-body {
    padding: 34px;
}

/* ---------- 右侧垂直目录 ---------- */
.toc-box {
    max-height: calc(100vh - 120px);
    overflow: auto;
}

.toc-nav {
    display: flex;
    flex-direction: column;
}

.toc-nav__item {
    display: block;
    padding: 7px 0 7px 14px;
    border-left: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-2);
    transition: color .2s ease, border-color .2s ease;
}

.toc-nav__item:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.toc-nav__item.is-sub {
    padding-left: 26px;
    font-size: 12.5px;
    color: var(--text-3);
}

.toc-nav__item.is-active {
    color: var(--cyan);
    border-color: var(--cyan);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .card-grid,
    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-layout,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-side,
    .detail-side {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .article-hero {
        padding: 22px 20px;
        border-radius: 16px;
    }

    .article-hero__title {
        font-size: 26px;
        line-height: 1.36;
        letter-spacing: -.3px;
    }

    .rank-panel {
        grid-template-columns: 1fr;
    }

    .rank-side {
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-dim);
        padding: 12px;
    }

    .rank-side__item {
        flex-shrink: 0;
        padding: 0 16px;
    }

    .rank-main {
        padding: 12px;
    }

    .rank-row {
        grid-template-columns: 30px 40px minmax(0, 1fr);
        padding: 8px 10px;
    }

    .rank-row__metrics {
        display: none;
    }

    .hot-tabs {
        height: auto;
        gap: 2px;
        padding: 4px;
        border-radius: 16px;
    }

    .hot-tab {
        flex: 0 0 auto;
        height: 56px;
        width: auto;
        min-width: 68px;
        padding: 6px 10px;
    }

    .hot-tab__icon {
        width: 20px;
        height: 20px;
    }

    .hot-tab__label {
        font-size: 11.5px;
    }

    .container {
        padding: 0 16px;
    }

    .nav {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #0b0b0e;
        border-bottom: 1px solid var(--border);
        padding: 8px 16px 16px;
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: all .25s;
    }

    .nav.is-open {
        transform: none;
        opacity: 1;
        pointer-events: auto;
    }

    .nav a {
        padding: 12px 4px;
        border-bottom: 1px solid var(--border);
    }

    .header-search {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 52px 0 44px;
    }

    .hero__title {
        font-size: 30px;
    }

    .hero__desc {
        font-size: 13.5px;
    }

    .hero__stats {
        gap: 28px;
    }

    .hero__stat strong {
        font-size: 20px;
    }

    .card-grid,
    .topic-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 40px 0;
    }

    .section__title {
        font-size: 19px;
    }

    .rank-item {
        padding: 13px 14px;
        gap: 12px;
    }

    .rank-item__meta {
        display: none;
    }

    .detail-head {
        padding: 20px;
    }

    .detail-head__title {
        font-size: 21px;
    }

    .detail-body {
        padding: 22px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 6px;
    }

    .page-hero__title {
        font-size: 24px;
    }
}

/* ---------- 评论表单 ---------- */
.comment-form {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-form__row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    flex: 1;
    min-width: 160px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}

.comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: border-color .2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--cyan);
}

.comment-form__submit {
    display: flex;
    justify-content: flex-end;
}

.comment-login {
    font-size: 12.5px;
    color: var(--text-3);
}

/* ---------- 导航分类下拉 ---------- */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 56px;
}

.nav-dropdown__toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-2);
    font-size: 16px;
    font-weight: 500;
    transition: color .2s;
}

.nav-dropdown:hover .nav-dropdown__toggle,
.nav-dropdown__toggle:hover {
    color: var(--text);
}

.nav-dropdown__menu {
    position: absolute;
    top: 50px;
    left: 50%;
    min-width: 220px;
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    border-radius: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(6px);
    transition: opacity .18s, transform .18s, visibility .18s;
}

.nav-dropdown:hover .nav-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown__menu a {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-2);
    white-space: nowrap;
}

.nav-dropdown__menu a:hover,
.nav-dropdown__menu a.is-active {
    background: var(--surface-2);
    color: var(--text);
}

/* ---------- 右侧悬浮工具 ---------- */
.side-tools {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    border-radius: 999px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
}

.side-tool {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    transition: background .2s, color .2s;
}

.side-tool:hover {
    background: var(--surface-2);
    color: var(--text);
}

.side-tool-wrap {
    position: relative;
    display: flex;
}

.side-tool__pop {
    position: absolute;
    right: 46px;
    top: 50%;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 12.5px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(6px);
    transition: opacity .18s, transform .18s, visibility .18s;
}

.side-tool-wrap:hover .side-tool__pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 1200px) {
    .side-tools {
        display: none;
    }
}

/* ---------- 提示词 ---------- */
.detail-body__prompt {
    white-space: pre-wrap;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 14px;
}

/* ---------- 深浅色切换按钮 ---------- */
.theme-toggle {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s, border-color .2s;
}

.theme-toggle:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.theme-toggle__sun {
    display: none;
}

html[data-theme="dark"] .theme-toggle__sun {
    display: block;
}

html[data-theme="dark"] .theme-toggle__moon {
    display: none;
}

/* ---------- 浅色主题 ---------- */
html[data-theme="light"] {
    --bg: #f4f6f8;
    --bg-soft: #ffffff;
    --bg-surface: #ffffff;
    --bg-panel: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f1f4f7;
    --surface-2: #f5f7f9;
    --border: rgba(15, 23, 42, .10);
    --border-dim: rgba(15, 23, 42, .08);
    --border-glass: rgba(15, 23, 42, .10);
    --border-strong: rgba(15, 23, 42, .20);
    --text: #0f172a;
    --text-2: rgba(15, 23, 42, .66);
    --text-3: rgba(15, 23, 42, .50);
    --text-4: rgba(15, 23, 42, .36);
    --cyan: #0891b2;
    --mint: #0d9488;
    --violet: #7c3aed;
    --shadow: 0 18px 50px rgba(15, 23, 42, .10);
    --hero: linear-gradient(180deg, #e8f6f9 0%, #f4f6f8 72%);
}

html[data-theme="light"] body {
    background: var(--bg);
    color: var(--text);
}

html[data-theme="light"] .site-header__inner {
    background: transparent;
    box-shadow: none;
}

html[data-theme="light"] .brand__logo {
    background: var(--cyan);
    color: #ffffff;
}

html[data-theme="light"] .hero__eyebrow {
    background: rgba(13, 148, 136, .10);
}

html[data-theme="light"] .hero__stat + .hero__stat::before {
    background: rgba(15, 23, 42, .12);
}

html[data-theme="light"] .section__title::after {
    background: linear-gradient(90deg, rgba(15, 23, 42, .16), transparent);
}

html[data-theme="light"] .rank-side__item:hover,
html[data-theme="light"] .rank-row:hover,
html[data-theme="light"] .hot-tab:hover {
    background: rgba(15, 23, 42, .05);
}

html[data-theme="light"] .hot-tabs {
    background: #eef2f6;
    border-color: rgba(15, 23, 42, .06);
}

html[data-theme="light"] .hot-tab__sep {
    background: rgba(15, 23, 42, .10);
}

html[data-theme="light"] .hot-tab.is-active {
    background: #ffffff;
    border-color: rgba(15, 23, 42, .06);
    color: var(--text);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .08);
}

html[data-theme="light"] .hot-tab.is-active .hot-tab__icon {
    color: var(--cyan);
}

html[data-theme="light"] .rank-side__item.is-active {
    background: rgba(8, 145, 178, .10);
    border-color: rgba(8, 145, 178, .38);
    color: var(--cyan);
    box-shadow: none;
}

html[data-theme="light"] .detail-body code {
    background: rgba(15, 23, 42, .06);
}

html[data-theme="light"] .site-footer {
    background: #eef2f6;
    border-top: 1px solid var(--border);
}

html[data-theme="light"] .topic-card__cover {
    border-radius: 16px;
}

/* ---------- 顶部导航：整条通栏 ---------- */
.site-header {
    padding: 0;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
}

html[data-theme="dark"] .site-header {
    background: rgba(10, 10, 12, .86);
    box-shadow: none;
}

.site-header__inner {
    height: 64px;
    padding: 0 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body {
    padding-top: 64px;
}

.brand {
    font-size: 17px;
    letter-spacing: 0;
}

.nav a {
    font-size: 15px;
}

.nav a.is-active {
    color: var(--cyan);
}

.header-search {
    min-width: 210px;
    background: var(--surface-2);
    border-color: var(--border);
}

.header-cta {
    height: 38px;
    padding: 0 18px;
}

.nav-dropdown {
    height: 64px;
}

.nav-dropdown__menu {
    top: 60px;
}

.hero {
    padding-top: 48px;
}

@media (max-width: 768px) {
    .site-header__inner {
        height: 58px;
        padding: 0 16px;
    }

    body {
        padding-top: 58px;
    }

    .nav {
        background: var(--bg-surface);
        border: 1px solid var(--border);
        border-radius: 14px;
        overflow: hidden;
    }
}

/* ---------- 页脚重排 ---------- */
.site-footer {
    margin-top: 0;
    padding: 56px 0 26px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
}

html[data-theme="light"] .site-footer {
    background: #f4f6f9;
    border-top-color: rgba(15, 23, 42, .06);
}

.footer-grid {
    grid-template-columns: 1.7fr 1.5fr .9fr 1.4fr;
    gap: 44px;
    padding-bottom: 32px;
    border-bottom-color: var(--border-dim);
}

.footer-brand .brand {
    font-size: 18px;
}

.footer-brand__desc {
    margin-top: 14px;
    max-width: 320px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-3);
}

.footer-col h4 {
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.footer-col a {
    padding: 5px 0;
    font-size: 13px;
    color: var(--text-2);
}

.footer-social {
    gap: 8px 10px;
    margin-bottom: 10px;
}

.footer-col .footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.footer-col .footer-social a.social-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 11px;
    background: none;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.footer-col .footer-social a.social-logo svg {
    width: 38px;
    height: 38px;
    display: block;
    flex-shrink: 0;
}

.footer-col .footer-social a.social-logo:hover {
    background: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .18);
}

html[data-theme="dark"] .footer-social .social-logo--douyin {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.footer-beian,
.footer-col .footer-beian {
    display: inline-block;
    margin-top: 14px;
    padding: 0;
    font-size: 12px;
    color: var(--text-4);
}

.footer-bottom {
    padding-top: 20px;
    font-size: 12px;
    color: var(--text-4);
}

@media (max-width: 980px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

/* ---------- 分类标签 ---------- */
.tag--cat {
    background: rgba(0, 238, 255, .08);
    border-color: rgba(0, 238, 255, .24);
    color: var(--cyan);
}

html[data-theme="light"] .tag--cat {
    background: rgba(8, 145, 178, .08);
    border-color: rgba(8, 145, 178, .22);
}

/* ---------- 点赞 / 收藏 ---------- */
.side-actions-box {
    padding: 14px;
}

.side-actions {
    display: flex;
    gap: 8px;
}

.side-actions .skill-act {
    flex: 1;
    justify-content: center;
    height: 34px;
    padding: 0 8px;
    font-size: 12px;
    gap: 5px;
}

.skill-act {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 13px;
    transition: background .2s, border-color .2s, color .2s, transform .2s;
}

.skill-act:hover {
    border-color: var(--border-strong);
    color: var(--text);
    transform: translateY(-1px);
}

.skill-act b {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.skill-act.is-active {
    background: rgba(0, 238, 255, .10);
    border-color: rgba(0, 238, 255, .34);
    color: var(--cyan);
}

.skill-act.is-active[data-skill-act="favorite"] {
    background: rgba(246, 203, 87, .12);
    border-color: rgba(246, 203, 87, .32);
    color: var(--gold);
}

html[data-theme="light"] .skill-act.is-active[data-skill-act="favorite"] {
    color: #b58108;
}

/* ---------- 导航分类下拉：点击展开 + 移动端手风琴 ---------- */
.nav-dropdown.is-open .nav-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .nav {
        top: 58px;
        max-height: calc(100vh - 74px);
        overflow-x: hidden;
        overflow-y: auto;
    }

    .nav-dropdown {
        display: block;
        width: 100%;
        height: auto;
    }

    .nav-dropdown__toggle {
        width: 100%;
        justify-content: space-between;
        padding: 12px 4px;
        border-bottom: 1px solid var(--border);
        font-size: 15px;
    }

    .nav-dropdown__toggle svg {
        transition: transform .2s;
    }

    .nav-dropdown.is-open .nav-dropdown__toggle svg {
        transform: rotate(180deg);
    }

    .nav-dropdown__menu {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        padding: 2px 0 10px;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-dropdown.is-open .nav-dropdown__menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-dropdown__menu a {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 11px 4px;
        border: 0;
        border-bottom: 1px solid var(--border-dim);
        border-radius: 0;
        background: transparent;
        font-size: 14px;
        line-height: 1.4;
        text-align: left;
        white-space: normal;
        word-break: normal;
    }

    .nav-dropdown__menu a:last-child {
        border-bottom: 0;
    }

    .nav-dropdown__menu a:hover,
    .nav-dropdown__menu a.is-active {
        background: transparent;
        color: var(--cyan);
    }
}

/* 移动端头部：投稿按钮与汉堡菜单靠右 */
@media (max-width: 768px) {
    .site-header__inner .header-cta {
        margin-left: auto;
    }

    .site-header__inner .nav-toggle {
        margin-left: 0;
    }
}

/* ---------- 会员中心 ---------- */
.header-user {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(22, 163, 74, .45);
    background: rgba(22, 163, 74, .06);
    color: #16a34a;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: color .2s, border-color .2s, background .2s;
}

.header-user:hover {
    color: #15803d;
    border-color: rgba(22, 163, 74, .8);
    background: rgba(22, 163, 74, .10);
}

html[data-theme="dark"] .header-user {
    color: #4ade80;
    border-color: rgba(74, 222, 128, .45);
    background: rgba(74, 222, 128, .08);
}

html[data-theme="dark"] .header-user:hover {
    color: #86efac;
    border-color: rgba(74, 222, 128, .8);
}

.header-user__name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-msg {
    max-width: 520px;
    margin: 0 auto 18px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
}

.account-msg--error {
    background: rgba(255, 125, 125, .12);
    border: 1px solid rgba(255, 125, 125, .35);
    color: var(--danger);
}

.account-msg--ok {
    background: rgba(92, 255, 203, .10);
    border: 1px solid rgba(92, 255, 203, .30);
    color: var(--mint);
}

.auth-card {
    max-width: 420px;
    margin: 0 auto;
    padding: 26px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
}

.auth-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    margin-bottom: 20px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    border: 1px solid var(--border-dim);
}

.auth-tab {
    flex: 1;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
}

.auth-tab.is-active {
    background: var(--bg-surface);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-2);
}

.auth-field input,
.auth-field textarea,
.auth-field select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
}

.auth-field textarea {
    height: auto;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.6;
}

.auth-field input:focus,
.auth-field textarea:focus,
.auth-field select:focus {
    border-color: var(--cyan);
}

.auth-field input:disabled {
    opacity: .6;
}

.auth-submit {
    width: 100%;
    height: 44px;
    margin-top: 4px;
}

.auth-hint {
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
}

.auth-hint a {
    color: var(--cyan);
}

.me-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 18px;
}

.me-head__main {
    flex: 1;
    min-width: 0;
}

.me-head__name {
    font-size: 18px;
    font-weight: 700;
}

.me-head__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--text-3);
}

.me-head__bio {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-2);
}

.me-logout {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-3);
}

.me-logout:hover {
    color: var(--danger);
    border-color: rgba(255, 125, 125, .4);
}

.me-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.me-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 13px;
    white-space: nowrap;
}

.me-tab.is-active {
    background: var(--cyan);
    border-color: transparent;
    color: #ffffff;
}

html[data-theme="dark"] .me-tab.is-active {
    color: #04121a;
}

.me-panel {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
}

.me-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 0;
    color: var(--text-3);
    font-size: 13px;
}

.me-submit {
    margin-bottom: 22px;
}

.me-submit__title {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
}

.me-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.me-list__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border-dim);
    font-size: 13.5px;
}

.me-list__title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.me-list__status {
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 12px;
}

.me-list__status--publish {
    background: rgba(92, 255, 203, .12);
    color: var(--mint);
}

.me-list__status--waiting {
    background: rgba(255, 231, 128, .12);
    color: var(--gold);
}

.me-list__status--draft {
    background: var(--surface);
    color: var(--text-3);
}

.me-list__date {
    font-size: 12px;
    color: var(--text-3);
}

@media (max-width: 768px) {
    .header-user {
        padding: 0 12px;
        font-size: 13px;
    }

    .me-head {
        flex-wrap: wrap;
    }

    .me-logout {
        margin-left: auto;
    }

    .me-panel {
        padding: 14px;
    }
}
