@import url(https://fonts.googleapis.com/css?family=Roboto:300,400,700&display=swap&subset=cyrillic-ext);
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Adigiana 2', arial;
}

@import url(https://fonts.googleapis.com/css?family=Roboto:300,400,700&display=swap&subset=cyrillic-ext);
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Roboto", sans-serif;
}

html,
body {
    height: 100%;
}

body.lock {
    overflow: hidden;
}

a {
    text-decoration: none;
}


/* КОНФЕТТИ И СУПЕШНЫЙ БЛОК*/

.confetti {
    position: fixed;
    top: -10px;
    width: 6px;
    height: 10px;
    background: #2ecc71;
    opacity: 0.8;
    animation: confFall 5.5s ease-out forwards;
}

@keyframes confFall {
    to {
        transform: translateY(110vh) rotate(180deg);
        opacity: 0;
    }
}

.success-box {
    padding: 7%;
    border: 4px solid #2ecc71;
    background: rgba(46, 204, 113, 0.08);
    border-radius: 50px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-box {
    animation: fadeUp 0.5s ease-out;
}


/*  */

.noselect {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}

.btn {
    border-radius: 25px;
    width: 160px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: .3s all;
    outline: 0
}

.dot {
    box-sizing: content-box;
    flex: 0 1 auto;
    width: 30px;
    height: 6px;
    margin-right: 3px;
    margin-left: 3px;
    cursor: pointer;
    background-clip: padding-box;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    opacity: .5;
    transition: opacity .6s ease;
}

.indicators {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 15;
    display: flex;
    justify-content: center;
    margin-right: 15%;
    margin-left: 15%;
    list-style: none;
}

.game-space {
    display: flex;
    padding: 2%;
    /* margin-left: 6%; */
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

#bottom-spacev1 {
    min-width: 100%;
    justify-content: space-evenly;
}

.game-content {
    display: flex;
    /* justify-content: space-evenly; */
    font-size: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.game-content img {
    max-width: 250px;
    object-fit: cover;
    margin: 10px;
}

.game-counter {
    display: flex;
    align-items: center;
    /* font-size: 24px; */
    font-family: 'Adigiana 2', arial;
    font-size: 1.5em;
    /* text-shadow: -1.5px 0 black, 0 1.5px black, 1.5px 0 black, 0 -1.5px black; */
}

.game-back {
    display: absolute;
    margin-right: 10px;
    cursor: pointer;
}

.game-back img {
    object-fit: cover
}

.game-btn {
    width: 220px;
    height: 65px;
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: .3s all;
    outline: 0;
    margin: auto;
    border-radius: 25px;
    background-color: #5982d2;
}

.game-btn-v2 {
    width: auto;
    display: inline-block;
    padding: 0.35em 1.2em;
    margin: 0 0.3em 0.3em 0;
    /* border-radius: 0.12em; */
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    box-sizing: border-box;
    text-decoration: none;
    font-family: "Bookman Old Style", serif;
    font-weight: 500;
    font-size: 1.5rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    word-break: break-word;
    white-space: normal;
}

.game-btn-v3 {
    width: auto;
    display: inline-block;
    padding: 0.35em 1.2em;
    margin: 0 0.3em 0.3em 0;
    /* border-radius: 0.12em; */
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    box-sizing: border-box;
    text-decoration: none;
    /* font-family: 'Adigiana 2', arial; */
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    word-break: break-word;
    white-space: normal;
}

.game-nav-btns {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 0.3em 0;
    z-index: 100;
}

.game-menu-btn {
    position: static;
    padding: 0.4em 1.4em;
    min-width: 140px;
    margin: 0;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    font-family: 'Adigiana 2', arial;
    box-sizing: border-box;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.35rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.title {
    font-size: 36px;
    font-weight: 400
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 110px;
    background-color: #5982d2;
    margin: 0 auto;
    z-index: 3;
}

.header__right-block {
    display: flex;
    margin-right: 5%;
    z-index: 3;
    justify-content: flex-end;
}

.header__left-block {
    display: flex;
    margin-left: 5%;
    justify-content: space-between;
    min-width: 550px;
    margin-right: 20px;
}

.header__logo {
    max-width: 170px;
    margin-right: 50px;
}

.header__logo img {
    max-width: 100%;
    display: block;
}

.header__links {
    display: flex;
    align-items: center;
    z-index: 3;
}

.header__link {
    color: #f4f4f4;
    position: relative;
    font-weight: 700;
    font-family: 'Adigiana 2', arial;
    text-shadow: -1.5px 0 black, 0 1.5px black, 1.5px 0 black, 0 -1.5px black;
    font-size: 1.5rem;
}

.header__link:after {
    content: '';
    position: absolute;
    display: block;
    width: 100%;
    left: -5%;
    bottom: -1px;
    z-index: -1;
    height: 8px;
}

.header__link:hover {
    border-bottom: 3px #f4f4f4 solid;
}

.header__link:last-child {
    margin-right: 0
}

.show {
    display: block
}

.hide {
    display: none
}

.main-btn {
    width: 200px;
    height: 200px;
    margin-left: 2%;
    margin-right: 2%;
    justify-content: center;
    text-align: center;
    align-items: center;
    cursor: pointer;
    transition: .3s all;
}

.main-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 130px;
}

/* ── Dynamic subjects grid ── */
.subjects-dynamic-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}

.subject-card-dyn {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
}

.subject-card-dyn:hover { transform: scale(1.07); }

.subject-card-dyn__img {
    width: 200px;
    height: 200px;
    border-radius: 130px;
    object-fit: cover;
}

.subject-card-dyn__img--placeholder {
    width: 200px;
    height: 200px;
    border-radius: 130px;
    background: linear-gradient(135deg, #5982d2, #3960ab);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.subject-card-dyn__name {
    margin-top: 10px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    color: #f4f4f4;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.main-btn-v2 {
    display: inline-flex;
    width: 200px;
    height: 200px;
    justify-content: center;
    text-align: center;
    align-items: center;
    cursor: pointer;
    transition: .3s all;
    position: relative;
}

.main-btn-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 130px;
}

/* Locked topic — dim + lock icon */
.main-btn-v2.topic-locked {
    opacity: 0.55;
    filter: grayscale(40%);
}
.main-btn-v2.topic-locked:hover {
    opacity: 0.7;
    filter: grayscale(20%);
}
.topic-lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
}

