
/* ═══════════════════════════════════════════════════════════
   Cognee — styles.css v9.1
   Файл: styles.css | Глобальная версия: 9.1
   Изменения v9.1 (Блок 2):
   - Задача 2.1: стили .explain-btn, .explain-result, .explain-close
   - Задача 2.2: стили #read-time-left (адаптивный таймер чтения)
   - Задача 2.3: .article-card-tag, .article-card-kim, .article-tag, #kim-recommend-banner
   - Задача 2.4: #cognee-bookmark-btn, #cognee-bookmark-toast
   - Задача 2.5: #cognee-chrono-notice (хронорежим)
   - Блок 1 v9.0 сохранён полностью
   ═══════════════════════════════════════════════════════════ */

/* ─── CSS-ПЕРЕМЕННЫЕ: ТЁМНАЯ ТЕМА (по умолчанию) ─────────────────────────── */
:root {
    --bg:            #0f0f0f;
    --bg-normal:     #111318;
    --bg-tired:      #12100e;
    --text:          #e8e0d0;
    --text-normal:   #ddd8c8;
    --text-tired:    #c4b89e;
    --h2-focus:      #4FC3F7;
    --h2-normal:     #81C784;
    --h2-tired:      #c49a6c;
    --h2-border-f:   #4FC3F722;
    --h2-border-n:   #81C78422;
    --h2-border-t:   #c49a6c22;
    --kim-bg:        #0a1020;
    --kim-color:     #a0b8d0;
    --keyword-bg:    rgba(255,253,231,0.12);
    --keyword-color: #FFE082;
    --keyword-box:   rgba(255,224,130,0.2);
    --active-glow:   rgba(196,154,108,0.18);
}

/* ─── CSS-ПЕРЕМЕННЫЕ: СВЕТЛАЯ ТЕМА ───────────────────────────────────────── */
[data-theme="light"] {
    --bg:            #f5f0e8;
    --bg-normal:     #eeeae0;
    --bg-tired:      #f0ebe0;
    --text:          #2a2520;
    --text-normal:   #342e28;
    --text-tired:    #5c4f3d;
    --h2-focus:      #1a7ab5;
    --h2-normal:     #2e7d32;
    --h2-tired:      #8b5e3c;
    --h2-border-f:   #1a7ab522;
    --h2-border-n:   #2e7d3222;
    --h2-border-t:   #8b5e3c22;
    --kim-bg:        #ddd8ce;
    --kim-color:     #4a3f35;
    --keyword-bg:    rgba(139,94,60,0.12);
    --keyword-color: #7a4820;
    --keyword-box:   rgba(139,94,60,0.2);
    --active-glow:   rgba(139,94,60,0.12);
}

/* ─── БАЗОВЫЕ СТИЛИ ──────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0 0 140px;
    transition:
        font-size        1.5s ease,
        line-height      1.5s ease,
        background-color 1.2s ease,
        color            1.2s ease;
}

.article {
    max-width: 700px;
    margin: 60px auto;
    padding: 0 24px;
}

/* ─── РЕЖИМ FOCUS (КИМ > 70) ─────────────────────────────────────────────── */
body.mode-focus {
    font-size: 16px;
    line-height: 1.65;
    background-color: var(--bg);
    color: var(--text);
}

body.mode-focus p {
    opacity: 1;
    margin-bottom: 18px;
    transition: opacity 1.5s ease;
}

body.mode-focus .keyword {
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    color: inherit;
}

body.mode-focus h2 {
    font-size: 20px;
    color: var(--h2-focus);
    border-bottom: 1px solid var(--h2-border-f);
    padding-bottom: 8px;
    margin: 40px 0 16px;
}

/* ─── РЕЖИМ NORMAL (КИМ 40–70) ───────────────────────────────────────────── */
body.mode-normal {
    font-size: 17px;
    line-height: 1.85;
    background-color: var(--bg-normal);
    color: var(--text-normal);
}

body.mode-normal p {
    opacity: 1;
    margin-bottom: 22px;
    transition: opacity 1.5s ease;
}

