.password-container {
    text-align: center;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards 0.3s;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.error-image {
    max-width: 600px;
    margin-bottom: 30px;
    animation: fadeIn 0.5s forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.password-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    transform: scale(0.9);
    animation: scaleIn 0.3s forwards 0.5s;
}
@keyframes scaleIn {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}
.password-box {
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ff4444;
    border-radius: 25px;
    margin-bottom: 10px;
    width: 200px;
    outline: none;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.9);
}
.password-box:focus {
    border-color: #ff0000;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}
.submit-btn {
    padding: 12px;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.submit-btn:hover {
    background-color: #ff0000;
    transform: scale(1.05);
}
.hidden {
    display: none;
}
.error-message {
    color: #ff4444;
    margin-top: 10px;
    height: 20px;
    font-weight: bold;
    animation: shake 0.5s;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
    font-family: 'Georgia', serif;
}
.book-container {
    position: relative;
    width: 900px;
    height: 600px;
    perspective: 1500px;
    margin-bottom: 20px;
}
.book {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}
.spread {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    transform-style: preserve-3d;
}
.page-left, .page-right {
    position: relative;
    width: 50%;
    height: 100%;
    background-color: white;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}
.page-left {
    border-radius: 10px 0 0 10px;
    border-right: 1px solid #eee;
}
.page-right {
    border-radius: 0 10px 10px 0;
    border-left: 1px solid #eee;
}
.page-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}
.page-number {
    text-align: center;
    font-style: italic;
    margin-top: 20px;
}
.book-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: bold;
}

.page-flip {
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
    right: 0;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1.000);
    z-index: 10;
    backface-visibility: hidden;
    display: none;
}

.page-flip.flipping-forwards {
    right: 0;
    left: auto;
    transform-origin: left center;
}

.page-flip.flipping-backwards {
    left: 0;
    right: auto;
    transform-origin: right center;
}

.page-flip.flipped {
    transform: rotateY(-180deg);
}

.page-flip-front, .page-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    backface-visibility: hidden;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.flipping-forwards .page-flip-front {
    border-radius: 0 10px 10px 0;
    border-left: 1px solid #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 3;
}

.flipping-forwards .page-flip-back {
    transform: rotateY(180deg);
    border-radius: 10px 0 0 10px;
    border-right: 1px solid #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.flipping-backwards .page-flip-front {
    border-radius: 10px 0 0 10px;
    border-right: 1px solid #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 3;
}

.flipping-backwards .page-flip-back {
    transform: rotateY(180deg);
    border-radius: 0 10px 10px 0;
    border-left: 1px solid #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.page-flip::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0) 20%);
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s;
}

.flipping-backwards.page-flip::after {
    background: linear-gradient(to left, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0) 20%);
}

.page-flip.flipped::after {
    opacity: 1;
}

.page-flip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 5%);
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s;
    border-radius: 0 10px 10px 0;
}

.flipping-backwards.page-flip::before {
    background: linear-gradient(to left, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 5%);
    border-radius: 10px 0 0 10px;
}

.page-flip.flipped::before {
    opacity: 1;
}

.navigation {
    display: flex;
    justify-content: space-between;
    width: 900px;
    padding: 10px 0;
    background-color: rgba(255, 253, 253, 0.8);
    position: fixed;
    bottom: 0;
    z-index: 1000;
}
.nav-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: background-color 0.3s;
}
.nav-arrow:hover {
    background-color: #333;
}
.nav-arrow:disabled {
    background-color: #999;
    cursor: not-allowed;
}
.cover-right {
    background: url('../assets/cover.png') no-repeat center center;
    background-size: cover;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    text-align: center;
    padding: 40px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}
.inside-cover {
    background-color: white;
}

.image-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inside-cover-img {
    flex: 1 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
    height: auto;
    border-radius: 8px;
}

.book {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.spread::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: linear-gradient(to right, 
                                rgba(0,0,0,0.1) 0%, 
                                rgba(0,0,0,0.2) 50%, 
                                rgba(0,0,0,0.1) 100%);
    z-index: 5;
    transform: translateX(-50%);
}
.video-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .book-container {
        width: 100vw;
        height: 100vh;
        perspective: none;
        margin: 0;
        overflow: hidden;
    }

    .video-container {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        position: absolute;
        top: 0;
        left: 0;
    }

    video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .spread {
        flex-direction: column;
    }

    .page-left, .page-right {
        width: 100%;
        height: 100%;
        margin-bottom: 0;
        border-radius: 0;
        box-shadow: none;
        font-size: 20px;
    }

    .page-left {
        display: none;
    }

    .page-right {
        border-left: none;
    }

    .page-flip, .page-flip::before, .page-flip::after {
        display: none !important;
    }

    .navigation {
        width: 100%;
        background-color: rgba(255, 255, 255, 0.8);
        padding: 10px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-arrow {
        width: 50px;
        height: 50px;
        font-size: 15px;
    }

    .inside-cover img {
        width: 25px;
        height: 25px;
        margin: 20px auto;
        display: block;
    }

    .cover-right {
        width: 100%;
        height: 100%;
        background-size: contain;
        background-position: center;
        padding: 0;
        font-size: 24px;
        display: flex;
        justify-content: center;
        align-items: center;
        background-repeat: no-repeat;
    }

    .spread::before {
        display: none;
    }

    
}