body {
    margin: 0;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

.flipbook {
    width: 100%;
    height: 100%;
}

.flipbook-container {
    position: relative;
    width: 100%;
    height: 500px;
    border: none;
    margin: 20px 0;
    overflow: hidden;
}

.dropdown-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.book-dropdown {
    position: relative;
    display: inline-block; /* or inline-flex */
}
.open-button {
    padding: 10px 20px;
    margin-right: 10px;
    border: 1px solid #4C5EAD;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    text-align: center;
}

@media (min-width: 769px) {
    .open-button {
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .open-button {
        justify-content: space-between;
    }
}

.dropdown-content {
    /* Start with hidden state */
    opacity: 0;
    visibility: hidden;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    min-width: 280px;
    width: max-content;
    margin: 0 auto;
    z-index: 10;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-top: 5px;

    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.book-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


.book-dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 10px;
    bottom: -10px;
    background: transparent;
}

.book-option {
    padding: 16px 20px;
    text-decoration: none;
    display: block;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.book-option:last-child {
    border-bottom: none;
}

.book-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.book-title {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 14px;
}

.book-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile */
@media (max-width: 768px) {
    .book-dropdown {
        display: block;
        margin-bottom: 10px;
    }

    .dropdown-content {
        left: 0;
        top: 100%;
        width: 100%;
        min-width: auto;
        margin-top: 8px;
    }

    .open-button {
        width: 100%;
        margin-right: 0;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .book-dropdown {
        display: block;
        margin-bottom: 10px;
    }

    .dropdown-content {
        left: 0;
        top: 100%;
        width: 100%;
    }

    .open-button {
        width: 100%;
        margin-right: 0;
    }
}

/* Fix for flipbook page boundaries */
.flipbook-container ::v-deep .viewport {
    overflow: hidden !important;
}

.flipbook-container ::v-deep .bounding-box {
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Controls Bar */
.controls-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
}

.nav-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-btn {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    color: white;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Fullscreen */
.flipbook-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background: rgba(15, 15, 90, 100);
    margin: 0;
    border: none;
    touch-action: pan-x;
}

.flipbook-container.fullscreen .controls-bar {
    top: 30px;
    padding: 10px 20px;
}

.flipbook-container.fullscreen .nav-btn {
    width: 45px;
    height: 45px;
}

.flipbook-container.fullscreen .nav-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile */
@media (max-width: 768px) {
    .controls-bar {
        top: 10px;
        gap: 10px;
        padding: 6px 12px;
    }

    .nav-controls {
        gap: 5px;
    }

    .action-controls {
        gap: 5px;
        margin-left: 8px;
        padding-left: 8px;
    }

    .nav-btn {
        width: 36px;
        height: 36px;
    }

    .nav-btn svg {
        width: 16px;
        height: 16px;
    }
}