body.mode-normal .keyword {
    background: var(--keyword-bg);
    color: var(--keyword-color);
    padding: 1px 5px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px var(--keyword-box);
}

body.mode-normal h2 {
    font-size: 20px;
    color: var(--h2-normal);
    border-bottom: 1px solid var(--h2-border-n);
    padding-bottom: 8px;
    margin: 40px 0 16px;
}

/* ─── РЕЖИМ TIRED (КИМ < 40) ─────────────────────────────────────────────── */
body.mode-tired {
    font-size: 20px;
    line-height: 2.15;
    background-color: var(--bg-tired);
    color: var(--text-tired);
}

body.mode-tired {
    background-color: #13110e;
}

[data-theme="light"].mode-tired,
[data-theme="light"] body.mode-tired {
    background-color: #f0e8d8;
}

body.mode-tired p {
    opacity: 0.1;
    margin-bottom: 28px;
    transition: opacity 1.2s ease;
}

body.mode-tired p.active-para {
    opacity: 1;
    background: var(--active-glow);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0 -16px 28px;
    box-shadow: 0 0 40px var(--active-glow);
}

body.mode-tired h2 {
    font-size: 22px;
    color: var(--h2-tired);
    border-bottom: 1px solid var(--h2-border-t);
    padding-bottom: 8px;
    margin: 48px 0 20px;
    opacity: 0.5;
    transition: opacity 1.2s ease;
}

/* ─── ПАРАГРАФЫ С ДВУМЯ ВЕРСИЯМИ ─────────────────────────────────────────── */
.para-full,
.para-simple {
    margin: 0 0 18px;
}

/* ─── КНОПКА-ТРИГГЕР ПАУЗЫ ───────────────────────────────────────────────── */
#pause-trigger-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #c47a45, #a05a28);
    color: #fff8f0;
    font-size: 15px;
    font-weight: bold;
    font-family: Georgia, serif;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow:
        0 4px 24px rgba(180,100,40,0.45),
        0 0 50px rgba(160,80,30,0.2);
    transition:
        background   0.2s ease,
        transform    0.15s ease,
        box-shadow   0.2s ease;
    z-index: 10002;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

#pause-trigger-btn:hover {
    background: linear-gradient(135deg, #a05a28, #804020);
    transform: translateX(-50%) scale(1.04);
    box-shadow:
        0 6px 32px rgba(160,80,30,0.55),
        0 0 60px rgba(160,80,30,0.25);
}

#pause-trigger-btn:active {
    transform: translateX(-50%) scale(0.97);
}

/* ─── ПОЛНОЭКРАННЫЙ ОВЕРЛЕЙ ПАУЗЫ ────────────────────────────────────────── */
#pause-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #2a1a0a 0%, #0f0a05 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

#pause-overlay.active {
    display: flex;
    opacity: 1;
}

[data-theme="light"] #pause-overlay {
    background: radial-gradient(ellipse at center, #f5e8d0 0%, #e8d5b0 100%);
}

.pause-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    padding: 40px;
    max-width: 480px;
}

.pause-overlay-emoji {
    font-size: 64px;
    line-height: 1;
    filter: drop-shadow(0 0 30px rgba(220,140,60,0.6));
    animation: pause-float 3s ease-in-out infinite;
}

@keyframes pause-float {
    0%, 100% { transform: translateY(0);    }
    50%       { transform: translateY(-8px); }
}

.pause-overlay-title {
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: 600;
    color: #f0d8b0;
    letter-spacing: 0.04em;
}

