@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    --bg: #111;
    --panel: rgba(0, 0, 0, .45);
    --btn: #ffffffee;
    --btnText: #111;
    --shadow: 0 18px 60px rgba(0, 0, 0, .55);
    --radius: 14px;
    --radiusBtn: 12px;

    --topPad: 58px;
    --bottomPad: 58px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    font-family: 'Prompt', system-ui, -apple-system, "Segoe UI", sans-serif;
    overflow: hidden;
}

img {
    user-select: none;
    -webkit-user-drag: none;
}

.ui {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
}

.left,
.right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pill {
    color: #fff;
    background: var(--panel);
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

button,
.btn {
    display: inline-block;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--btn);
    color: var(--btnText);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
    transition: transform .08s ease, opacity .15s ease;
}

button:active,
.btn:active {
    transform: scale(.98);
}

.stage {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--topPad) 12px var(--bottomPad);
}

.zoomWrap {
    transform-origin: center top;
    will-change: transform;
}

#flipbook {
    background: #fff;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
}

.page {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
}

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

.bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px;
    z-index: 10;
    background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
}

.navbtn {
    width: 48px;
    height: 44px;
    border-radius: var(--radiusBtn);
    display: grid;
    place-items: center;
    padding: 0;
}

input[type="range"] {
    width: min(55vw, 420px);
    accent-color: #fff;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, .35);
    border-radius: 999px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, .2);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}

#flipbook,
.page,
.page img {
    transform: translateZ(0);
    backface-visibility: hidden;
}

.page img {
    image-rendering: auto;
}

@media (max-width:420px) {
    button {
        padding: 9px 10px;
    }

    .navbtn {
        width: 44px;
        height: 42px;
    }

    .pill {
        font-size: 12px;
        padding: 7px 9px;
    }

    input[type="range"] {
        width: min(58vw, 320px);
    }
}