/* Общее */

body {
    margin: auto;
    max-width: calc((320px - 16px * 2) * 3 + 16px * 2);
    padding: 16px;

    display: flex;
    flex-direction: column;
    gap: 32px;

    font-family: "Inter";

    color-scheme: dark;
    color: #ffffff;
    background: #18191c;
}

h1 {
    font-family: "Pangolin";
    font-size: 32px;
    font-weight: bolder;
    text-align: center;

    color: #ff8a7a;
}

h2 {
    font-family: "Pangolin";
    font-size: 24px;
    font-weight: bold;
}

img {
    width: 100%;
}

a {
    all: unset;
    
    cursor: pointer;
}

input, textarea, button {
    font-family: "Inter";
    font-size: 16px;
}

input {
    box-sizing: border-box;
    width: 100%;
    padding: 8px;
}

input[type="file"] {
    padding: 0;
}

textarea {
    box-sizing: border-box;
    width: 100%;
    height: 80px;
    padding: 8px;
}

.divider {
    margin-bottom: 32px;
    width: 100%;
    height: 10px;

    background: url('/static/index/tooth.png');
}

/* Мемы */

#memes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.meme {
    box-sizing: border-box;

    width: calc(320px - 16px * 2);
    height: 100%;
    padding: 16px;

    background-color: field;
}

.meme img {
    aspect-ratio: 1 / 1;

    object-fit: contain;
}

.meme-date {
    display: inline;

    font-size: 16px;
    font-weight: normal;
}

/* Мем */

#meme {}

#meme img {
    max-height: 320px;

    object-fit: contain;
}

/* Предложка */

#suggest {}

.suggest_form_field {
    max-width: 320px;
}

/* Поиск */

#search {}

#search form {
    display: flex;
    gap: 8px;
}

/* Подвал */

#footer {}

#footer_devs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 16px;
}

#footer_devs_role {}

.footer_devs_role_title {
    font-weight: bold;
}

.footer_devs_role_list_element a {
    color: #ff8a7a;
    text-decoration: underline;
}

/* Адаптивная верстка */

@media (max-width: 1024px) {
    #memes {
        max-width: calc((320px - 16px * 2) * 2 + 16px * 1);
    }
}

@media (max-width: 512px) {
    #memes {
        justify-content: center;
    }
    #footer_devs {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
}

.snow {
    --animation-name: snowfall;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}
.snow__flake {
    position: relative;
    top: -1.5em;
    color: #c1dcec;
    animation-name: var(--animation-name);
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    will-change: transform;
}
@keyframes snowfall {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(calc(100vh + 1.5em));
  }
}
