.disabled {
    background-color: #4a4a4a !important;
    color: #666 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.button.nbut.disabled.correct {
    background-color: #4caf86 !important;
    color: white !important;
}

.button.nbut.disabled.incorrect {
    background-color: #cd2122 !important;
    color: white !important;
}

.button.nbut.disabled.partial {
    background-color: #f88c00 !important;
    color: white !important;
}


.comment_wrapper {
    margin-top: 20px;
}

.next_button {
    background-color: #2196f3;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
}

.next_button:hover {
    background-color: #1976d2;
}
    
    .test_wrapper .question .description {
    padding:12px 0;
        display: none;
}
    
    .test_wrapper .question .stat {
    color: #999;
}
.test_wrapper .question .answered .stat {
    color: #9a9a9a;
    padding-bottom:12px;
    display: none;
}

    .test_wrapper .question .points {
    position: absolute;
    bottom:20px;
    left:20px;
    padding: 8px 15px;
    background: #0000008a;
    border-radius:12px;
    font-size: 14px;
    color: #fff;
}
    
    .test_wrapper .question .description .pointsv {
    margin-right: 5px;
    font-weight: 700;
    display: inline-block;
}
    
    .test_wrapper .results .quizend {
        margin: 12px 10px;
    font-weight: 500;
    }


/* ==================== СТИЛИ ДЛЯ ТАБЛИЦЫ ЛИДЕРОВ ==================== */

/* Стили для модального окна (светлая тема) */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background-color: #ffffff;           /* светлый фон */
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    position: relative;
    border: 2px solid #cd2122;
    max-height: 80vh;
    overflow-y: auto;
    color: #333;                         /* тёмный текст */
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #333;                         /* тёмный крестик */
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.close-modal:hover {
    color: #cd2122;
}

/* Стили для таблицы лидеров (светлая тема) */
.leaderboard-container {
    margin-top: 20px;
}

.leaderboard-info {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(205, 33, 34, 0.05); /* очень светлый красный */
    border-radius: 8px;
    border-left: 4px solid #cd2122;
}

.quiz-type-info {
    font-size: 14px;
    color: #333;                         /* тёмный текст вместо зелёного */
    font-style: italic;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.leaderboard-table th {
    background-color: #cd2122;
    color: #ffffff;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 5;
}

.leaderboard-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;      /* светлая граница */
    vertical-align: middle;
    color: #333;
}

.leaderboard-table tr:hover {
    background-color: #f5f5f5;           /* светлый фон при наведении */
}

/* Стили для мест */
.rank-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    color: #ffffff;
}

.rank-1 {
    background-color: gold;
    color: #333;
}

.rank-2 {
    background-color: silver;
    color: #333;
}

.rank-3 {
    background-color: #cd7f32; /* bronze */
    color: #ffffff;
}

.rank-4, .rank-5, .rank-6, .rank-7, .rank-8, .rank-9, .rank-10 {
    background-color: #e0e0e0;           /* светлый серый */
    color: #333;
}

/* Специальные стили для строк первых трёх мест (светлая тема) */
.first-place td {
    background-color: rgba(255, 215, 0, 0.1);
}

.second-place td {
    background-color: rgba(192, 192, 192, 0.1);
}

.third-place td {
    background-color: rgba(205, 127, 50, 0.1);
}