[data-theme="light"] .pause-overlay-title { color: #6b3a10; }

.pause-overlay-countdown {
    font-family: 'Courier New', monospace;
    font-size: 72px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #e8a060;
    line-height: 1;
    text-shadow: 0 0 40px rgba(232,160,96,0.5);
    letter-spacing: 0.06em;
}

[data-theme="light"] .pause-overlay-countdown {
    color: #a05020;
    text-shadow: 0 0 30px rgba(160,80,32,0.3);
}

.pause-overlay-subtitle {
    font-family: Georgia, serif;
    font-size: 16px;
    color: #a07850;
    font-style: italic;
    letter-spacing: 0.02em;
    line-height: 1.6;
}

[data-theme="light"] .pause-overlay-subtitle { color: #7a5030; }

.pause-overlay-return {
    margin-top: 16px;
    background: transparent;
    color: #c47a45;
    border: 1px solid #c47a4566;
    border-radius: 30px;
    padding: 12px 28px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.pause-overlay-return:hover {
    background: rgba(196,122,69,0.15);
    border-color: #c47a45aa;
    transform: scale(1.03);
}

.pause-overlay-return:active { transform: scale(0.97); }

[data-theme="light"] .pause-overlay-return { color: #8b4010; border-color: #8b401066; }
[data-theme="light"] .pause-overlay-return:hover { background: rgba(139,64,16,0.1); border-color: #8b4010aa; }

/* ─── КИМ-ДИСПЛЕЙ ────────────────────────────────────────────────────────── */
#kim-display {
    background-color: var(--kim-bg);
    color: var(--kim-color);
    font-size: 13px;
    font-family: 'Courier New', monospace;
    padding: 8px 14px;
    border-radius: 8px;
    border-left: 3px solid #4FC3F7;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    letter-spacing: 0.06em;
    box-shadow:
        0 2px 16px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.04);
    transition: border-color 1s ease, background-color 1.2s ease, color 1.2s ease;
}

/* ─── КИМ ПУЛЬС ПРИ СМЕНЕ ЗОНЫ ──────────────────────────────────────────── */
@keyframes kim-pulse {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}

#kim-display.kim-pulse-anim {
    animation: kim-pulse 0.6s ease;
}

/* ─── КНОПКА ТЕМЫ ────────────────────────────────────────────────────────── */
#cognee-theme-toggle:hover { background: rgba(255,255,255,0.1) !important; }
[data-theme="light"] #cognee-theme-toggle { color: #4a3f35 !important; border-color: rgba(0,0,0,0.2) !important; }
[data-theme="light"] #cognee-theme-toggle:hover { background: rgba(0,0,0,0.08) !important; }

[data-theme="light"] #kim-display {
    box-shadow: 0 2px 16px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
}

/* ─── ССЫЛКА НА ДАШБОРД ──────────────────────────────────────────────────── */
#dash-link {
    position: fixed; top: 60px; right: 20px; z-index: 9999;
    background-color: var(--kim-bg); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; text-decoration: none; line-height: 1;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
#dash-link:hover { background-color: rgba(79,195,247,0.15); border-color: rgba(79,195,247,0.3); }

/* ─── ССЫЛКА НА ПРОФИЛЬ ──────────────────────────────────────────────────── */
#profile-link {
    position: fixed; top: 104px; right: 20px; z-index: 9999;
    background-color: var(--kim-bg); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; text-decoration: none; line-height: 1;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
#profile-link:hover { background-color: rgba(79,195,247,0.15); border-color: rgba(79,195,247,0.3); }

/* ─── ССЫЛКА НА ЛЕНДИНГ ──────────────────────────────────────────────────── */
#landing-link {
    position: fixed; top: 148px; right: 20px; z-index: 9999;
    background-color: var(--kim-bg); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; text-decoration: none; line-height: 1;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
#landing-link:hover { background-color: rgba(79,195,247,0.15); border-color: rgba(79,195,247,0.3); }

/* ═══════════════════════════════════════════════════════════
   AI-ЭЛЕМЕНТЫ — v8.1
   ═══════════════════════════════════════════════════════════ */

#cognee-ai-status {
    position: fixed; bottom: 24px; right: 24px;
    padding: 7px 16px;
    background: rgba(10, 16, 32, 0.88);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 20px;
    font-family: 'Courier New', monospace;
    font-size: 11px; font-weight: 600; color: #4FC3F7;
    letter-spacing: 0.04em; z-index: 10002;
    opacity: 0; transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none; white-space: nowrap;
    backdrop-filter: blur(8px);
}

#cognee-ai-status.visible { opacity: 1; transform: translateY(0); }

[data-theme="light"] #cognee-ai-status {
    background: rgba(245, 240, 232, 0.92);
    border-color: rgba(26, 122, 181, 0.3);
    color: #1a7ab5;
}

