@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lora:ital@0;1&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lora', serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    perspective: 1500px;
}

.book {
    width: 100%;
    max-width: 1000px;
    height: calc(100vh - 40px);
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
}

.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 40px;
    backface-visibility: hidden;
    z-index: 2;
    text-align: center;
}

.book-cover h1 {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.book-cover .subtitle {
    font-style: italic;
    font-size: 20px;
    margin-bottom: 40px;
    color: #666;
}

.book-author {
    margin-top: 20px;
    font-style: italic;
    color: #999;
}

.open-book {
    margin-top: 60px;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.open-book:hover {
    background-color: #e9e9e9;
    transform: translateY(-2px);
}

.book-content {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    transform: rotateY(180deg);
    backface-visibility: hidden;
}

/* KEtika dibuka */
.book.open {
    transform: rotateY(180deg);
}

.book-nav {
    display: flex;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
    scrollbar-width: none;
}

.book-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.nav-item:hover {
    background-color: #f0f0f0;
    color: #333;
}

.nav-item.active {
    font-weight: bold;
    border-bottom: 2px solid #333;
    color: #333;
}

/* === PAGES === */
.book-pages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #fff;
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: -1px -1px;
}

.page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    min-height: calc(100% - 40px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.page.hidden {
    display: none;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.page-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: #333;
}

.page-number {
    font-style: italic;
    color: #999;
}

.page-content {
    line-height: 1.8;
}


.diary-entry {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #e0e0e0;
}

.diary-entry:last-child {
    border-bottom: none;
}

.entry-date {
    font-style: italic;
    color: #999;
    margin-bottom: 10px;
}

.diary-entry h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
    color: #333;
}

.diary-entry p {
    margin-bottom: 15px;
}

.entry-image-container {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.entry-image-container img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.entry-image-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.image-modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 18px;
}

@media only screen and (max-width: 700px) {
    .image-modal-content {
        width: 95%;
    }
}


.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f5f5f5;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text p {
    margin-bottom: 15px;
    text-align: center;
}

.song-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.song-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.song-item:hover {
    transform: translateY(-3px);
}

.song-icon {
    font-size: 24px;
    color: #666;
    padding: 10px;
    background-color: #eee;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.song-details h3 {
    margin-bottom: 5px;
    font-family: 'Playfair Display', serif;
}

.song-details p {
    font-style: italic;
    color: #666;
    margin-bottom: 8px;
}

.song-note {
    font-size: 14px;
    color: #888;
}

.tech-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.tech-item {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #333;
}

.tech-item h3 {
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    background-color: #e0e0e0;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #555;
}


.books-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.book-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    transition: transform 0.3s ease;
    border-left: 4px solid #937245;
}

.book-item:hover {
    transform: translateY(-3px);
}

.book-cover-img {
    width: 100px;
    height: 140px;
    background-color: #e0e0e0;
    border-radius: 4px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.book-cover-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-info h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 8px;
}

.book-info .book-author {
    font-style: italic;
    margin: 0 0 10px 0;
    color: #666;
}

.book-info .book-description {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.book-rating {
    margin-top: 10px;
    color: #b38b37;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    padding: 10px;
    background-color: #f9f9f9;
    font-style: italic;
    text-align: center;
}

.book-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.page-nav {
    display: flex;
    gap: 10px;
}

.prev-page,
.next-page {
    background: none;
    border: 1px solid #e0e0e0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prev-page:hover,
.next-page:hover {
    background-color: #e9e9e9;
}

.book-close {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.book-close:hover {
    background-color: #e9e9e9;
}


.music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.music-control:hover {
    transform: scale(1.1);
    background-color: #fff;
}

@media (min-width: 768px) {
    .about-content {
        flex-direction: row;
        align-items: flex-start;
    }

    .about-text {
        flex: 1;
    }

    .about-text p {
        text-align: left;
    }

}

@media (max-width: 767px) {
    .book-cover h1 {
        font-size: 36px;
    }

    .book-cover .subtitle {
        font-size: 18px;
    }

    .page-header h2 {
        font-size: 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .book-item {
        flex-direction: column;
        align-items: center;
    }

    .book-cover-img {
        width: 100px;
        height: 140px;
        margin-bottom: 15px;
    }

    .book-info {
        text-align: center;
    }

    .entry-image-container img {
        width: 100%;
    }

}

@media (max-width: 480px) {
    .book-container {
        padding: 10px;
    }

    .book {
        height: calc(100vh - 20px);
    }

    .book-cover {
        padding: 20px;
    }

    .book-cover h1 {
        font-size: 28px;
    }

    .book-cover .subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .book-pages {
        padding: 10px;
    }

    .page {
        padding: 15px;
    }

    .entry-image-container img {
        width: 100%;
    }
}