/* Locked test button — same visual style as locked topic */
.game-btn-v2.test-locked {
    opacity: 0.5;
    filter: grayscale(60%);
    cursor: not-allowed;
    border-style: dashed !important;
    pointer-events: auto;
    user-select: none;
}
.game-btn-v2.test-locked:hover {
    opacity: 0.65;
    filter: grayscale(40%);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.modal__dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.modal__content {
    position: relative;
    width: 92vw;
    padding: 40px;
    border-radius: 4px;
    max-height: 80vh;
    overflow-y: auto
}

.modal__close {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 30px;
    opacity: .5;
    font-weight: 700;
    border: none;
    background-color: transparent;
    cursor: pointer
}

.modal__title {
    text-align: center;
    font-size: 1.2rem;
    text-transform: uppercase
}

.modal__text {
    margin: 20px auto 20px auto;
    height: 50px;
    font-size: 1.2rem;
    text-align: center;
}

.modal__text img {
    height: 100%;
    width: auto;
    background-color: white;
    border-radius: 16px;
}

.offer {
    /* padding: 70px 0 100px 0; */
    position: relative;
    z-index: 0;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    z-index: 0;
}

.slider {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.slider__state {
    display: flex;
    align-items: center;
    font-size: 24px;
    flex-direction: row;
}

.slider__window {
    overflow: hidden;
    width: 980px;
    margin-top: 15px;
    position: relative;
    display: block;
}

.slider__content {
    display: flex;
    width: 999999px;
    transition: 0.5s all;
    padding-top: 2%;
}

.slider__prev {
    margin-right: 10px;
    cursor: pointer
}

.slider__prev img {
    height: 100%;
    width: 100%;
}

.slider__next {
    margin-left: 10px;
    cursor: pointer
}

.slider__next img {
    height: 100%;
    width: 100%;
}

.slider__counter {
    font-size: 38px;
    font-weight: 700;
    flex-direction: row;
}

.slider__slide {
    width: 980px;
    display: inline-block;
}

.theme-button {
    height: 50px;
    width: 50px;
    right: 5px;
    top: 5px;
    padding: 10px 25px;
    cursor: pointer;
    transition: .3s all;
    border-radius: 50px;
}

.theme-button:hover {
    background-color: #fff;
}

.theme-button img {
    height: 100%;
    width: auto;
    transform: scale(1.5) translate(-10px, 0px);
}

.offer__item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover
}

.false {
    border: solid rgb(243, 28, 28);
    background-color: rgb(243, 28, 28);
}

.stuff {
    padding: 5%;
    margin-left: 6%;
    align-items: center;
}

.stuff_box {
    margin-right: 10px;
    margin-bottom: 10px;
}

.stuff_container {
    display: flex;
    justify-content: space-evenly;
}

.stuff_top {
    margin-bottom: 7px;
    height: 300px;
    width: 300px;
    text-align: center;
    border-radius: 25px 25px 25px 25px;
}

.stuff_top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 130px;
}

