/* style.css */

/* === ШРИФТЫ И ПЕРЕМЕННЫЕ === */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&display=swap');

:root {
    --bg-color: #F4F4F4;
    --text-color: #000000;
    --white: #FFFFFF;
    --border-radius: 30px;

    /* Цветовые палитры */
    --green-primary: #20A563;
    --green-light: #8CD277;
    --green-bg: #E8F5E9;
    --blue-primary: #0C6DBD;
    --blue-light: #4CA8F3;
    --dark-primary: #000000;
    --dark-light: #979797;
    --yellow-primary: #FFB041;
    --yellow-light: #FFD191;
    --pink-primary: #FF1952;
    --pink-light: #FF80B2;
    --purple-primary: #8239AD;
    --purple-light: #C679F4;

    /* Состояния */
    --error: #FF1952;
    --success: #20A563;

    --gray-ui: #EEEEEE;
    --gray-text: #666666;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 0;
    margin: 0;
    line-height: 1.4;
}

.container {
    max-width: 860px; /* 820px контент + 40px на падинги */
    margin: 0 auto;
    padding: 40px 20px;
}

/* === ТИПОГРАФИКА === */
h1 { font-size: 48px; font-weight: 600; text-transform: uppercase; margin-bottom: 20px; line-height: 1; }
h2 { font-size: 44px; font-weight: 600; text-transform: uppercase; margin-bottom: 20px; letter-spacing: -0.01em; }
p { font-size: 18px; font-weight: 600; color: #000; line-height: 1.4; }
/* === ЛОГОТИП === */
.site-logo {
    display: block;
    margin-bottom: 40px;
    text-decoration: none;
}
.site-logo.with-divider {
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid #061624;
}
.site-logo img {
    height: 48px;
    width: auto;
    max-width: 100%;
    display: block;
}

/* === ГЛАВНАЯ СТРАНИЦА === */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.card-link { text-decoration: none; display: block; }

.main-card {
    border-radius: var(--border-radius);
    height: 260px;
    display: flex;
    flex-direction: column;
    color: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: filter 0.2s;
    overflow: hidden;
}
.main-card:hover { filter: brightness(1.15); }

.bg-green { background: linear-gradient(135deg, var(--green-light), var(--green-primary)); }
.bg-blue { background: linear-gradient(135deg, var(--blue-light), var(--blue-primary)); }
.bg-dark { background: linear-gradient(135deg, var(--dark-light), var(--dark-primary)); }
.bg-magenta { background: linear-gradient(135deg, var(--pink-light), var(--pink-primary)); }
.bg-orange { background: linear-gradient(135deg, var(--yellow-light), var(--yellow-primary)); }
.bg-violet { background: linear-gradient(135deg, var(--purple-light), var(--purple-primary)); }

.main-card-header {
    height: 50px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    font-style: italic;
    text-transform: uppercase;
    position: relative;
}
.main-card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25px;
    right: 25px;
    height: 1px;
    background-color: rgba(255,255,255,0.3);
}

.main-card-body { flex-grow: 1; padding: 20px 25px; }
.card-title {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.1;
}

.main-card-footer {
    height: 50px;
    position: relative;
}
.main-card-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25px;
    right: 25px;
    height: 1px;
    background-color: rgba(255,255,255,0.3);
}

/* === СЕКЦИЯ ПОДДЕРЖКИ === */
.support-section {
    padding: 50px 0;
    border-top: 1px solid #000000;
    border-bottom: 1px solid #000000;
    text-align: center;
    margin-top: 80px;
}
.support-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 25px; flex-wrap: wrap; }
.btn-support {
    padding: 12px 30px;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 16px;
    text-decoration: none;
    transition: filter 0.2s;
}
.btn-support:hover {
    filter: brightness(1.15);
}
.donate-color-green { background-color: var(--green-primary); }
.donate-color-blue { background-color: var(--blue-primary); }
.donate-color-dark { background-color: var(--dark-primary); }
.donate-color-magenta { background-color: var(--pink-primary); }
.donate-color-orange { background-color: var(--yellow-primary); }
.donate-color-violet { background-color: var(--purple-primary); }
/* === ПОДВАЛ (FOOTER) === */
.site-footer {
    background-color: #EEEEEE;
    width: 100%;
    margin-top: 80px;
    margin-bottom: 0;
    padding: 40px 0;
}
.site-footer-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-right {
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #424242;
}

