@font-face {
    font-family: 'BEW_OT_Regular';
    src: url('assets/bew-ot-regular.otf');
    font-weight: normal;
    font-style: normal;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'BEW_OT_Regular', 'Georgia', serif;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
}

/* Background Video */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Card Container */
.card-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    perspective: 2000px;
    perspective-origin: center center;
}

/* Book Wrapper */
.book {
    width: 700px;
    height: 393px;
    position: relative;
    transform-style: preserve-3d;
    transform: translateZ(0);
}

/* Pages */
.page {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

/* Left Page (Flips - Front to Inside Left) */
.page-left {
    left: 0;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: none;
    z-index: 2;
}

/* Right Page (Static - Inside Right, always visible behind) */
.page-right {
    right: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.page-right img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Page Faces (Front and Back of Right Page) */
.page-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.page-face img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Front Face (Outside - Cover) */
.page-front {
    transform: rotateY(0deg);
}

/* Back Face (Inside Right) */
.page-back {
    transform: rotateY(180deg);
}

/* Flip Button Styles */
.flip-btn {
    padding: 15px 40px;
    font-size: 18px;
    font-family: 'BEW_OT_Regular', 'Georgia', serif;
    color: #fff;
    background: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    letter-spacing: 1px;
    font-weight: 400;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.flip-btn:hover {
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .book {
        width: 90vw;
        height: calc(90vw * 0.714); /* Maintain 700:500 aspect ratio */
        max-width: 700px;
        max-height: 500px;
    }
    
    .flip-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .flip-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .card-container {
        gap: 20px;
    }
}
