:root {
    --debugColor: rgba(255, 255, 255, 0.3);
    --debugColor: rgba(255, 255, 255, 0.0);

    --widthDesktop: 30%;
    --heightDesktop: 45%;
    --widthTablet: 30%;
    --heightTablet: 45%;
    --widthMobile: 45%;
    --heightMobile: 30%;
    --widthMini: 95%;
    --heightMini: 15%;

    --background-color: rgb(32, 32, 32);
    --bright-color: rgb(255, 255, 255);
    --backgroundBrightener: rgb(255, 255, 255, 0.03);
    --backgroundResults: rgb(255, 255, 255, 0.05);
    --highlightColor: rgb(173, 40, 185);
    --buttonFontColor: rgb(255, 255, 255);
    --logText: rgba(255, 255, 255, 0.5);
}

* {
    padding: 0px;
    margin: 0px;
    appearance: none;
}

html {
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--highlightColor);
    overflow-x: hidden;
}

body {
    width: 100%;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: 16px;
    color: rgb(255, 255, 255);
    background-color: var(--debugColor);
}

h1 {
    font-size: min(25px, 5.5vw);
    font-weight: bold;
}

h2 {
    font-size: 20px;
    font-weight: bold;
}

/* SITE */

#siteContent {
    width: 100%;
    height: 100vh;
    height: 100svh;
    max-width: 100%;
    max-height: 100vh;
    max-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    /* resize: both; */
    overflow: hidden;
    background-color: var(--background-color);
}

/* TOP */

#inputContent {
    width: 100%;
    max-width: 100%;
    min-height: 200px;
    height: 20%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    background-color: var(--debugColor);
    overflow: hidden;
}

.flexContent {
    display: flex;
    background-color: var(--debugColor);
}

#flexReturn {
    flex: 20 0 250px;
    max-width: 550px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#flexSearch {
    flex: 10 1 400px;
    max-width: min(100%, 1000px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#flexLegende {
    flex: 1 0 370px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media screen and (max-width: 1200px) {
    #flexLegende {
        display: none;
    }
}

#flexLogo {
    flex: 10 0 150px;
    max-width: 440px;
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* RETURN */

#returnDiv {
    width: 95%;
    height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    overflow: hidden;
    background-color: var(--backgroundBrightener);
}

.returnText {
    margin: 0.2% 0%;
    font-size: clamp(12px, 0.8vw, 16px);
    color: var(--logText);
}

.linkToInput {
    font-weight: bold;
    text-decoration: none;
    color: var(--bright-color);
}

/* SEARCH */

input {
    width: 90%;
    font-size: 18px;
    padding: 0.5% 1%;
    margin: 20px 0px;
    border: none;
    background-color: var(--bright-color);
}

#buttonContainer {
    width: 90%;
    height: 33%;
    max-width: 90%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    background-color: var(--debugColor);
}

.divider {
    width: 3%;
    min-width: 10px;
    height: 100%;
}

.optionButtons {
    flex: 1 0;
    font-size: min(16px, 4vw);
    font-weight: bold;
    padding: 3% 15px;
    border: none;
    border-radius: 5px;
    color: var(--buttonFontColor);
    background-color: var(--highlightColor);
    transition: 0.2s;
}

.optionButtons:hover {
    cursor: pointer;
    transform: scale(1.05);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

/* LEGENDE */

#legende {
    height: 70%;
    width: 98%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin: 20px 0% 0% 5%;
    background-color: var(--debugColor);
}

#legendeHeader {
    padding: 5px 0px;
}

.legendeAnchor {
    text-decoration: none;
    color: var(--bright-color);
    padding: 5px 0px;
}

#legende:hover .legendeAnchor:not(:hover) {
    /* color: var(--logText); */
    opacity: 0.7;
}

.hLegende {
    font-weight: bolder;
    color: var(--highlightColor);
}

/* #legende:hover .legendeAnchor:hover {
    color: var(--logText);
} */

/* #legende:hover .legendeAnchor:hover p .hLegende {
    color: var(--bright-color);
} */

/* #legende:hover .legendeAnchor:not(:hover) p .hLegende {
    color: var(--bright-color);
} */

/* LOGO */