.footer-right a {
    color: #424242;
    text-decoration: underline;
    display: block;
    margin-top: 5px;
}
.footer-logo-img {
    height: 48px;
    display: block;
    max-width: 100%;
}
@media (max-width: 600px) {
    .site-footer {
        padding: 20px;
    }
    .footer-right {
        font-size: 12px;
    }
    .footer-logo-img {
        height: 36px;
    }
}

/* === ИНТЕРФЕЙС ТЕСТА (QUIZ) === */
.quiz-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.quiz-header-pill {
    display: flex;
    height: 28px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
}

.theme-green .header-left { background: var(--green-primary); }
.theme-green .header-right { background: var(--green-light); }
.theme-green .dot { border-color: var(--green-primary); }
.theme-green .dot.filled { background: var(--green-primary); }

.theme-orange .header-left { background: var(--yellow-primary); color: #333; }
.theme-orange .header-right { background: var(--yellow-light); }
.theme-orange .dot { border-color: var(--yellow-primary); }
.theme-orange .dot.filled { background: var(--yellow-primary); }

.theme-violet .header-left { background: var(--purple-primary); }
.theme-violet .header-right { background: var(--purple-light); }
.theme-violet .dot { border-color: var(--purple-primary); }
.theme-violet .dot.filled { background: var(--purple-primary); }

.theme-magenta .header-left { background: var(--pink-primary); }
.theme-magenta .header-right { background: var(--pink-light); }
.theme-magenta .dot { border-color: var(--pink-primary); }
.theme-magenta .dot.filled { background: var(--pink-primary); }

.theme-dark .header-left { background: var(--dark-primary); }
.theme-dark .header-right { background: var(--dark-light); }
.theme-dark .dot { border-color: var(--dark-primary); }
.theme-dark .dot.filled { background: var(--dark-primary); }

.header-left {
    padding: 2px 40px 0 40px;
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
    line-height: 1;
    white-space: nowrap;
}
.header-right {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 40px 0 15px;
}
.header-info-text {
    color: white;
    font-weight: 600;
    font-style: italic;
    text-transform: uppercase;
    font-size: 16px;
    line-height: 1;
}
.dots-container { display: flex; gap: 6px; }
.dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.dot.correct {
    border: 2px solid #FFFFFF !important;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='20' fill='%2320A563'/%3E%3Cpath d='M33.1348 15.1074L17.2061 31.2402L6.89453 21.082L11.1055 16.8076L17.1475 22.7598L28.8652 10.8926L33.1348 15.1074Z' fill='white'/%3E%3C/svg%3E");
}

.dot.wrong {
    border: 2px solid #FFFFFF !important;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='20' fill='%23FF1952'/%3E%3Cpath d='M11.2426 7.00007L32.4558 28.2133L28.2132 32.4559L7 11.2427L11.2426 7.00007Z' fill='white'/%3E%3Cpath d='M7 28.2132L28.2132 7L32.4558 11.2426L11.2426 32.4558L7 28.2132Z' fill='white'/%3E%3C/svg%3E");
}

.quiz-body { padding: 40px; }
.question-title {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
    color: #000000;
    margin-bottom: 25px;
    padding-bottom: 25px;
    position: relative;
}
.question-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 1px;
    background-color: #E0E0E0;
}
.js-q-image-container {
    margin-bottom: 25px;
    text-align: center;
}
.js-q-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.options-list { display: flex; flex-direction: column; gap: 30px; }
.option-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.3s;
    min-height: 40px;
}

.radio-custom {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    flex-shrink: 0;
    border: none !important;
    background-color: transparent !important;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url("icons/radio_empty.svg");
}

.option-item.selected .radio-custom {
    background-image: url("icons/radio_black_check_on_white.svg") !important;
}

.option-item.correct.selected .radio-custom {
    background-image: url("icons/radio_green_check.svg") !important;
}

.option-item.correct:not(.selected) .radio-custom {
    background-image: url("icons/radio_green_check_on_white.svg") !important;
}

.option-item.wrong.selected .radio-custom {
    background-image: url("icons/radio_white_cross_on_red.svg") !important;
}

