/* Styling Umum untuk Wadah Rak Buku agar berada di tengah */
.ruang-tamu-wrapper, #ruang-tamu-container { 
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center; 
    height: 100vh;
    margin: 0;
    
    position: relative; 
    width: 100%; 

    /* Menambahkan Latar Belakang Gambar Perpustakaan */
    background-image: url('perpustakaan.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* --- Rak Buku Container --- */
.rak-buku {
    display: flex;
    flex-direction: column; 
    gap: 20px;
    width: 90%; /* Lebar Desktop */
    height: 450px; 
	min-height: 450px; 
    padding-left: 30px;padding-right: 30px;padding-top: 20px;
    
    margin-left: auto;
    margin-right: auto;
    
    background-color: #a0522d;
    border: 10px solid #8b4513;
    border-radius: 5px;
    box-shadow: 5px 5px 25px rgba(0, 0, 0, 0.4); 
    perspective: 1200px; 
    margin-top: 60px; 
    margin-bottom: 10px; 
    overflow: hidden;
    z-index: 5; 
}

/* --- Styling Setiap Baris Buku (DEFAULT: FLEX - untuk desktop) --- */
.rak-buku-2-rows {
    display: flex;
    align-items: flex-end;
    position: relative;
    width: 100%; 
    justify-content: space-evenly; 
}


/* --- Styling Buku (Dasar & Animasi 3D) --- */
.buku {
    position: relative; 
    width: 55px; 
    height: 120px; 
    margin: 10px 5px; 
    cursor: pointer; 
    display: flex;
    flex-direction: column; 
    align-items: center; 
    justify-content: space-between; 
    padding: 12px 6px; 
    font-family: 'Georgia', serif; 
    color: white;
    box-shadow: 
        inset -5px 0 0 rgba(0, 0, 0, 0.2), 
        0 8px 15px rgba(0, 0, 0, 0.5); 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease, visibility 0s, opacity 0.4s; 
    transform-style: preserve-3d;
    transform: rotateY(-8deg) translateZ(-5px);
    z-index: 2; 
    flex-shrink: 0; 
}

/* --- Gradien Warna Buku --- */
.buku-1 { background: linear-gradient(to right, #e74c3c 5%, #c0392b 95%); }
.buku-2 { background: linear-gradient(to right, #3498db 5%, #2980b9 95%); }
.buku-3 { background: linear-gradient(to right, #2ecc71 5%, #27ae60 95%); }
.buku-4 { background: linear-gradient(to right, #9b59b6 5%, #8e44ad 95%); }
.buku-5 { background: linear-gradient(to right, #f1c40f 5%, #f39c12 95%); }
.buku-6 { background: linear-gradient(to right, #1abc9c 5%, #16a085 95%); }
.buku-7 { background: linear-gradient(to right, #e67e22 5%, #d35400 95%); }
.buku-8 { background: linear-gradient(to right, #34495e 5%, #2c3e50 95%); }
.buku-9 { background: linear-gradient(to right, #c0392b 5%, #e74c3c 95%); }
.buku-10 { background: linear-gradient(to right, #3498db 5%, #2980b9 95%); }
.buku-11 { background: linear-gradient(to right, #2ecc71 5%, #27ae60 95%); }
.buku-12 { background: linear-gradient(to right, #f1c40f 5%, #f39c12 95%); }
.buku-13 { background: linear-gradient(to right, #9b59b6 5%, #8e44ad 95%); }
.buku-14 { background: linear-gradient(to right, #1abc9c 5%, #16a085 95%); }
.buku-15 { background: linear-gradient(to right, #e67e22 5%, #d35400 95%); }
.buku-16 { background: linear-gradient(to right, #34495e 5%, #2c3e50 95%); }
.buku-17 { background: linear-gradient(to right, #7f8c8d 5%, #95a5a6 95%); }
.buku-18 { background: linear-gradient(to right, #2c3e50 5%, #34495e 95%); }
.buku-19 { background: linear-gradient(to right, #ff4d4d 5%, #ff7f7f 95%); }
.buku-20 { background: linear-gradient(to right, #ff9933 5%, #ffcc66 95%); }

/* --- Gaya Khusus untuk Detail Teks (Profesional) --- */
.buku span {
    display: block; 
    width: 100%;
    text-align: center;
    line-height: 1.1;
}

.buku .judul {
    font-size: 0.3525em; 
    font-weight: 800; 
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.buku .penulis {
    font-size: 7px;
    font-weight: 400;
    font-style: italic; 
    margin-top: 5px;
    opacity: 0.9;
}

.buku .detail {
    font-size: 6px;
    font-weight: 300;
    opacity: 0.7;
    margin-top: 15px;
}

.buku .harga {
    font-size: 8px;
    font-weight: 700;
    margin-top: auto; 
    padding-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.5); 
}

/* --- Efek Hover (Saat Disentuh Mouse) --- */
.buku:hover {
    transform: rotateY(-8deg) translate(0, 60px) translateZ(50px) scale(1.5); 
    z-index: 100; 
    box-shadow: 
        inset -5px 0 0 rgba(0, 0, 0, 0.2), 
        0 30px 60px rgba(0, 0, 0, 0.8); 
}

/* ============================================== */
/* GAYA UNTUK NAVIGASI (Prev/Next Buttons) */
/* ============================================== */

.nav-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%; 
    padding: 0 10px;
    
    margin-left: auto;
    margin-right: auto;
    
    position: relative; 
    z-index: 10; 
    
    margin-bottom: 20px;
}

.nav-button {
    padding: 7px 15px;
    background-color: rgba(0, 0, 0, 0.5); 
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 700;
    z-index: 50; 
    border-radius: 8px;
    transition: opacity 0.3s, background-color 0.3s, transform 0.2s;
    user-select: none; 
	transform: translateY(-80px) translateX(-5px);
        justify-content: space-around;
}

.nav-button:hover:not([disabled]) {
    background-color: rgba(0, 0, 0, 0.7); 
    transform: scale(1.05);
	transform: translateY(-80px) translateX(-5px);
        justify-content: space-around;
}

.nav-button:hover {
    background-color: rgba(0, 0, 0, 0.7); 
    transform: scale(1.05);
	transform: translateY(-80px) translateX(-5px);
        justify-content: space-around;
}


.nav-button[disabled] {
    opacity: 0.2;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================== */
/* GAYA UNTUK TAMPILAN BACA BUKU (Modal Content) */
/* ============================================== */

.book-viewer {
    display: flex;
    width: 900px; 
    height: 500px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    padding: 2px;
    gap: 20px;
    margin: auto;
}

.book-page {
    flex: 1;
    padding: 15px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow-y: auto;
}

/* ============================================== */
/* MEDIA QUERY UNTUK MOBILE (Layar <= 768px) */
/* ============================================== */
@media (max-width: 768px) {
    
    /* ----------------------------------------------------- */
    /* KONTROL POSISI TOMBOL NAVIGASI DI MOBILE (TranslateY) */
    /* ----------------------------------------------------- */
    .nav-controls {
        width: 95%; 
        z-index: 10;
        position: relative; 
        margin-top: 15px;margin-left: 10px;
        
        /* GANTI DI SINI UNTUK MENAIKKAN/MENURUNKAN TOMBOL */
        /* Gunakan nilai NEGATIF (misal: -150px) untuk naik ke atas */
        /* Gunakan nilai POSITIF (misal: 50px) untuk turun ke bawah */
     /*  transform: translateY(10px) translateX(5px); */
        justify-content: space-around;
        /* Jika Anda ingin tombol Prev/Next terpisah jauh: */
        /* justify-content: space-around; */
    }

    .nav-button {
        padding: 7px 10px;
        font-size: 1em;
    }
    
    /* Rak Buku Container untuk Mobile (Grid 4x4) */
    .rak-buku {
        display: grid; 
        grid-template-columns: repeat(3, 1fr); 
        grid-auto-rows: 110px; 
        gap: 7px 7px; 
        
        width: 78%; 
        height: auto; 
        min-height: 530px; 
        padding-right: 20px; 
        
        /* Margin Bawah disesuaikan karena .nav-controls digeser ke atas */
        margin-bottom: 0; 
        
        margin-left: auto;
        margin-right: auto;
        z-index: 5; 
    }

    .rak-buku-2-rows {
        display: contents; 
    }
    
    /* Styling Buku untuk Mobile */
    .buku {
        width: 45px; 
        height: 90px; 
        margin: 0px !important; 
        padding: 10px 5px; 
        transform: none; 
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); 
    }

    /* Styling Teks di dalam Buku untuk Mobile */
    .buku .judul {
        font-size: 0.35em; 
        margin-bottom: 5px;
        padding-bottom: 5px;
    }

    .buku .penulis {
        font-size: 6px; 
        margin-top: 3px;
    }

    .buku .detail {
        font-size: 5px; 
        margin-top: 8px; 
    }

    .buku .harga {
        font-size: 7px; 
        padding-top: 3px;
    }
	
	.buku:hover {
    transform: rotateY(-8deg) translate(0, 60px) translateZ(50px) scale(1.9); 
    z-index: 100; 
    box-shadow: 
        inset -5px 0 0 rgba(0, 0, 0, 0.2), 
        0 30px 60px rgba(0, 0, 0, 0.8); 
}
	
	
	
	
	
}