@font-face {
    font-family: 'FirstFont';
    src: url('../assets/fonts/FirstFont.ttf') format('truetype');
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'FirstFont', sans-serif;
    background-color: #f0f0f0;
    color: #333;
    font-size: 18px;
    line-height: 1.5;
    height: 100vh;
    width: 100vw;
}

img#cover-photo {
    width: 95%;
    height: auto;  
    margin: 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
    display: block;
    position: relative;
    object-fit: cover;
    top: -30%;
    padding: 20px;    
}


#cover-photo-wrapper {
    width: 50%;
    height: 95%;
    overflow: hidden;
    position: relative;
    top: 20px;;
    
}

#title-line {
    line-height: 0.5;
}

.front img, .back img {
    width: auto;
    height: 18rem;  
    margin: 1rem;
    margin-left: 3rem;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
    display: inline-block;
}

.front img:hover, .front img:active, .back img:hover, .back img:active {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    transition: transform 0.1s ease;
}

#intro-wrapper {
    height: 100%;
    width: 100%;
    background-color: #f0f0f0;
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#image-overlay {
    height: 100vh;
    width: 100vw;
    background-color: rgba(0, 0, 0, 0.8);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

img#image-slot {
    max-width: 80vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

#epilogue-wrapper {
    height: 100%;
    width: 100%;
    background-color: #f0f0f0;
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#epilogue_img {
    position: absolute;
    height: auto;
    width: auto;
    z-index: -1;
}

#epilogue-text {
    color: white;
    filter: drop-shadow(0px 0px 4px #000000);

}

#epilogue-wrapper #move-forward-btn{
    color: white;
    filter: drop-shadow(0px 0px 4px #000000);
}

#epilogue-wrapper #move-forward-btn:hover, #epilogue-wrapper #move-forward-btn:active{
    color: rgb(0, 0, 0);
    filter: drop-shadow(0px 0px 4px #ffffff);
    transform: scale(1.1);
    background-color: transparent;
}

#title {
    text-transform: uppercase;
    text-align: center;
}

#seasons-index-wrapper #book-backing {
    left: 0;
}

#book-backing {
    position: absolute;
    left: 31rem;
    top: 50%;
    width: 99rem;
    height: 53rem;
    background-color: #525252;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: -2;
    transform: translate(-50%, -50%);
    transform-origin: center;
    overflow: visible;
}

.book-page {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 97rem;
    height: 52.1rem;
    background-color: #f0f0f0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, -50%);
}

#filler-page-2 {
    width: 91rem;
    background-color: white;
}

.back-btn {
    position: fixed;
    left: 0.3rem;
}

.forward-btn {
    position: absolute;
    left: 47rem;
    z-index: -1;
}

.season-button {
    font-family: 'FirstFont', sans-serif;
    background-color: transparent;
    color: #333;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1.5rem;
    text-align: center;
}

.season-button:hover, .season-button:active {
    background-color: #ddd;
    color: #000;
    transform: scale(1.1);
}

#toggle-music {
    left: 0;
    right: 100vw;
}

.icon {
    background-color: transparent;
    border: none;
    padding: 1rem 1.5rem;
    right: 0;
    cursor: pointer;
    border-radius: 5px;
    position: fixed;
    z-index: 9997;
}

.icon img {
    width: 1rem;
    height: 1rem;
}

.icon:hover, .icon:active {
    transform: scale(1.1);
    transition: transform 0.4s ease;
}

#seasons-index-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 50vw;
    position: absolute;
    right: 0;
    background-color: #f0f0f0;
    z-index: 9998;
}

#seasons-index-wrapper h1 {
    font-size: 5em;
    margin-bottom: 20px;
    color: #333;
}

#seasons-index-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: left;
}

#credits {
    position: absolute;
    bottom: 0;
}

#index-chapter {
    left: 0;
}

#index-chapter .front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    left: 0;
    cursor: default;
}

.locked {
    color: #999;
    text-decoration: line-through;
    pointer-events: none;
}

.locked:hover, .locked:active, .locked:focus {
    background-color: transparent;
    color: #999;
    transform: none;
}

.hidden {
    display: none !important;
    pointer-events: none;
}

#spring-chapter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

#summer-chapter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

#autumn-chapter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

#winter-chapter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

#credits-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

#credits-wrapper .front {
    overflow-y: scroll;
}

#credits-wrapper .front p {
    font-size: 1rem;
}

#credits-wrapper .back h2 {
    padding-left: 40px;
}

#credits-wrapper .back p {
    padding-left: 40px;
}

.book {
    perspective: 1000px;
    position: relative;
    left: 22.5rem;
}

.page {
    width: 45rem;
    height: 52rem;
    background-color: #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: absolute;
    transition: transform ease 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
    left: 31rem;
    transform-origin: left;
    display: flex;
    flex-direction: column;

}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background-color: white;
    /*display: inline-block;*/
    justify-content: left;
    align-items: justify;
    text-align: left;
}

.front .align_left, .back .align_left {
    margin-left: 3rem;
}

.front .align_right, .back .align_right {
    margin-left: 15rem;
    margin-right: 0;
}

.front p.caption {
    position: absolute;
}

.front p.caption:nth-child(1) {
    top: 10px;
    left: 10px;
}

.front p.caption:nth-child(2) {
    top: 50px;
    left: 10px;
}

#credits-pg1 .front, #credits-pg1 .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background-color: white;
    display: inline-block;
    justify-content: left;
    align-items: justify;
    text-align: left;
}

.back {
    transform: rotateY(-180deg); /* Rotate the back side */
}

.page.flipped {
    transform: rotateY(-180deg);
}

.page h1, .page p {
    margin: 20px;
}

.page h1 {
    width: 100%;
    height: fit-content;
    display: block;
}

.book h1 {
    font-size: 3rem;
    text-align: center;
    text-transform: uppercase;
}

.book p {
    font-size: 1.5rem;
}

                                    /* CHAPTER PAGES */
#spring-pg1, #summer-pg1, #autumn-pg1, #winter-pg1{
    z-index: 2;
}

#spring-pg2, #summer-pg2, #autumn-pg2, #winter-pg2{
    z-index: 1;
}

#spring-pg1 .front p, #spring-pg1 .back p, #spring-pg2 .front p, #spring-pg2 .back p, #summer-pg1 .front p, #summer-pg1 .back p, #summer-pg2 .front p, #summer-pg2 .back p, #autumn-pg1 .front p, #autumn-pg1 .back p, #autumn-pg2 .front p, #autumn-pg2 .back p, #winter-pg1 .front p, #winter-pg1 .back p, #winter-pg2 .front p, #winter-pg2 .back p{
    display: inline;
    
}

.page .caption {
    position: absolute;
}

.caption.align_left{
    left: 0;
}

                                    /* ANIMATIONS */
.fade-in {
    animation: fade-in 6s ease-in;
}

@keyframes fade-in {
    0%{
        opacity: 0;
    }
    20%{
        opacity: 1;
    }
    100%{
        opacity: 1;
    }
}

.fade-out {
    animation: fade-out 1s ease-out;
}


@keyframes fade-out {
    0%{
        opacity: 1;
    }
    100%{
        opacity: 0;
    }
}

.slide-in {
    animation: slide-in 0.8s ease-in;
}
@keyframes slide-in {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    70% {
        transform: translateX(0);
        opacity: 1;
    }
    80% {
        transform: translateX(1%);
    }
    100% {
        transform: translateX(0);
    }
}

.slide-out {
    animation: slide-out 0.8s ease-in;
}
@keyframes slide-out {
    0% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(1%);
    }
    30% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