.cognee-ai-spinner {
    display: flex; gap: 5px;
    align-items: center; justify-content: center;
    padding: 10px 0 4px; opacity: 0.6;
}

.cognee-ai-spinner span {
    display: inline-block; width: 5px; height: 5px; border-radius: 50%;
    background: #4FC3F7;
    animation: cognee-dot-pulse 1.2s ease-in-out infinite;
}

.cognee-ai-spinner span:nth-child(2) { animation-delay: 0.2s; }
.cognee-ai-spinner span:nth-child(3) { animation-delay: 0.4s; }

@keyframes cognee-dot-pulse {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
    40%            { transform: scale(1.2); opacity: 1; }
}

[data-theme="light"] .cognee-ai-spinner span { background: #1a7ab5; }

.keyword-ai {
    background: rgba(79, 195, 247, 0.14);
    color: #7dd3f7;
    border-bottom: 1px solid rgba(79, 195, 247, 0.4);
    border-radius: 2px; padding: 0 2px;
    transition: background 0.2s ease;
}
.keyword-ai:hover { background: rgba(79, 195, 247, 0.25); }

[data-theme="light"] .keyword-ai {
    background: rgba(26, 122, 181, 0.1);
    color: #1a5f8b;
    border-bottom-color: rgba(26, 122, 181, 0.35);
}

/* ═══════════════════════════════════════════════════════════
   МОБИЛЬНАЯ АДАПТАЦИЯ — v9.0 (Блок 1, Задача 1.2)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {

    #kim-display {
        font-size: 11px; padding: 5px 9px; top: 8px; right: 8px;
        max-width: calc(100vw - 16px); white-space: nowrap;
        overflow: hidden; text-overflow: ellipsis;
    }

    #dash-link    { top: 46px;  right: 8px; width: 30px; height: 30px; font-size: 14px; }
    #profile-link { top: 82px;  right: 8px; width: 30px; height: 30px; font-size: 14px; }
    #landing-link { top: 118px; right: 8px; width: 30px; height: 30px; font-size: 14px; }

    #cognee-mode-switcher {
        flex-direction: row !important; flex-wrap: wrap !important; gap: 4px !important;
        bottom: 10px !important; left: 8px !important; right: 8px !important;
        justify-content: center !important;
    }
    #cognee-mode-switcher button { font-size: 10px !important; padding: 4px 10px !important; }

    .article { padding: 0 14px; margin: 32px auto; }
    body { padding-bottom: 80px; }

    #pause-trigger-btn {
        min-height: 44px; min-width: 200px;
        font-size: 14px; padding: 10px 24px;
    }

    #cognee-theme-toggle {
        top: 8px !important;
        right: calc(8px + 90px) !important;
        width: 30px !important; height: 30px !important;
        font-size: 14px !important;
    }

    #cognee-progress-bar { width: 4px !important; }
}

@media (max-width: 600px) {
    .reader-nav { padding: 0 12px !important; }
    .reader-nav-link { display: none !important; }
    .article-title { font-size: clamp(18px, 5vw, 28px) !important; }
    .meta-row { gap: 8px !important; }
    :root { --reader-max: 100% !important; }
}

/* ═══════════════════════════════════════════════════════════
   БЛОК 2 — v9.1
   Задача 2.1: "Объясни иначе"
   Задача 2.2: Адаптивный таймер
   Задача 2.3: AI-теги, баннер КИМ
   Задача 2.4: Умные закладки
   Задача 2.5: Хронорежим
   ═══════════════════════════════════════════════════════════ */

/* ─── Задача 2.1: Кнопка "Объясни иначе" ─────────────────────────────────── */

.explain-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 4px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    background: rgba(79, 195, 247, 0.07);
    color: #4FC3F7;
    border: 1px solid rgba(79, 195, 247, 0.22);
    border-radius: 20px;
    padding: 5px 14px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    animation: explain-btn-appear 0.4s ease both;
}

