/* Подключение шрифтов */

@font-face {
    font-family: "Roboto Sans";
    src: url(../fonts/Roboto-Regular.ttf);
    
    font-weight: normal;
}

@font-face {
    font-family: "Roboto Sans";
    src: url(../fonts/Roboto-Bold.ttf);

    font-weight: bold;
}

@font-face {
    font-family: "Roboto Sans";
    src: url(../fonts/Roboto-Italic.ttf);
    
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: "Roboto Sans";
    src: url(../fonts/Roboto-BoldItalic.ttf);

    font-weight: bold;
    font-style: italic;
}

/* Переменные */

:root {
    --first-color: #456db1;
    --second-color: #223a76;
    --third-color: #456db1;
    --border-color: #456db1;
    --dark-color: #456db1;
    /* --bright-color: */ 
    --main-text-color: black;
    --side-text-color: black;
    --title-text-color: black;
    --transparent-text-color: rgba(0, 0, 0, .6);
    --fading-text-color: rgba(0, 0, 0, .2);
    --title-font-size: 1.25rem;
    /* --plain-font-size: ... */ /* <--- Теперь это часть медиа-запроса */
    --special-font-size: 1.5rem;
}

/* Медиа-запросы на ширину экрана */

@media screen and ((width <= 1400px) or (height <= 800px))  {
    :root {
        --plain-font-size: 16px;
    }

    #_logo {
        width: 200px;
        height: 200px;
    }
}

@media screen and ((width > 1400px) and (height > 800px)) {
    :root {
        --plain-font-size: 20px;
    }

    #_logo {
        width: 250px;
        height: 250px;
    }
}

/* Универсальный селектор */

* {
    margin: 0;
    padding: 0;

    font-family: "Roboto Sans", Verdana, Geneva, Tahoma, sans-serif;
    font-weight: normal;
    font-size: var(--plain-font-size);

    box-sizing: border-box;
}

/* Общие селекторы */

p,a {
    color: var(--main-text-color);
}

body {
    background-image: url("../images/fon1.jpg");
    background-attachment: fixed;
    
}

table {
    border-collapse: collapse;

    border: 1px solid black;
}

th, td {
    border: 1px solid black;
    padding: 5px;
}

th {
    font-weight: bold;
}

/* Стили столбца и строки */

.col {
    display: flex;
    flex-direction: column;
}

.row {
    display: flex;
    flex-direction: row;
}

/* Стили распределения по главной оси */

.main-spacing {
    justify-content: space-between;
}

.main-centering {
    justify-content: center;
}

/* Стили выравнивания по побочной оси */

.side-centering {
    align-items: center;
}

.side-starting {
    align-items: start;
}

.side-ending {
    align-items: end;
}

/* Стили выравнивания по центру */

.centered-h {
    margin-left: auto;
    margin-right: auto;
}

.centered-v {
    margin-top: auto;
    margin-bottom: auto;
}

/* Стили отображения */

.absolute {
    position: absolute;
}

/* Стили долей ширины */

.wrapper {
    width: 100%;
}

.container {
    width: 70%;
}

.content {
    width: 95%;
}

.subcontent {
    width: 90%;
}

/* Стили линий */

.stripe-h {
    border-bottom: solid;
}

.stripe-v {
    border-right: solid;
}

/* Стили шрифта */

.bold {
    font-weight: bold;
}

.centered {
    text-align: center;
}

/* Стили курсора */

.pointer {
    cursor: pointer;
}

/* Стили основной страницы */

#_exit_button {
    margin-top: 40vh;
    background-color: var(--dark-color);
    opacity: 0.3;

    transform-origin: left top;
    transform: rotate(-90deg);

    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 10px;
    padding-top: 5px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;

    user-select: none;

    transition: 0.5s ease;
}

#_exit_button:hover {
    opacity: 1;
    transition: 0.5s ease;
}

#_exit_caption {
    color: white;
    font-size: var(--special-font-size);
}

/* Стили заголовка */

#_container {
    background-image: linear-gradient(rgba(68,28,80,.1) 0,rgba(68,28,80,.1) 130px,rgba(68,28,80,.1) 150px,rgba(68,28,80,.1) 100%);
    box-shadow: 0px 0px 10px 0px #456db1;
    
    min-height: 100vh;
}