.option-item.wrong:not(.selected) .radio-custom {
    background-image: url("icons/radio_red_cross_on_white.svg") !important;
}

.option-item:hover:not(.selected):not(.correct):not(.wrong) .radio-custom {
    background-image: url("icons/radio_gray_check_on_white.svg") !important;
}

.option-item:hover:not(.selected):not(.correct):not(.wrong) .option-text {
    color: #888888;
}

.option-text { font-size: 18px; font-weight: 600; color: #000; line-height: 1.2; transition: color 0.2s; }
.options-list.is-checked .option-item:not(.correct):not(.wrong) { opacity: 0.4; pointer-events: none; }

.explanation {
    margin-top: 10px;
    margin-left: 60px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 400;
    font-style: italic;
    color: #000000;
    line-height: 1.4;
}
.explanation.success { border-left: 2px solid var(--green-primary); }
.explanation.error { border-left: 2px solid var(--error); }
/* Отображение ссылок в тексте (Quiz & Editor Preview) */
.content-link {
    color: var(--green-primary);
    text-decoration: underline;
    cursor: pointer;
}

/* Панель редактирования ссылки */
.link-editor-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F4F4F4;
    padding: 10px;
    margin-top: 5px;
}

.link-editor-bar.inline-link-bar {
    background: transparent;
    padding: 0;
    margin: 0;
}
/* Плейсхолдеры для contenteditable */
[contenteditable="true"]:empty:before {
    content: attr(placeholder);
    color: #999;
    pointer-events: none;
    display: block;
}

/* Стили ссылок внутри WYSIWYG редактора */
.editor-ce-title-link {
    background-color: #D4EDDA;
    padding: 2px 6px;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
}
.editor-ce-expl-link {
    color: var(--green-primary);
    text-decoration: underline;
}

.link-editor-input {
    flex-grow: 1;
    border: none;
    padding: 5px 10px;
    font-size: 14px;
    outline: none;
    background: white;
}

.link-editor-save {
    background-color: var(--green-primary);
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 50px;
}

