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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f6f7fb;
    color: #1a1a2e;
    line-height: 1.6;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.topbar {
    background: #fff;
    border-bottom: 1px solid #ececf2;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    gap: 20px;
}
.logo {
    font-size: 19px;
    font-weight: 700;
    color: #7c5cff;
    white-space: nowrap;
}
.search-box { display: flex; gap: 8px; flex: 1; max-width: 420px; }
.search-box input {
    flex: 1;
    height: 38px;
    border: 1px solid #dcdce6;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
    outline: none;
}
.search-box input:focus { border-color: #7c5cff; }
.search-box button {
    height: 38px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea, #7c5cff);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #7c5cff 100%);
    padding: 38px 0 30px;
    color: #fff;
}
.hero h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}
.cats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cat {
    padding: 7px 18px;
    background: rgba(255,255,255,.18);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
}
.cat:hover { background: rgba(255,255,255,.32); }
.cat.on { background: #fff; color: #7c5cff; font-weight: 600; }

/* ---------- 列表 ---------- */
.list-head {
    margin: 26px 0 14px;
    font-size: 14px;
    color: #888;
}
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-bottom: 50px;
}
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .grid { grid-template-columns: 1fr; } }

.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    border: 1px solid #eeeef5;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(124, 92, 255, .16);
}
.card.pinned { border-left: 4px solid #ffb020; }
.card-thumb {
    height: 120px;
    background: linear-gradient(135deg, #e9e7ff, #f3f0ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: #7c5cff;
    font-weight: 700;
    letter-spacing: 1px;
}
.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-excerpt {
    font-size: 12.5px;
    color: #777;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #aaa;
}
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0eeff;
    color: #7c5cff;
}
.tag.hot { background: #ffeceb; color: #e5484d; }
.tag.new { background: #e6f7ee; color: #18a058; }

.empty { text-align: center; padding: 70px 0; color: #aaa; }

/* ---------- 弹窗 ---------- */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-mask.on { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    max-height: 86vh;
    overflow-y: auto;
    position: relative;
}
.modal-close {
    position: absolute;
    right: 14px;
    top: 10px;
    font-size: 26px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    z-index: 2;
}
.modal-body { padding: 28px 26px; }

.m-title { font-size: 20px; font-weight: 700; margin-bottom: 10px; padding-right: 30px; }
.m-meta { font-size: 12.5px; color: #999; margin-bottom: 16px; }
.m-excerpt {
    font-size: 14px;
    color: #444;
    line-height: 1.8;
    padding: 16px;
    background: #faf9ff;
    border-radius: 10px;
    border-left: 3px solid #7c5cff;
}

/* 模糊遮挡块 */
.m-lock {
    margin-top: 16px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}
.m-lock-fake {
    filter: blur(5px);
    user-select: none;
    color: #8a8a9a;
    font-size: 13px;
    line-height: 2;
    padding: 14px 16px;
    background: #f4f4f8;
}
.m-lock-tip {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.72);
    text-align: center;
}
.m-lock-tip strong { font-size: 14px; color: #333; margin-bottom: 4px; }
.m-lock-tip span { font-size: 12px; color: #888; }

.m-btn {
    width: 100%;
    height: 48px;
    margin-top: 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #7c5cff);
    color: #fff;
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
}
.m-btn:active { opacity: .88; }

/* 验证通过后 */
.m-pass { margin-top: 18px; padding: 18px; background: #e9f9f0; border-radius: 10px; text-align: center; }
.m-pass-title { color: #18a058; font-weight: 600; margin-bottom: 12px; font-size: 15px; }
.m-link {
    display: block;
    word-break: break-all;
    background: #fff;
    border: 1px dashed #18a058;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: #0a7a42;
    text-decoration: none;
    margin-bottom: 10px;
}
.m-copy {
    height: 42px;
    padding: 0 24px;
    border: none;
    border-radius: 8px;
    background: #18a058;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

/* ---------- 页脚 ---------- */
.foot {
    background: #1f2033;
    color: #999;
    padding: 28px 0;
    font-size: 13px;
    text-align: center;
}
.foot .copy { margin-top: 6px; font-size: 12px; }
