:root {
    --additional-1-c: #373e40;
    --background-c: #fdfdfd;
    --content-width: 600px;
    --navbar-height: 50px;
    --sidebar-width: 350px;
}

* {
    box-sizing: border-box;
}

body {
    padding: var(--navbar-height) 0 0 0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    color: #212529;
    background-color: var(--background-c);
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    /* For sticky footer */
    height: calc(100vh - var(--navbar-height));
    padding: 20px;
    scrollbar-gutter: stable;
    overflow-y: auto;
}

.intro {
    order: 2;
}

.browse {
    order: 1;
}

.download {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.about {
    margin-top: 20px;
}

.suggest {
    margin-top: 20px;
    display: block;
}

@media only screen and (min-width: 800px) and (min-height: 715px) {
    body {
        padding-left: var(--sidebar-width);
    }

   .intro {
       position: fixed;
       top: 0;
       left: 0;
       height: calc(100vh - var(--navbar-height));
       width: var(--sidebar-width);
       margin-top: var(--navbar-height);
       padding: 20px;
       overflow: auto;
       box-sizing: border-box;
       order: initial;
   }

   .browse {
       order: initial;
   }
}

#main-content {
    width: min(var(--content-width),100%);
    flex-grow: 1;
}

.card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin: 1rem;
}

.card {
    padding: 1rem;
    line-height: 1.5;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 0 20px 8px #d0d0d0;
    box-sizing: border-box;
}

.card--term {
    font-size: 1.5rem;
}

.term--alias {
    font-size: 1rem
}

.card--note {
    font-style: italic;
    text-align: right;
}

.math {
    font-weight: 300;
}

.navbar {
    background-color: var(--additional-1-c);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    height: var(--navbar-height);
    box-sizing: border-box;
    overflow: hidden;
}

a {
    text-decoration: none;
}

.navbar-brand {
    color: var(--background-c);
    display: inline-block;
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
    font-size: 1.25rem;
}

.search {
    position: relative;
    font-size: 1.5rem;
    padding: 15px 0 0;
    margin-top: 10px;
    width: var(--content-width);
    max-width: 100%;
}

.search form {
    display: flex;
    gap: 1rem;
}

.button {
    padding-left: 2rem;
    padding-right: 2rem;
    background-image: linear-gradient(92.88deg, #455EB5 9.16%, #5643CC 43.89%, #673FD7 64.72%);
    border-radius: 8px;
    border-style: none;
    box-sizing: border-box;
    color: #FFFFFF;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.3rem;
    line-height: 1.5;
}
.button:hover {
    box-shadow: rgb(80 63 205 / 30%) 0 1px 30px;
    transition-duration: .1s;
}

.search--input {
    flex-grow: 1;
}

.search #query {
    width: 100%;
    border: 0;
    border-bottom: 2px solid gray;
    outline: 0;

    padding: 7px 0;
    background: transparent;
    transition: border-color 0.2s;

    font-size: 1.3rem;
    line-height: 1.5;
}

.search #query::placeholder {
    color: transparent;
}

.search #query:placeholder-shown ~ label {
    font-size: 1.3rem;
    cursor: text;
    top: 20px;
}

.search label {
    position: absolute;
    top: 0;
    display: block;
    transition: 0.2s;
    font-size: 1rem;
    color: #666666;
    pointer-events: none;
}

.search #query:focus {
    padding-bottom: 6px;
    font-weight: 700;
    border-width: 3px;
    border-image: linear-gradient(to right, blue, green);
    border-image-slice: 1;
}

.search #query:focus ~ label {
    position: absolute;
    top: 0;
    display: block;
    transition: 0.2s;
    font-size: 1rem;
    font-weight: 700;
}

footer {
    flex-shrink: 0;
    order: 99;
}

/* ehdota.php */

.suggestionform {
    display: flex;
    justify-content: center;
}

.suggestionform > * {
    max-width: var(--content-width);
}

.suggestionform input,
.suggestionform textarea {
    width: 30em;
}

.suggestionform textarea {
    height: 150px;
}
