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: 99vw; max-height: 96vh; padding: 0px; box-sizing: border-box; }

#book { 
    position: relative; 
    width: 184vh; 
    height: 92vh; 
    max-width: 98vw;
    max-height: 94vh;
    transform-style: preserve-3d; 
    perspective: 2000px; 
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), width 0.6s ease; 
    -webkit-box-reflect: below 2px linear-gradient(transparent 95%, rgba(255,255,255,0.02));
    cursor: grab;
}
#book:active { cursor: grabbing; }

/* Görünmez Köşe Tıklama Alanları (Hotspots) Katman Kuralları */
.book-hotspot {
    position: absolute;
    top: 0;
    width: 15%;
    height: 100%;
    z-index: 999;
    cursor: pointer;
    transition: background 0.2s;
}
#hotspot-left { left: 0; }
#hotspot-right { right: 0; }
#hotspot-left:hover { background: linear-gradient(to right, rgba(255,255,255,0.03), transparent); }
#hotspot-right:hover { background: linear-gradient(to left, rgba(255,255,255,0.03), transparent); }

.page-sheet { 
    position: absolute; 
    width: 50%; 
    height: 100%; 
    top: 0; 
    right: 0; 
    transform-origin: left center; 
    transform-style: preserve-3d; 
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), width 0.6s ease, right 0.6s ease; 
    z-index: 1; 
    pointer-events: auto; 
}

#book.single-page .page-sheet {
    width: 100% !important;
    right: 0 !important;
    left: 0 !important;
    transform-origin: center center !important;
}

.page-face { position: absolute; width: 100%; height: 100%; top: 0; left: 0; backface-visibility: hidden; background: #fff; box-shadow: 0 15px 50px rgba(0,0,0,0.7); overflow: hidden; border-radius: 6px; }
.page-face img { width: 100%; height: 100%; object-fit: fill; 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: 38px; 
    margin-bottom: 8px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    color: #aaa; 
    font-size: 13px; 
    z-index: 1010;
    background: rgba(30, 32, 38, 0.8); 
    padding: 2px 20px; 
    border-radius: 30px; 
    backdrop-filter: blur(10px); 
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

button { padding: 4px 14px; border: 0; border-radius: 20px; background: #2d7df4; color: #fff; font-weight: bold; cursor: pointer; transition: all 0.2s; font-size: 12px; display: flex; align-items: center; gap: 4px; }
button:hover { background: #1a66d3; transform: scale(1.03); }

.go-to-page-container { display: flex; align-items: center; gap: 5px; border-left: 1px solid rgba(255,255,255,0.15); padding-left: 10px; }
#page-input { width: 45px; height: 24px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.2); border-radius: 4px; color: #fff; text-align: center; font-size: 12px; outline: none; }
#page-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#page-go { padding: 4px 10px; background: #34c759; }
#page-go:hover { background: #28a745; }
