.kitap-okuyucu-sarmalayici {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 20px 0 30px;
}

.kitap-durum {
    color: var(--kahve);
    padding: 50px 0;
    text-align: center;
}

.kitap {
    position: relative;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 25px 60px var(--golge);
    border-radius: 4px;
    background: var(--beyaz);
    perspective: 2200px;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.kitap.suruklemede {
    cursor: grabbing;
}

.kitap-sayfa {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 4px;
    overflow: hidden;
    background: var(--beyaz);
}

.kitap-sayfa canvas {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.kitap-sayfa-ust {
    z-index: 2;
    transform-style: preserve-3d;
}

.kitap-sayfa-alt {
    z-index: 1;
}

.kitap-serit-kapsayici {
    position: absolute;
    inset: 0;
    display: none;
    transform-style: preserve-3d;
}

.kitap-serit-kapsayici.aktif {
    display: block;
}

.kitap-serit {
    position: absolute;
    top: 0;
    height: 100%;
    display: block;
    backface-visibility: hidden;
    will-change: transform;
}

.kitap-golge-katman {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.08) 35%,
        rgba(255, 255, 255, 0.25) 60%,
        rgba(0, 0, 0, 0.25) 100%
    );
}

.kitap::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 46px;
    height: 46px;
    pointer-events: none;
    z-index: 3;
    background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.1) 50%, transparent 65%);
    border-radius: 0 0 4px 0;
}

.kitap-mini-yukleniyor {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid var(--bej-koyu);
    border-top-color: var(--mor);
    opacity: 0;
    transition: opacity 0.2s ease;
    animation: kitap-donme 0.8s linear infinite;
}

.kitap-mini-yukleniyor.gorunur {
    opacity: 1;
}

@keyframes kitap-donme {
    to { transform: rotate(360deg); }
}

.kitap-kontrolleri {
    display: flex;
    align-items: center;
    gap: 18px;
}

#kitap-sayfa-bilgisi {
    color: var(--kahve);
    font-weight: 600;
    min-width: 100px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.kitap-kontrolleri button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-yakinlastir {
    background: #5a5a62;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-yakinlastir:hover {
    background: #45454c;
}

.kitap-alt-not {
    text-align: center;
    font-size: 0.85rem;
    color: var(--kahve);
}

.kitap-zoom-katman {
    position: fixed;
    inset: 0;
    background: rgba(20, 8, 30, 0.92);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
}

.kitap-zoom-katman.acik {
    display: flex;
}

.kitap-zoom-govde {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}

.kitap-zoom-govde.suruklemede {
    cursor: grabbing;
}

.kitap-zoom-govde img {
    max-width: 92vw;
    max-height: 88vh;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    will-change: transform;
    transition: filter 0.15s ease;
}

.kitap-zoom-govde img.yukleniyor {
    filter: blur(1.5px);
}

.kitap-zoom-kapat {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--beyaz);
    color: var(--kahve-koyu);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.kitap-zoom-ipucu {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--bej-acik);
    font-size: 0.82rem;
    opacity: 0.8;
    text-align: center;
    pointer-events: none;
}

@media (max-width: 640px) {
    .kitap { max-width: 100%; }

    .kitap-kontrolleri {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .kitap-kontrolleri .btn-mor {
        flex: 0 0 auto;
        padding: 12px 20px;
    }

    .kitap-zoom-kapat {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }

    .kitap-zoom-ipucu {
        display: none;
    }
}

@media (max-height: 640px) and (orientation: landscape) {
    .kitap {
        width: auto;
        height: 78vh;
        max-width: 92vw;
        max-height: 78vh;
    }
}
