html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: black;
    color: white;
}

p {
    margin: 10px;
}

input {
    user-select: text;
    -webkit-user-select: text;
}

.loggin {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loggin img {
    width: 50vw;
    max-width: 500px;
    margin-bottom: 40px;
}

.logo img {
    width: 50vw;
    max-width: 500px;
    margin-bottom: 50px;
}

.loggin input {
    width: 220px;
    margin-bottom: 15px;
    font-size: 1rem;
    background-color: rgb(43, 43, 43);
    border: white 2px solid;
    color: var(--grey-font);
    border-radius: 10px;
    padding: 10px;
}

.loggin input :hover :focus-visible {
    outline: transparent;
}

button {
    margin: 10px;
    padding: 10px 50px;
    font-size: 1rem;
    background-color: white;
    color: black !important;
    border: 0px;
    border-radius: 10px;
}

.logo {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.spinner {
    margin-bottom: 20px;
    border: 4px solid white;
    border-left-color: transparent;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.d-none {
    display: none !important;
}

#movies {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: max-content minmax(0, 1fr) max-content minmax(0, 1fr) max-content minmax(0, 1fr) max-content minmax(0, 1fr);
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
    gap: 5px 15px;
    margin: 0;
}

.film {
    /* width: 100%;
    height: 100%; */
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.film img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Explicit mapping for rows to prevent 'display: none' titles from shifting the films into the wrong rows */
.titulo:nth-of-type(1) { grid-row: 1; }
#mov1, #mov2, #mov3, #mov4, #mov5 { grid-row: 2; }
.titulo:nth-of-type(2) { grid-row: 3; }
#mov6, #mov7, #mov8, #mov9, #mov10 { grid-row: 4; }
.titulo:nth-of-type(3) { grid-row: 5; }
#mov11, #mov12, #mov13, #mov14, #mov15 { grid-row: 6; }
.titulo:nth-of-type(4) { grid-row: 7; }
#mov16, #mov17, #mov18, #mov19, #mov20 { grid-row: 8; }

.fade-in {
    opacity: 1;
    -webkit-transition: opacity 0.3s ease-in-out;
    -moz-transition: opacity 0.3s ease-in-out;
    -o-transition: opacity 0.3s ease-in-out;
    -ms-transition: opacity 0.3s ease-in-out;
    transition: opacity 0.3s ease-in-out;
}

.fade-in.fade {
    opacity: 0;
}

.zoom {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(150%);
    -webkit-transition: opacity 0.3s ease-in-out;
    -moz-transition: opacity 0.3s ease-in-out;
    -o-transition: opacity 0.3s ease-in-out;
    -ms-transition: opacity 0.3s ease-in-out;
    transition: transform 0.3s ease;

}

.titulo {
    grid-column: 1 / 6;
    color: white;
    font-weight: bold;
    margin: 0;
}

.color {
    color: transparent !important;
}

.titulo p {
    margin: 0;
}

/* .titulo:has(p:empty) {
    display: none;
}

p:empty {
    display: none;
} */

@media (orientation: portrait) {
    #movies {
        width: 100vh;
        height: 100vw;
        transform: translate(-50%, -50%) rotate(90deg);
    }
}