#logoContainer {
    width: 70%;
    max-width: 300px;
    height: 90%;
    background-color: var(--debugColor);
    padding: 0% 5%;
}

#giphyIMG {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 50%;
}

#logoMobile {
    display: none;
}

/* BOTTOM */

#resultContainer {
    position: relative;
    width: 100%;
    height: 80%;
    background-color: var(--backgroundResults);
}

#resultHeader {
    position: absolute;
    top: 0%;
    left: 50%;
    transform: translateX(-50%);
    height: 5%;
    min-height: 20px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

#pResult {
    background-color: var(--debugColor);
}

#result {
    position: absolute;
    top: max(5%, 20px);
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: min(90%, calc(95% - 20px));
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.resultText {
    font-size: 20px;
    margin: 10px 10px 0px;
    text-align: center;
}

.resultDiv,
.resultDivText {
    position: relative;
    width: var(--widthDesktop);
    height: var(--heightDesktop);
    border-radius: 0.2vmin;
    background-color: rgb(100, 100, 100);
    box-shadow: 0px 1vmin 1vmin rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transition: 0.15s ease-in;
}

.resultDiv:hover {
    transform: scale(1.2);
    box-shadow: 0px 2vmin 3vmin rgba(0, 0, 0, 0.5);
    transition: 0.15s ease-out;
    z-index: 5;
}

#result:has(.resultDiv:hover)>.resultDiv:not(:hover) {
    opacity: 0.75;
    filter: brightness(0.7);
}

.resultIMG,
.resultIMGhidden {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resultIMGhidden {
    object-fit: contain;
    opacity: 0;
    transform: translate(-0%, -101.5%) scale(1.2);
    transition: 0.15s ease-out;
}

.resultDiv:hover .resultIMGhidden {
    opacity: 1;
    transform: translate(-0%, -101.5%) scale(1);
}

.resultIMG {
    width: 100%;
    height: 100%;
    transition: 0.15s ease-out;
}

.resultDiv:hover .resultIMG {
    opacity: 0.75;
    filter: brightness(0.0);
}

.copyButton {
    position: absolute;
    top: 5%;
    right: 5%;
    font-size: min(12px, 4vw);
    font-weight: bold;
    color: var(--buttonFontColor);
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: var(--highlightColor);
    transition: 0.2s;
    z-index: 100;
    opacity: 0;
    transform: scale(0.2);
}

.resultDiv:hover .copyButton {
    opacity: 0.5;
    transform: scale(1);
}

.resultDiv:hover .copyButton:hover {
    cursor: pointer;
    transform: scale(1.2);
    opacity: 1;
}

.resultDivText {
    width: 18.5%;
    height: 30.33%;
    background-color: rgba(0, 0, 0, 0);
    box-shadow: none;
    overflow: hidden;
    transition: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* FOOTER */

#footerContainer {
    width: 100%;
    height: 30px;
    background-color: var(--background-color);
}

#logoMobile {
    display: none;
    width: 90%;
    padding-left: 5%;
    height: calc(100% - 30px);
}

#giphyIMGmobile {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 50%;
}

#footer {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    background-color: var(--debugColor);
}

.footerLink,
.footerText {
    padding: 0px 15px;
}

.footerLink {
    color: var(--highlightColor);
    text-decoration: none;
}

.footerText {
    color: var(--logText);
}

@media all and (max-width: 1000px) {

    .resultDiv,
    .resultDivText {
        width: var(--widthTablet);
        height: var(--heightTablet);
    }
}

@media all and (max-width: 800px) {
    #flexReturn {
        display: none;
    }

    .resultDiv,
    .resultDivText {
        width: var(--widthMobile);
        height: var(--heightMobile);
    }

    #flexSearch {
        flex: 1 0 300px;
        min-width: 100%;
    }

    #flexLogo {
        display: none;
    }

    #resultContainer {
        height: 70%;
    }

    #footerContainer {
        height: 10%;
    }

    #logoMobile {
        display: inherit;
    }

    #footer {
        height: 30px;
        justify-content: center;
    }

    .footerLink,
    .footerText {
        padding: 0px 3vw;
        font-size: 4vw;
    }
}

@media all and (max-width: 250px) {

    .resultDiv,
    .resultDivText {
        width: var(--widthMini);
        height: var(--heightMini);
    }
}