.book-section {
    max-width: 1280px;
    margin: 0 auto 48px;
    padding: 28px 18px 36px;
    border-radius: 8px;
    background: linear-gradient(145deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-family: Arial, Helvetica, sans-serif;
}

.book-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    padding: 6px 40px 30px;
}

.book-heading > div {
    flex: 1 1 420px;
    min-width: 0;
}

.book-label {
    color: #f13625;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.82rem;
    font-weight: 800;
}

.book-heading h2 {
    margin: 8px 0 10px;
    color: #111827;
    font-size: clamp(1.45rem, 4vw, 2.5rem);
    line-height: 1.12;
    max-width: 16ch;
}

.book-summary {
    max-width: 760px;
    color: #475569;
    line-height: 1.6;
    font-size: clamp(0.95rem, 2vw, 1rem);
}

.book-start-btn,
.nav-btn {
    border: none;
    border-radius: 4px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f13625, #ff7a59);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(241, 54, 37, 0.18);
}

.book-start-btn:hover,
.nav-btn:hover {
    transform: translateY(-1px);
}

.book-shell {
    display: flex;
    align-items: stretch;
    gap: 14px;
    min-height: 620px;
    perspective: 1800px;
    padding: 12px 10px 12px 8px;
    position: relative;
    border-radius: 32px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.85), rgba(241,245,249,0.95)),
        linear-gradient(90deg, rgba(15,23,42,0.02), rgba(15,23,42,0.02));
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        inset 0 -6px 18px rgba(15,23,42,0.08),
        0 28px 44px rgba(15,23,42,0.18);
}

.book-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 32px;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.55) 0%, transparent 12%, transparent 88%, rgba(255,255,255,0.55) 100%),
        radial-gradient(circle at top, rgba(255,255,255,0.65), transparent 35%);
}

.book-spine {
    width: 42px;
    border-radius: 18px 6px 6px 18px;
    background:
        linear-gradient(180deg, #2a241f 0%, #4a3727 32%, #171717 55%, #0b1220 100%);
    color: #fff;
    writing-mode: vertical-rl;
    display: grid;
    place-items: center;
    letter-spacing: 0.35em;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow:
        8px 0 18px rgba(15, 23, 42, 0.42) inset,
        0 16px 30px rgba(15, 23, 42, 0.2),
        -4px 0 10px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.16);
    position: relative;
    z-index: 2;
}

.book-pages {
    display: flex;
    flex: 1;
    gap: 18px;
    position: relative;
    filter: drop-shadow(0 18px 18px rgba(15, 23, 42, 0.18));
    align-items: stretch;
}

.book-page {
    display: none;
    flex: 1;
    min-height: 560px;
    background:
        linear-gradient(145deg, #ffffff 0%, #f8fbff 100%),
        linear-gradient(90deg, rgba(255,255,255,0.75), transparent 18%);
    border-radius: 18px 26px 26px 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow:
        0 18px 35px rgba(15, 23, 42, 0.14),
        10px 10px 0 rgba(17, 24, 39, 0.12),
        inset 0 1px 0 rgba(255,255,255,0.92),
        inset -8px 0 12px rgba(15, 23, 42, 0.02);
    padding: 18px 18px 20px;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.book-page::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px 26px 26px 18px;
    background:
        linear-gradient(120deg, rgba(255,255,255,0.25), transparent 20%),
        linear-gradient(180deg, rgba(255,255,255,0.12), transparent 18%, transparent 82%, rgba(15,23,42,0.05));
    pointer-events: none;
}

.book-page::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    bottom: 8px;
    width: 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(148,163,184,0.18), rgba(148,163,184,0.45));
    opacity: 0.7;
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.35);
}

