.book-reader-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 208, 122, 0.35), transparent 30%),
        radial-gradient(circle at top right, rgba(120, 190, 255, 0.25), transparent 28%),
        linear-gradient(180deg, #fff6e7 0%, #f5fbff 100%);
    padding: 20px;
}

.book-reader-header,
.book-reader-actions,
.book-library-columns,
.book-reader-overlay-dock,
.book-progress {
    display: flex;
    gap: 16px;
}

.book-reader-header,
.book-progress {
    justify-content: space-between;
    align-items: center;
}

.book-reader-kicker,
#readerMeta,
.book-library-note,
.book-book-meta,
.book-series-meta {
    font-size: 12px;
    color: #6a7280;
}

.book-library-screen,
.book-reader-screen {
    margin-top: 18px;
}

.book-library-columns {
    align-items: flex-start;
    margin-top: 18px;
}

.book-library-columns .card {
    flex: 1;
}

.book-series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.book-series-card,
.book-book-item {
    border: 1px solid rgba(27, 52, 88, 0.12);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.book-series-card:hover,
.book-book-item:hover {
    transform: translateY(-2px);
}

.book-series-card.active,
.book-book-item.active {
    border-color: #ff8c42;
    box-shadow: 0 12px 28px rgba(255, 140, 66, 0.18);
}

.book-series-card img,
.book-book-thumb img,
#pageImage {
    width: 100%;
    display: block;
}

.book-series-card img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.book-series-copy,
.book-book-copy {
    padding: 6px 8px;
}

.book-series-title,
.book-book-title {
    font-size: 12px;
    font-weight: 700;
    color: #1f2a36;
}

.book-series-meta {
    margin-top: 4px;
}

.book-level-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.book-level-chip {
    border: 1px solid rgba(27, 52, 88, 0.12);
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
}

.book-level-chip.active {
    background: #ffefe2;
    border-color: #ff8c42;
    color: #9a4f15;
}

.book-book-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.book-book-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.book-book-thumb {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    position: relative;
    background: #e8e8e8;
}

.book-book-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-read-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(100, 180, 100, 0.85);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
}

.book-book-copy {
    padding: 6px 8px;
}

.book-book-order {
    display: none;
}

.book-book-title {
    font-size: 11px;
    font-weight: 600;
    color: #1f2a36;
    line-height: 1.25;
}

.book-book-meta {
    display: none;
}

.book-stage {
    padding: 18px;
    touch-action: pan-y;
    user-select: none;
}

.book-progress {
    margin: 14px 0 18px;
}

.book-progress-bar {
    flex: 1;
    height: 10px;
    background: rgba(31, 55, 92, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.book-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ff9a3d 0%, #ffcc5c 100%);
    transition: width 180ms ease;
}

.book-page-frame {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(27, 52, 88, 0.08);
}

.book-page-copy {
    margin-top: 16px;
}

.book-page-text {
    margin-top: 6px;
    font-size: 22px;
    line-height: 1.45;
    color: #1f2a36;
}

.book-page-text-zh {
    font-size: 18px;
    color: #5b6472;
}

.book-reader-exit-btn,
.book-reader-overlay-dock {
    display: none;
}

body.book-reader-body-immersive {
    overflow: hidden;
    background: #07111f;
}

.book-reader-shell.reader-immersive {
    padding: 0;
    background: #07111f;
}

.book-reader-shell.reader-immersive .book-reader-header {
    display: none;
}

.book-reader-shell.reader-immersive .book-reader-screen {
    position: fixed;
    inset: 0;
    margin: 0;
    z-index: 40;
    background:
        radial-gradient(circle at top left, rgba(255, 194, 84, 0.22), transparent 24%),
        radial-gradient(circle at top right, rgba(74, 144, 226, 0.22), transparent 20%),
        linear-gradient(180deg, #0a1424 0%, #07111f 100%);
}

.book-reader-shell.reader-immersive .book-reader-exit-btn {
    display: none;
}

.book-reader-shell.reader-immersive .book-reader-overlay-dock {
    display: none;
}

.book-reader-shell.reader-immersive .book-reader-controls-peek {
    display: flex;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 55;
    width: 28px;
    height: 48px;
    background: rgba(7, 17, 31, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
}

.book-reader-shell.reader-immersive .book-reader-controls-panel {
    display: none;
    position: fixed;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 55;
    flex-direction: column;
    gap: 8px;
    padding: 12px 10px;
    background: rgba(7, 17, 31, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.book-reader-shell.reader-immersive .book-reader-controls-panel .btn {
    min-width: 64px;
    font-size: 13px;
}

.book-reader-shell.reader-immersive.controls-visible .book-reader-controls-peek {
    display: none;
}

.book-reader-shell.reader-immersive.controls-visible .book-reader-controls-panel {
    display: flex;
}

.book-reader-shell.reader-immersive .book-stage {
    height: 100dvh;
    margin: 0;
    padding: 20px 20px 92px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.book-reader-shell.reader-immersive .book-progress {
    margin: 0 0 16px;
}

.book-reader-shell.reader-immersive .book-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.14);
}

.book-reader-shell.reader-immersive .book-reader-canvas {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.book-reader-shell.reader-immersive .book-page-frame {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.book-reader-shell.reader-immersive #pageImage {
    width: auto;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    object-fit: contain;
}

.book-reader-shell.reader-immersive .book-page-copy {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 22px;
    border-radius: 0 0 24px 24px;
    background: rgba(7, 17, 31, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    backdrop-filter: blur(16px);
    margin-top: 0;
}

.book-reader-shell.reader-immersive .book-page-text {
    font-size: clamp(14px, 1.6vw, 20px);
    line-height: 1.55;
    color: #f8fafc;
}

.book-reader-shell.reader-immersive .book-page-text-zh {
    margin-top: 0;
    display: none;
}

@media (max-width: 960px) {
    .book-library-columns {
        flex-direction: column;
    }

    .book-book-item {
        flex-direction: column;
    }

    .book-book-thumb {
        width: 100%;
        min-width: 0;
    }

    .book-book-thumb img {
        aspect-ratio: 4 / 3;
    }

    .book-page-text {
        font-size: 18px;
    }

    .book-reader-shell.reader-immersive .book-stage {
        padding: 14px 12px 88px;
    }

    .book-reader-shell.reader-immersive .book-page-copy {
        padding: 16px;
    }

    .book-reader-shell.reader-immersive .book-page-text {
        font-size: 18px;
    }

    .book-reader-shell.reader-immersive .book-page-text-zh {
        font-size: 16px;
    }
}
