:root {
    --body-background-color: rgb(238, 238, 238);
    --font: "Nunito", sans-serif;
    --second-font: "Barlow", sans-serif;
    --text-color: black;
    --search-background-color: rgb(255, 255, 255);
    --genral-border-color: rgb(13, 13, 13);
    --special-result-background-color: white;
    --selection-background-color: rgb(138, 48, 0);
    --selection-color: rgb(255, 255, 255);
    --search-result-background-color: rgb(122, 122, 122);
    --code-font: "Fira Code", monospace;
    --link-color: rgb(0, 130, 167);
}

@media (prefers-color-scheme: dark) {
    :root {
        --body-background-color: rgb(19, 19, 19);
        --search-background-color: rgb(255, 255, 255);
        --font: "Nunito", sans-serif;
        --second-font: "Barlow", sans-serif;
        --code-font: "Fira Code", monospace;
        --text-color: white;
        --genral-border-color: white;
        --special-result-background-color: var(--body-background-color);
        --selection-background-color: rgb(138, 48, 0);
        --selection-color: rgb(255, 255, 255);
        --search-result-background-color: rgb(38, 38, 38);
        --link-color: rgb(0, 130, 167);
    }
}

::selection {
    background-color: var(--selection-background-color);
    color: var(--selection-color);
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100vh;
}

body {
    color: var(--text-color);
    background-color: var(--body-background-color);
    font-family: var(--font);
}

.search-bar {
    width: 50%;
    display: flex;
    justify-content: center;
}

.search-bar input {
    padding: 15px;
    flex: 1;
    border-left: 4px solid rgb(255, 162, 0);
    border-top: 4px solid green;
    border-bottom: 4px solid blue;
    caret-color: green;
    border-radius: 30px 0 0 30px;
    background-color: var(--search-background-color);
    font-size: 17px;
    border-right: none;
    outline: none;
    transition: border 0.5s linear;
}

.search-bar input::placeholder {
    font-family: var(--second-font);
    font-weight: 400;
}

.search-bar:focus-within input {
    border: 4px solid green;
    border-right: none;
}

.search-bar:focus-within .search-button {
    border: 4px solid green;
    border-left: none;
}

.search-bar:focus-within .home-button {
    border: 4px solid green;
    border-right: 2px solid rgb(209, 209, 209);
}

.search-bar button {
    padding: 8px 15px;
    border-top: 4px solid green;
    border-bottom: 4px solid blue;
    background-color: var(--search-background-color);
    color: rgb(54, 54, 54);
    font-size: 18px;
    transition: border 0.5s linear, font-size 0.1s ease;
}

.search-button {
    border-right: 4px solid rgb(255, 162, 0);
    border-left: none;
    margin-left: -1px;
    border-radius: 0 30px 30px 0;
}

.search-bar button:hover {
    cursor: pointer;
    color: black;
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    width: 100vw;
    position: relative;
}

.home-button {
    border-radius: 30px 0 0 30px;
    border-right: none;
    border-left: 4px solid rgb(255, 162, 0);
    border-right: 2px solid rgb(209, 209, 209);
}

.disable-message {
    color: rgb(113, 113, 113);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    flex: 1;
}

.code-highlight,
.code-snippet {
    background-color: rgb(59, 59, 59);
    padding: 1px;
    border-radius: 5px;
    font-size: 15px;
    font-family: var(--code-font);
    position: relative;
    overflow: hidden;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.code-snippet{
    padding: 10px 5px 5px 5px;
}

.code-snippet-copy{
    position: absolute;
    right: 0;
    top: 0;
}

.code-snippet-copy button{
    background-color: rgb(43, 43, 43);
    color: white;
    border: none;
    padding: 3px;
    border-bottom-left-radius: 8px;
    font-size: 17px;
    z-index: 2;
}

@media only screen and (max-width: 780px) {
    .search-bar {
        width: 95%;
    }
}