.explain-btn:hover:not(:disabled) {
    background: rgba(79, 195, 247, 0.16);
    border-color: rgba(79, 195, 247, 0.45);
    transform: translateY(-1px);
}

.explain-btn:active:not(:disabled) { transform: scale(0.96); }
.explain-btn:disabled { opacity: 0.45; cursor: not-allowed; }

@keyframes explain-btn-appear {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

[data-theme="light"] .explain-btn {
    background: rgba(26, 122, 181, 0.07); color: #1a7ab5;
    border-color: rgba(26, 122, 181, 0.22);
}
[data-theme="light"] .explain-btn:hover:not(:disabled) {
    background: rgba(26, 122, 181, 0.14); border-color: rgba(26, 122, 181, 0.45);
}

/* ─── Задача 2.1: Блок результата перефраза ──────────────────────────────── */

.explain-result {
    display: none;
    overflow: hidden;
    background: rgba(79, 195, 247, 0.04);
    border: 1px solid rgba(79, 195, 247, 0.14);
    border-left: 3px solid #4FC3F7;
    border-radius: 0 8px 8px 0;
    padding: 0;
    margin: 6px 0 12px;
}

.explain-result.visible {
    display: block;
    padding: 12px 16px;
    animation: explain-result-in 0.35s ease;
}

@keyframes explain-result-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.explain-result-label {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: #4FC3F7; margin-bottom: 8px; opacity: 0.8;
}

.explain-result-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 15px; line-height: 1.75; color: #c8d8e8;
}

