.doc-reader-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #14532d 100%);
    color: #f8fafc;
    padding: 1.75rem 0 1.25rem;
}

.doc-reader-breadcrumb .breadcrumb {
    --bs-breadcrumb-divider-color: rgba(248, 250, 252, 0.45);
    margin-bottom: 0;
}

.doc-reader-breadcrumb .breadcrumb-item a {
    color: rgba(248, 250, 252, 0.85);
    text-decoration: none;
}

.doc-reader-breadcrumb .breadcrumb-item a:hover {
    color: #fff;
}

.doc-reader-breadcrumb .breadcrumb-item.active {
    color: rgba(248, 250, 252, 0.65);
}

.doc-reader-hero h1 {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.doc-reader-stage {
    position: relative;
    min-height: calc(100vh - 280px);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(46, 125, 50, 0.08) 0%, transparent 55%),
        linear-gradient(180deg, #e8eef3 0%, #d5dee8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem 2rem;
    overflow: hidden;
}

body.dark-mode .doc-reader-stage {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(46, 125, 50, 0.12) 0%, transparent 55%),
        linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

.doc-reader-loading {
    text-align: center;
    color: #334155;
}

body.dark-mode .doc-reader-loading {
    color: #cbd5e1;
}

.doc-reader-loading__spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(46, 125, 50, 0.2);
    border-top-color: #2e7d32;
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: docReaderSpin 0.8s linear infinite;
}

@keyframes docReaderSpin {
    to { transform: rotate(360deg); }
}

.doc-reader-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12);
    z-index: 2;
}

body.dark-mode .doc-reader-toolbar {
    background: rgba(30, 41, 59, 0.95);
}

.doc-reader-page-info {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 5rem;
    text-align: center;
    color: #334155;
}

body.dark-mode .doc-reader-page-info {
    color: #e2e8f0;
}

.doc-reader-book-wrap {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: center;
    perspective: 2200px;
}

.doc-reader-book {
    box-shadow:
        0 25px 60px rgba(15, 23, 42, 0.25),
        0 8px 20px rgba(15, 23, 42, 0.15);
    border-radius: 4px;
}

.doc-reader-book .stf__parent {
    border-radius: 4px;
}

.doc-reader-book .doc-flip-page {
    background: #fff;
    overflow: hidden;
}

.doc-reader-book .stf__block {
    background: #fff;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.06);
}

.doc-reader-book .stf__item {
    background: #fff;
}

.doc-reader-book .doc-page-canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    user-select: none;
    -webkit-user-drag: none;
}

.doc-reader-error {
    text-align: center;
    color: #475569;
    max-width: 360px;
}

body.dark-mode .doc-reader-error {
    color: #94a3b8;
}

.doc-reader-stage:fullscreen {
    min-height: 100vh;
    padding: 2rem 1rem;
}

.doc-reader-stage:fullscreen .doc-reader-book-wrap {
    max-width: 95vw;
}

@media (max-width: 767.98px) {
    .doc-reader-stage {
        min-height: calc(100vh - 320px);
        padding: 1rem 0.5rem 1.5rem;
    }

    .doc-reader-hero .h3 {
        font-size: 1.15rem;
    }
}
