* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

.viewer,
.slides,
.slide {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}

.viewer {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    transition: filter 250ms ease, transform 250ms ease;
}

.viewer.is-blurred {
    filter: blur(8px) brightness(0.72);
    transform: scale(1.015);
    user-select: none;
}

.slides {
    display: flex;
    transform: translateX(0);
    transition: transform 400ms ease;
    will-change: transform;
}

.slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.media-item {
    display: block;
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    object-fit: contain;
    object-position: center;
    background: #000;
    flex: 0 0 auto;
}

.dots {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
    max-width: calc(100vw - 2rem);
    overflow-x: auto;
    padding: 0.5rem;
    transform: translateX(-50%);
}

.dot {
    flex: 0 0 auto;
    width: 0.7rem;
    height: 0.7rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
}

.dot.is-active {
    background: #fff;
    transform: scale(1.2);
}

.dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.sound-button {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    display: grid;
    place-items: center;
    width: 2.85rem;
    height: 2.85rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(14px) saturate(1.25);
    box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.22);
    transition: background 180ms ease, transform 180ms ease;
}

.sound-button:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.sound-button:active {
    transform: scale(0.96);
}

.sound-button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.sound-icon {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sound-icon-on,
.sound-button.is-sound-on .sound-icon-muted {
    display: none;
}

.sound-button.is-sound-on .sound-icon-on {
    display: block;
}

.password-gate {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 28rem),
        rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.password-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: min(100%, 22rem);
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: 0 1.2rem 4rem rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px) saturate(1.35);
    pointer-events: auto;
}

.password-card input {
    min-width: 0;
    flex: 1;
    border: 0;
    border-radius: 999px;
    padding: 0.9rem 0.6rem 0.9rem 1rem;
    background: transparent;
    color: #fff;
    font: inherit;
    outline: none;
}

.password-card input::placeholder {
    color: rgba(255, 255, 255, 0.68);
}

.password-card input:focus {
    box-shadow: none;
}

.password-card button {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.password-card button svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-card button:hover {
    background: #fff;
    box-shadow: 0 0.55rem 1.4rem rgba(0, 0, 0, 0.22);
    transform: translateX(1px);
}

.password-card button:active {
    transform: scale(0.96);
}

.password-card:focus-within {
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow:
        0 1.2rem 4rem rgba(0, 0, 0, 0.32),
        0 0 0 4px rgba(255, 255, 255, 0.1);
}

.password-error {
    position: absolute;
    top: calc(100% + 0.7rem);
    left: 50%;
    width: max-content;
    max-width: 100%;
    margin: 0;
    color: rgba(255, 210, 210, 0.92);
    font-size: 0.82rem;
    transform: translateX(-50%);
}

.empty-state {
    min-height: 100vh;
    display: grid;
    place-content: center;
    gap: 0.5rem;
    padding: 2rem;
    text-align: center;
}

.empty-state h1,
.empty-state p {
    margin: 0;
}

.empty-state code {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 0.25rem;
    padding: 0.15rem 0.35rem;
}
