/* GENERAL */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
    --color-lighter: #F5F7FF;
    --color-light: #D2D2FF;
    --color-primary: #6A70DD;
    --padding: min(5%, 50px)
}

body{
    background-color: var(--color-light);
    width: 100%;
    min-height: 100vh;
    font-family: "Roboto", sans-serif;
}

/* SEARCH */
.search-area{
    width: 100%;
    padding: calc(var(--padding) + 12px) var(--padding)  0 var(--padding);
}
.search-container{
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    transition: all 0.3s ease-in-out;
}
.search-container.front:hover{
    transform: scale(1.55);
}
.search{
    width: 100%;
    background-color: var(--color-lighter);
    border-radius: 10px;
    overflow: hidden;
}
.search-container label{
    z-index: 2;
    font-size: 20px;
    color: black;
    user-select: none;

    font-weight: bold;
    position: absolute;
    top: -15px;
    left: 12px;
}
#search{
    width: 100%;
    padding: 15px;
    outline: none;
    border: none;
    font-size: 14px;
}

.front{
    max-width: min(calc(100vw / 1.5 - 2 * var(--padding)), 600px);
    margin-top: calc(100vh / 2 - 70px - 45px);
    transform: scale(1.5);
}

/* RESULTS */
section.results{
    width: 100%;
    height: 100%;
    padding: var(--padding);
}

#results{
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result{
    width: 100%;
    padding: 15px;
    border-radius: 15px;
    background-color: var(--color-lighter);
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    color: black;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.result > img{
    width: 170px;
    border-radius: 10px;
}
.result > div{
    width: 100%;
}
.result > div > p:nth-child(1){
    font-size: 17px;
    font-weight: bold;
}
.result > div > p:nth-child(2){
    margin-top: 4px;
    font-size: 15px;
}
.result > div > p:nth-child(2) > strong{
    font-weight: normal;
    color: white;
    background-color: var(--color-primary);
}
.result > div > p:nth-child(3){
    text-align: right;
    font-size: 15px;
    text-decoration: underline;
    margin-top: 13px;
}
.result-enter-animation{
    opacity: 0;
    animation: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) result-enter forwards;
}
@keyframes result-enter {
    from{
        transform: scale(0.95) translateY(50px);
        opacity: 0;
    }
    to{
        opacity: 1;
    }
}
.result:hover{
    transform: scale(1.05);
}
.result:active{
    transform: scale(0.95);
}

#not_found{
    background-color: var(--color-lighter);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
    border-radius: 15px;
}
#not_found p {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}
#not_found > *:nth-child(2){
    width: 100%;
    border-radius: 15px;
}

/* VIDEO SECTION */
#videos_container{
    z-index: 3;
    position: fixed;
    inset: 0;
    background-color: white;
    padding: var(--padding);
    overflow-y: auto;
    transition: all 0.3s ease-in-out;
    transform: translateY(100%);
}
#videos_container.opened{
    transform: none;
}
#videos_container > p{
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
}
.videos{
    margin-top: var(--padding);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: start;
    justify-content: center;
}
.videos > a{
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.videos > a > img{
    width: 335px;
}
.videos > a:hover{
    transform: scale(1.05);
}
.videos > a:active{
    transform: scale(1.05);
}
#videos_close{
    position: absolute;
    top: var(--padding);
    right: var(--padding);
    width: 50px;
    height: 50px;
    padding: 10px;    
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#videos_close:hover{
    transform: rotate(90deg);
}
#videos_close:active{
    transform: rotate(90deg) scale(0.9);
}

#open_videos{
    --btn-padding: 0.8rem;
    position: fixed;
    bottom: var(--padding);
    right: var(--padding);
    outline: none;
    border: none;
    background-color: white;
    padding: var(--btn-padding);
    display: flex;
    align-items: center;
    justify-content: start;
    gap: var(--btn-padding);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    width: calc(30px + 2 * var(--btn-padding));
    height: calc(30px + 2 * var(--btn-padding));
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    border-bottom: 3px solid var(--color-light);
}
#open_videos:hover{
    width: calc(184px + 3 * var(--btn-padding) + 30px);
    border-bottom: 3px solid var(--color-primary);
}
#open_videos:active{
    transform: scale(0.95);
}
#open_videos > img{
    width: 30px;
    height: 30px;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#open_videos:hover > img{
    transform: rotate(360deg);
}
#open_videos > span{
    white-space: nowrap;
}