* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #fff;
    font-family: 'Georgia', 'Times New Roman', serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Flipbook container - fullscreen */
#flipbook {
    width: 85vh;
    height: 95vh;
    max-width: 700px;
    background: #fff;
}

#flipbook .page {
    background: #fff;
    overflow: hidden;
}

.page-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.page-inner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-number {
    position: absolute;
    bottom: 6px;
    right: 12px;
    font-size: 12px;
    color: #999;
    font-family: monospace;
}

/* Floating audio controls */
.floating-audio {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.75);
    padding: 8px 16px;
    border-radius: 30px;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.floating-audio .ctrl-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    background: transparent;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.floating-audio .ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.floating-audio .ctrl-btn.playing {
    border-color: #4caf50;
    color: #4caf50;
}

.floating-audio .audio-progress {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.floating-audio .audio-progress-bar {
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.floating-audio .audio-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 30px;
    text-align: right;
    font-family: monospace;
}

/* Navigation buttons */
.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid #ccc;
    background: transparent;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: #f0f0f0;
}

.nav-btn:disabled {
    opacity: 0.2;
    cursor: default;
}

/* Responsive */
@media (max-width: 600px) {
    #flipbook {
        width: 95vw;
        height: 90vh;
    }

    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .floating-audio {
        padding: 6px 12px;
        gap: 6px;
    }

    .floating-audio .ctrl-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .floating-audio .audio-progress {
        width: 60px;
    }
}
