/* ============================================================
   spa.css — SPA 前台增强样式（骨架屏 / 过渡 / 分页 / 搜索）
   IE11 兼容：不使用 CSS 变量新语法、grid/flex 均为旧版可用写法。
   ============================================================ */

/* ---------- 视图切换过渡（透明度渐入，IE11 支持 transition） ---------- */
.view {
    display: none;
    opacity: 0;
}
.view.active {
    display: block;
    opacity: 1;
    -webkit-transition: opacity .25s ease;
    transition: opacity .25s ease;
}

/* ---------- 骨架屏（数据加载时的占位） ---------- */
.skeleton-block {
    background: #eef3f7;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}
.skeleton-block::after {
    content: "";
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
    -webkit-animation: sk-shine 1.2s infinite;
    animation: sk-shine 1.2s infinite;
}
@keyframes sk-shine { 100% { left: 100%; } }

/* 首页骨架：轮播占位 + 快捷入口占位 + 会员条占位 */
.sk-carousel { width: 100%; height: 420px; margin-bottom: 30px; }
.sk-quick-row { text-align: center; padding: 30px 0; }
.sk-quick { display: inline-block; width: 120px; height: 120px; border-radius: 50%; margin: 0 40px; }
.sk-member { width: 66%; height: 180px; margin: 60px auto; }

/* 栏目页骨架：左栏 + 右栏列表行占位 */
.sk-list-view { display: -webkit-box; display: flex; }
.sk-left { width: 220px; height: 320px; margin-right: 20px; flex-shrink: 0; }
.sk-right { -webkit-box-flex: 1; flex: 1; }
.sk-row { height: 48px; margin-bottom: 14px; }

/* 文章页骨架 */
.sk-article { padding: 20px; }
.sk-article .sk-title { width: 60%; height: 34px; margin: 0 auto 30px; }
.sk-article .sk-line { height: 18px; margin-bottom: 12px; }
.sk-article .sk-line.short { width: 70%; }

/* ---------- 空状态 ---------- */
.empty-tip {
    text-align: center;
    color: #999;
    padding: 60px 0;
    font-size: 15px;
}
.empty-tip .empty-icon {
    display: block;
    font-size: 42px;
    margin-bottom: 12px;
    color: #c8d4dd;
}

/* ---------- 分页条（SPA 版，替换旧 jquery.pagination） ---------- */
.sp-pagination {
    text-align: center;
    padding: 24px 0 10px;
    font-size: 14px;
}
.sp-pagination .pp-btn {
    display: inline-block;
    min-width: 34px;
    padding: 6px 10px;
    margin: 0 3px;
    border: 1px solid #d5dde5;
    border-radius: 4px;
    background: #fff;
    color: #556;
    cursor: pointer;
    text-decoration: none;
    -webkit-transition: all .15s;
    transition: all .15s;
    vertical-align: middle;
}
.sp-pagination .pp-btn:hover {
    border-color: #007acc;
    color: #007acc;
}
.sp-pagination .pp-btn.on {
    background: #007acc;
    border-color: #007acc;
    color: #fff;
    cursor: default;
}
.sp-pagination .pp-btn.disabled {
    color: #c3ccd4;
    border-color: #e6ecf1;
    cursor: default;
}
.sp-pagination .pp-btn.disabled:hover {
    border-color: #e6ecf1;
    color: #c3ccd4;
}
.sp-pagination .pp-info {
    margin-left: 8px;
    color: #99a4ad;
    font-size: 13px;
}

/* ---------- 导航顶部搜索框（外壳常驻） ---------- */
.nav-search {
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
}
.nav-search input {
    width: 150px;
    height: 30px;
    border: none;
    border-radius: 15px 0 0 15px;
    padding: 0 12px;
    font-size: 13px;
    outline: none;
    background: rgba(255,255,255,.92);
    color: #333;
    vertical-align: middle;
}
.nav-search input::-ms-clear { display: none; }
.nav-search button {
    height: 30px;
    border: none;
    border-radius: 0 15px 15px 0;
    padding: 0 12px;
    background: rgba(255,255,255,.75);
    color: #007acc;
    cursor: pointer;
    font-size: 13px;
    vertical-align: middle;
    -webkit-transition: background .2s;
    transition: background .2s;
}
.nav-search button:hover { background: #fff; }

/* ---------- 搜索视图 ---------- */
.search-panel {
    width: 67%;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,.1);
    padding: 20px;
    min-height: 55vh;
}
.search-panel .search-head {
    border-bottom: 1px solid #DEDEDE;
    padding-bottom: 12px;
    margin-bottom: 6px;
    font-size: 16px;
    color: #333;
}
.search-panel .search-head b { color: #007acc; }
.search-panel .search-count {
    color: #999;
    font-size: 13px;
    padding: 6px 0 10px;
}

/* ---------- 面包屑位置条 ---------- */
.connection-location a { color: #888; }
.connection-location a:hover { color: #007acc; }
.connection-location .loc-sep { margin: 0 4px; color: #bbb; }

/* ---------- 加载失败提示 ---------- */
.load-error {
    text-align: center;
    color: #d9534f;
    padding: 40px 0;
}
.load-error button {
    margin-top: 10px;
    padding: 6px 18px;
    border: 1px solid #d9534f;
    background: #fff;
    color: #d9534f;
    border-radius: 4px;
    cursor: pointer;
}
.load-error button:hover { background: #fdf3f2; }

/* ---------- 响应式微调 ---------- */
@media (max-width: 768px) {
    .sk-carousel { height: 200px; }
    .sk-left { display: none; }
    .search-panel { width: 92%; }
    .nav-search input { width: 110px; }
}