.explain-close {
    display: block; margin-top: 10px;
    background: none; border: none; color: #4a6278;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px; letter-spacing: 0.04em;
    cursor: pointer; padding: 0;
    transition: color 0.2s ease; text-align: left;
}
.explain-close:hover { color: #7a9ab8; }

[data-theme="light"] .explain-result {
    background: rgba(26, 122, 181, 0.04);
    border-color: rgba(26, 122, 181, 0.14);
    border-left-color: #1a7ab5;
}
[data-theme="light"] .explain-result-label { color: #1a7ab5; }
[data-theme="light"] .explain-result-text  { color: #3a4f68; }
[data-theme="light"] .explain-close        { color: #7a96b0; }

/* ─── Задача 2.2: Таймер чтения ──────────────────────────────────────────── */

#read-time-left {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px;
    color: var(--muted, #5a7090);
    letter-spacing: 0.03em;
    transition: color 0.5s ease;
}
#read-time-left.mode-tired { color: #FFB74D; }
[data-theme="light"] #read-time-left { color: #7a9aaa; }

/* ─── Задача 2.3: Теги в каталоге ────────────────────────────────────────── */

.article-card-tags {
    display: flex; flex-wrap: wrap; gap: 5px;
    margin-top: 10px; align-items: center;
}

.article-card-tag {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 10px; font-weight: 600; letter-spacing: 0.05em;
    background: rgba(79, 195, 247, 0.07); color: #4a7090;
    border: 1px solid rgba(79, 195, 247, 0.15);
    border-radius: 4px; padding: 2px 7px;
    transition: background 0.15s, border-color 0.15s;
}
.article-card-tag:hover {
    background: rgba(79, 195, 247, 0.13); border-color: rgba(79, 195, 247, 0.3); color: #4FC3F7;
}

.article-card-kim {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 10px; font-weight: 700;
    background: rgba(124, 77, 255, 0.08); color: #9c7adb;
    border: 1px solid rgba(124, 77, 255, 0.2);
    border-radius: 4px; padding: 2px 7px; letter-spacing: 0.04em;
}

[data-theme="light"] .article-card-tag {
    background: rgba(26, 122, 181, 0.07); color: #3a6080;
    border-color: rgba(26, 122, 181, 0.18);
}

/* ─── Задача 2.3: Баннер рекомендуемого КИМ (reader.html) ──────────────────── */

#kim-recommend-banner {
    max-width: 720px; margin: 0 auto 24px; padding: 0 24px;
}

.kim-rec-inner {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    background: rgba(124, 77, 255, 0.07);
    border: 1px solid rgba(124, 77, 255, 0.2);
    border-left: 3px solid #7C4DFF;
    border-radius: 0 8px 8px 0;
    animation: rec-banner-in 0.4s ease;
}

@keyframes rec-banner-in {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

.kim-rec-icon { font-size: 18px; flex-shrink: 0; }
.kim-rec-text {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 12px; color: #b39ddb; letter-spacing: 0.03em; flex: 1; line-height: 1.5;
}
.kim-rec-close {
    background: none; border: none; color: #7a6098;
    font-size: 16px; cursor: pointer; padding: 2px 6px;
    border-radius: 4px; transition: color 0.15s, background 0.15s; flex-shrink: 0;
}
.kim-rec-close:hover { color: #b39ddb; background: rgba(124, 77, 255, 0.1); }

/* ─── Задача 2.3: Теги в reader.html ─────────────────────────────────────── */

.article-tags {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
}

.article-tag {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
    background: rgba(79, 195, 247, 0.08); color: #4a6888;
    border: 1px solid rgba(79, 195, 247, 0.18);
    border-radius: 5px; padding: 3px 9px; text-transform: lowercase;
}

/* ─── Задача 2.4: Кнопка закладки ────────────────────────────────────────── */

#cognee-bookmark-btn {
    position: fixed; top: 192px; right: 20px; z-index: 9999;
    background-color: var(--kim-bg, #0a1020);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; cursor: pointer; line-height: 1;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
#cognee-bookmark-btn:hover { transform: scale(1.08); }
#cognee-bookmark-btn.zone-focus  { border-color: rgba(79, 195, 247, 0.4);  color: #4FC3F7; }
#cognee-bookmark-btn.zone-normal { border-color: rgba(129, 199, 132, 0.4); color: #81C784; }
#cognee-bookmark-btn.zone-tired  { border-color: rgba(255, 183, 77, 0.4);  color: #FFB74D; }

/* Тост закладки */
#cognee-bookmark-toast {
    position: fixed; top: 192px; right: 66px; z-index: 10002;
    background: rgba(10, 16, 32, 0.92);
    border: 1px solid rgba(79, 195, 247, 0.25);
    border-radius: 8px; padding: 6px 12px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px; color: #4FC3F7; letter-spacing: 0.03em;
    white-space: nowrap; pointer-events: none;
    opacity: 0; transform: translateX(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
#cognee-bookmark-toast.visible { opacity: 1; transform: translateX(0); }

@media (max-width: 600px) {
    #cognee-bookmark-btn { top: 154px; right: 8px; width: 30px; height: 30px; font-size: 14px; }
    #cognee-bookmark-toast { display: none; }
}

/* ─── Задача 2.5: Хроно-уведомление ──────────────────────────────────────── */

#cognee-chrono-notice {
    position: fixed; bottom: 100px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 10003;
    background: rgba(10, 16, 30, 0.94);
    border: 1px solid rgba(79, 195, 247, 0.2);
    border-radius: 12px; padding: 14px 20px;
    max-width: 360px; width: calc(100% - 40px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    display: flex; align-items: flex-start; gap: 12px;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

#cognee-chrono-notice.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    animation: chrono-slide-up 0.4s ease;
}

@keyframes chrono-slide-up {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.chrono-icon { font-size: 22px; flex-shrink: 0; line-height: 1; margin-top: 1px; }
.chrono-body { flex: 1; min-width: 0; }

.chrono-title {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 12px; font-weight: 700; color: #a0b8d0;
    letter-spacing: 0.04em; margin-bottom: 4px;
}

.chrono-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 13px; color: #6a8099; line-height: 1.5;
}

.chrono-close {
    background: none; border: none; color: #4a6078;
    font-size: 16px; cursor: pointer; padding: 0 2px;
    flex-shrink: 0; transition: color 0.15s;
}
.chrono-close:hover { color: #8a9ab8; }

[data-theme="light"] #cognee-chrono-notice {
    background: rgba(245, 240, 232, 0.96);
    border-color: rgba(26, 122, 181, 0.2);
}
[data-theme="light"] .chrono-title { color: #3a5068; }
[data-theme="light"] .chrono-text  { color: #7a9aaa; }
