* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    display: flex;
    height: 100vh;
    background-color: #f4f4f4;
    overflow: hidden;
}

/* Sol Menü (Sidebar) */
.sidebar {
    width: 60px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    z-index: 100;
}

.brand-logo {
    font-size: 22px;
    color: #0058a3; /* IKEA Mavi Tonu */
    margin-bottom: 25px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    transition: color 0.2s, transform 0.1s;
    padding: 8px;
    border-radius: 6px;
}

.menu-btn:hover {
    color: #0058a3;
    background-color: #f0f0f0;
}

.catalog-info {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 10px;
    color: #888;
    letter-spacing: 1px;
    font-weight: bold;
}

/* Ana Görünüm Alanı */
.viewer-container {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e9e9e9;
    overflow: hidden;
}

/* Gezinme Okları */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 48px;
    height: 60px;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    z-index: 50;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.prev-arrow { left: 20px; border-radius: 0 8px 8px 0; }
.next-arrow { right: 20px; border-radius: 8px 0 0 8px; }

/* Kitap/Katalog Yapısı */
.book-viewport {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    overflow: hidden;
}

/* Sayfa Çifti ve Geçiş Animasyonu */
/* 3D Görünüm İçin Perspective Alanı */
.book-viewport {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    perspective: 2000px; /* 3D derinlik algısı */
}

/* Ana Kitap Çerçevesi */
.book-spread {
    display: flex;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    background-color: #fff;
    max-height: 94vh;
    max-width: 92vw;
    position: relative;
    transform-style: preserve-3d;
}

.page-container {
    height: 94vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
    position: relative;
    backface-visibility: hidden;
}

.page-left {
    border-right: 1px solid #e0e0e0;
}

.page-container img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
}

/* Düz 3D Sayfa Çevirme Katmanı (Flip Overlay) */
/* 3D Sayfa Çevirme Katmanı */
.flipping-page {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    z-index: 100;
    transform-style: preserve-3d;
    transition: transform 0.4s ease-in-out;
}

/* İleri giderken: Sağ sayfa sola doğru kapanır */
.flipping-page.flip-next {
    right: 0;
    transform-origin: left center; /* Sol ortadan (kitabın sırtından) döner */
}

.flipping-page.flip-next.active {
    transform: rotateY(-180deg); /* Tam sola yatar */
}

/* Geri giderken: Sol sayfa sağa doğru kapanır */
.flipping-page.flip-prev {
    left: 0;
    transform-origin: right center; /* Sağ ortadan döner */
}

.flipping-page.flip-prev.active {
    transform: rotateY(180deg); /* Tam sağa yatar */
}

/* Dönen Yaprağın Ön ve Arka Yüzleri */
.page-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.page-face.front {
    z-index: 2;
}

.page-face.back {
    transform: rotateY(180deg); /* Arka yüzü ters çevir */
    z-index: 1;
}

/* Alt Bilgi Barı */
.footer-bar {
    position: absolute;
    bottom: 15px;
    right: 25px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 13px;
    font-weight: bold;
    color: #444;
}

.page-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}
