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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif, Arial;
    background: #eaeeee linear-gradient(45deg, #eaeeee, #f5f7fa);
    color: #333;
    line-height: 1.6;
}

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

.container { max-width: 1500px; margin: 0 auto; padding: 0 15px; }

.main { min-height: calc(100vh - 140px); overflow: hidden; }

/* ---------- 头部 ---------- */
.site-header {
    height: 70px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0 16px;
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 70px; }

.logo {
    height: 40px;
    line-height: 40px;
    font-size: 22px;
    font-weight: 700;
    color: #1a3c6e;
    letter-spacing: 1px;
}
.logo a {
    display: block;
    padding-left: 40px;
    background: url("../../assets/image/logo.png") no-repeat 0 56%;
    background-size: auto 24px;
}

.search-box { display: flex; min-width: 380px; }
.search-input {
    height: 40px;
    flex: 1;
    padding: 5px 15px;
    border: 2px solid #e4e8ee;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    outline: none;
    background: #fafbfc;
    transition: border-color .2s;
}
.search-input:focus { border-color: #0084ff; background: #fff; }
.search-btn {
    height: 40px;
    padding: 5px 18px;
    border: none;
    border-radius: 0 8px 8px 0;
    background: #0084ff;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
}
.search-btn:hover { background: #1f55d8; }

/* ---------- 分类 Tab ---------- */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 26px 0 10px;
}
.cat-tab {
    padding: 8px 20px;
    border-radius: 9999px;
    background: #fff;
    color: #555;
    font-size: 14px;
    border: 1px solid #fff;
    transition: all .2s;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.cat-tab:hover { color: #0084ff; border-color: #0084ff; }
.cat-tab.active {
    background: #0084ff;
    border-color: #0084ff;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(47, 107, 255, .25);
}

/* ---------- 分类区块 ---------- */
.cat-section { margin: 30px 0 30px; }
.cat-section .link-grid { margin-bottom: 0; }
.cat-title {
    font-weight: 200;
    font-size: 22px;
    text-indent: 10px;
    line-height: 1;
    color: #1a3c6e;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- 链接卡片 ---------- */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
    margin-bottom: 26px;
}

.l-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    border-radius: 12px;
    padding: 14px 14px;
    position: relative;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform .22s ease;
}
.l-card:hover {
    transform: translateY(-5px);
}

.l-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid #eee;
    background-size: cover;
    background-position: center;
    flex: 0 0 44px;
    object-fit: cover;
}
.l-icon-text {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #0084ff;
}

.l-body { min-width: 0; }
.l-title {
    font-size: 16px;
    color: #222;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.l-card:hover .l-title { color: #0084ff; }
.l-card:hover .l-icon { border-color: #eaeaea; }
.star {
    line-height: 1;
    font-weight: 200;
    font-style: normal;
    font-size: 12px;
    color: #f60;
    user-select: none;
    pointer-events: none;
    position: absolute;
    top: 6px;
    right: 7px;
}
.l-desc {
    font-weight: 200;
    font-size: 13px;
    color: #9aa4b2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 搜索结果 ---------- */
.search-result-head {
    margin: 26px 0 22px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.search-result-head h2 {
    font-size: 18px;
    color: #1a3c6e;
}
.search-result-head p {
    color: #8a94a6;
    font-size: 13px;
    flex: 1;
    min-width: 160px;
}
.btn-ghost {
    display: inline-block;
    padding: 8px 20px;
    background: #fff;
    border: 1px solid #d8dee7;
    border-radius: 8px;
    color: #555;
    font-size: 13px;
    transition: all .18s;
}
.btn-ghost:hover { border-color: #0084ff; color: #0084ff; }
.l-cat {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    color: #0084ff;
    background: #e8f0ff;
    border-radius: 8px;
    padding: 0 8px;
    line-height: 18px;
}

/* ---------- 空状态 / 页脚 ---------- */
.empty-tip {
    text-align: center;
    padding: 90px 20px;
    color: #9aa4b2;
}
.empty-tip h2 { font-size: 24px; color: #555; margin-bottom: 10px; }
.empty-tip p { margin-bottom: 24px; }
.btn-primary {
    display: inline-block;
    padding: 10px 28px;
    background: #0084ff;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
}
.btn-primary:hover { background: #1f55d8; }

.site-footer {
    height: 70px;
    border-top: 1px solid #e4e8ee;
    text-align: center;
    line-height: 40px;
    color: #9aa4b2;
    font-size: 13px;
    background: #fff;
    padding: 15px 0;
}
.footer-admin a { color: #0084ff; margin-left: 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
    .search-btn { padding: 5px 10px; }
    .search-box { flex: auto; min-width: 200px; }
}

@media (max-width: 550px) {
    .container { padding: 0 12px; }
    .main { min-height: calc(100vh - 120px); }
    .site-header, .site-footer { height: 60px; padding: 10px 0; }
    .search-box { display: none; }
    .cat-tabs { gap: 10px; }
    .cat-tab { padding: 4px 12px 5px; font-size: 11px; font-weight: 700; }
    .link-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .star { font-size: 8px; }
    .l-card:hover { transform: translateY(0); }
}