.bdp-book-wrapper {
    max-width: 1200px;
    margin: 2em auto;
    padding: 1em;
    color: var( --bdp-text );
    background: var( --bdp-background );
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
}

/* Buchgröße: Groß */
.bdp-size-large.bdp-book-wrapper {
    max-width: 1500px;
}

.bdp-size-large.bdp-layout-book .bdp-book {
    max-width: 1120px;
    min-height: 640px;
}

.bdp-size-large .bdp-page {
    min-height: 560px;
}

.bdp-size-large .bdp-cover-inner {
    min-height: 500px;
}

.bdp-size-large .bdp-page img {
    max-height: 74vh;
}

/* Buchgröße: Vollbreite */
.bdp-size-full.bdp-book-wrapper {
    max-width: 96vw;
}

.bdp-size-full.bdp-layout-book .bdp-book {
    max-width: 100%;
    min-height: 72vh;
}

.bdp-size-full .bdp-page {
    min-height: 70vh;
}

.bdp-size-full .bdp-cover-inner {
    min-height: 60vh;
}

.bdp-size-full .bdp-page img {
    max-height: 80vh;
}

/* Ablenkungsfreier Modus */
.bdp-focus-mode {
    margin-top: 0;
}

.bdp-book-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.bdp-book-controls {
    display: flex;
    gap: 0.75rem;
}

.bdp-btn {
    border: none;
    padding: 0.75rem 1rem;
    background: var( --bdp-primary );
    color: #fff;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bdp-btn:hover,
.bdp-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.bdp-layout-label {
    font-weight: 600;
}

.bdp-book {
    position: relative;
    min-height: 400px;
}

.bdp-book-title {
    margin: 0 0 0.75rem;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var( --bdp-text );
}

.bdp-page {
    width: 100%;
    min-height: 420px;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    transform-origin: left center;
    backface-visibility: hidden;
    transition: transform 0.8s ease, opacity 0.6s ease;
    padding: 1rem;
    box-sizing: border-box;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    border: 1px solid rgba(34, 34, 34, 0.06);
}

.bdp-layout-book .bdp-book {
    max-width: 860px;
    margin: 0 auto;
    min-height: 520px;
    padding-right: 8%;
    perspective: 1600px;
    transform-style: preserve-3d;
    overflow: visible;
}

.bdp-layout-book .bdp-book::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 8%;
    background: linear-gradient(270deg, rgba(0, 0, 0, 0.08), transparent 80%);
    border-radius: 0 18px 18px 0;
}

.bdp-layout-book .bdp-page {
    width: 70%;
    right: 12%;
    left: auto;
    transform-origin: right center;
    box-shadow: -20px 32px 90px rgba(0, 0, 0, 0.16);
}

.bdp-layout-book .bdp-page-inner {
    padding: 1.5rem;
}

.bdp-layout-book .bdp-page {
    opacity: 0;
    pointer-events: none;
    transform: perspective(1600px) rotateY(100deg);
}

.bdp-layout-book .bdp-page.is-active {
    opacity: 1;
    pointer-events: all;
    transform: perspective(1600px) rotateY(0deg);
    z-index: 10;
}

.bdp-cover-page {
    background: #111;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), -30px 30px 90px rgba(0, 0, 0, 0.35);
}

.bdp-cover-inner {
    width: 100%;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.bdp-cover-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.65));
    pointer-events: none;
}

