/* ========================================================= */
/* === ГЛОБАЛЬНЫЕ СТИЛИ ГРАММАТИКИ (ЗЕЛЕНЫЕ АКЦЕНТЫ) === */
/* ========================================================= */

:root {
    --bubble_color: #F0F4F7;
    --bubble_color: #F5F5F7;
}


/* ========================================================= */
/* === ЛЕЙАУТ 1: SPLIT (ПЕРСОНАЖ + КВИЗ) === */
/* ========================================================= */

.grammar_view_split {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: auto;
}

/* Верхняя половина (50%) */
.split_hero {
    flex: 0 0 50%;
    display: flex;
    flex-direction: row;
    /* Персонаж слева, баббл справа */
    align-items: center;
    justify-content: center;
}

.split_character {
    flex: 0 1 180px;
    height: 80%;
    display: flex;
    align-items: center;
    margin-left: -20px;
}

/* Баббл в split-режиме (хвостик слева) */
.split_bubble {
    flex: 1;
    max-width: 320px;
    background: #ffffff;
    color: #131415;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.split_bubble::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 12px solid #ffffff;
}

/* Нижняя половина (50%) */
.split_content_card {
    flex: 0 0 50%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 20px 20px 20px;
}

.split_scroll_area {
    background-color: var(--c-bg-card);
    border: 2px solid var(--c-border);
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ========================================================= */
/* === ЛЕЙАУТ 2: CENTERED (ПРИВЕТСТВИЕ / ТОЛЬКО ПЕРСОНАЖ) === */
/* ========================================================= */

.grammar_view_centered {
    display: flex;
    flex-direction: column;
    height: 100%;
    align-items: center;
    justify-content: center;
}

/* Баббл в centered-режиме (хвостик снизу) */
.centered_bubble {
    background: var(--bubble_color);
    color: #131415;
    padding: 20px 25px;
    border-radius: 24px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    max-width: 90%;
    z-index: 5;
}

.centered_bubble::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 15px solid #ffffff;
}

.centered_character {
    flex: 0 1 40%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* ========================================================= */
/* === ЛЕЙАУТ 3: TEXT ONLY (БЕЗ ПЕРСОНАЖА) === */
/* ========================================================= */

.grammar_view_text_only {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: var(--c-bg-body);
}

.text_only_scroll_area {
    background-color: var(--c-bg-card);
    border: 2px solid var(--c-border);
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90%;
    overflow-y: auto;
}

/* ========================================================= */
/* === ОБЩИЕ ЭЛЕМЕНТЫ И АНИМАЦИИ === */
/* ========================================================= */

.char_img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.char_img_big {
    height: 300px;
    width: 300px;
}

.split_quiz_section .c_option {
    margin-left: 0 !important;
    width: 100%;
    margin-top: 10px;
}

.char_img.is_happy {
    animation: bounceChar 0.5s ease-out;
}
.char_img.is_angry {
    animation: shakeChar 0.4s ease-in-out;
}

@keyframes bounceChar {
    0% { transform: translateY(0); }
    30% { transform: translateY(-15px); } /* Подпрыгивает вверх */
    50% { transform: translateY(0); }
    80% { transform: translateY(-7px); } /* Небольшой отскок */
    100% { transform: translateY(0); }
}

@keyframes shakeChar {
    0%, 100% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-6px) rotate(-4deg); }
    75% { transform: translateX(6px) rotate(4deg); }
}




/* ВНУТРЕННОСТИ */
.split_rich_text h1,
.split_rich_text h3,
.text_only_scroll_area h1,
.text_only_scroll_area h3
{
    color: var(--c-accent-green) !important;
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}


.split_rich_text h2,
.text_only_scroll_area h2
{
    color: var(--c-accent-green) !important;
    font-weight: 800;
    font-size: 1.3rem;
    display: block;
    margin: 0px auto;
    margin-bottom: 1rem;
}

.split_rich_text p,
.text_only_scroll_area p
{
    margin-bottom: 1rem;
}


.split_bubble b {
    color: var(--c-accent-blue) !important;
    font-weight: 800;
}

.split_bubble i {
    color: var(--c-accent-purple) !important;
}


.split_rich_text,
.text_only_rich_text,
.centered_bubble {
    font-family: inherit;
}

/* Выделение слов — ЗЕЛЕНЫЙ (читается лучше синего) */
.split_rich_text b,
.split_rich_text strong,
.text_only_rich_text b,
.text_only_rich_text strong {
    color: var(--c-accent-green) !important;
    font-weight: 800;
}

/* Красивые списки */
.split_rich_text ul,
.text_only_rich_text ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.split_rich_text li,
.text_only_rich_text li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 10px;
}

.split_rich_text li::before,
.text_only_rich_text li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--c-accent-green);
    font-weight: bold;
    font-size: 1.2em;
}

