* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background-image: url("images/pigs.png");
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
    font-family: "Iosevka Charon Mono", monospace;
}

.container {
    min-height: 100vh;
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding-top: 60px;
}

h1 {
    font-size: 32px;
    margin-bottom: 70px;
    text-align: center;
}

#nameInput {
    width: 330px;
    height: 80px;

    padding: 0 20px;

    border: none;
    outline: none;

    background: white;
    font-size: 28px;
}

#nameInput::placeholder {
    color: #333;
}

/* КНОПКА ПРОВЕРИТЬ */

#checkButton {
    position: absolute;

    left: 0;
    top: 50%;
    transform: translateY(-50%);

    width: 100px;
    height: 500px;

    border: none;
    background: white;

    font-size: 28px;
    font-weight: normal;

    writing-mode: vertical-rl;
    text-orientation: upright;

    cursor: pointer;
}

/* КНОПКА СВИНКИ */

#secondButton {
    position: absolute;

    right: 25px;
    bottom: 30px;

    width: 190px;
    min-height: 100px;

    padding: 15px 20px;

    border: none;
    background: white;

    font-size: 18px;
    line-height: 1.2;

    cursor: pointer;
}

/* TELEGRAM */

#telegramButton {
    display: block;

    margin: 30px auto 0;

    padding: 12px 30px;

    background: #229ED9;
    color: white;

    border: none;
    border-radius: 10px;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    transition:
        transform 0.2s,
        background 0.2s;
}

#telegramButton:hover {
    transform: scale(1.05);
    background: #168AC0;
}

#telegramButton:active {
    transform: scale(0.97);
}

/* ОКНО РЕЗУЛЬТАТА */

.modal {
    display: none;

    position: fixed;
    inset: 0;

    background: transparent;

    justify-content: center;
    align-items: center;

    z-index: 1000;
}

.modalContent {
    position: relative;

    width: min(90vw, 700px);

    text-align: center;
}

.resultImages {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 100%;
}

.resultImages img {
    width: 500px;
    height: 500px;

    object-fit: cover;

    display: block;
}

#resultImage2 {
    display: none;
}

#resultText {
    position: absolute;

    top: 20px;
    left: 0;
    right: 0;

    margin: 0;

    color: red;

    font-size: clamp(28px, 5vw, 60px);
    font-weight: normal;

    z-index: 2;
}

.closeButton {
    position: absolute;

    top: -50px;
    right: 0;

    border: none;
    background: transparent;

    color: white;

    font-size: 40px;

    cursor: pointer;

    z-index: 3;
}

/* ФЕЙЕРВЕРК */

#fireworks {
    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100vh;

    pointer-events: none;

    z-index: 999999;
}

/* =========================
   ПК
   ========================= */

@media screen and (min-width: 768px) {

    #checkButton {
        width: 180px;
        height: 750px;
        font-size: 42px;
    }

    #secondButton {
        width: 300px;
        min-height: 160px;

        right: 50px;
        bottom: 50px;

        font-size: 28px;
    }
}

/* =========================
   ТЕЛЕФОН
   ========================= */

@media screen and (max-width: 767px) {

    .container {
        padding-top: 35px;
        min-height: 100vh;
        position: relative;
    }

    h1 {
        width: 90%;
        font-size: 28px;
        margin-bottom: 40px;
        text-align: center;
    }

    #nameInput {
        width: 75%;
        max-width: 330px;
        height: 70px;
        font-size: 24px;
    }

    /* ПРОВЕРИТЬ — слева */

    #checkButton {
        position: absolute;

        left: 0;
        top: 50%;

        transform: translateY(-50%);

        width: 60px;
        height: 260px;

        font-size: 22px;

        writing-mode: vertical-rl;
        text-orientation: upright;
    }

    /* TELEGRAM — не залезает на ПРОВЕРИТЬ */

    #telegramButton {
        width: calc(100% - 110px);

        margin-top: 25px;
        margin-left: 90px;
        margin-right: 20px;

        padding: 18px 10px;

        font-size: 20px;
        border-radius: 14px;
    }

    /* СВИНКА — справа снизу */

    #secondButton {
        position: absolute;

        right: 15px;
        bottom: 20px;

        width: 150px;
        min-height: 80px;

        padding: 12px 10px;

        font-size: 18px;
        line-height: 1.2;
    }

    /* ОКНО РЕЗУЛЬТАТА */

    .modalContent {
        width: 90vw;
    }

    .resultImages img {
        width: 90vw;
        height: auto;
        max-height: 80vh;
    }
}
#sendPersonButton {
    display: none;

    margin: 20px auto 0;

    padding: 14px 30px;

    background: #14526d;
    color: white;

    border: none;
    border-radius: 10px;

    font-size: 18px;
    font-weight: bold;

    cursor: pointer;

    transition: transform 0.2s, background 0.2s;
}

#sendPersonButton:hover {
    transform: scale(1.05);
    background: #132933;
}

#sendPersonButton:active {
    transform: scale(0.97);
}

/* Телефон */

@media screen and (max-width: 767px) {

    #sendPersonButton {
        width: 85%;
        max-width: 350px;

        margin-top: 15px;

        padding: 17px 12px;

        font-size: 19px;
        line-height: 1.2;

        border-radius: 14px;
    }
}