/* ============================================================
   heie.cn 电子书库（book）页面样式
   静态资源域名: img.heie.cn（绑定 heiehtml/img 目录）
   ============================================================ */

/* ---------- 面包屑 ---------- */
.crumb { padding: 14px 0 10px; color: #888; font-size: 13px; }
.crumb a { color: #666; }
.crumb a:hover { color: #1677ff; }

/* ---------- 通用卡片 ---------- */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 18px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
    transition: box-shadow .25s;
}
.card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.card-title {
    display: inline-block;
    font-size: 18px;
    color: #222;
    padding-bottom: 10px;
    margin-bottom: 18px;
    position: relative;
}
.card-title::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 36px; height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #1677ff, #4096ff);
}

/* ---------- 索引页：搜索横幅 ---------- */
.hero-banner {
    background: linear-gradient(135deg, #1677ff 0%, #4096ff 50%, #69b1ff 100%);
    border-radius: 12px;
    padding: 40px 36px 36px;
    margin-bottom: 22px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero-banner::after {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.hero-banner h1 { font-size: 30px; font-weight: 700; margin-bottom: 8px; position: relative; z-index: 1; }
.hero-banner .hero-desc { font-size: 15px; opacity: .9; margin-bottom: 22px; position: relative; z-index: 1; }
.hero-search {
    display: flex;
    max-width: 520px;
    height: 46px;
    border-radius: 23px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    position: relative; z-index: 1;
}
.hero-search input { flex: 1; border: none; padding: 0 20px; font-size: 15px; color: #333; }
.hero-search input::placeholder { color: #bbb; }
.hero-search button {
    border: none; background: #1677ff; color: #fff;
    padding: 0 28px; font-size: 15px; font-weight: 500; cursor: pointer;
    transition: background .2s;
}
.hero-search button:hover { background: #0958d9; }
.hero-stats { display: flex; gap: 32px; margin-top: 22px; position: relative; z-index: 1; }
.hero-stats .stat-num { font-size: 26px; font-weight: 700; line-height: 1.2; }
.hero-stats .stat-label { font-size: 13px; opacity: .85; margin-top: 2px; }

/* ---------- 文章页：书籍详情 ---------- */
.book-detail { display: flex; gap: 28px; flex-wrap: wrap; }
.book-cover { flex-shrink: 0; }
.book-cover img {
    width: 140px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.book-meta { flex: 1; min-width: 280px; }
.book-title { font-size: 24px; color: #1a1a1a; margin-bottom: 10px; font-weight: 700; }
.book-author { color: #666; font-size: 15px; margin-bottom: 12px; }
.book-desc { color: #555; font-size: 14px; line-height: 1.8; margin-bottom: 16px; }
.book-tags { margin-bottom: 18px; }
.book-tags a {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 6px 6px 0;
    background: #f0f5ff;
    color: #1677ff;
    border-radius: 14px;
    font-size: 13px;
    border: 1px solid #d6e4ff;
    transition: all .2s;
}
.book-tags a:hover { background: #1677ff; color: #fff; border-color: #1677ff; }
.book-download-bar { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, #1677ff, #4096ff);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
}
.btn:hover { opacity: .9; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-outline {
    background: transparent;
    border: 1px solid #1677ff;
    color: #1677ff;
}
.btn-outline:hover { background: #1677ff; color: #fff; }

/* ---------- 文章页：内容排版 ---------- */
.cd-title {
    font-size: 26px;
    color: #1a1a1a;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 700;
}
.cd-meta { color: #999; font-size: 13px; margin-bottom: 14px; }
.cd-meta span { margin-right: 18px; }
.cd-detail { font-size: 15px; color: #444; word-break: break-word; line-height: 1.9; }
.cd-detail p { margin-bottom: 12px; }

/* ---------- 书籍列表 ---------- */
.book-list { overflow: hidden; }
.book-list li {
    padding: 8px 10px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.book-list li:last-child { border-bottom: none; }
.book-list li a {
    color: #333;
    font-size: 14px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.book-list li a:hover { color: #1677ff; }
.book-list li span {
    color: #999;
    font-size: 13px;
    flex-shrink: 0;
    margin-left: 12px;
}

/* ---------- 下载页 ---------- */
.download-list { overflow: hidden; }
.download-list li {
    float: left;
    width: 50%;
    padding: 8px 10px;
}
.download-list li a {
    display: block;
    padding: 12px 16px;
    background: #f6f9ff;
    border: 1px solid #d6e4ff;
    border-radius: 6px;
    color: #1677ff;
    font-size: 14px;
    text-align: center;
    transition: all .2s;
}
.download-list li a:hover {
    background: #1677ff;
    color: #fff;
    border-color: #1677ff;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .hero-banner { padding: 28px 20px 24px; }
    .hero-banner h1 { font-size: 22px; }
    .hero-search { height: 40px; }
    .hero-search button { padding: 0 18px; }
    .hero-stats { gap: 20px; }
    .hero-stats .stat-num { font-size: 20px; }
    .book-detail { flex-direction: column; align-items: center; text-align: center; }
    .book-meta { text-align: left; }
    .book-download-bar { justify-content: center; }
    .cd-title { font-size: 20px; }
    .card { padding: 18px 16px; }
    .download-list li { width: 100%; }
}