.link-editor-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-footer { margin-top: 25px; padding-top: 25px; border-top: 1px solid #EEEEEE; display: flex; justify-content: flex-end; }
.btn {
    height: 50px;
    padding: 0 35px;
    border-radius: 25px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-prev { background: transparent; border: 1px solid var(--green-primary); color: var(--green-primary); }
.btn-next { background: var(--green-primary); color: #FFFFFF; }
.btn.disabled { background: #D9D9D9; border: 1px solid #D9D9D9; color: #FFFFFF; cursor: not-allowed; }
.btn-prev.disabled { background: transparent; border: 1px solid #D9D9D9; color: #BDBDBD; }
.btn:not(.disabled):hover { filter: brightness(1.15); }

/* === АДМИН ПАНЕЛЬ === */
.admin-page-title { font-size: 36px; font-weight: 700; text-transform: uppercase; margin-bottom: 50px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 30px; }

.admin-card {
    background: white;
    border-radius: 30px;
    height: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    position: relative;
    transition: filter 0.2s;
}
.admin-card:hover { filter: brightness(0.96); }

.stats-pill {
    display: flex;
    height: 36px;
    border-radius: 30px 30px 0 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
}
.stats-left, .stats-right { flex: 1; display: flex; align-items: center; justify-content: center; }
.stats-pill.green .stats-left { background-color: var(--green-primary); }
.stats-pill.green .stats-right { background-color: var(--green-light); }
.stats-pill.blue .stats-left { background-color: var(--blue-primary); }
.stats-pill.blue .stats-right { background-color: var(--blue-light); }
.stats-pill.dark .stats-left { background-color: var(--dark-primary); }
.stats-pill.dark .stats-right { background-color: var(--dark-light); }
.stats-pill.magenta .stats-left { background-color: var(--pink-primary); }
.stats-pill.magenta .stats-right { background-color: var(--pink-light); }
.stats-pill.orange .stats-left { background-color: var(--yellow-primary); }
.stats-pill.orange .stats-right { background-color: var(--yellow-light); }
.stats-pill.violet .stats-left { background-color: var(--purple-primary); }
.stats-pill.violet .stats-right { background-color: var(--purple-light); }

.admin-card-title { font-size: 24px; font-weight: 700; text-transform: uppercase; padding: 20px 25px 0 25px; line-height: 1.2; }
.theme-selector {
    display: none; /* Скрыт по умолчанию, показывается через JS */
    gap: 8px;
    align-items: center;
}
.theme-selector.active { display: flex; }

.theme-opt {
    width: 32px;
    height: 32px;
    cursor: pointer;
    background-size: contain;
    background-repeat: no-repeat;
    position: relative;
    transition: transform 0.1s;
}

.theme-opt:hover { transform: scale(1.1); }

.theme-opt.magenta { background-image: url("icons/color_magenta.svg"); }
.theme-opt.orange  { background-image: url("icons/color_orange.svg"); }
.theme-opt.green   { background-image: url("icons/color_green.svg"); }
.theme-opt.blue    { background-image: url("icons/color_blue.svg"); }
.theme-opt.violet  { background-image: url("icons/color_violet.svg"); }
.theme-opt.dark    { background-image: url("icons/color_black.svg"); }

/* Галочка выбора */
.theme-opt.active::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M33.1348 15.1074L17.2061 31.2402L6.89453 21.082L11.1055 16.8076L17.1475 22.7598L28.8652 10.8926L33.1348 15.1074Z' fill='white'/%3E%3C/svg%3E");
    background-size: 80%;
    background-position: center;
    background-repeat: no-repeat;
}

/* Фикс для темной иконки (там галочка уже может быть зашита, но мы её дублируем для надежности или используем CSS) */
.theme-opt.dark.active::after { background-size: 80%; }
.card-divider { height: 1px; background-color: #E0E0E0; margin: auto 25px 15px 25px; }

/* Нижняя панель в админке */
.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px 25px 25px;
}

.action-icons-group {
    display: flex;
    gap: 12px;
}

.action-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    border-radius: 50%;
}
.action-icon img { width: 100%; height: 100%; display: block; }
.action-icon .icon-hover {
    display: none;
}
.action-icon:hover .icon-default {
    display: none;
}
.action-icon:hover .icon-hover {
    display: block;
}

.theme-circle {
    width: 40px;
    height: 40px;
}
.theme-circle img {
    width: 100%;
    height: 100%;
    display: block;
}

.admin-card.new-test-card { align-items: center; justify-content: center; cursor: pointer; color: #000; }
.plus-circle {
    width: 66px; height: 66px; background-color: #EEEEEE; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin-bottom: 15px;
}
.plus-icon { font-size: 36px; color: #000; font-weight: 400; line-height: 1; margin-top: -4px; }
/* Toast Notification */
#admin-toast {
    visibility: hidden;
    min-width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 30px;
    padding: 12px 24px;
    position: fixed;
    z-index: 10000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-weight: 600;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s, visibility 0.3s;
}
#admin-toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 40px;
}
/* Стили для управления донатами */
.donate-input-custom {
    width: 260px;
    height: 50px;
    border: none;
    padding: 0 25px;
    border-radius: 0 !important; /* Строго без скруглений */
    outline: none;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    color: #000;
}
.donate-input-custom::placeholder { color: #999; }
/* Стили для модального окна управления донатами */
.donate-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.donate-modal-content {
    width: 100%;
    max-width: 1100px;
    text-align: center;
}
.donate-input-custom {
    width: 260px;
    height: 50px;
    border: none;
    background: #EDEDED;
    padding: 0 25px;
    border-radius: 0; /* Строгие углы по макету */
    outline: none;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    color: #000;
}
.donate-input-custom::placeholder { color: #000; opacity: 1; }
/* Стили для модального окна донатов */
.donate-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.donate-modal-content {
    width: 100%;
    max-width: 1000px;
    text-align: center;
}
.donate-input-custom {
    width: 260px;
    height: 50px;
    border: none;
    background: #EDEDED;
    padding: 0 25px;
    border-radius: 10px;
    outline: none;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
}
.donate-input-custom::placeholder { color: #999; text-transform: none; }

/* === РЕДАКТОР === */
.editor-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 60px; }
.editor-header-actions { display: flex; gap: 15px; }
.editor-header-actions .action-icon { box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

.editor-item-wrapper { position: relative; margin-bottom: 20px; }
.editor-floating-actions { position: absolute; right: -70px; display: flex; flex-direction: column; gap: 12px; }
.editor-floating-actions.top { top: 60px; }
.editor-floating-actions.bottom { bottom: 60px; }

.editor-floating-btn {
    width: 44px; height: 44px; border: none; background: none;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); border-radius: 50%;
}
.editor-floating-btn img { width: 100%; height: 100%; display: block; }
.editor-floating-btn .icon-hover { display: none; }
.editor-floating-btn:hover .icon-default { display: none; }
.editor-floating-btn:hover .icon-hover { display: block; }

.editor-add-btn {
    width: 44px; height: 44px; border: none; background: none;
    display: flex; align-items: center; justify-content: center; margin: 30px auto; cursor: pointer;
}
.editor-add-btn img { width: 100%; height: 100%; }

.edit-card {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #D9D9D9;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 60px;
    /* overflow: hidden; убрано, чтобы не обрезались плавающие кнопки действий (удалить/переместить) */
}
.edit-header { height: 24px; background-color: var(--green-light); position: relative; border-radius: var(--border-radius) var(--border-radius) 0 0; overflow: hidden; }
.edit-header-indicator { position: absolute; left: 0; top: 0; width: 20%; height: 100%; background-color: var(--green-primary); }
/* Цвета для редактора */
.edit-card.theme-green .edit-header { background-color: var(--green-light); }
.edit-card.theme-green .edit-header-indicator { background-color: var(--green-primary); }

.edit-card.theme-blue .edit-header { background-color: var(--blue-light); }
.edit-card.theme-blue .edit-header-indicator { background-color: var(--blue-primary); }

.edit-card.theme-magenta .edit-header { background-color: var(--pink-light); }
.edit-card.theme-magenta .edit-header-indicator { background-color: var(--pink-primary); }

.edit-card.theme-orange .edit-header { background-color: var(--yellow-light); }
.edit-card.theme-orange .edit-header-indicator { background-color: var(--yellow-primary); }

.edit-card.theme-violet .edit-header { background-color: var(--purple-light); }
.edit-card.theme-violet .edit-header-indicator { background-color: var(--purple-primary); }

.edit-card.theme-dark .edit-header { background-color: var(--dark-light); }
.edit-card.theme-dark .edit-header-indicator { background-color: var(--dark-primary); }
.edit-body { padding: 40px; }
.edit-footer { padding: 30px 40px; display: flex; justify-content: space-between; border-top: 1px solid #EEE; }

.btn-save { background-color: var(--green-primary); color: white; }
.btn-outline-red { background: transparent; border: 1px solid var(--error); color: var(--error); }

.editor-inner-input {
    width: 100%; background-color: #F4F4F4; border: none; padding: 20px;
    font-size: 22px; font-weight: 700; outline: none; margin-bottom: 15px;
}

.wysiwyg-group { display: flex; gap: 8px; }
.wysiwyg-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity 0.2s; }
.wysiwyg-icon:hover { opacity: 0.7; }
.wysiwyg-icon img { width: 100%; height: 100%; display: block; }

.status-check { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.status-check img { width: 100%; height: 100%; display: block; }

.multichoice-text { font-size: 16px; font-weight: 700; line-height: 1.2; }
.editor-inner-multichoice { display: flex; align-items: center; gap: 15px; padding-top: 10px; }

.editor-option-radio-placeholder { width: 32px; height: 32px; border: 2px solid #E0E0E0; border-radius: 50%; background-color: white; flex-shrink: 0; }
.explanation-status-label { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; }

.editor-inner-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; margin-bottom: 25px; }
.editor-inner-title-col { flex-grow: 1; }
.editor-inner-wysiwyg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    position: relative;
    margin-bottom: 15px;
}
.editor-inner-wysiwyg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 1px;
    background-color: #E0E0E0;
}

.editor-question-title-view { font-size: 22px; font-weight: 700; text-transform: uppercase; text-align: left; margin-bottom: 40px; padding: 0; line-height: 1.4; }

.editor-inner-options { display: flex; flex-direction: column; gap: 15px; }
.editor-option-box { background-color: #F4F4F4; padding: 20px; display: flex; gap: 20px; align-items: flex-start; }
.editor-option-text { font-size: 16px; font-weight: 600; line-height: 1.5; outline: none; flex-grow: 1; }
.editor-explanation-box { background-color: #F4F4F4; padding: 20px; margin-left: 30px; margin-top: 10px; }
.editor-explanation-box .wysi-wrapper {
    background: #FFFFFF !important;
    border: 1px solid #D9D9D9 !important;
    border-radius: 0 !important; /* Строго без скруглений */
    box-shadow: none !important;
    margin-top: 10px;
}

.editor-explanation-box .wysi-wrapper:focus-within {
    border-color: #666666 !important; /* Тёмно-серый вместо синего при активации */
    outline: none !important;
}

.editor-explanation-box .wysi-editor {
    padding: 15px 20px !important; /* Добавляем воздух по бокам */
    font-size: 15px;
    font-weight: 400 !important; /* Убираем жирный по умолчанию */
    font-style: normal !important; /* Убираем курсив по умолчанию */
    line-height: 1.5;
}

/* Перебиваем глобальные стили для <p>, если редактор оборачивает в них строки */
.editor-explanation-box .wysi-editor p {
    font-weight: 400 !important;
    font-style: normal !important;
    margin: 0 0 10px 0;
}

.editor-explanation-box .wysi-toolbar {
    background: #EEEEEE !important;
    border-bottom: 1px solid #D9D9D9 !important;
    border-radius: 0 !important;
}

/* Удаляем любые контуры и свечения, которые могут давать эффект "жирной линии" или синего цвета */
.editor-explanation-box .wysi-wrapper *,
.editor-explanation-box .wysi-wrapper *:focus {
    box-shadow: none !important;
    outline: none !important;
}
.editor-explanation-text { font-size: 15px; font-weight: 400; font-style: italic; line-height: 1.5; margin-bottom: 20px; outline: none; }
.editor-explanation-text u { color: var(--green-primary); text-decoration: underline; }
.editor-explanation-text span { color: #333; }
.editor-explanation-footer { display: flex; justify-content: space-between; align-items: center; }

.editor-add-option-btn {
    background-color: #F4F4F4; padding: 15px 20px; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: background-color 0.2s; margin-top: 10px;
}
.editor-add-option-btn:hover { background-color: #EAEAEA; }
.add-option-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.add-option-icon img { width: 100%; height: 100%; display: block; }
.add-option-text { font-size: 18px; font-weight: 700; }
/* Стили для результатов в плеере */
.results-score-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1;
}
.results-circles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}
.result-circle-svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.results-text-block {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #000;
}

/* Стили для результатов в редакторе */
.editor-result-block {
    margin-bottom: 20px;
}
.editor-result-header {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #000;
}
.editor-result-body {
    background-color: #F4F4F4;
    padding: 20px;
}
/* Стили для превью картинки в редакторе */
.q-image-preview-container {
    margin-bottom: 25px;
}
.q-editor-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}
.q-editor-preview-img {
    display: block;
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    background: #f0f0f0;
}
.q-editor-image-remove {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 30px;
    height: 30px;
    background: var(--pink-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.2s;
}
.q-editor-image-remove:hover {
    transform: scale(1.1);
}

/* === МОБИЛЬНАЯ ВЕРСИЯ === */
@media (max-width: 600px) {
    body { padding: 0; }
    .container { padding: 20px 10px; }
    h1 { font-size: 24px; }
    .site-logo { margin-bottom: 30px; }
    .site-logo.with-divider {
        padding-bottom: 12px;
        margin-bottom: 18px;
    }
    .site-logo img { height: 36px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .quiz-container { padding-top: 20px; }
    .quiz-header-pill { width: calc(100% - 40px); margin: 0 auto; border-radius: 50px; }
    .header-left { padding: 2px 20px 0 20px; }
    .header-right { padding: 2px 20px 0 10px; justify-content: flex-start; }
    .header-info-text { display: block; }
    .dots-container { display: none; }
    .quiz-body { padding: 20px 20px 25px 20px; }
    .quiz-footer { flex-direction: column; gap: 15px; }
    .btn { width: 100%; }
    .editor-floating-actions { display: none; }
}