.stuff_bottom {
    width: 300px;
    text-align: center;
    padding: 10px;
    font-size: 20px;
    border-radius: 25px;
}

.wrapper {
    min-height: 100%;
    overflow: hidden;
    flex-direction: column;
}

.feature {
    width: 60%;
    text-align: justify;
}

.answers {
    width: 25%;
    text-align: center;
    word-break: break-word;
}

.information {
    width: 100%;
    padding-top: 100px;
    justify-content: center;
}

.information__title {
    text-align: center;
    font-size: 2rem;
    text-transform: uppercase;
    color: #5982d2;
    font-family: 'Adigiana 2', arial;
}

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

.information__link {
    margin: 20px;
    height: 50px;
    font-size: 2rem;
    text-align: center;
    font-family: 'Adigiana 2', arial;
}

.information__link img {
    height: 100%;
    width: auto;
    background-color: white;
    border-radius: 16px;
}

table {
    table-layout: fixed;
    left: 20%;
    width: 100%;
    border-collapse: collapse;
    border: 3px solid;
}


/* td:nth-child(2) {
    background-color: rgb(255, 0, 0);
} */


/* td:nth-child(3) {
    background-color: rgb(36, 138, 36);
} */

th,
td {
    padding: 10px;
}

tbody td {
    text-align: right;
}

tfoot th {
    text-align: center;
}

p {
    font-size: 1.5rem;
    font-family: Arial;
    text-align: justify;
    word-break: break-word;
    padding-left: 2%;
    padding-right: 2%;
    display: table;
    max-width: 100%;
}


/* //////////////////////////////////////////////////////////////////////////// */


/* //////////////////////////////////////////////////////////////////////////// */


/* mangalib.ru */

.form__subtitle {
    font-size: 14px;
    margin-bottom: 10px;
    color: #818181;
    text-align: center;
}

.form__field {
    margin-bottom: 15px;
    position: relative;
}

.form__footer {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
}

.form__input {
    padding: 5px 12px;
    width: 100%;
    /* height: 32px; */
}

.form__input,
.form__textarea {
    margin: 0;
    font-size: 14px;
    font-family: inherit;
    line-height: 20px;
    border-radius: 3px;
    color: #212529;
    border: solid 1px;
    max-width: 100%;
}

.form__description {
    margin-bottom: 5px;
    color: #818181;
    font-size: 13px;
    line-height: 1.2;
    text-align: right;
}

@media (min-width: 420px) {
    .modal__content {
        width: 400px;
    }
}


/* Сообщение об ошибке */

.input-error {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 1000;
    text-align: center;
    animation: fadeInOut 0.5s;
    min-width: 300px;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


/* Сообщение о результате проверки */

.result-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 1000;
    text-align: center;
    animation: fadeInOut 2s;
}

.result-message.success {
    background-color: rgba(40, 167, 69, 0.9);
}


/* Анимация тряски для слотов */

.shake {
    animation: shake 0.5s;
}


/* Анимация появления/исчезновения */

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}


/* Сообщение об успехе */

.success-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 15px;
    border-radius: 5px;
    z-index: 10000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.5s;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    text-align: center;
    max-width: 80%;
}


/* Анимация исчезновения */