.bdp-cover-title {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.bdp-page-inner {
    flex: 1 1 auto;
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.bdp-page img {
    max-width: 100%;
    max-height: 64vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.1);
}

.bdp-page-title {
    margin: 0;
    font-size: 1.1rem;
    color: var( --bdp-primary );
    text-align: center;
}

.bdp-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.85rem;
    padding: 0.75rem 1rem;
    background: var( --bdp-primary );
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.bdp-download-btn:hover,
.bdp-download-btn:focus {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.bdp-page-description {
    max-width: 100%;
    color: rgba(34, 34, 34, 0.85);
    font-size: 0.98rem;
    line-height: 1.6;
    text-align: center;
    margin-top: 0.75rem;
}

.bdp-page-description p {
    margin: 0;
}

.bdp-page-border-none .bdp-page {
    border: none;
    box-shadow: none;
}

.bdp-page-border-soft .bdp-page {
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

.bdp-page-border-frame .bdp-page {
    border: 2px solid rgba(0, 0, 0, 0.08);
}

.bdp-layout-grid .bdp-book {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    position: static;
    min-height: auto;
}

.bdp-layout-grid .bdp-page {
    position: relative;
    transform: none;
    opacity: 1;
    pointer-events: all;
}

.bdp-layout-stack .bdp-book {
    display: grid;
    gap: 1rem;
    position: static;
    min-height: auto;
}

.bdp-layout-stack .bdp-page {
    position: relative;
    transform: none;
    opacity: 1;
    pointer-events: all;
}

.bdp-layout-stack .bdp-page:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

@media (max-width: 1024px) {
    .bdp-size-large.bdp-layout-book .bdp-book {
        max-width: 100%;
        padding-right: 1rem;
    }

    .bdp-layout-book .bdp-book {
        max-width: 100%;
        padding-right: 1rem;
    }

    .bdp-layout-book .bdp-page {
        width: 85%;
        right: 7.5%;
    }
}

@media (max-width: 900px) {
    .bdp-book-wrapper {
        padding: 0.75rem;
        margin: 1rem auto;
    }

    .bdp-book-top {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .bdp-book-controls {
        gap: 0.5rem;
    }

    .bdp-btn {
        padding: 0.65rem 0.9rem;
        font-size: 0.95rem;
    }

    .bdp-layout-book .bdp-book {
        min-height: 400px;
        padding-right: 0.5rem;
    }

    .bdp-size-large.bdp-layout-book .bdp-book {
        min-height: 380px;
    }

    .bdp-page-inner {
        padding: 1rem;
    }

    .bdp-layout-book .bdp-page-inner {
        padding: 1rem;
    }

    .bdp-cover-inner {
        min-height: 300px;
        padding: 1.5rem;
    }

    .bdp-cover-title {
        font-size: 1.4rem;
        padding: 0.75rem 1rem;
    }

    .bdp-book-title {
        font-size: 1.5rem;
    }

    .bdp-page img {
        max-height: 50vh;
    }

    .bdp-size-full .bdp-page img {
        max-height: 60vh;
    }
}

@media (max-width: 768px) {
    .bdp-book-wrapper {
        border-radius: 12px;
    }

    .bdp-layout-grid .bdp-book {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.75rem;
    }

    .bdp-page {
        min-height: 300px;
        border-radius: 12px;
        padding: 0.75rem;
    }

    .bdp-layout-book .bdp-page {
        min-height: auto;
    }

    .bdp-page-title {
        font-size: 1rem;
    }

    .bdp-page-description {
        font-size: 0.9rem;
    }

    .bdp-download-btn {
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
    }

    .bdp-size-large .bdp-page {
        min-height: 300px;
    }

    .bdp-size-large .bdp-cover-inner {
        min-height: 380px;
    }
}

@media (max-width: 640px) {
    .bdp-book-wrapper {
        max-width: 100%;
        margin: 1rem 0;
        padding: 0.5rem;
    }

    .bdp-book-top {
        margin-bottom: 0.75rem;
    }

    .bdp-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .bdp-book-controls {
        gap: 0.4rem;
        width: 100%;
    }

    .bdp-btn {
        flex: 1;
    }

    .bdp-layout-book .bdp-book {
        perspective: none;
        transform-style: unset;
        overflow: visible;
        min-height: auto;
        padding-right: 0;
    }

    .bdp-layout-book .bdp-book::before {
        display: none;
    }

    .bdp-layout-book .bdp-page {
        width: 100%;
        right: 0;
        left: auto;
        transform-origin: center;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: all !important;
        position: relative;
        margin-bottom: 1rem;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }

    .bdp-layout-book .bdp-page.is-active {
        transform: none !important;
    }

    .bdp-book-title {
        font-size: 1.3rem;
        margin: 0 0 0.5rem;
    }

    .bdp-cover-inner {
        min-height: 250px;
        padding: 1rem;
    }

    .bdp-cover-title {
        font-size: 1.2rem;
        padding: 0.6rem 0.8rem;
    }

    .bdp-page img {
        max-height: 40vh;
        border-radius: 8px;
    }

    .bdp-size-large .bdp-page img {
        max-height: 45vh;
    }

    .bdp-size-full .bdp-page img {
        max-height: 50vh;
    }

    .bdp-layout-grid .bdp-book {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
    }

    .bdp-page {
        border-radius: 10px;
        padding: 0.5rem;
        min-height: 200px;
    }

    .bdp-page-inner {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .bdp-page-title {
        font-size: 0.95rem;
    }

    .bdp-page-description {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .bdp-book-wrapper {
        padding: 0.5rem;
        border-radius: 8px;
    }

    .bdp-layout-grid .bdp-book {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .bdp-btn {
        padding: 0.55rem 0.7rem;
        font-size: 0.85rem;
    }

    .bdp-book-top {
        margin-bottom: 0.5rem;
    }

    .bdp-book-title {
        font-size: 1.2rem;
        margin: 0 0 0.4rem;
    }

    .bdp-page {
        padding: 0.5rem;
        border-radius: 8px;
        min-height: 180px;
    }

    .bdp-cover-inner {
        min-height: 220px;
        padding: 0.75rem;
    }

    .bdp-cover-title {
        font-size: 1.1rem;
        padding: 0.5rem 0.7rem;
        background: rgba(0, 0, 0, 0.55);
    }

    .bdp-page img {
        max-height: 35vh;
        border-radius: 6px;
    }

    .bdp-page-title {
        font-size: 0.9rem;
        margin: 0.3rem 0;
    }

    .bdp-page-description {
        font-size: 0.8rem;
        margin-top: 0.3rem;
    }

    .bdp-download-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }

    .bdp-page-inner {
        padding: 0.5rem;
        gap: 0.5rem;
    }
}

.bdp-notice {
    padding: 1rem;
    background: #fff4e5;
    color: #6f4f0d;
    border-left: 4px solid #f5b259;
    border-radius: 12px;
}

/* Passwortschutz */
.bdp-password-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 2rem;
    background: var(--bdp-background, #f6f7fb);
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
    max-width: 1200px;
    margin: 2em auto;
}

.bdp-password-form-wrap {
    text-align: center;
    max-width: 380px;
    width: 100%;
}

.bdp-password-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.bdp-password-hint {
    font-size: 1rem;
    color: var(--bdp-text, #222);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.bdp-password-form {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.bdp-pw-input {
    flex: 1 1 auto;
    min-width: 180px;
    padding: 0.75rem 1.1rem;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
    background: #fff;
    color: #222;
}

.bdp-pw-input:focus {
    border-color: var(--bdp-primary, #1a73e8);
}

.bdp-pw-error {
    display: block;
    margin-top: 0.85rem;
    font-size: 0.9rem;
    color: #c0392b;
    min-height: 1.3em;
}

@media (max-width: 480px) {
    .bdp-password-gate {
        min-height: 240px;
        padding: 1.25rem;
        border-radius: 12px;
    }

    .bdp-password-form {
        flex-direction: column;
        align-items: stretch;
    }

    .bdp-pw-input {
        min-width: 0;
    }
}
