/*

base code credits: rai (https://abulove.neocities.org/) ♫

        ..,,,,,..
    .,;;;;;;;;;;;;;;,.
  ,;;;'            `;;;;,       ,,
 ,;'                 ';;;;,    ;;;;
.;.;;;;,               ;;;;;.   ''
;;;;;;;;                ;;;;;                ASCII art from https://www.asciiart.eu, author not specified
`;;;;;;'                ;;;;;
                        ;;;;'   ,,
                      .;;;;'   ;;;;
                     ,;;;'      ''
                   ,;;;'
                ,;;;'
            .;;;;'
        .,;;;''
    .,;;''

*/

.container {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.scene {
    width: 800px;
    height: 533px;
    perspective: 2000px;
    position: relative;
    margin-top: 20px;
}

.binder {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}


.page {
    width: 50%;
    height: 100%;
    position: absolute;
    right: 0;
    transform-origin: left center;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.page.flipped {
    transform: rotateY(-180deg);
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background-color: #ffffff;
    border-radius: 0 15px 15px 0;
    box-shadow: inset 5px 0 10px rgba(0,0,0,0.05), 0 0 5px rgba(0,0,0,0.1);
    
    /* grid layout for photocard pockets */
    display: grid;
    grid-template-columns: 1fr 1fr; /* if you want 9 pcs per face, change to 1fr 1fr 1fr. if you want one, 1fr */
    grid-template-rows: 1fr 1fr; /* if you want 9 pcs per face, change to 1fr 1fr 1fr. if you want one, 1fr */
    padding: 25px;
    gap: 15px;
    box-sizing: border-box;
    justify-items: center;
    align-items: center;
}

.face.back {
    transform: rotateY(180deg);
    border-radius: 15px 0 0 15px;
    box-shadow: inset -5px 0 10px rgba(0,0,0,0.05), 0 0 5px rgba(0,0,0,0.1);
    background-color: #fcfcfc;
}

/* each photocard pocket */
.pocket {
    width: 100%;
    height: 100%;
    background: #eee;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    aspect-ratio: 55 / 85;
    transition: transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pocket img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pocket.missing img {
    filter: grayscale(100%) opacity(0.5);
}

.pocket:hover { transform: scale(1.05); z-index: 5; }

.empty-slot {
    width: 100%; height: 100%;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ccc;
    font-size: 0.8rem;
}

.imageWrapper {
    width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    position: fixed; top: 0; left: 0;
    display: none;
    justify-content: center; align-items: center;
    z-index: 200;
}
.modalContent {
    background: #fff; padding: 20px;
    border-radius: 10px; text-align: center;
    position: relative;
    max-width: 90%;
}
.modalContent img { max-height: 500px; max-width: 100%; }

.page.cover .face {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    background-color: #7475bb;
    overflow: hidden;
}

.cover-full-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 15px 15px 0;
    background-color: #7475bb;
}

.face.back .cover-full-img {
    border-radius: 15px 0 0 15px;
    background-color: #7475bb;
}

.inside-binder {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    background-size: 20px 20px;
}

.nav-btn {
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 10px;
}

.prev-btn {
    position: absolute;
    left: 5%;
}

.next-btn {
    position: absolute;
    right: 5%;
}