#_title {
    height: 60px;
    margin-top: 15px;

    background-color: #456db1;

    border-radius: 15px;

    flex-shrink: 0;
}

#_title_text {
    font-size: var(--title-font-size);
    color: var(--title-text-color);
    margin-left: 15px;
}

#_title_desc {
    font-size: var(--plain-font-size);
    color: var(--main-text-color);
    padding-left: 15px;
    padding-right: 15px;

    margin-top: 5px;
}

#_title_stripe {
    color: var(--main-text-color);
    margin-top: 5px;
    margin-bottom: 10px;
    border-width: 2px;
}


/* Стили контента */

.main-content {
    padding-left: 15px;
    padding-right: 15px;
    height: 70vh;
}

.fill {
    height: 70vh;
}

.btn {
    width: 200px;
    height: 30px;

    background-color: white;
    border: 1px solid white;
    border-radius: 5px;
}

.btn:enabled {
    cursor: pointer;
}

.btn-text {
    color: var(--dark-color);
}

*:disabled {
    background-color: rgb(188, 18, 18);
    color: white;
}

#_answers {
    gap: 10px;
}

.data-row {
    gap: 10px;
    flex-shrink: 0;

    padding: 5px;
    border-radius: 5px;
    background-color: white;

    height: 60px;
}

.data-row label {
    color: var(--dark-color);
}

.rd {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

#_bottom {
    margin-top: 10px;
    background-color: var(--dark-color);
    padding: 10px;
}

#_timer, #_timer_stopped {
    color: white;
    font-size: var(--title-font-size);
    font-weight: var(--border-color);
}

#_buttons {
    gap: 10px;
}

/* Скрытые элементы */

.hidden-popup {
    position: absolute;
    z-index: 1;
    width: 100vw;
    height: 100vh;
    background-color:rgba(0, 0, 0, .5);

    user-select: none;
}

.popup {
    width: 80vw;
    height: 80vh;
    background-color: white;
    border: 8px solid var(--border-color);
    border-radius: 8px;

    padding: 16px;

    gap: 20px;

    overflow-y: scroll;
}

.popup-title {
    color: var(--title-text-color);
    font-size: var(--title-font-size);
}

.popup-text, .popup-text em {
    color: black;
    font-size: var(--title-font-size);    
}

.popup-par {
    gap: 10px;
}

.popup-close {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background-color: var(--border-color);

    margin-left: -24px;
    margin-top: -16px;
}

.white-line {
    border-color: white;
    border-width: 4px;
}

.line-h {
    width: 26px;
    margin-top: 11px;
}

.line-v {
    height: 26px;
    margin-left: 11px;
}

.cross {
    width: 26px;
    height: 26px;
    transform: rotate(45deg);
}

.screen {
    display: grid;
    grid-template-columns: 1fr .35fr;
    grid-auto-flow: column;
    gap: 15px;
    padding: 15px;
    box-sizing: border-box;
}

.screen.mod2 {
    grid-template-columns: 1fr .60fr;
}

.screen__section {
    border: 3px solid black;
    border-radius: 25px;
    box-sizing: border-box;
    padding: 10px;
    margin-left: 28%;
    height: 130%;
}

.screen__section--grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, 1fr);
    place-content: start center;
    gap: 15px;
    block-size: 72vh;

    @media (max-width: 1680px) {
        block-size: 60vh;
    }
}

.correct {
    background: rgba(11 156 49 / 0.6);
    color: white;
}

.answer:active {
    cursor: grabbing;
}

.answer:not([src]) {
    background: white;
}

.question {
    inline-size: 100%;
    block-size: 100%;
}

.question__grid {
    display: grid;
    grid-auto-rows: auto;
    block-size: 100%;
    gap: 20px;
}

.question__text {
    display: grid;
    place-content: center;
    text-align: center;
    font-size: 3vmin;
    padding: 10px;
}

.question__answers {
    display: grid;
    grid-auto-rows: minmax(50px, 1fr);
    gap: 5px;
}

.overflow-hidden {
    overflow: hidden;
}

.guestions__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(125px, 1fr));
    grid-template-rows: repeat(3, minmax(125px, 1fr));
    gap: 15px;
    inline-size: 100%;
    margin-left: 10%;
    height: 130%;
}