
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #e9edf2;
    color: #222;
}

.header {
    height: 70px;
    background: #172033;
    color: white;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h2 {
    font-size: 22px;
}

button {
    cursor: pointer;
    border: none;
    border-radius: 5px;
    padding: 10px 16px;
    font-size: 14px;
}

#fullscreenBtn {
    background: #f5a623;
    font-weight: bold;
}

.gallery-container {
    max-width: 1250px;
    margin: auto;
    padding: 30px 20px;
	margin-top:50px;
}

.viewer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    min-height: 650px;
}

.book-wrapper {
    width: 100%;
    max-width: 1050px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#flipbook {
    margin: auto;
}

.nav-btn {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    background: #172033;
    color: white;
    font-size: 20px;
    border-radius: 50%;
}

.nav-btn:hover {
    background: #f5a623;
    color: #111;
}

.nav-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 25px auto;
    flex-wrap: wrap;
}

.controls button {
    background: #172033;
    color: white;
}

.controls button:hover {
    background: #f5a623;
    color: #111;
}

#pageNumber {
    font-weight: bold;
    min-width: 100px;
    text-align: center;
}

.thumbnail-section {
    margin-top: 35px;
}

.thumbnail-section h3 {
    margin-bottom: 15px;
}

.thumbnail-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 3px 20px;
}

.thumbnail {
    width: 85px;
    height: 115px;
    flex-shrink: 0;
    border: 3px solid transparent;
    border-radius: 4px;
    background: white;
    overflow: hidden;
    cursor: pointer;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail.active {
    border-color: #f5a623;
}

footer {
    background: #172033;
    color: white;
    text-align: center;
    padding: 20px;
}

/* Fullscreen */

.gallery-container:fullscreen {
    max-width: none;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: #e9edf2;
}

.gallery-container:fullscreen .viewer {
    min-height: 75vh;
}

.gallery-container:fullscreen .book-wrapper {
    max-width: 1200px;
}

/* Responsive */

@media (max-width: 700px) {

    .header {
        height: 60px;
        padding: 0 15px;
    }

    .header h2 {
        font-size: 16px;
    }

    .gallery-container {
        padding: 15px 5px;
    }

    .viewer {
        min-height: 480px;
        gap: 5px;
    }

    .book-wrapper {
        min-width: 0;
        overflow: hidden;
    }

    .nav-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
        padding: 0;
    }

    .controls {
        gap: 6px;
    }

    .controls button {
        padding: 8px;
        font-size: 11px;
    }

    #pageNumber {
        min-width: 75px;
        font-size: 12px;
    }

    .thumbnail {
        width: 65px;
        height: 90px;
    }
}
