* {
    box-sizing: border-box;
    font-size: 1rem;
    line-height: 1rem;
    font-family: --apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol';
    word-wrap: break-word;
    user-select: none;
}

body {
    display: grid;
    align-items: center;
    justify-items: center;
    background: hsl(0, 0%, 0%) url('backdrop.jpg') left top;
    background-attachment: fixed;
    padding: 4rem 0;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: hsl(0, 100%, 100%);
    padding-bottom: 2rem;
    letter-spacing: -1px;
    text-align: center;
}
.container {
    max-width: 1060px;
}

#filter-listing {
    display: grid;
    grid-column-gap: 10px;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 1;
    color: hsl(0, 100%, 100%);
}

#filter-listing input {
    cursor: pointer;
    position: relative;
    top: -2px;
    margin-right: 6px;
    padding: 0;
}

#filter-listing {
    margin: 1rem 0;
}

#filter-listing label {
    background-color: hsla(0, 0%, 20%, 0.85);
    cursor: pointer;
    font-weight: 500;
    min-width: 200px;
    display: block;
    text-align: center;
    padding: 1rem;
    border-radius: 4px;
    transition: background-color 125ms ease-in-out;
}

#filter-listing label:hover {
    background-color: hsla(0, 0%, 27%, 0.85);
    transition: background-color 125ms ease-in-out;
}

#search {
    text-align: center;
    padding-bottom: 60px;
}

#search-form {
    position: relative;
}

#search-form input {
    width: 630px;
    margin: 0;
    padding: 0.95rem 1rem 1.15rem 2.5rem;
    outline: none;
    border: 0;
    line-height: 1rem;
    border-radius: 6px;
    background-color: hsla(0, 0%, 20%, 0.85);
    color: hsl(0, 100%, 100%);
    position: relative;
    transition: background-color 125ms ease-in-out;
}

#search-form input:hover {
    background-color: hsla(0, 0%, 27%, 0.85);
    transition: background-color 125ms ease-in-out;
}

#search-form input:focus {
    box-shadow: 0 0 0 3px hsla(0, 0%, 35%, 0.85);
    background-color: hsla(0, 0%, 20%, 0.85);
    transition: box-shadow, background-color 125ms ease-in-out;
}

#search-form .icon {
    background: url('search.svg') no-repeat;
    background-size: 20px;
    position: absolute;
    width: 20px;
    height: 20px;
    margin-top: 15px;
    margin-left: 10px;
}

#movie-listing {
    display: grid;
    grid-column-gap: 15px;
    grid-row-gap: 60px;
    grid-template-columns: repeat(5, 1fr);
    justify-items: stretch;
}

.movie {
    max-width: auto;
    transition: transform 125ms ease-in-out;
}

.movie a img {
    border: none;
    width: 200px;
    height: 280px;
    border-radius: 4px;
}

.movie:hover {
    transform: scale(1.05);
}

.highlight-movie a:before {
    content: '\00a0';
    background-image: linear-gradient(
        to bottom,
        transparent 0%,
        hsla(230, 100%, 70%, 0.666) 100%
    );
    position: absolute;
    width: 200px;
    height: 280px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 125ms ease-in-out;
}

.highlight-movie a:hover:before {
    opacity: 1;
}

.highlight-series a:before {
    /* \00a0 = nbsp */
    content: '\00a0';
    background-image: linear-gradient(
        to bottom,
        transparent 0%,
        hsla(25, 100%, 60%, 0.666) 100%
    );
    position: absolute;
    width: 200px;
    height: 280px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 125ms ease-in-out;
}

.highlight-series a:hover:before {
    opacity: 1;
}

.title {
    font-size: 1rem;
    font-weight: 700;
    color: hsla(0, 100%, 100%, 0.85);
    line-height: 1.25rem;
}

.year {
    font-size: 0.75rem;
    color: hsla(0, 100%, 100%, 0.5);
    padding: 6px 0px 6px 0px;
    text-transform: uppercase;
    font-weight: 600;
}

.type {
    font-size: 0.55rem;
    border-radius: 3px;
    padding: 1px 6px 1px 6px;
    color: hsla(0, 100%, 100%, 1);
    position: relative;
    top: -1px;
    float: right;
    text-transform: uppercase;
    font-weight: 800;
}

.type-movie {
    background-color: hsla(230, 100%, 70%, 1);
}

.type-series {
    background-color: hsla(25, 100%, 60%, 1);
}

/* Tooltip example from https://www.w3schools.com/css/css_tooltip.asp */

.tooltip {
    position: relative;
}

.tooltip .tooltip-text {
    opacity: 0;
    background-color: hsl(45, 100%, 60%);
    color: hsl(0, 0%, 0%);
    box-shadow: 0 1px 5px hsl(0, 0%, 0%);
    padding: 4px 6px;
    position: absolute;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: left;
    line-height: 0.875rem;
    margin-left: 3px;
    margin-top: -3rem;
    width: 128px;
    border-radius: 2px;
}

.tooltip:hover .tooltip-text {
    opacity: 1;
    transition: opacity 150ms ease-in-out;
    transition-delay: 1250ms;
}
