/* ============================================================
   前台内容组件（依赖 shell.css 的骨架）
   ============================================================ */

/* 列表页 */
.item-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.item-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: #fbfcfd; text-decoration: none; color: var(--text); transition: border-color 0.15s, background 0.15s; }
.item-row:hover { border-color: var(--accent); background: var(--accent-soft); }
.item-title { font-weight: 500; }
.item-meta { color: var(--text-muted); font-size: 12px; flex: none; }

/* 软件/图书详情头部 */
.software-head { display: flex; gap: 18px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.software-icon { width: 54px; height: 54px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #3b6ea5, #6a93c0); color: #fff; box-shadow: var(--shadow-sm); }
.software-icon svg { width: 28px; height: 28px; fill: #fff; }
.software-icon.book-tone { background: linear-gradient(135deg, #8a5bb8, #b08fd6); }
.software-head .meta { flex: 1; }
.software-head h1 { margin: 0; font-size: 21px; }
.software-head .ver { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

.download-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.15s, transform 0.05s; }
.download-btn:hover { background: #335d8c; text-decoration: none; color: #fff; }
.download-btn:active { transform: translateY(1px); }
.download-btn svg { width: 16px; height: 16px; fill: #fff; }

.dl-list { list-style: none; padding: 0; margin: 0; }
.dl-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; background: #fbfcfd; }
.dl-list .dl-name { font-weight: 500; }
.dl-list .dl-meta { color: var(--text-muted); font-size: 12px; }

.changelog { list-style: none; padding: 0; margin: 0; }
.changelog li { position: relative; padding: 10px 0 10px 20px; border-left: 1px solid var(--border); margin-left: 6px; }
.changelog li::before { content: ""; position: absolute; left: -5px; top: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.changelog .cl-ver { font-weight: 600; }
.changelog .cl-date { color: var(--text-muted); font-size: 12px; margin-left: 8px; }
.changelog .cl-body { color: var(--text-secondary); margin-top: 2px; }

/* 图书阅读 */
.reader-toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.reader-toolbar button { padding: 4px 10px; font-size: 13px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; cursor: pointer; }
.reader-toolbar button:hover { border-color: var(--accent); color: var(--accent); }
.reader { background: #fbfcfd; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; line-height: 2; font-size: 15px; }
.reader-para { margin: 0 0 0.5em; text-indent: 2em; word-break: break-word; white-space: pre-wrap; }
.reader-toolbar select { padding: 4px 8px; font-size: 13px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; max-width: 240px; }
.reader-meta { font-size: 12px; color: var(--muted, #888); align-self: center; }
.reader-loading { padding: 12px 24px; text-align: center; color: var(--muted, #888); font-size: 13px; }
.chapter-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; }

/* 收藏/图书：单页分组 + 搜索 */
.bm-search { display: flex; align-items: center; gap: 6px; margin: 16px 0; padding: 8px 10px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.bm-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 110, 165, 0.12); }
.bm-search input { border: none; outline: none; flex: 1; font-size: 13px; background: transparent; min-width: 0; padding: 0; }
.bm-group { margin-bottom: 22px; }
.bm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.bm-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: #fbfcfd; text-decoration: none; color: var(--text); transition: border-color 0.15s, background 0.15s; }
.bm-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.bm-title { font-weight: 600; }
.bm-desc { color: var(--text-muted); font-size: 12px; }

/* 欢迎页 */
.welcome { text-align: center; padding: 30px 10px; }
.welcome .w-icon { width: 46px; height: 46px; fill: var(--accent); margin-bottom: 14px; }
.welcome h1 { margin-bottom: 10px; }
.welcome p { color: var(--text-secondary); max-width: 460px; margin: 0 auto 14px; white-space: pre-line; }

mark { background: #fff1a8; border-radius: 2px; padding: 0 1px; }

/* 在线工具：UTF-8 转码 */
.utf8-tool { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.utf8-drop { border: 2px dashed var(--border); border-radius: var(--radius); padding: 30px 20px; text-align: center; cursor: pointer; background: #fbfcfd; transition: border-color 0.15s, background 0.15s; }
.utf8-drop:hover, .utf8-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.utf8-drop-title { margin: 0 0 6px; font-weight: 600; }
.utf8-drop-hint { margin: 0; color: var(--text-muted); font-size: 12px; }
.utf8-options { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.utf8-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.utf8-field select { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; font-size: 13px; }