.leaderboard-loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.no-leaders {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

/* Адаптивность (без изменений) */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .leaderboard-table {
        font-size: 14px;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 8px;
    }
    
    .rank-badge {
        width: 25px;
        height: 25px;
        line-height: 25px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .leaderboard-table {
        display: block;
        overflow-x: auto;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
    
    .test_result_buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .test_result_buttons a {
        width: 100%;
        text-align: center;
    }
}








/* quiz.css - ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ ТЕСТОВ */

.hidden {
    display: none;
}

/* Ключевые кадры для анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Анимации */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

/* Применяем анимацию к изображению */
.tests_full .ph_img {
    opacity: 0; /* Начальная прозрачность */
    animation: fadeIn 0.5s ease forwards; /* Анимация длительностью 0.5 секунды */
}

.tests_full .ph_img {
    opacity: 0;
    transition: opacity 300ms;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.tests_full .ph_img.visible {
    opacity: 1;
}

.tests_full .ph_img {
    position: relative;
}

.ph_img {
    vertical-align: bottom;
    max-width: 100%;
    border-radius: 16px;
}

/* Общие контейнеры */
.tests_full {
    display: flex;
    width: 100%;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: #343434;
    box-shadow: 0 1px 0 1px rgb(0 0 0 / 4%);
    border-radius: 16px;
    flex-wrap: wrap;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    transition: opacity 300ms;
    opacity: 1;
}

.test_wrapper {
    position: relative;
    max-width: 700px;
    width: 100%;
    margin: 30px 0;
    background-color: #fff;
    box-shadow: 0 1px 0 1px rgb(0 0 0 / 4%);
    border-radius: 16px;
    padding: 20px;
}

.dark-skin .test_wrapper {
    background-color: #343434;
}

/* Текст и заголовки */
.test_wrapper .results h2, 
.test_wrapper .question h2, 
.test_wrapper .start h2 {
    font-size: 21px;
    line-height: 27px;
    font-weight: 500;
    margin: 0 0 20px;
}

.test_wrapper .i_f {
    color: #929292;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
}

.test_wrapper .ir {
    margin-left: auto;
}

.test_wrapper .i_f a {
    font-size: 15px;
}

/* Бейджи */
.test_wrapper .question .badge {
    padding: 4px 15px;
    background: #525252;
    display: inline-block;
    border-radius: 20px;
    color: #fff;
}

.test_wrapper .question .blue_badge {
    background: #866239;
}

/* Изображения */
.tests .opa {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-size: auto 1500px;
    background-position: center;
    transform: scale(1.1) translateZ(0);
    backface-visibility: hidden;
    opacity: .9;
    filter: blur(8px);
    -webkit-filter: blur(8px);
    background-position: top center;
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
}

.test_wrapper .question .image, 
.test_wrapper .start .image {
    width: 100%;
    display: block;
    background-color: #414141;
    position: relative;
    border-radius: 16px;
}

.test_wrapper .question .story, 
.test_wrapper .start .story {
    margin: 12px 0 0;
    line-height: 24px;
    font-size: 110%;
}

/* Кнопки - ОБЩИЕ СТИЛИ */
.share_input.nbut, 
.tests .nbut {
    padding: 9px 20px;
    border-radius: 8px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    text-align: center;
    cursor: pointer;
    border: 0;
    box-shadow: 0 1px 0px rgb(0 0 0 / 10%);
    display: inline-block;
    box-sizing: border-box;
    user-select: none;
    padding-top: 12px;
    padding-bottom: 12px;
}

.test_wrapper .question .button_wrapper {
    margin-top: 12px;
}

.test_wrapper .question .button_wrapper .button {
    width: 100%;
}

.test_wrapper .start .button {
    width: 100%;
    display: block;
    margin: 12px 0 0;
    background: #008710;
    border-color: #008710;
}

.dark-skin .test_wrapper .start .button {
    background: #008710;
    border-color: #008710;
}

.dark-skin .share_input.nbut, 
.dark-skin .tests .options .nbut {
    background: #434343;
}

.btn_green {
    background: #008710;
    border-color: #008710;
    color: #fff !important;
}

@media (hover: hover) {
    .btn_green:hover {
        background: #00c818;
        color: #fff;
    }
}

.btn_blue {
    background: #866239;
    border-color: #866239;
    color: #fff;
}

/* Результаты */
.test_wrapper .results .image {
    padding-bottom: 52%;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 16px;
}

.test_wrapper .results .share_results {
    text-align: center;
    margin: 12px 0;
}

.share_input {
    display: flex;
    white-space: nowrap;
    align-items: center;
}

.share_results .input2 {
    background: #282828;
    padding: 12px 15px;
    border-radius: 8px;
    transition: border .4s, box-shadow .4s;
    appearance: none;
    outline: none;
    border: 0;
    width: 100%;
    box-sizing: border-box;
    color: #ddd;
    font-size: 16px;
    font-family: inherit;
    vertical-align: top;
    resize: vertical;
    margin-right: 12px;
}

.test_result_buttons .nbut {
    margin-top: 12px;
    width: 100%;
}

.test_result_buttons .test_other {
    background-color: #393939;
    color: #fff !important;
}

/* Общие стили для отключенных кнопок */
.disabled {
    background-color: #4a4a4a !important;
    color: #666 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Комментарии и описание */
.test_wrapper .question .description {
    padding: 12px 0;
    display: none;
}

.test_wrapper .question .stat {
    color: #999;
}

.test_wrapper .question .answered .stat {
    color: #9a9a9a;
    padding-bottom: 12px;
    display: none;
}

.test_wrapper .question .description .pointsv {
    margin-right: 5px;
    font-weight: 700;
    display: inline-block;
}

.test_wrapper .results .quizend {
    margin: 12px 10px;
    font-weight: 500;
}

/* Кнопка "Дальше" - общие стили */
.next_button {
    background-color: #2196f3;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
}

.next_button:hover {
    background-color: #1976d2;
}

/* Счетчик баллов */
.test_wrapper .question .points {
    position: absolute;
    bottom: 20px;
    left: 20px;
    padding: 8px 15px;
    background: #0000008a;
    border-radius: 12px;
    font-size: 14px;
    color: #fff;
}

    
/* ==================== СТИЛИ ДЛЯ ТАБЛИЦЫ ЛИДЕРОВ ==================== */

/* Стили для модального окна (светлая тема) */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background-color: #ffffff;           /* светлый фон */
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    position: relative;
    border: 2px solid #cd2122;
    max-height: 80vh;
    overflow-y: auto;
    color: #333;                         /* тёмный текст */
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #333;                         /* тёмный крестик */
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.close-modal:hover {
    color: #cd2122;
}

/* Стили для таблицы лидеров (светлая тема) */
.leaderboard-container {
    margin-top: 20px;
}

.leaderboard-info {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(205, 33, 34, 0.05); /* очень светлый красный */
    border-radius: 8px;
    border-left: 4px solid #cd2122;
}

.quiz-type-info {
    font-size: 14px;
    color: #333;                         /* тёмный текст вместо зелёного */
    font-style: italic;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.leaderboard-table th {
    background-color: #cd2122;
    color: #ffffff;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 5;
}

.leaderboard-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;      /* светлая граница */
    vertical-align: middle;
    color: #333;
}

.leaderboard-table tr:hover {
    background-color: #f5f5f5;           /* светлый фон при наведении */
}

/* Стили для мест */
.rank-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    color: #ffffff;
}

.rank-1 {
    background-color: gold;
    color: #333;
}

.rank-2 {
    background-color: silver;
    color: #333;
}

.rank-3 {
    background-color: #cd7f32; /* bronze */
    color: #ffffff;
}

.rank-4, .rank-5, .rank-6, .rank-7, .rank-8, .rank-9, .rank-10 {
    background-color: #e0e0e0;           /* светлый серый */
    color: #333;
}

/* Специальные стили для строк первых трёх мест (светлая тема) */
.first-place td {
    background-color: rgba(255, 215, 0, 0.1);
}

.second-place td {
    background-color: rgba(192, 192, 192, 0.1);
}

.third-place td {
    background-color: rgba(205, 127, 50, 0.1);
}

.leaderboard-loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.no-leaders {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

/* Адаптивность (без изменений) */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .leaderboard-table {
        font-size: 14px;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 8px;
    }
    
    .rank-badge {
        width: 25px;
        height: 25px;
        line-height: 25px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .leaderboard-table {
        display: block;
        overflow-x: auto;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
    
    .test_result_buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .test_result_buttons a {
        width: 100%;
        text-align: center;
    }
}

/* ===== ТЁМНАЯ ТЕМА (переопределения для .dark-skin) ===== */
.dark-skin .modal-content {
    background-color: #1f2024;
    color: #ddd;
    border-color: #cd2122;
}

.dark-skin .close-modal {
    color: #fff;
}

.dark-skin .close-modal:hover {
    color: #cd2122;
}

.dark-skin .leaderboard-info {
    background: rgba(205, 33, 34, 0.2);
    border-left-color: #cd2122;
}

.dark-skin .quiz-type-info {
    color: #b3fc03;                     /* возвращаем зелёный для тёмной темы */
}

.dark-skin .leaderboard-table th {
    background-color: #cd2122;
    color: #fff;
}

.dark-skin .leaderboard-table td {
    border-bottom-color: #444;
    color: #ddd;
}

.dark-skin .leaderboard-table tr:hover {
    background-color: #3a3f4a;
}

.dark-skin .rank-badge.rank-4,
.dark-skin .rank-badge.rank-5,
.dark-skin .rank-badge.rank-6,
.dark-skin .rank-badge.rank-7,
.dark-skin .rank-badge.rank-8,
.dark-skin .rank-badge.rank-9,
.dark-skin .rank-badge.rank-10 {
    background-color: #555;
    color: #fff;
}

.dark-skin .first-place td {
    background-color: rgba(255, 215, 0, 0.15);
}

.dark-skin .second-place td {
    background-color: rgba(192, 192, 192, 0.15);
}

.dark-skin .third-place td {
    background-color: rgba(205, 127, 50, 0.15);
}

.dark-skin .leaderboard-loading,
.dark-skin .no-leaders {
    color: #aaa;
    border-color: #444;
}
</style>