/* ===== Reset ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;-webkit-font-smoothing:antialiased}
body{font-family:Arial,"PingFang SC","Microsoft YaHei","Hiragino Sans GB",sans-serif;color:#333;background:#fff;min-height:100vh}
a{color:#333;text-decoration:none}
img{border:0;vertical-align:middle}

/* ========================================
   INDEX PAGE — Baidu-style Homepage
   ======================================== */

/* --- Top nav --- */
.index-head{padding:16px 24px 0;position:absolute;top:0;left:0;right:0;z-index:10}
.head-inner{display:flex;justify-content:space-between;align-items:center;max-width:1200px;margin:0 auto}
.head-right{display:flex;gap:20px}
.head-right a{font-size:13px;color:#333}
.head-right a:hover{color:#4e6ef2}

/* (index-hero handles centering) */

/* --- Logo --- */
.index-logo{display:flex;align-items:flex-end;gap:4px;margin-bottom:28px;user-select:none}
.logo-img{height:130px}
.logo-sub{
    font-size:32px;font-weight:400;color:#4e6ef2;
    letter-spacing:2px;padding-bottom:18px;
    font-family:"PingFang SC","Microsoft YaHei",sans-serif;
}

/* --- Search bar --- */
.index-search{width:640px;max-width:100%;margin-bottom:24px}

.s-bar{
    display:flex;align-items:center;
    border:1px solid #b6b6b6;border-radius:10px;
    height:44px;overflow:hidden;
    background:#fff;transition:border-color .2s,box-shadow .2s;
}
.s-bar:focus-within{
    border-color:#4e6ef2;
    box-shadow:0 2px 10px rgba(78,110,242,.15);
}
.s-bar input{
    flex:1;border:none;outline:none;
    height:100%;padding:0 16px;font-size:16px;
    background:transparent;color:#333;
}
.s-bar input::placeholder{color:#b6b6b6}
.s-bar input::-webkit-search-cancel-button{display:none}

.s-tools{display:flex;align-items:center;padding-right:8px;gap:8px}
.s-ico{cursor:pointer;opacity:.5;transition:opacity .2s}
.s-ico:hover{opacity:1}

.s-btn{
    flex-shrink:0;height:100%;padding:0 28px;
    border:none;outline:none;cursor:pointer;
    background:#4e6ef2;color:#fff;
    font-size:17px;letter-spacing:1px;
    border-radius:0 10px 10px 0;
    transition:background .2s;
}
.s-btn:hover{background:#3a5cdb}

.s-count{text-align:center;margin-top:10px;font-size:13px;color:#9195a3}
.s-count strong{color:#4e6ef2}

/* --- Hot section --- */
.hot-wrap{
    width:640px;max-width:100%;
    background:#fff;border-radius:12px;
    padding:16px 20px 12px;
}

.hot-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}

.hot-tabs{display:flex;gap:20px}
.hot-tab{
    font-size:15px;color:#9195a3;cursor:pointer;
    padding-bottom:6px;position:relative;
}
.hot-tab.active{color:#222;font-weight:600}
.hot-tab.active::after{
    content:'';position:absolute;bottom:0;left:0;right:0;
    height:2px;background:#f73131;border-radius:1px;
}
.hot-tab i{font-style:normal;color:#f73131}

.hot-refresh{
    display:flex;align-items:center;gap:4px;
    font-size:13px;color:#9195a3;cursor:pointer;
}
.hot-refresh:hover{color:#4e6ef2}

.hot-list{display:flex;gap:12px;margin-top:4px}
.hot-col{flex:1;display:flex;flex-direction:column}

.hot-item{
    display:flex;align-items:center;gap:8px;
    padding:8px 6px;border-radius:6px;
    transition:background .15s;cursor:pointer;
    text-decoration:none;color:#333;
    font-size:14px;
}
.hot-item:hover{background:#f5f6f8}

.hot-rank{
    flex-shrink:0;width:18px;text-align:center;
    font-size:14px;font-weight:700;
    font-style:italic;
}
.rank-top{
    font-size:10px;font-style:normal;font-weight:700;
    color:#fff;background:#f54545;
    border-radius:3px;padding:1px 3px;width:auto;
}
.rank-1{color:#f54545}
.rank-2{color:#f7703d}
.rank-3{color:#faa90e}
.rank-4{color:#9195a3}

.hot-title{
    flex:1;overflow:hidden;white-space:nowrap;
    text-overflow:ellipsis;line-height:1.4;
}
.hot-item:hover .hot-title{color:#4e6ef2}

.hot-badge{
    flex-shrink:0;font-size:10px;font-weight:600;
    padding:1px 5px;border-radius:3px;letter-spacing:.02em;
}
.badge-pdf{background:#fef2f2;color:#dc2626}
.badge-html,.badge-htm{background:#ecfdf5;color:#059669}

.hot-empty{text-align:center;padding:32px 0;color:#9195a3;font-size:14px}
.hot-empty a{color:#4e6ef2}

/* --- Hero wrapper --- */
.index-hero{
    display:flex;flex-direction:column;align-items:center;
    justify-content:center;min-height:80vh;padding:0 24px;
}

/* --- Library Section (SEO listing) --- */
.index-library{background:#f5f5f6;padding:40px 0 20px}
.lib-inner{max-width:760px;margin:0 auto;padding:0 24px}
.lib-title{
    font-size:18px;font-weight:700;color:#222;margin-bottom:20px;
    display:flex;align-items:center;gap:10px;
}
.lib-title::before{content:'';width:4px;height:1em;background:#4e6ef2;border-radius:2px}
.lib-title span{font-size:13px;font-weight:400;color:#9195a3}

.lib-list{display:flex;flex-direction:column}
.lib-item{
    display:flex;align-items:center;gap:12px;
    padding:12px 14px;background:#fff;
    border-bottom:1px solid #f0f0f0;
    transition:background .15s;
}
.lib-item:first-child{border-radius:8px 8px 0 0}
.lib-item:last-child{border-radius:0 0 8px 8px;border-bottom:none}
.lib-item:hover{background:#f9fafc}

.lib-num{
    flex-shrink:0;width:22px;text-align:center;
    font-size:14px;font-weight:700;color:#9195a3;font-style:italic;
}
.lib-item:nth-child(-n+3) .lib-num{color:#f54545}

.lib-info{flex:1;min-width:0}
.lib-info h3{font-size:15px;font-weight:500;line-height:1.4;margin:0}
.lib-info h3 a{color:#222;transition:color .15s}
.lib-info h3 a:hover{color:#4e6ef2}
.lib-kw{font-size:12px;color:#9195a3;margin-top:2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}

.lib-type{
    flex-shrink:0;font-size:10px;font-weight:700;
    padding:2px 8px;border-radius:3px;
}
.type-pdf{background:#fef2f2;color:#dc2626}
.type-html,.type-htm{background:#ecfdf5;color:#059669}

.lib-pager{display:flex;align-items:center;justify-content:center;gap:3px;margin-top:24px;padding-bottom:20px;flex-wrap:wrap}
.lib-pager a{
    padding:5px 10px;border-radius:6px;font-size:13px;
    color:#333;border:1px solid #e3e5e7;background:#fff;transition:all .15s;
}
.lib-pager a:hover{border-color:#4e6ef2;color:#4e6ef2}
.lib-pager a.cur{background:#4e6ef2;color:#fff;border-color:#4e6ef2}
.pager-gap{padding:0 4px;color:#9195a3;font-size:13px}

/* --- Full footer --- */
.index-footer-full{
    background:#fff;border-top:1px solid #eee;
    padding:28px 24px;text-align:center;color:#9195a3;font-size:13px;
}
.foot-inner{max-width:760px;margin:0 auto}
.foot-links{margin:8px 0;display:flex;justify-content:center;gap:20px}
.foot-links a{color:#9195a3}
.foot-links a:hover{color:#4e6ef2}
.foot-copy{font-size:12px;margin-top:4px}

/* ========================================
   SEARCH RESULTS PAGE
   ======================================== */

.search-page{background:#f5f5f6}

.s-header{
    background:#fff;border-bottom:1px solid #e3e5e7;
    padding:10px 0;position:sticky;top:0;z-index:100;
}
.s-header-inner{
    display:flex;align-items:center;gap:24px;
    max-width:920px;margin:0 auto;padding:0 24px;
}
.s-logo{display:flex;align-items:center;gap:2px;flex-shrink:0}
.s-logo img{height:28px}
.s-logo span{font-size:16px;color:#4e6ef2;font-weight:500;padding-bottom:2px}

.s-header-form{flex:1;max-width:540px}
.s-bar.compact{height:38px;border-radius:8px}
.s-bar.compact input{font-size:14px;padding:0 12px}
.s-bar.compact .s-btn{font-size:14px;padding:0 20px;border-radius:0 8px 8px 0}

.search-main{max-width:920px;margin:0 auto;padding:24px 24px 48px}
.search-info{font-size:13px;color:#9195a3;margin-bottom:20px}
.search-info strong{color:#4e6ef2}

.no-result{text-align:center;padding:60px 0;color:#9195a3;font-size:15px}

/* --- Result item --- */
.result-item{
    background:#fff;border-radius:8px;padding:16px 20px;
    margin-bottom:10px;transition:box-shadow .2s;
}
.result-item:hover{box-shadow:0 2px 12px rgba(0,0,0,.06)}

.result-title{font-size:16px;font-weight:400;line-height:1.5}
.result-title a{color:#2440b3}
.result-title a:hover{text-decoration:underline}

.result-badge{
    display:inline-block;font-size:10px;font-weight:700;
    padding:1px 5px;border-radius:3px;margin-right:4px;
    vertical-align:middle;
}
.result-pdf{background:#fef2f2;color:#dc2626}
.result-html,.result-htm{background:#ecfdf5;color:#059669}

.result-keywords{font-size:13px;color:#666;margin-top:4px}
.result-meta{font-size:12px;color:#9195a3;margin-top:6px;display:flex;gap:12px}
.result-url{color:#009a61}

/* --- Pagination --- */
.pager{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:32px}
.pager-btn,.pager-num{
    padding:6px 14px;border-radius:6px;
    font-size:14px;color:#333;
    border:1px solid #e3e5e7;background:#fff;
    transition:all .2s;
}
.pager-btn:hover,.pager-num:hover{border-color:#4e6ef2;color:#4e6ef2}
.pager-num.active{background:#4e6ef2;color:#fff;border-color:#4e6ef2}

/* ========================================
   Responsive
   ======================================== */
@media(max-width:680px){
    .index-search,.hot-wrap{width:100%}
    .logo-img{height:80px}
    .logo-sub{font-size:22px;padding-bottom:10px}
    .hot-list{flex-direction:column;gap:0}
    .s-header-inner{flex-wrap:wrap;gap:10px}
    .s-logo img{height:22px}
    .result-item{padding:12px 14px}
}
