:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5A4BD1;
    --accent: #FF6B6B;
    --accent-light: #FFA8A8;
    --bg: #F8F9FA;
    --bg-card: #FFFFFF;
    --text: #2D3436;
    --text-secondary: #636E72;
    --text-light: #B2BEC3;
    --border: #E9ECEF;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-reading: 'Noto Serif SC', serif;
    --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --reader-bg: #FFFFFF;
    --reader-text: #2D3436;
    --reader-line-height: 2;
    --reader-font-size: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.section { margin-bottom: 24px; }

.section-header {
    padding: 0 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.page-header {
    padding: 20px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-btn svg { width: 20px; height: 20px; fill: var(--text-secondary); }

/* ========== 活体指示器 ========== */
.living-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--accent);
    font-weight: 500;
}

.living-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: living-pulse 1.5s infinite;
}

@keyframes living-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,107,107,0.4); }
    50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(255,107,107,0); }
}

/* ========== 书架页 ========== */
.currently-reading {
    padding: 0 20px;
}

.reading-card {
    background: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
    border-radius: var(--radius-lg);
    padding: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.reading-card:active { transform: scale(0.98); }

.reading-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.reading-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.reading-card-progress {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 12px;
}

.reading-card-bar {
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
}

.reading-card-bar-fill {
    height: 100%;
    background: #fff;
    border-radius: 4px;
    transition: width 0.5s;
}

.reading-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 12px;
    opacity: 0.7;
}

.reading-characters {
    display: flex;
    gap: -8px;
}

.reading-char-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-left: -8px;
}

.reading-char-avatar:first-child { margin-left: 0; }

/* 书籍网格 */
.book-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 20px;
}

.book-item {
    cursor: pointer;
    transition: var(--transition);
}

.book-item:active { transform: scale(0.95); }

.book-cover {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #DFE6E9, #B2BEC3);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.book-cover-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.book-cover-living {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00B894;
    animation: living-pulse 2s infinite;
}

.book-name {
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ========== 响应式 ========== */
@media (min-width: 768px) {
    .book-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }