:root {
    --animation-transition: 200ms;
    --border-thickness: 2px;

    --background-tertiary: hsl(0, 0%, 0%);
    --background-secondary: hsl(0, 0%, 16%);
    --background-primary: hsl(0, 0%, 32%);

    --font-color-accent: hsl(0, 50%, 80%);
    --font-color-primary: hsl(0, 0%, 95%);
    --font-color-secondary: hsl(0, 0%, 65%);
}

html,
body {
    box-sizing: border-box;
    margin: 0;
    background: transparent;
    padding: 0;
    overflow: hidden;
}

.effect-centered {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

a.layout-wrapper {
    display: inline-block;
    position: relative;
    cursor: pointer;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

a.layout-wrapper img.watermark {
    position: absolute;
    right: 16px;
    bottom: 16px;
    opacity: 0.8;
    transition: var(--animation-transition) ease-in-out opacity;
    height: 4vw;
    min-height: 20px;
}

a.layout-wrapper:hover img.watermark,
a.layout-wrapper:focus-visible img.watermark {
    opacity: 1;
}

/* Layout: Error */
a.layout-wrapper div.error {
    box-sizing: border-box;
    border: var(--border-thickness) solid var(--background-primary);
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 8px,
            var(--background-secondary) 8px,
            var(--background-secondary) 9px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 8px,
            var(--background-secondary) 8px,
            var(--background-secondary) 9px
        );
    background-color: var(--background-tertiary);
    width: 100%;
    height: 100%;
}

a.layout-wrapper div.error p {
    border: var(--border-thickness) solid var(--background-primary);
    background-color: var(--background-tertiary);
    padding: 16px 32px;
    width: fit-content;
    color: var(--font-color-primary);
    font-size: large;
    font-family: monospace;
    text-align: center;
}

/* Layout: Canvas */
a.layout-wrapper video.decoder {
    position: absolute;
    visibility: hidden;
}

a.layout-wrapper canvas.render {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Layout: Image */
a.layout-wrapper img.render {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
