/* ============================================================
   阅读记录 reading.s1.css
   靛蓝紫渐变主题 + 玻璃拟态，移动端自适应
   ============================================================ */

.read-card {
    background: linear-gradient(160deg, rgba(255,255,255,0.96), rgba(238,242,255,0.92));
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.10);
    padding: 22px;
    position: relative;
    overflow: hidden;
}
.read-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(139,92,246,0.10), transparent 70%);
    pointer-events: none;
}
.read-card::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(99,102,241,0.08), transparent 70%);
    pointer-events: none;
}
.read-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
    animation: read-breath 3s ease-in-out infinite;
}
@keyframes read-breath {
    0%, 100% { box-shadow: 0 6px 18px rgba(99,102,241,0.35); }
    50% { box-shadow: 0 6px 26px rgba(139,92,246,0.55); }
}

/* ---------- 登录引导 ---------- */
.read-login-guide { text-align: center; padding: 34px 16px 26px; position: relative; z-index: 1; }
.read-login-guide i { font-size: 40px; background: linear-gradient(135deg,#6366f1,#8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.read-login-guide h3 { margin: 12px 0 6px; font-size: 1.05rem; color: #1e293b; }
.read-login-guide p { margin: 0 0 18px; font-size: 0.85rem; color: #64748b; }
.read-login-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.read-login-btns a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 26px; border-radius: 999px; text-decoration: none;
    font-size: 0.9rem; font-weight: 600; transition: all .25s ease;
}
.read-login-btns a.main { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; box-shadow: 0 6px 16px rgba(99,102,241,0.35); }
.read-login-btns a.main:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(139,92,246,0.45); }
.read-login-btns a.ghost { border: 1.5px solid rgba(99,102,241,0.45); color: #4f46e5; background: rgba(255,255,255,0.7); }
.read-login-btns a.ghost:hover { background: rgba(99,102,241,0.08); }

/* ---------- Tabs ---------- */
.read-tabs {
    display: flex; gap: 5px; margin: 6px 0 16px;
    background: rgba(224,231,255,0.55); border: 1px solid rgba(99,102,241,0.28);
    padding: 5px; border-radius: 14px;
    position: relative; z-index: 1;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.read-tabs::-webkit-scrollbar { display: none; }
.read-tab {
    flex: 1 0 auto; border: none; background: transparent; cursor: pointer;
    padding: 9px 12px; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
    color: #94a3b8; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    transition: all .22s ease; white-space: nowrap;
}
.read-tab i { font-size: 0.8rem; }
.read-tab:hover { color: #4f46e5; }
.read-tab.active {
    background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.read-pane { display: none; animation: read-slide-in .3s ease; position: relative; z-index: 1; }
.read-pane.active { display: block; }
@keyframes read-slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 概览卡 ---------- */
.read-overview-card {
    display: flex; align-items: center; justify-content: space-around; gap: 8px;
    background: linear-gradient(135deg, #eef2ff 0%, #ede9fe 100%);
    border-radius: 16px; padding: 16px 12px;
    border: 1px solid rgba(99,102,241,0.3);
    box-shadow: 0 6px 20px rgba(99,102,241,0.10);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.read-ov-item { text-align: center; flex: 1; min-width: 60px; }
.read-ov-num { font-size: 1.5rem; font-weight: 800; color: #4338ca; line-height: 1.1; }
.read-ov-label { font-size: 0.75rem; color: #4f46e5; margin-top: 4px; font-weight: 500; }
.read-ov-divider { width: 1px; height: 32px; background: rgba(99,102,241,0.2); }

/* ---------- 添加按钮 ---------- */
.read-add-row { margin-bottom: 16px; }
.read-add-btn {
    width: 100%; border: 1.5px dashed rgba(99,102,241,0.4); cursor: pointer;
    padding: 12px; border-radius: 12px;
    font-size: 0.9rem; font-weight: 600; color: #4f46e5;
    background: rgba(99,102,241,0.04);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .2s ease;
}
.read-add-btn:hover { background: rgba(99,102,241,0.1); border-color: #6366f1; transform: translateY(-1px); }

/* ---------- 书籍列表 ---------- */
.read-list { display: flex; flex-direction: column; gap: 10px; }
.read-book-item {
    display: flex; gap: 12px;
    background: rgba(255,255,255,0.8); border: 1px solid rgba(99,102,241,0.15);
    border-radius: 14px; padding: 12px;
    transition: all .2s;
}
.read-book-item:hover { box-shadow: 0 6px 18px rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.3); }
.read-cover {
    width: 50px; height: 70px; border-radius: 6px; flex-shrink: 0;
    background: linear-gradient(135deg,#c7d2fe,#a5b4fc);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.2rem; overflow: hidden;
}
.read-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.read-book-body { flex: 1; min-width: 0; }
.read-book-title { font-size: 0.92rem; font-weight: 700; color: #1e293b; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.read-book-author { font-size: 0.78rem; color: #64748b; margin-bottom: 4px; }
.read-book-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.read-book-cat { font-size: 0.7rem; background: rgba(99,102,241,0.1); color: #4f46e5; padding: 2px 8px; border-radius: 999px; }
.read-book-status { font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.read-book-status.s1 { background: rgba(99,102,241,0.12); color: #4f46e5; }
.read-book-status.s2 { background: rgba(16,185,129,0.12); color: #059669; }
.read-book-status.s3 { background: rgba(245,158,11,0.12); color: #d97706; }
.read-book-dates { font-size: 0.72rem; color: #94a3b8; }

/* 进度条 */
.read-progress-wrap { margin-top: 6px; }
.read-progress-head { display: flex; justify-content: space-between; font-size: 0.72rem; color: #64748b; margin-bottom: 3px; }
.read-progress-track { height: 6px; background: rgba(99,102,241,0.1); border-radius: 999px; overflow: hidden; }
.read-progress-fill { height: 100%; background: linear-gradient(90deg,#6366f1,#8b5cf6); border-radius: 999px; transition: width .4s ease; }

/* 评分星 */
.read-stars { display: inline-flex; gap: 1px; }
.read-stars i { font-size: 0.8rem; color: #e2e8f0; }
.read-stars i.on { color: #f59e0b; }

/* 笔记预览 */
.read-note-preview {
    margin-top: 6px; font-size: 0.78rem; color: #64748b;
    background: rgba(248,250,252,0.8); border-left: 3px solid #a5b4fc;
    padding: 6px 10px; border-radius: 4px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.read-book-actions { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.read-book-btn { border: none; background: rgba(99,102,241,0.08); color: #4f46e5; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 0.8rem; transition: all .2s; }
.read-book-btn:hover { background: rgba(99,102,241,0.18); }
.read-book-btn.del { color: #ef4444; background: rgba(239,68,68,0.08); }
.read-book-btn.del:hover { background: rgba(239,68,68,0.18); }

.read-empty { text-align: center; padding: 36px 16px; color: #94a3b8; }
.read-empty i { font-size: 2.2rem; margin-bottom: 10px; opacity: 0.4; }
.read-empty div { font-size: 0.88rem; }

/* ---------- 统计 ---------- */
.read-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px; }
.read-stat-card {
    background: rgba(255,255,255,0.8); border-radius: 14px; padding: 14px;
    border: 1px solid rgba(99,102,241,0.18);
}
.read-stat-card.wide { margin-bottom: 18px; }
.read-stat-card.c1 { background: linear-gradient(135deg, #eef2ff, #fff); }
.read-stat-card.c2 { background: linear-gradient(135deg, #d1fae5, #fff); }
.read-stat-card.c3 { background: linear-gradient(135deg, #fef3c7, #fff); }
.read-stat-card.c4 { background: linear-gradient(135deg, #ede9fe, #fff); }
.read-stat-label { font-size: 0.78rem; color: #64748b; margin-bottom: 6px; }
.read-stat-label i { margin-right: 4px; }
.read-stat-value { font-size: 1.5rem; font-weight: 800; color: #1e293b; }

.read-top-title { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 700; color: #4338ca; margin: 18px 0 12px; }
.read-top-title i { color: #6366f1; }

.read-cat-dist { display: flex; flex-direction: column; gap: 8px; }
.read-cat-bar { display: flex; align-items: center; gap: 10px; }
.read-cat-bar .read-cat-name { width: 70px; font-size: 0.82rem; color: #475569; font-weight: 500; text-align: right; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.read-cat-bar .read-cat-track { flex: 1; height: 8px; background: rgba(99,102,241,0.1); border-radius: 999px; overflow: hidden; }
.read-cat-bar .read-cat-fill { height: 100%; background: linear-gradient(90deg,#6366f1,#8b5cf6); border-radius: 999px; transition: width .5s ease; }
.read-cat-bar .read-cat-count { font-size: 0.78rem; color: #94a3b8; min-width: 36px; text-align: right; }

/* ---------- Toast ---------- */
.read-toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: #fff; padding: 12px 20px; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 10px;
    font-size: 0.88rem; font-weight: 500; z-index: 999999;
    border-left: 4px solid #6366f1;
    animation: read-toast-in .3s ease;
    max-width: 90vw;
}
.read-toast.success { border-left-color: #10b981; }
.read-toast.error { border-left-color: #ef4444; }
.read-toast.warning { border-left-color: #f59e0b; }
.read-toast.info { border-left-color: #3b82f6; }
.read-toast i { font-size: 1rem; }
.read-toast.success i { color: #10b981; }
.read-toast.error i { color: #ef4444; }
.read-toast.warning i { color: #f59e0b; }
.read-toast.info i { color: #3b82f6; }
@keyframes read-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(-15px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---------- 弹窗 ---------- */
.read-modal-mask {
    position: fixed; inset: 0; background: rgba(15,23,42,0.45);
    z-index: 999998; display: flex; align-items: center; justify-content: center;
    padding: 16px; animation: read-fade .2s ease;
}
@keyframes read-fade { from { opacity: 0; } to { opacity: 1; } }
.read-modal {
    background: #fff; border-radius: 18px; max-width: 460px; width: 100%;
    padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: read-pop .25s ease;
    max-height: 88vh; overflow-y: auto;
}
@keyframes read-pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.read-modal-title { font-size: 1.05rem; font-weight: 700; color: #4338ca; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.read-modal-title i { color: #6366f1; }

.read-form-field { margin-bottom: 14px; }
.read-form-field label { display: block; font-size: 0.82rem; font-weight: 600; color: #475569; margin-bottom: 6px; }
.read-form-field label i { color: #6366f1; margin-right: 4px; }
.read-form-field input[type="text"], .read-form-field input[type="number"], .read-form-field input[type="date"], .read-form-field textarea, .read-form-field select {
    width: 100%; box-sizing: border-box;
    padding: 10px 12px; border: 1.5px solid rgba(99,102,241,0.22);
    border-radius: 10px; font-size: 0.88rem; color: #1e293b;
    background: #fff; font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.read-form-field textarea { resize: vertical; min-height: 70px; }
.read-form-field input:focus, .read-form-field textarea:focus, .read-form-field select:focus {
    outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.read-form-row { display: flex; gap: 10px; }
.read-form-row .read-form-field { flex: 1; }

/* 状态选择 */
.read-status-grid { display: flex; gap: 8px; }
.read-status-item {
    flex: 1; text-align: center; padding: 10px 6px;
    border: 1.5px solid rgba(99,102,241,0.22); border-radius: 10px;
    cursor: pointer; transition: all .2s; background: #fff;
}
.read-status-item i { font-size: 1.1rem; }
.read-status-item .read-rs-name { font-size: 0.78rem; color: #64748b; margin-top: 3px; }
.read-status-item.active { background: rgba(99,102,241,0.08); border-color: #6366f1; }
.read-status-item.active .read-rs-name { color: #4338ca; font-weight: 700; }

/* 评分星选择 */
.read-rating-picker { display: inline-flex; gap: 4px; }
.read-rating-picker i { font-size: 1.5rem; color: #e2e8f0; cursor: pointer; transition: color .15s; }
.read-rating-picker i.on { color: #f59e0b; }

.read-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.read-modal-btn {
    flex: 1; border: none; cursor: pointer; padding: 11px; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600; transition: all .2s;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.read-modal-btn.primary { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.read-modal-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(139,92,246,0.4); }
.read-modal-btn.ghost { background: rgba(99,102,241,0.08); color: #4f46e5; }
.read-modal-btn.ghost:hover { background: rgba(99,102,241,0.16); }

/* 详情弹窗 */
.read-detail-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.85rem; }
.read-detail-row:last-child { border-bottom: none; }
.read-detail-row .read-dr-label { color: #64748b; }
.read-detail-row .read-dr-val { font-weight: 600; color: #1e293b; text-align: right; max-width: 60%; }
.read-detail-note { margin-top: 8px; padding: 10px 12px; background: rgba(248,250,252,0.9); border-left: 3px solid #a5b4fc; border-radius: 6px; font-size: 0.82rem; color: #475569; line-height: 1.6; white-space: pre-wrap; }

/* ---------- 响应式 ---------- */
@media (max-width: 600px) {
    .read-card { padding: 14px; border-radius: 16px; }
    .read-tab { padding: 8px 10px; font-size: 0.78rem; }
    .read-tab i { display: none; }
    .read-overview-card { padding: 12px 8px; gap: 4px; }
    .read-ov-num { font-size: 1.2rem; }
    .read-ov-label { font-size: 0.7rem; }
    .read-ov-divider { height: 24px; }
    .read-stat-grid { gap: 8px; }
    .read-stat-card { padding: 12px; }
    .read-stat-value { font-size: 1.25rem; }
    .read-modal { padding: 16px; border-radius: 14px; }
    .read-form-row { flex-direction: column; gap: 0; }
    .read-book-actions { flex-direction: row; }
}
