html, body { height: 100%; margin: 0; padding: 0; background: #131417; font-family: sans-serif; overflow: hidden; }

#bg-blur {
    position: fixed;
    top: -10%; left: -10%;
    width: 120%; height: 120%;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.25) saturate(1.2);
    transition: background-image 0.8s ease-in-out;
    z-index: 0;
    pointer-events: none;
}

#canvas { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 1; }
#book-container { flex: 1; display: flex; justify-content: center; align-items: center; width: 100%; max-width: 95vw;  max-height: 85vh; padding: 20px; box-sizing: border-box; }

/* 3D Görünüm Alanı - Üzerine gelince el işareti çıkar */
#book { 
    position: relative; 
    width: 75vh; 
    height: 75vh; 
    transform-style: preserve-3d; 
    perspective: 2000px; 
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); 
    -webkit-box-reflect: below 5px linear-gradient(transparent 85%, rgba(255,255,255,0.04));
    cursor: grab;
}
#book:active { cursor: grabbing; }

/* Sürüklemeyi algılaması için pointer-events: auto yapıldı */
.page-sheet { position: absolute; width: 100%; height: 100%; top: 0; left: 0; transform-origin: left center; transform-style: preserve-3d; transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1); z-index: 1; pointer-events: auto; }

.page-face { position: absolute; width: 100%; height: 100%; top: 0; left: 0; backface-visibility: hidden; background: #fff; box-shadow: 0 10px 35px rgba(0,0,0,0.6); overflow: hidden; border-radius: 4px; }
/* Resimlerin farenin hareketini engellememesi için pointer-events kaldırıldı */
.page-face img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }

.page-face.front::after { content: ''; position: absolute; top: 0; left: 0; width: 15px; height: 100%; background: linear-gradient(to right, rgba(0,0,0,0.15), transparent); pointer-events: none; }
.page-face.back::after { content: ''; position: absolute; top: 0; right: 0; width: 15px; height: 100%; background: linear-gradient(to left, rgba(0,0,0,0.15), transparent); pointer-events: none; }

.page-face.back { transform: rotateY(180deg); }
.page-sheet.flipped { transform: rotateY(-180deg); }

#controls { 
    height: 50px; 
    margin-bottom: 25px; 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    color: #aaa; 
    font-size: 14px; 
    z-index: 10; 
    background: rgba(30, 32, 38, 0.75); 
    padding: 5px 25px; 
    border-radius: 30px; 
    backdrop-filter: blur(10px); 
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
button { padding: 8px 22px; border: 0; border-radius: 20px; background: #2d7df4; color: #fff; font-weight: bold; cursor: pointer; transition: all 0.2s; }
button:hover { background: #1a66d3; transform: scale(1.05); }