.book-page.active {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-page.cover {
    background:
        radial-gradient(circle at top, rgba(255,255,255,0.8), rgba(255,255,255,0.15) 28%),
        linear-gradient(145deg, #1f2937 0%, #111827 45%, #0f172a 100%);
    color: #eff6ff;
    border-color: rgba(148, 163, 184, 0.2);
}

.book-page.cover h3,
.book-page.cover p,
.book-page.cover li,
.book-page.cover .page-note,
.book-page.cover .page-tag {
    color: #f8fafc;
}

.book-page.cover .page-tag {
    background: rgba(241, 54, 37, 0.16);
}

.book-page.back-cover {
    background:
        linear-gradient(145deg, #111827 0%, #172554 45%, #111827 100%);
    color: #eff6ff;
    border-color: rgba(148, 163, 184, 0.18);
}

.book-page.back-cover h3,
.book-page.back-cover p,
.book-page.back-cover li,
.book-page.back-cover .page-note,
.book-page.back-cover .page-tag {
    color: #eff6ff;
}

.book-page.back-cover .page-tag {
    background: rgba(248, 250, 252, 0.12);
}

.book-shell.is-flipping .book-page.active {
    animation: pageTurn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    transform-origin: left center;
}

.page-tag {
    display: inline-block;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(241, 54, 37, 0.12);
    color: #f13625;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 800;
}

.book-page h3 {
    margin: 10px 0 8px;
    color: #111827;
    font-size: 1.3rem;
}

.book-page p,
.book-page li,
.book-page code {
    color: #334155;
    line-height: 1.6;
}

.book-page pre {
    padding: 10px;
    border-radius: 4px;
    background: #111827;
    color: #eff6ff;
    overflow-x: auto;
}

.book-page code {
    color: #f8fafc;
}

.page-explain {
    font-size: 0.95rem;
    color: #475569;
}

.page-note {
    border-top: 1px dashed rgba(148, 163, 184, 0.4);
    padding-top: 10px;
    color: #0f172a;
    font-weight: 600;
}

.book-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
    padding: 0 14px;
}

.jump-label {
    color: #334155;
    font-size: 0.95rem;
}

.page-input {
    width: 70px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    padding: 8px 10px;
}

.page-indicator {
    color: #475569;
    margin: 8px 0 0;
    font-size: 0.95rem;
}

@keyframes pageTurn {
    0% { transform: rotateY(0deg); }
    20% { transform: rotateY(-10deg) translateX(2px); }
    55% { transform: rotateY(-70deg); box-shadow: 20px 0 30px rgba(15,23,42,0.18); }
    100% { transform: rotateY(-4deg); }
}

@media (max-width: 1100px) {
    .book-section {
        padding: 22px 14px 30px;
    }

    .book-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .book-heading > div {
        flex-basis: 100%;
    }

    .book-summary {
        max-width: 100%;
    }

    .book-shell {
        min-height: auto;
        padding: 10px;
    }

    .book-pages {
        gap: 14px;
    }
}

@media (max-width: 820px) {
    .book-shell {
        flex-direction: column;
        gap: 10px;
    }

    .book-spine {
        width: 100%;
        min-height: 44px;
        writing-mode: horizontal-tb;
        border-radius: 14px;
        letter-spacing: 0.18em;
        font-size: 0.72rem;
    }

    .book-pages {
        flex-direction: column;
        gap: 12px;
    }

    .book-page {
        min-height: 320px;
        border-radius: 18px;
    }

    .book-page::after {
        width: 8px;
        top: 6px;
        right: 6px;
        bottom: 6px;
    }
}

@media (max-width: 640px) {
    .book-section {
        padding: 18px 10px 24px;
        border-radius: 18px;
    }

    .book-heading {
        gap: 10px;
        margin-bottom: 14px;
    }

    .book-heading h2 {
        font-size: 1.45rem;
        line-height: 1.18;
        max-width: 100%;
    }

    .book-summary {
        font-size: 0.95rem;
    }

    .book-start-btn {
        width: 100%;
        justify-content: center;
    }

    .book-page {
        padding: 14px;
        min-height: auto;
    }

    .book-page h3 {
        font-size: 1.1rem;
    }

    .book-page p,
    .book-page li,
    .book-page code,
    .page-explain,
    .page-note {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .book-controls {
        align-items: stretch;
        gap: 8px;
    }

    .nav-btn {
        flex: 1 1 45%;
    }

    .page-input {
        width: 100%;
        box-sizing: border-box;
    }

    .jump-label {
        width: 100%;
    }

    .page-indicator {
        font-size: 0.92rem;
    }
}
