/* ==========================================================================
   源码分享 - 前台样式表
   ========================================================================== */

:root {
    --brand-1: #6366f1;
    --brand-2: #8b5cf6;
    --brand-3: #a855f7;
    --brand-soft: #eef0ff;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --text-1: #101426;
    --text-2: #4a5268;
    --text-3: #8b93a7;
    --line: #e9ecf5;
    --line-2: #f2f4fa;
    --bg: #f6f7fc;
    --bg-soft: #fafbff;
    --white: #ffffff;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(16, 20, 38, .05), 0 4px 14px rgba(16, 20, 38, .04);
    --shadow: 0 4px 12px rgba(16, 20, 38, .06), 0 18px 40px rgba(16, 20, 38, .07);
    --shadow-lg: 0 24px 60px rgba(76, 60, 180, .16);
    --gradient: linear-gradient(135deg, var(--brand-1), var(--brand-3));

    --container: 1220px;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--brand-1); }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

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

.ico { width: 20px; height: 20px; flex: 0 0 auto; display: inline-block; vertical-align: -.18em; }
.ico-sm { width: 16px; height: 16px; }
.ico-xs { width: 13px; height: 13px; }
.ico-lg { width: 26px; height: 26px; }

/* ============ 顶部信息条 ============ */
.topbar {
    background: linear-gradient(90deg, #1b1f3b, #2b2350 45%, #3a2a63);
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    gap: 16px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-left .ico { color: #c4b5fd; }
.topbar-right { gap: 20px; }
.topbar-right a { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .8); }
.topbar-right a:hover { color: #fff; }

/* ============ 头部 ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(16, 20, 38, .07); }

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 74px;
}

.logo { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.logo-mark { width: 42px; height: 42px; display: block; }
.logo-mark svg { width: 100%; height: 100%; border-radius: 12px; box-shadow: 0 6px 16px rgba(99, 102, 241, .3); }
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text strong { font-size: 19px; font-weight: 800; letter-spacing: -.02em; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.logo-text em { font-style: normal; font-size: 11.5px; color: var(--text-3); letter-spacing: .04em; }

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 13px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-weight: 600;
    font-size: 14.5px;
    border: 0;
    background: transparent;
}
.nav-link:hover { background: var(--brand-soft); color: var(--brand-1); }
.nav-link.active { background: var(--brand-soft); color: var(--brand-1); }

.nav-dropdown { position: relative; }
.dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: -10px;
    width: 330px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all .22s var(--ease);
    display: grid;
    gap: 2px;
}
.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-panel a { display: flex; gap: 11px; padding: 10px 12px; border-radius: 12px; }
.dropdown-panel a:hover { background: var(--bg-soft); }
.dropdown-panel strong { display: block; font-size: 14px; }
.dropdown-panel em { font-style: normal; font-size: 12px; color: var(--text-3); display: block; }
.dropdown-icon {
    width: 34px; height: 34px; flex: 0 0 auto;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand-1);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 5px 5px 16px;
    min-width: 300px;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.header-search:focus-within { border-color: #c7d2fe; box-shadow: 0 0 0 4px rgba(99, 102, 241, .1); background: #fff; }
.header-search .ico { color: var(--text-3); }
.header-search input {
    flex: 1;
    border: 0;
    background: transparent;
    outline: none;
    padding: 8px 0;
    font-size: 14px;
    min-width: 0;
}
.header-search input::placeholder { color: var(--text-3); }
.header-search button {
    border: 0;
    background: var(--gradient);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 18px;
    border-radius: 999px;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.header-search button:hover { opacity: .9; transform: translateY(-1px); }

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: #fff;
    width: 42px; height: 42px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
}

/* ============ 通用区块 ============ */
.section { padding: 52px 0 0; }
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.section-title { display: flex; align-items: center; gap: 12px; }
.section-title .badge-icon {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand-1);
}
.section-title h2 { font-size: 22px; }
.section-title p { margin: 2px 0 0; font-size: 13.5px; color: var(--text-3); }
.section-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.section-more:hover { gap: 10px; color: var(--brand-1); }
.section-more .ico { transition: transform .2s var(--ease); }
.section-more:hover .ico { transform: translateX(2px); }

/* ============ 首页 Hero ============ */
.hero {
    position: relative;
    overflow: hidden;
    background: #16123a;
    color: #fff;
    padding: 76px 0 96px;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(760px 380px at 12% 6%, rgba(99, 102, 241, .55), transparent 62%),
        radial-gradient(680px 400px at 88% 18%, rgba(168, 85, 247, .48), transparent 60%),
        radial-gradient(620px 380px at 62% 108%, rgba(6, 182, 212, .34), transparent 62%);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 78%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 860px; margin: 0 auto; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: 13px;
    color: #ddd6fe;
    margin-bottom: 22px;
    backdrop-filter: blur(6px);
}
.hero h1 {
    font-size: 46px;
    line-height: 1.2;
    letter-spacing: -.03em;
    margin-bottom: 18px;
}
.hero h1 .grad {
    background: linear-gradient(100deg, #a5b4fc, #c4b5fd 40%, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-desc { color: rgba(255, 255, 255, .74); font-size: 16px; margin: 0 auto 32px; max-width: 640px; }

.hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .97);
    border-radius: 999px;
    padding: 8px 8px 8px 22px;
    max-width: 660px;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(10, 8, 40, .4);
}
.hero-search .ico { color: var(--text-3); }
.hero-search input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    padding: 12px 0;
    font-size: 15.5px;
    color: var(--text-1);
    min-width: 0;
}
.hero-search button {
    border: 0;
    background: var(--gradient);
    color: #fff;
    font-weight: 700;
    padding: 13px 30px;
    border-radius: 999px;
    font-size: 15px;
    white-space: nowrap;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.hero-search button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(99, 102, 241, .45); }

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    font-size: 13.5px;
}
.hero-tags span { color: rgba(255, 255, 255, .5); }
.hero-tags a {
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .85);
}
.hero-tags a:hover { background: rgba(255, 255, 255, .2); color: #fff; }

.hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 46px;
}
.hero-stat {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius);
    padding: 18px 20px;
    backdrop-filter: blur(8px);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
}
.hero-stat .badge-icon {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    color: #c7d2fe;
}
.hero-stat strong { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.hero-stat span { font-size: 12.5px; color: rgba(255, 255, 255, .6); }

/* ============ 分类网格 ============ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}
.category-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 18px;
    transition: all .25s var(--ease);
    position: relative;
    overflow: hidden;
}
.category-card::after {
    content: "";
    position: absolute;
    inset: auto -30% -60% auto;
    width: 120px; height: 120px;
    background: var(--gradient);
    opacity: 0;
    border-radius: 50%;
    filter: blur(30px);
    transition: opacity .3s var(--ease);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #ddd9ff; }
.category-card:hover::after { opacity: .18; }
.category-card .badge-icon {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 13px;
    background: var(--brand-soft);
    color: var(--brand-1);
    margin-bottom: 12px;
    position: relative; z-index: 1;
}
.category-card strong { display: block; font-size: 15.5px; position: relative; z-index: 1; }
.category-card span { font-size: 12px; color: var(--text-3); position: relative; z-index: 1; }

/* ============ 源码卡片 ============ */
.source-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.source-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.source-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.source-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.source-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #e0dcff; }

.card-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    color: #fff;
    overflow: hidden;
}
.card-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-cover .cover-letter {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: .06em;
    opacity: .92;
    text-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 78% 12%, rgba(255, 255, 255, .3), transparent 55%);
    pointer-events: none;
}
.cover-chip {
    position: absolute;
    z-index: 2;
    top: 12px; left: 12px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: var(--text-1);
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}
.cover-chip.right { left: auto; right: 12px; background: rgba(16, 20, 38, .55); color: #fff; }

.card-body { padding: 16px 17px 18px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.card-title {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 46px;
}
.source-card:hover .card-title { color: var(--brand-1); }
.card-desc {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
    color: var(--text-3);
    padding-top: 12px;
    border-top: 1px dashed var(--line);
    flex-wrap: wrap;
}
.card-meta i { display: inline-flex; align-items: center; gap: 4px; font-style: normal; }
.card-meta .push { margin-left: auto; color: var(--brand-1); font-weight: 600; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    color: var(--text-2);
}
.tag:hover { background: var(--brand-soft); border-color: #dcd8ff; color: var(--brand-1); }

/* ============ 列表行 ============ */
.source-list { display: grid; gap: 14px; }
.source-row {
    display: flex;
    gap: 18px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    transition: all .25s var(--ease);
}
.source-row:hover { border-color: #e0dcff; box-shadow: var(--shadow-sm); transform: translateX(3px); }
.row-cover {
    width: 168px;
    flex: 0 0 auto;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    overflow: hidden;
    position: relative;
}
.row-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.row-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-head h3 { font-size: 17px; }
.row-rank {
    width: 26px; height: 26px;
    flex: 0 0 auto;
    border-radius: 8px;
    display: grid; place-items: center;
    font-size: 13px; font-weight: 800;
    background: var(--bg-soft);
    color: var(--text-3);
}
.row-rank.top1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.row-rank.top2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #fff; }
.row-rank.top3 { background: linear-gradient(135deg, #fdba74, #ea580c); color: #fff; }
.row-foot { margin-top: auto; display: flex; align-items: center; gap: 16px; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.row-foot i { font-style: normal; display: inline-flex; align-items: center; gap: 5px; }

/* ============ 徽章 ============ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
}
.badge-brand { background: var(--brand-soft); color: var(--brand-1); }
.badge-success { background: #e7f8f1; color: #0d9c6f; }
.badge-warning { background: #fef4e6; color: #c2760a; }
.badge-danger { background: #feecec; color: #d93b3b; }
.badge-plain { background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--line); }

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 14.5px;
    transition: all .22s var(--ease);
    white-space: nowrap;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 20px rgba(99, 102, 241, .26); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(99, 102, 241, .38); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { border-color: #c7d2fe; color: var(--brand-1); background: var(--brand-soft); }
.btn-soft { background: var(--brand-soft); color: var(--brand-1); }
.btn-soft:hover { background: #e3e5ff; }
.btn-danger { background: #fff; border-color: #fbd5d5; color: var(--danger); }
.btn-danger:hover { background: #fff1f1; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 28px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }

/* ============ 面包屑 ============ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-3);
    padding: 20px 0 0;
    flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--brand-1); }
.breadcrumb .sep { color: #cbd2e0; }

/* ============ 页面标题条 ============ */
.page-head {
    background: linear-gradient(135deg, #1e1b4b, #33265c 55%, #4c1d95);
    color: #fff;
    padding: 42px 0 46px;
    position: relative;
    overflow: hidden;
}
.page-head::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 260px at 15% 0%, rgba(99, 102, 241, .5), transparent 60%),
        radial-gradient(520px 240px at 90% 100%, rgba(168, 85, 247, .42), transparent 60%);
}
.page-head .container { position: relative; z-index: 1; }
.page-head h1 { font-size: 30px; margin-bottom: 8px; }
.page-head p { color: rgba(255, 255, 255, .72); margin: 0; max-width: 720px; font-size: 14.5px; }
.page-head .breadcrumb { color: rgba(255, 255, 255, .6); padding: 0 0 14px; }
.page-head .breadcrumb a:hover { color: #fff; }
.page-head .breadcrumb .sep { color: rgba(255, 255, 255, .35); }

/* ============ 工具栏 / 筛选 ============ */
.toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 20px;
}
.toolbar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-label { font-size: 13px; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; }
.chip {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13.5px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text-2);
    transition: all .2s var(--ease);
}
.chip:hover { border-color: #c7d2fe; color: var(--brand-1); }
.chip.active { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(99, 102, 241, .24); }
.toolbar .push { margin-left: auto; }

/* ============ 分页 ============ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 34px 0 0;
    flex-wrap: wrap;
}
.page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
}
.page-link:hover { border-color: #c7d2fe; color: var(--brand-1); }
.page-link.active { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(99, 102, 241, .26); }
.page-link.disabled { color: #c3c9d8; background: var(--bg-soft); cursor: not-allowed; }
.page-dots { color: var(--text-3); padding: 0 4px; }

/* ============ 详情页 ============ */
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 26px;
    align-items: start;
    padding-top: 26px;
}
.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 26px;
    margin-bottom: 20px;
}
.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-2);
}
.panel-title::before {
    content: "";
    width: 4px; height: 18px;
    border-radius: 3px;
    background: var(--gradient);
}

.detail-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.detail-title { font-size: 25px; line-height: 1.4; flex: 1; min-width: 240px; }
.detail-sub { color: var(--text-3); font-size: 13.5px; display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.detail-sub i { font-style: normal; display: inline-flex; align-items: center; gap: 5px; }

.detail-cover {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 8;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 54px;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 22px;
    position: relative;
}
.detail-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.info-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.info-item {
    display: flex;
    gap: 10px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line-2);
    font-size: 14px;
}
.info-item:nth-last-child(-n+2) { border-bottom: 0; }
.info-item dt { color: var(--text-3); width: 84px; flex: 0 0 auto; margin: 0; }
.info-item dd { margin: 0; font-weight: 600; word-break: break-all; }

.article-body {
    font-size: 15.2px;
    line-height: 1.95;
    color: var(--text-2);
    word-break: break-word;
}
.article-body::after { content: ""; display: block; clear: both; }

.sidebar { position: sticky; top: 94px; }
.download-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.download-card .dl-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}
.download-card .dl-price strong { font-size: 30px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.download-card .dl-price span { color: var(--text-3); font-size: 13px; }
.download-card .dl-actions { display: grid; gap: 10px; margin-bottom: 16px; }
.dl-tips { font-size: 12.5px; color: var(--text-3); border-top: 1px dashed var(--line); padding-top: 14px; display: grid; gap: 7px; }
.dl-tips span { display: flex; gap: 7px; align-items: flex-start; }
.dl-tips .ico { color: var(--success); margin-top: 3px; }

.side-list { display: grid; gap: 4px; }
.side-item { display: flex; gap: 12px; padding: 10px 8px; border-radius: 12px; transition: background .2s var(--ease); }
.side-item:hover { background: var(--bg-soft); }
.side-thumb {
    width: 56px; height: 56px;
    flex: 0 0 auto;
    border-radius: 11px;
    display: grid; place-items: center;
    color: #fff; font-weight: 800; font-size: 17px;
    overflow: hidden;
}
.side-thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-body { min-width: 0; }
.side-body h4 {
    font-size: 13.8px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
}
.side-body span { font-size: 12px; color: var(--text-3); }

/* ============ 表单 ============ */
.form-grid { display: grid; gap: 18px; }
.form-row { display: grid; gap: 8px; }
.form-row label { font-size: 14px; font-weight: 600; color: var(--text-1); }
.form-row .hint { font-size: 12.5px; color: var(--text-3); }
.required::after { content: " *"; color: var(--danger); }

.input, .select, .textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 14.5px;
    outline: none;
    transition: all .2s var(--ease);
    font-family: inherit;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.75; }
.input:focus, .select:focus, .textarea:focus {
    border-color: #c7d2fe;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .1);
}
.input::placeholder, .textarea::placeholder { color: #aab1c4; }

.form-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

/* ============ 提示条 ============ */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 12px;
    margin-top: 18px;
    font-size: 14px;
    border: 1px solid transparent;
}
.alert-success { background: #ecfdf5; color: #0b7a58; border-color: #c7f0e0; }
.alert-error { background: #fef2f2; color: #b91c1c; border-color: #fbd5d5; }
.alert-info { background: var(--brand-soft); color: #4c4ddb; border-color: #dcd8ff; }

.empty {
    text-align: center;
    padding: 72px 20px;
    background: var(--white);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--text-3);
}
.empty .ico { width: 46px; height: 46px; color: #cbd2e0; margin-bottom: 14px; }
.empty h3 { font-size: 17px; color: var(--text-1); margin-bottom: 6px; }

/* ============ 特性区 ============ */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 22px;
    transition: all .25s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card .badge-icon {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 13px;
    background: var(--gradient);
    color: #fff;
    margin-bottom: 14px;
    box-shadow: 0 10px 22px rgba(99, 102, 241, .28);
}
.feature-card h3 { font-size: 16px; margin-bottom: 7px; }
.feature-card p { font-size: 13.4px; color: var(--text-3); margin: 0; line-height: 1.75; }

/* ============ 页面通用 ============ */
.page-body { padding-bottom: 60px; }
.content-narrow { max-width: 880px; margin: 0 auto; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 26px; align-items: start; }

/* ============ 页脚 ============ */
.site-footer {
    background: #12122b;
    color: rgba(255, 255, 255, .68);
    margin-top: 64px;
    padding-bottom: 26px;
}
.footer-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.footer-stat { display: flex; align-items: baseline; gap: 10px; justify-content: center; }
.footer-stat strong { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.footer-stat span { font-size: 13px; color: rgba(255, 255, 255, .5); }

.footer-main {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 34px;
    padding: 42px 0 34px;
}
.footer-col h4 { font-size: 15px; color: #fff; margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 10px; font-size: 13.8px; }
.footer-col ul a { color: rgba(255, 255, 255, .66); }
.footer-col ul a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.6; }
.footer-contact .ico { color: #a5b4fc; margin-top: 4px; }
.footer-brand .logo-light { margin-bottom: 16px; }
.footer-brand .logo-text strong { -webkit-text-fill-color: #fff; background: none; color: #fff; }
.footer-brand p { font-size: 13.4px; line-height: 1.8; color: rgba(255, 255, 255, .55); }
.footer-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.footer-tags a {
    font-size: 12px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .7);
}
.footer-tags a:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .09);
    padding-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
}
.footer-copy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-beian { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.beian-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .13);
    color: rgba(255, 255, 255, .8);
    font-size: 12.8px;
    line-height: 1.5;
    transition: all .2s var(--ease);
}
.beian-link:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .26);
    color: #fff;
}
.beian-link .ico { color: #a5b4fc; }
.footer-note { display: inline-flex; align-items: center; gap: 7px; color: rgba(255, 255, 255, .45); }
.footer-note .ico { color: rgba(255, 255, 255, .35); }

/* ============ 返回顶部 ============ */
.back-to-top {
    position: fixed;
    right: 26px;
    bottom: 30px;
    width: 46px; height: 46px;
    border-radius: 14px;
    border: 0;
    background: var(--gradient);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 28px rgba(99, 102, 241, .38);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all .28s var(--ease);
    z-index: 80;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top .ico { transform: rotate(180deg); }

/* ============ 响应式 ============ */
@media (max-width: 1180px) {
    .source-grid { grid-template-columns: repeat(3, 1fr); }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .header-search { min-width: 220px; }
}

@media (max-width: 1024px) {
    .detail-layout, .two-col { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: static; }
    .footer-main { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 18px 18px;
        margin: 0;
        display: none;
    }
    .main-nav.open { display: flex; }
    .nav-link { justify-content: flex-start; padding: 12px 14px; }
    .nav-dropdown { position: static; }
    .dropdown-panel {
        position: static;
        width: auto;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        border-radius: 0;
        padding: 0 0 0 8px;
    }
    .header-inner { flex-wrap: wrap; }
    .header-search { order: 3; width: 100%; margin: 0 0 14px; min-width: 0; }
    .hero h1 { font-size: 34px; }
    .hero { padding: 56px 0 70px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .source-grid, .source-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .topbar-left { display: none; }
    .topbar-inner { justify-content: center; }
    .topbar-right { gap: 14px; }
    .logo-text em { display: none; }
    .hero h1 { font-size: 27px; }
    .hero-desc { font-size: 14.5px; }
    .hero-search { flex-wrap: wrap; border-radius: 18px; padding: 12px; }
    .hero-search input { width: 100%; flex: 1 1 100%; padding: 6px 4px; }
    .hero-search button { width: 100%; border-radius: 12px; padding: 12px; }
    .hero-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .hero-stat { padding: 14px; gap: 10px; }
    .hero-stat strong { font-size: 19px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .source-grid, .source-grid.cols-3 { grid-template-columns: 1fr; }
    .source-grid.cols-2 { grid-template-columns: 1fr; }
    .source-row { flex-direction: column; }
    .row-cover { width: 100%; }
    .detail-title { font-size: 20px; }
    .panel { padding: 18px; }
    .info-table { grid-template-columns: 1fr; }
    .info-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--line-2); }
    .info-item:last-child { border-bottom: 0; }
    .form-cols { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .back-to-top { right: 16px; bottom: 18px; }
    .section { padding: 36px 0 0; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .page-head { padding: 30px 0 34px; }
    .page-head h1 { font-size: 23px; }
}
