@import url('https://fonts.googleapis.com/css2?family=Handjet:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    font-family: 'Handjet', sans-serif;
    user-select: none;
    color: red;
    white-space: nowrap;
}

textarea:focus,
input:focus {
    outline: none;
}

body {
    background: black;
    overflow-x: hidden;
}

.static-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.modal {
    background: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 500;
    color: red;
}

.modal h2 {
    font-size: 70px;
}

.modal .button-container {
    display: flex;
    gap: 50px;
}

.modal-response {
    display: flex;
    justify-content: center;
    align-items: center;
    background: black;
    z-index: 450;
    pointer-events: none;
}

.modal-response.fading {
    animation: fade 2s linear forwards;
}

.modal-response span {
    color: red;
    font-size: 150px;
}

.button {
    height: 70px;
    width: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: red;
    font-size: 40px;
    transition: 0.2s linear all;
    cursor: pointer;
}

.button:hover {
    animation: commonTextShadow 1.6s infinite;
    box-shadow: 0 0 10px white;
    background: white;
    color: black;
}

header {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: var(--decoration-gap);
    height: var(--decoration-size);
    font-size: 35px;
    gap: 20px;
    color: red;
    z-index: 100;
    margin-bottom: 50px;
}

main {
    padding: 0 10%;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: 300px 300px;
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    grid-row-gap: 30px;
}

main > section {
    width: 100%;
    padding: 0 20%;
    box-sizing: border-box;
}

main > section > h2 {
    font-size: 45px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 30px;
    margin-bottom: 30px;
}

.section-header span {
    font-size: 40px;
    cursor: pointer;
    transition: 0.3s all linear;
}

.section-header span:hover {
    animation: commonTextShadow 1.6s infinite;
    transition: none;
    color: white;
}

.controls .section-header {
    margin-bottom: 0;
}

.controls-indicator-container {
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.controls-indicator {
    animation: commonTextShadow 1.6s infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    height: 40px;
    font-size: 23px;
    opacity: 20%;
    width: 108px;
    border: 2px solid white;
}

.ready-indicator.active {
    opacity: 100%;
    color: white;
    background: green;
    border: 2px solid transparent;
}

.work-indicator.active {
    opacity: 100%;
    color: black;
    background: #c29200;
    border: 2px solid transparent;
    text-shadow: none !important;
}

.error-indicator.active {
    opacity: 100%;
    color: black;
    background: red;
    border: 2px solid transparent;
    animation: errorIndicator 1.1s linear infinite;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

form label {
    font-size: 20px;
}

input {
    padding: 0 5px;
    margin: 0 2px;
}

input[type="text"] {
    color: black;
    font-size: 17px;
    animation: commonTextShadow 1.6s infinite;
}

input[type="button"],
input[type="submit"] {
    background: none;
    border: none;
    font-size: 17px;
    box-shadow: black 0 0 3px;
    cursor: pointer;
    transition: 0.05s linear all;
}

input[type="submit"] {
    height: 30px;
    width: 0;
    padding: 0;
    margin: 0 auto;
    overflow: hidden;
    color: white;
    background: none;
    border: 2px solid transparent;
    cursor: default;
    opacity: 20%;
    animation: commonTextShadow 1.6s infinite;
    transition: 0.2s all ease-out;
}

input[type="submit"]:not([disabled]) {
    cursor: pointer;
    border: 2px solid white;
    width: 80%;
    max-width: 320px;
    color: black;
    background: white;
    opacity: 100%;
}

input[type="submit"]:not([disabled]):hover {
    transition: none;
    color: white;
    background: red;
    border: red;
}

input[type="button"] {
    transition: 0.3s all linear;
}

input[type="button"]:hover,
input[type="button"].active {
    animation: commonTextShadow 1.6s infinite;
    transition: none;
    color: white;
}

.viewport {
    grid-row: span 2;
}

.viewport-content {
    width: 500px;
    height: 500px;
    position: relative;
    cursor: pointer;
}

.viewport-measure {
    margin: 3px 0 0 3px;
    position: absolute;
    font-weight: bold;
    top: 250px;
    left: 250px;
    user-select: none;
    padding: 2px;
    color: white;
    mix-blend-mode: difference;
    z-index: 200;
}

.viewport-measure[top] {
    top: 50px;
}

.viewport-measure[half-top] {
    top: 150px;
}

.viewport-measure[half-bottom] {
    top: 350px;
}

.viewport-measure[bottom] {
    top: 450px;
}

.viewport-measure[left] {
    left: 50px;
}

.viewport-measure[half-left] {
    left: 150px;
}

.viewport-measure[half-right] {
    left: 350px;
}

.viewport-measure[right] {
    left: 450px;
}

.viewport-warning-sign {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    z-index: 300;
}

.viewport-warning-sign.active {
    visibility: visible;
}

.viewport-warning-sign img {
    width: 100%;
    height: 100%;
}

.table {
    display: flex;
    flex-direction: column;
}

.row {
    white-space: nowrap;
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(3, 50px) 110px 170px 190px;
    gap: 3px;
}

.row:not(:first-child) span:last-child {
    font-size: 0.8em;
}

.legend {
    font-weight: bold;
}

.legend:last-child {
    visibility: hidden;
}

.legend:last-child::after {
    margin-top: -52px;
    font-weight: normal;
    visibility: visible;
    content: "Данных пока не было получено";
}

.row > span {
    padding: 10px;
}

.row:not(.legend):hover * {
    color: white;
}

.hit-result-decoration {
    height: 70px;
    width: 300px;
    position: absolute;
    z-index: 500;
    animation: hitFlicker 2s linear forwards;
    pointer-events: none;
}

.hit-result-decoration-square {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 4px;
    background: black;
    border: 2px solid white;
}

.hit-result-decoration-diagonal-line {
    position: absolute;
    bottom: 6px;
    left: 6px;
    height: 40px;
    width: 40px;
    background: linear-gradient(-45deg, transparent 0, transparent 27px, white 27px, white 29px, transparent 29px, transparent 100% );
}

.hit-result-decoration-horizontal-line {
    position: absolute;
    bottom: 44px;
    left: 45px;
    height: 3px;
    width: 40px;
    background: white;
}

.hit-result-decoration-container {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 85px;
    width: fit-content;
    border: 3px solid white;
    background: black;
    padding: 5px;
}

.hit-result-decoration-container * {
    color: white;
}

.hit-result-decoration-container div:first-child {
    font-size: 1.2em;
}

.message-provider {
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    background: red;
    font-size: 100px;
    z-index: 1000;
    animation: fade 2s linear forwards, commonTextShadow 1.6s linear infinite;
}

@keyframes errorIndicator {
    0% {
        opacity: 100%;
    }

    50% {
        opacity: 100%;
    }

    98% {
        opacity: 20%;
    }

    100% {
        opacity: 100%;
    }
}

@keyframes fade {
    0% {
        opacity: 100%;
    }

    20% {
        opacity: 100%;
    }

    100% {
        opacity: 0;
        display: none;
    }
}

@keyframes hitFlicker {
    0% {
        display: none;
    }

    10% {
        display: block;
    }

    20% {
        display: none;
    }

    30% {
        display: block;
    }

    40% {
        display: none;
    }

    50% {
        display: block;
        opacity: 100%;
    }

    90% {
        opacity: 100%;
    }

    100% {
        opacity: 0;
    }
}

@media screen and (max-width: 1600px) {
    main {
        grid-template-columns: 1fr;
    }

    main > section {
        width: min-content;
    }
}
