:root {
    --black: #111;
    --grey: #222;
    --font-white: #f5f5f5;
    --white: #d0d0d0;
    --yellow: #f4d950;
    --red: #bf4640;
}

body {
    background-color: black;

    background-image: url("images/background_posters.jpeg");
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover; 

    font-family: "Fjalla One", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.2rem;
    color: var(--font-white);
}

* {
    box-sizing: border-box;

    user-select: none;
    -webkit-user-select: none;
}

#reply, .details p, .details h3 {
    -webkit-user-select: text;
    user-select: text;
}

.container {
    background-color: var(--black);
    border: 1px solid var(--white);
    box-shadow: 0 0 18px 5px var(--white);
    border-radius: 3rem 3rem 0rem 0rem;

    margin: 2rem auto;
    padding: 1rem;

    max-width: 600px;
}

input[type="text"] {
    font-family: "Fjalla One", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.2rem;
    color: var(--font-white);

    caret-color: var(--yellow);

    background-color: var(--grey);
    border-radius: 2rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;

    border: 3px solid var(--white);
    outline: none;

    &.error {
        animation: shake 0.15s ease-in-out 0s 2;
    }
}

input[type="text"]::selection {
    background: var(--yellow);
}

input[type="text"]:focus {
    border-color: var(--red);
}

input[type="text"]:hover {
    scale: 1 1.05;
    background-color: var(--black);
}

input[type="text"]:active {
    scale: 1 1.1;
}

.reply {
    background-color: var(--grey);
    border-radius: 0 2rem 2rem 0;
    padding: 1rem;
    margin-bottom: 1.5rem;
    margin-left: 1.5rem;

    position: relative;
}

.reply::after {
    content: "";

    display: block; 
    position: absolute;
    border-top: 1rem solid transparent;
    border-bottom: 1rem solid transparent;
    border-right: 1.5rem solid var(--grey);

    left: -1.5rem;
    top: 1.5rem;
}

.wrapper {
    position: relative;
}

.poster-container {
    border: 2px solid var(--white);

    width: 100%;
    max-width: 300px;

    aspect-ratio: 2/3;

    display: block;

    margin: 0 auto 1.5rem auto;
    overflow: hidden;
}

.poster {
    width: 100%;
    height: 100%;
    max-width: 300px;

    aspect-ratio: 2/3;

    object-fit: cover;
    display: block;
    
    filter: blur(2px);
    -webkit-filter: blur(2px);

    transition: filter 0.5s ease;
    -webkit-transition: filter 0.5s ease;
}

.loader {
    width: 45px;
    aspect-ratio: 1;
    --c: no-repeat linear-gradient(#ffffff 0 0);
    background: 
        var(--c) 0%   50%,
        var(--c) 50%  50%,
        var(--c) 100% 50%;
    background-size: 20% 100%;
    animation: l1 1s infinite linear;

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10; 

    display: none;
}

.details {
    background-color: var(--grey);
    border-radius: 2rem 2rem 0rem 0rem;
    padding: 0.1rem 1rem;

    position: relative;

    overflow: hidden;
    opacity: 0;
    max-height: 0px;
    transition: opacity 1s ease, max-height 1s ease;
}

.details.show {
    opacity: 1;
    max-height: 1000px;
}

.details h3 {
    font-size: 1.7rem;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
}

.attribution {
    font-style: italic;
    text-align: center;
    font-size: 0.8rem;
}

a {
    color: var(--yellow);
}

a:hover {
    color: var(--red);
}

#reply::selection, .details p::selection, .details h3::selection {
    background: var(--yellow);
}

@keyframes l1 {
    0%  {background-size: 20% 100%,20% 100%,20% 100%}
    33% {background-size: 20% 10% ,20% 100%,20% 100%}
    50% {background-size: 20% 100%,20% 10% ,20% 100%}
    66% {background-size: 20% 100%,20% 100%,20% 10% }
    100%{background-size: 20% 100%,20% 100%,20% 100%}
}

@keyframes shake {
    0% { margin-left: 0rem; }
    25% { margin-left: 0.3rem; }
    75% { margin-left: -0.3rem; }
    100% { margin-left: 0rem; }
}