.success-message.fade-out {
    opacity: 0;
}


/* //////////////////////////////////////////////////////////////////////////// */


/* Множественный выбор */


/* //////////////////////////////////////////////////////////////////////////// */


/* Добавленные стили для горизонтального TestOrder */

.horizontal-scroll-container {
    min-width: 100%;
    margin: 0 auto 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.sortable-list.horizontal {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    justify-content: center;
}

.sequence-arrow {
    color: #888;
    font-size: 24px;
    min-width: 30px;
    text-align: center;
}


/* Убираем ручку для горизонтального режима */

.sortable-handle.horizontal {
    display: none;
}


/* Делаем весь элемент подвижным */

.sortable-item.full-drag {
    cursor: move;
}


/* Контейнер для кнопок внизу экрана */

.fixed-bottom-buttons {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 1000;
}

.fixed-bottom-buttons button {
    padding: 12px 25px;
}


/* ── MATCH test (TestArch monument matching) ── */
.match-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: .9rem;
}
.match-table th,
.match-table td {
    padding: 8px 10px;
    border: 1px solid var(--border-color, #ddd);
    text-align: center;
    vertical-align: middle;
}
.match-table th {
    background: var(--bg-secondary, #f5f7fb);
    font-weight: 700;
    font-size: .82rem;
}
.match-select {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: .84rem;
    background: var(--card-bg, #fff);
    color: var(--text-primary, #222);
    transition: border-color .2s, background .2s;
}
.match-select.correct { background: rgba(39,174,96,.18) !important; border-color: #27ae60 !important; }
.match-select.incorrect { background: rgba(231,76,60,.18) !important; border-color: #e74c3c !important; }

.monument-info { text-align: center; }
.monument-image { max-width: 100%; max-height: 280px; display: block; margin: 0 auto 14px; border-radius: 10px; border: 1px solid rgba(0,0,0,.1); }
.monument-description { font-size: 15px; line-height: 1.6; margin-bottom: 8px; }
.monument-image-cell img { max-width: 80px; max-height: 80px; border-radius: 6px; display: block; margin: 0 auto; }

.check-order-btn {
    display: block;
    width: 100%;
    max-width: 340px;
    margin: 16px auto 0;
}

/* Стили для системы категорий (legacy) */

.match-column {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    min-height: 200px;
}

.match-column h3 {
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.match-option {
    display: block;
    width: 100%;
    margin: 8px 0;
    padding: 10px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.match-option.selected {
    background: #e1f5fe;
    border-color: #039be5;
    box-shadow: 0 0 0 2px rgba(3, 155, 229, 0.3);
}

.match-column.error {
    border-color: #f44336;
    background: #ffebee;
}


/* Стили для системы перетаскивания */


/* Существующие стили */

.sortable-list {
    list-style-type: none;
    padding: 0;
    max-width: 600px;
    margin: 20px auto;
}

.sortable-item {
    margin: 8px 0;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: move;
    display: flex;
    align-items: center;
}

.sortable-item.error {
    border-color: #f44336;
}

.sortable-handle {
    margin-right: 10px;
    cursor: move;
    font-size: 18px;
}

.check-order-btn {
    display: block;
    margin: 20px auto;
    padding: 12px 30px;
}

.match-select {
    width: 100%;
}

.match-select.correct {
    border-color: #28a745;
    background-color: #d4edda;
}

.match-select.incorrect {
    border-color: #dc3545;
    background-color: #f8d7da;
}


/* === СТИЛИ ДЛЯ TestTerm (Кастомные селекты) === */


/* Контейнер кастомного селекта */

.term-custom-select {
    position: relative;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.2s;
}


/* Отображаемое значение */

.term-custom-select .custom-select-value {
    padding: 8px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.term-custom-select .custom-select-value[data-placeholder="true"] {
    color: #888;
    font-style: italic;
}

.term-custom-select.correct {
    border-color: #4caf50;
}

.term-custom-select.incorrect {
    border-color: #f44336;
}


/* Выпадающий список */

.term-custom-select .custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.term-custom-select .custom-select-dropdown.hide {
    display: none;
}


/* Элементы списка */

.term-custom-select .custom-select-option {
    padding: 8px 12px;
    cursor: pointer;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.term-custom-select .custom-select-option:hover {
    background-color: #f0f8ff;
}


/* === СТИЛИ ДЛЯ TestArch (Обычные селекты) === */

.arch-match-select {
    width: 100%;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.arch-match-select.correct {
    border-color: #4caf50;
    background-color: #e8f5e9;
}

.arch-match-select.incorrect {
    border-color: #f44336;
    background-color: #ffebee;
}


/* Пустые слоты - используем существующие стили с небольшими изменениями */

.slot {
    min-width: 150px;
    height: 60px;
    border: 2px dashed #ccc !important;
    /* !important чтобы перекрыть существующие стили */
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
    margin: 0 !important;
    /* Убираем существующие отступы */
}

.slot.empty {
    background-color: #fafafa;
}

.slot.correct {
    border-color: #4caf50 !important;
    background-color: #e8f5e9;
}

.slots-container {
    display: flex;
    gap: 10px;
    padding: 10px 0px;
    justify-content: center;
}


/* Номер слота */

.slot-number {
    position: absolute;
    top: -15px;
    left: 5px;
    font-size: 12px;
    color: #666;
    background: #e0e0e0;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Контейнер для вариантов ответов */

.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    min-height: 80px;
}


/* Элементы для перетаскивания - используем существующие стили */

.option-item {
    /* Наследуем стили от sortable-item */
    padding: 10px 15px;
    margin: 0 !important;
    /* Убираем существующие отступы */
    cursor: move;
    transition: all 0.2s;
}

.option-item:hover {
    background-color: grey;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


/* Стили для sortable-item, когда он находится ВНУТРИ .slot */

.slot .sortable-item {
    min-width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center;
    padding: 6px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot .sortable-item span {
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    /* до 3 строк */
    line-height: 1.3;
    font-size: 16px;
    word-break: break-word;
}


/* Ограничение: максимум 7 элементов в строке */

.slots-container,
.options-container {
    flex-wrap: wrap;
}

.slot,
.option-item {
    flex: 0 1 calc(14.2857% - 10px);
    /* 100% / 7 ≈ 14.2857% */
    min-width: 100px;
    /* предотвращает чрезмерное сжатие на узких экранах */
    box-sizing: border-box;
    font-size: 16px;
}

@media (max-width: 768px) {
    .slot,
    .option-item {
        flex: 0 1 calc(33.333% - 8px);
        /* 3 в строке */
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .slot,
    .option-item {
        flex: 0 1 calc(50% - 6px);
        /* 2 в строке */
    }
}


/* Инструкция */

.instruction-text {
    text-align: center;
    margin: 15px 0;
    font-style: italic;
    color: #555;
}


/* Анимация для ошибки */

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }
    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

@media (max-width: 767px) {
    .slot {
        min-width: 120px;
        height: 50px;
        font-size: 0.9rem;
    }
    .slot-number {
        font-size: 10px;
        width: 20px;
        height: 20px;
    }
    .sortable-item {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    .horizontal-scroll-container {
        padding-bottom: 20px;
    }
    .instruction-text {
        font-size: 0.9rem;
    }
    /* Увеличиваем размер кликабельной области для мобильных устройств */
    .option-item {
        padding: 12px 15px;
        min-height: 44px;
    }
    /* Корректировка позиционирования кнопки */
    .fixed-bottom-buttons {
        bottom: 10px;
    }
    .feature {
        font-size: 0.65rem;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .slot {
        min-width: 100px;
        height: 40px;
        font-size: 0.8rem;
    }
    .slot-number {
        font-size: 8px;
        width: 16px;
        height: 16px;
        top: -12px;
    }
    .sortable-item {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    .options-container {
        padding: 10px;
    }
    .game-btn-v3 {
        font-size: 1.2rem;
        padding: 0.3em 0.8em;
    }
    /* Увеличиваем размер шрифта для сообщения об успехе */
    .success-message {
        font-size: 1.1rem;
        padding: 12px;
    }
}


/* //////////////////////////////////////////////////////////////////////////// */


/* Множественный выбор */


/* //////////////////////////////////////////////////////////////////////////// */

@media (min-width: 1200px) {
    .header__link {
        margin-right: 45px;
    }
}

@media (max-width:1200px) {
    .container {
        max-width: 970px;
    }
    .header__link {
        margin-right: 45px;
    }
}

@media (max-width:992px) {
    #bottom-spacev {
        margin-bottom: 10%;
    }
    .container {
        max-width: 750px;
    }
    .slider__window {
        width: 740px;
    }
    .slider__slide {
        width: 740px;
    }
    .header__link {
        margin-right: 33px;
    }
    .header__logo {
        margin-right: 4px;
    }
    .game-content {
        justify-content: space-between;
    }
}

@media (max-width:767px) {
    .header {
        height: 60px;
    }
    .container {
        max-width: 360px;
    }
    .header__burger {
        display: block;
        position: relative;
        width: 30px;
        height: 20px;
        position: relative;
        z-index: 3;
        left: 5%;
    }
    .header__burger span {
        position: absolute;
        background-color: #fff;
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        top: 9px;
        transition: all 0.3s ease 0s;
    }
    .header__burger:before,
    .header__burger:after {
        content: '';
        background-color: #fff;
        position: absolute;
        width: 100%;
        height: 2px;
        left: 0;
    }
    .header__burger:before {
        top: 0;
    }
    .header__burger:after {
        bottom: 0;
    }
    .header__burger.active:before {
        transform: rotate(45deg);
        top: 9px;
    }
    .header__burger.active span {
        transform: scale(0);
    }
    .header__burger.active:after {
        transform: rotate(-45deg);
        bottom: 9px
    }
    .header__left-block {
        position: fixed;
        top: -100%;
        left: -44px;
        width: 105%;
        height: 100%;
        background-color: #1e3665;
        overflow: auto;
        transition: all .3s;
        z-index: 1;
    }
    .header__left-block.active {
        top: 0;
    }
    .header__link {
        text-align: center;
    }
    .header__link:last-child {
        margin-right: 33px;
    }
    .theme-button img {
        transform: scale(1.3) translate(-10px, 0px);
    }
    p {
        font-size: 1.3rem;
    }
}

@media (max-width:767px) and (orientation: landscape) {
    .header__logo {
        margin-top: 3%;
        margin-left: 42%;
        object-fit: scale(0.5);
        position: fixed;
    }
    .header__links {
        display: flex;
        align-items: center;
        z-index: 3;
        margin-top: 27%;
        width: 100%;
        justify-content: space-evenly;
        position: fixed;
    }
    .slider__window {
        width: 567px;
    }
    .slider__slide {
        width: 567px;
    }
    table {
        font-size: 1rem;
    }
}

@media (max-width:767px) and (orientation: portrait) {
    .header__logo {
        object-fit: scale(0.5);
        justify-content: center;
        position: fixed;
        margin-left: 36%;
        margin-top: 25%;
    }
    .header__links {
        z-index: 3;
        display: flex;
        margin-top: 70%;
        width: 125%;
        position: fixed;
        flex-direction: column;
    }
    .stuff_container {
        display: grid;
        justify-content: space-evenly;
    }
    .header__link {
        margin-bottom: 100px;
    }
    .stuff_container {
        display: grid;
    }
    .game-space {
        flex-direction: column;
    }
    .slider__window {
        width: 576px;
    }
    .slider__slide {
        width: 576px;
    }
    table {
        font-size: 0.8rem;
    }
    .main-btn {
        margin-bottom: 5%;
    }
    .answers {
        font-size: 0.74rem;
    }
    .information__links {
        flex-direction: column;
    }
    #olimpiad {
        margin-bottom: -50%;
    }
}

@media (max-width:580px) and (orientation: portrait) {
    .slider__window {
        width: 320px;
    }
    .slider__slide {
        width: 320px;
    }
    .game-content {
        display: inline-flex;
        justify-content: space-evenly;
        font-size: 1.5rem;
        flex-direction: column;
        align-items: center;
    }
    .information__links {
        flex-direction: column;
    }
}

@media (max-width:580px) and (orientation: portrait) {
    .slider__window {
        width: 320px;
    }
    .slider__slide {
        width: 320px;
    }
    .game-content {
        display: inline-flex;
        justify-content: space-evenly;
        font-size: 1.5rem;
        flex-direction: column;
        align-items: center;
    }
    #olimpiad {
        margin-bottom: -50%;
    }
    .information__links {
        flex-direction: column;
    }
}

/* ─── Auth Modal Styles ──────────────────────────────────────────────────── */

/* ── Auth modal ── */
.modal__title {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 22px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(128,128,128,0.3);
}

.auth-tab {
    flex: 1;
    padding: 11px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    transition: 0.2s;
}

.auth-tab.active {
    background: #3960ab;
    color: #fff !important;
}

.auth-form .form__field {
    margin-bottom: 14px;
}

.auth-form .form__input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1.5px solid rgba(128,128,128,0.35);
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.auth-form .form__input:focus {
    border-color: #3960ab;
}

.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrap .form__input {
    padding-right: 44px;
}

.eye-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    opacity: 0.55;
    transition: 0.2s;
    line-height: 1;
}

.eye-btn:hover { opacity: 1; }

.auth-error {
    color: #e74c3c;
    font-size: 0.84rem;
    min-height: 18px;
    margin-bottom: 4px;
}

.auth-social {
    margin-top: 20px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 0.82rem;
    opacity: 0.55;
    text-align: center;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: 0.35;
}

.social-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 25px;
    border: 1.5px solid rgba(128,128,128,0.3);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.social-btn img { width: 20px; height: 20px; }
.social-btn:hover { opacity: 0.85; box-shadow: 0 4px 14px rgba(0,0,0,0.15); }
.social-btn--vk { border-color: #2787F5; color: #2787F5 !important; }
.social-btn--tg { border-color: #2CA5E0; color: #2CA5E0 !important; }

/* Submit button — full width inside auth form */
.auth-form .form__footer {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.auth-form .form__footer .btn {
    width: 100%;
    max-width: 260px;
    height: 46px;
    font-size: 1rem;
    border-radius: 25px;
}

.form__footer {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

/* ── Account panel modal ── */
.account-modal {
    text-align: center;
    padding: 36px 32px 28px !important;
}

.account-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #3960ab;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 4px 20px rgba(57,96,171,0.35);
}

.account-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.account-email {
    font-size: 0.82rem;
    opacity: 0.5;
    margin-bottom: 10px;
}

.account-badge {
    display: inline-block;
    background: rgba(57,96,171,0.15);
    color: #3960ab;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    margin-bottom: 22px;
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: 0.2s;
    box-sizing: border-box;
}

.account-btn__icon { font-size: 1.05rem; }

.account-btn--default {
    background: rgba(57,96,171,0.08);
    color: #3960ab;
    border: 1.5px solid rgba(57,96,171,0.2);
}
.account-btn--default:hover { background: rgba(57,96,171,0.15); }

.account-btn--admin {
    background: #3960ab;
    color: #fff !important;
    border: none;
}
.account-btn--admin:hover { background: #2d4f99; box-shadow: 0 4px 14px rgba(57,96,171,0.4); }

.account-btn--logout {
    background: rgba(231,76,60,0.08);
    color: #e74c3c !important;
    border: 1.5px solid rgba(231,76,60,0.2);
}
.account-btn--logout:hover { background: rgba(231,76,60,0.15); }

/* Dark theme */
body.theme-dark .account-name,
body.theme-dark .account-modal .modal__title { color: #e8eaf0 !important; }
body.theme-dark .account-email { color: rgba(232,234,240,0.45) !important; }
body.theme-dark .account-btn--default {
    background: rgba(89,130,210,0.12);
    color: #7aa3f5;
    border-color: rgba(89,130,210,0.25);
}
body.theme-dark .account-btn--logout {
    background: rgba(231,76,60,0.1);
    color: #ff7c7c !important;
    border-color: rgba(231,76,60,0.25);
}

.access-denied {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.access-denied__card {
    background: #1e2535;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 36px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    color: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: access-denied-in .2s ease;
}

@keyframes access-denied-in {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.access-denied__icon {
    font-size: 2.8rem;
    line-height: 1;
    margin-bottom: 12px;
}

.access-denied__card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 14px;
    color: #fff !important;
    text-align: center;
}

.access-denied__card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78) !important;
    margin: 0 0 10px;
    text-align: center;
}

.access-denied__card p:last-of-type {
    margin-bottom: 24px;
}

.access-denied__card .access-denied__hint {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6) !important;
    margin-top: -8px;
    text-align: center;
}

.access-denied__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.access-denied__actions .btn {
    width: auto;
    padding: 0 28px;
    height: 44px;
    font-size: 1rem;
}

.access-denied__actions .btn-primary {
    background: #3960ab;
    color: #fff;
    border-color: #3960ab;
}

.access-denied__actions .btn-primary:hover { background: #4a74c9; border-color: #4a74c9; }

.access-denied__actions .btn-ghost {
    background: transparent;
    color: #bbb;
    border: 1.5px solid rgba(255,255,255,0.2);
}

.access-denied__actions .btn-ghost:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

/* ── Mobile nav buttons fix ─────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* Fix buttons to bottom corners, make them compact & semi-transparent */
    #back-btn,
    #Menu-btn,
    #back-btn-olimp,
    #menu-btn-olimp,
    #Menu-btn2 {
        position: fixed !important;
        bottom: 16px;
        z-index: 200;
        font-size: 0.78rem !important;
        min-width: 0 !important;
        padding: 0.45em 1em !important;
        opacity: 0.82;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    }
    #back-btn,
    #back-btn-olimp {
        left: 12px;
        right: auto;
    }
    #Menu-btn,
    #menu-btn-olimp,
    #Menu-btn2 {
        right: 12px;
        left: auto;
    }
    /* Padding so last card isn't hidden behind fixed buttons */
    #bottom-space,
    #bottom-space2 {
        padding-bottom: 72px;
    }
}

/* ── Mobile test & answer layout ────────────────────────────────────────── */
@media (max-width: 767px) {

    /* Score counter — compact row */
    .game-counter {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-size: 1rem !important;
        padding: 6px 14px;
        background: rgba(89,130,210,0.12);
        border-radius: 20px;
        width: fit-content;
        margin: 0 auto;
    }
    .game-counter h5 {
        margin: 0;
        font-size: 0.95rem;
        font-weight: 600;
    }

    /* Question text area (no extra padding/line-height — breaks result tables on mobile) */
    #middle-spaceV1,
    #middle-spaceV2,
    #middle-space {
        font-size: 1.05rem !important;
        text-align: left !important;
        word-break: break-word;
        overflow-x: auto;
    }

    /* Result tables inside middle-space should scroll, not overflow */
    #middle-space table,
    #middle-spaceV1 table,
    #middle-spaceV2 table {
        width: 100%;
        min-width: 320px;
        font-size: 0.8rem;
    }
    #middle-space table th,
    #middle-space table td,
    #middle-spaceV1 table th,
    #middle-spaceV1 table td,
    #middle-spaceV2 table th,
    #middle-spaceV2 table td {
        padding: 5px 6px !important;
        white-space: normal;
        word-break: break-word;
    }

    /* Answer buttons (test variants) */
    .game-btn-v2,
    .game-btn-v3 {
        display: block !important;
        width: 100% !important;
        font-size: 1rem !important;
        padding: 0.6em 1em !important;
        margin: 0 0 8px 0 !important;
        text-align: center !important;
        box-sizing: border-box;
    }

    /* Container holding answer buttons — column layout */
    #bottom-spacev1 > div,
    #bottom-spacev1,
    #bottom-spacev2 > div,
    #bottom-spacev2 {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100%;
        padding: 0 12px;
        box-sizing: border-box;
        gap: 6px;
    }

    /* Test list buttons (topic tests selection) */
    #middle-spaceV1 .game-btn-v2,
    #middle-spaceV2 .game-btn-v2 {
        display: block !important;
        width: 100% !important;
        font-size: 0.97rem !important;
        padding: 0.65em 1em !important;
        margin: 0 0 6px 0 !important;
    }

    /* game-content flex → column on mobile */
    .game-content {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0 12px;
        gap: 6px;
    }

    /* Prevent horizontal scroll on narrow screens */
    #middle-spaceV1,
    #middle-spaceV2,
    #bottom-spacev1,
    #bottom-spacev2 {
        max-width: 100vw;
        overflow-x: hidden;
    }
}
