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

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
html::-webkit-scrollbar { display: none; }

body {
    background: #08030f;
    overflow-x: hidden;
}

/* Full-viewport scene */
#scene {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse 90% 80% at 50% 52%, #1c0838 0%, #08030f 100%);
    position: relative;
    overflow: hidden;
}

/* Slide stage — where images live */
#stage {
    position: relative;
    width: 88vw;
    height: 88vh;
    max-width: 1200px;
    perspective: 1600px;
    perspective-origin: center center;
}

/* Individual slides */
.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform, opacity;
    transform-style: preserve-3d;
}

.slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    box-shadow:
        0 25px 60px rgba(0,0,0,0.75),
        0  6px 20px rgba(0,0,0,0.5);
    pointer-events: none;
    user-select: none;
}

/* Page counter */
#counter {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.45);
    font-family: Georgia, serif;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    z-index: 50;
    pointer-events: none;
}
#pg  { color: #ffd700; font-weight: bold; }
.of  { opacity: 0.5; }

/* Thumbnail sidebar */
#sidebar {
    position: fixed;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 84px;
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 10px;
    padding: 8px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 7px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    scrollbar-width: none;
}
#sidebar::-webkit-scrollbar { display: none; }
#sidebar.show { opacity: 1; pointer-events: auto; }

.thumb {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    border-radius: 3px;
    border: 2px solid transparent;
    opacity: 0.36;
    transition: opacity 0.2s, transform 0.2s, border-color 0.2s;
}
.thumb:hover { opacity: 0.75; transform: scale(1.05); }
.thumb.on    { opacity: 1;    border-color: #ffd700; transform: scale(1.09); }

/* Mobile */
@media (max-width: 640px) {
    #stage  { width: 96vw; height: 80vh; }
    #sidebar { width: 60px; right: 6px; }
}
