/*
Theme Name: Popcake News
Theme URI: https://popcake.news
Author: Popcake Media
Author URI: https://popcake.news
Description: Современная тема для Popcake News на базе Tailwind CSS, Google Fonts и Lucide Icons. Эстетика современной поп-культуры.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: popcake
Tags: news, magazine, modern, entertainment, custom-menu, custom-logo, post-formats, responsive-layout
*/

body {
    -webkit-font-smoothing: antialiased;
    background-color: #ffffff;
    color: #0f172a;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

::selection {
    background-color: #eae2f8;
    color: #1e293b;
}

/* Убираем скроллбар для горизонтальных списков (Reels / Shorts) */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Стилизация пагинации WordPress под общий дизайн */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #475569;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.pagination .page-numbers:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.pagination .page-numbers.current {
    background-color: #8564b5;
    color: #ffffff;
    border-color: #8564b5;
}

/* Стилизация контента статьи в single.php (Prose override) */
.entry-content p {
    margin-bottom: 1.625rem; /* ~26px - четкий, заметный отступ между абзацами для воздуха */
    line-height: 1.65; /* Комфортный межстрочный интервал для чтения экрана */
    font-size: 1.125rem; /* 18px */
    color: #334155;
}

.entry-content h2 {
    font-size: 1.875rem;
    font-weight: 800;
    margin-top: 3.25rem !important; /* ~52px (четкое завершение мысли и привязка к тексту снизу) */
    margin-bottom: 0.875rem !important; /* ~14px (прилипание к тексту) */
    color: #0f172a;
    scroll-margin-top: 6rem;
}

.entry-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.25rem !important; /* ~36px */
    margin-bottom: 0.75rem !important; /* ~12px */
    color: #0f172a;
    scroll-margin-top: 6rem;
}

.entry-content ul, .entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    font-size: 1.125rem;
    color: #334155;
}

.entry-content ul {
    list-style-type: disc;
}

.entry-content ol {
    list-style-type: decimal;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content li::marker {
    color: #8564b5;
    font-weight: bold;
}

.entry-content blockquote {
    position: relative;
    background-color: #f8fafc;
    border-left: 4px solid #8564b5;
    border-radius: 0 1rem 1rem 0;
    padding: 1.75rem 2rem;
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.7;
    color: #1e293b;
    margin: 2.5rem 0;
    box-shadow: 0 4px 20px -5px rgba(0,0,0,0.03);
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content img {
    border-radius: 12px;
    margin: 2.5rem 0;
    max-width: 100%;
    height: auto;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

.entry-content figure,
.entry-content .wp-caption,
.entry-content .wp-block-image {
    margin-top: 2.5rem !important;
    margin-bottom: 2.5rem !important; /* 40px до следующего абзаца */
    max-width: 100%;
}

.entry-content figure img,
.entry-content .wp-caption img,
.entry-content .wp-block-image img {
    margin: 0 !important;
    border-radius: 12px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    width: 100%;
}

.entry-content figcaption,
.entry-content .wp-caption-text,
.entry-content .wp-element-caption {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    margin-top: 0.875rem !important; /* 14px (от фото до подписи) */
    margin-bottom: 2.5rem !important; /* 40px (после подписи до следующего текста) */
    font-size: 0.8125rem !important; /* 13px */
    font-weight: 500 !important;
    color: #94a3b8 !important; /* text-slate-400 */
    font-style: normal !important;
    line-height: 1.5;
    text-align: left !important;
    padding: 0 0.25rem;
}


.entry-content a {
    color: #8564b5;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s;
}

.entry-content a:hover {
    color: #6d4b9c;
}

.entry-content table {
    width: 100%;
    margin: 2.5rem 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.entry-content th {
    background-color: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 800;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
}

.entry-content td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.entry-content tr:last-child td {
    border-bottom: none;
}

/* --- Оглавление (Table of Contents) --- */
.toc-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.toc-list a {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    padding-left: 0.75rem;
    border-left: 2px solid transparent;
    transition: all 0.2s;
    line-height: 1.4;
}

.toc-list a:hover {
    color: #0f172a;
    border-left-color: #cbd5e1;
}

.toc-list a.active {
    color: #8564b5;
    border-left-color: #8564b5;
    font-weight: 700;
}

.toc-list .toc-subitem {
    padding-left: 1.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* --- Кнопки шаринга (Иконки с анимацией бумажного хайлайта в стиле меню) --- */
.share-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    width: 2.75rem; /* 44px */
    height: 2.75rem; /* 44px */
    border-radius: 0.875rem; /* 14px */
    border: 1px solid #e2e8f0;
    background-color: #ffffff; /* Чистый белый фон для контраста без наведения */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    user-select: none;
    overflow: hidden; /* Чтобы анимация заливки не выходила за скругления */
    z-index: 1;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ЗАПРЕТ на прыжки и увеличение самой кнопки при hover */
.share-pill:hover {
    transform: none !important;
    border-color: transparent;
    box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.1);
}

/* Нейтральный, строгий тёмный слейт без наведения (чтобы не отвлекать от контента до наведения курсора) */
.share-pill.vk,
.share-pill.tg,
.share-pill.copy {
    color: #1e293b;
}

/* Размеры и поведение SVG для VK и Telegram (сплошная заливка) */
.share-pill.vk svg,
.share-pill.tg svg {
    width: 1.375rem !important; /* 22px для VK и Telegram */
    height: 1.375rem !important;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    fill: currentColor;
    transition: color 0.3s ease, fill 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* КРИТИЧНО: Размеры и поведение для иконки ссылки (строго линии без fill, иначе превращается в кляксу!) */
.share-pill.copy svg,
.share-pill.copy i {
    width: 1.125rem !important; /* 18px для иконки ссылки */
    height: 1.125rem !important;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    fill: none !important; /* Отключаем заливку внутренних отверстий цепи */
    stroke: currentColor !important;
    stroke-width: 2.25px !important;
    transition: color 0.3s ease, stroke 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- АНИМАЦИЯ ХАЙЛАЙТА В ДУХЕ МЕНЮ (Realistic Paper Highlighter) --- */
.share-pill::before {
    content: '';
    position: absolute;
    z-index: 1;
    left: -2px;
    right: -2px;
    top: -2px;
    bottom: -2px;
    border-radius: 0.75rem;
    transform: rotate(-2deg) skewX(-12deg);
    clip-path: inset(0 100% 0 0); /* Скрыт справа налево по умолчанию */
    transition: clip-path 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.share-pill:hover::before {
    clip-path: inset(0 0% 0 0); /* Плавный штрих-заливка при наведении */
}

/* Цвета хайлайта для каждой соцсети */
.share-pill.vk::before {
    background-color: #0077FF;
}

.share-pill.tg::before {
    background-color: #29A9EA;
}

.share-pill.copy::before {
    background-color: #8564b5;
}

/* Смена цвета и легкий поворот иконки при наведении на штрих */
.share-pill.vk:hover svg,
.share-pill.tg:hover svg {
    color: #ffffff !important;
    fill: #ffffff !important;
    transform: scale(1.1) rotate(-6deg);
}

.share-pill.copy:hover svg,
.share-pill.copy:hover i {
    color: #ffffff !important;
    stroke: #ffffff !important;
    fill: none !important;
    transform: scale(1.1) rotate(-6deg);
}

/* --- АКТИВНОЕ СОСТОЯНИЕ УСПЕШНОГО КОПИРОВАНИЯ (с анимацией галочки) --- */
.share-pill.copy.copied-active::before {
    clip-path: inset(0 0% 0 0) !important;
    background-color: #10b981 !important; /* Изумрудный цвет успеха */
}

.share-pill.copy.copied-active svg,
.share-pill.copy.copied-active i {
    color: #ffffff !important;
    stroke: #ffffff !important;
    fill: none !important;
    animation: popcakeCopyPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@keyframes popcakeCopyPop {
    0% { transform: scale(0.3) rotate(-25deg); opacity: 0; }
    60% { transform: scale(1.3) rotate(8deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* =========================================
   ЖИВОЙ БУМАЖНЫЙ ХАЙЛАЙТ (REALISTIC PAPER HIGHLIGHTER)
   ========================================= */

#main-nav .menu-item > a,
#main-nav div > a {
    position: relative;
    z-index: 1;
    transition: color 0.2s ease;
}

/* Базовая форма широкого маркера-штриха для всех пунктов меню */
#main-nav .menu-item > a::before,
#main-nav div > a::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: -10px;
    right: -10px;
    top: -4px;
    bottom: -4px;
    border-radius: 2px 10px 1px 12px; /* Четкие, почти острые края со скосом под широкий маркер */
    transform: rotate(-1.2deg) skewX(-14deg); /* Форма УЖЕ итоговая, не искажается при анимации */
    clip-path: inset(0 100% 0 0); /* Скрываем справа налево без деформации краев */
    transition: clip-path 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease;
}

/* Проявление штриха при наведении или активации (для любых пунктов) */
#main-nav .menu-item > a:hover::before,
#main-nav div > a:hover::before,
#main-nav .menu-item.current-menu-item > a::before,
#main-nav .menu-item.popcake-active-item > a::before,
#main-nav .menu-item.current-category-ancestor > a::before,
#main-nav div > a.popcake-active-item::before {
    clip-path: inset(0 0% 0 0);
}

/* =====================================================
   УМНЫЙ ПАСТЕЛЬНЫЙ МУЛЬТИКОЛОР (CURATED PASTEL PALETTE)
   (Классы .popcake-color-* генерируются динамически через wp_head из реестра 12 цветов)
   ===================================================== */

/* Дефолтный фоллбек (для пунктов без класса цвета) */
#main-nav .menu-item:not([class*="popcake-color-"]) > a::before,
#main-nav div > a:not([class*="popcake-color-"])::before {
    background-color: #eae2f8;
}
#main-nav .menu-item:not([class*="popcake-color-"]).current-menu-item > a::before,
#main-nav .menu-item:not([class*="popcake-color-"]).popcake-active-item > a::before,
#main-nav div > a:not([class*="popcake-color-"]).popcake-active-item::before {
    background-color: #dfcefa;
}
#main-nav .menu-item:not([class*="popcake-color-"]) > a:hover,
#main-nav .menu-item:not([class*="popcake-color-"]).current-menu-item > a,
#main-nav .menu-item:not([class*="popcake-color-"]).popcake-active-item > a,
#main-nav div > a:not([class*="popcake-color-"]):hover,
#main-nav div > a:not([class*="popcake-color-"]).popcake-active-item {
    color: #4c1d95 !important;
}

/* =========================================
   СТИЛИ ВИДЖЕТОВ И САЙДБАРА
   ========================================= */

.sidebar-widgets .widget,
.widget-area .widget {
    margin-bottom: 2rem;
    border-radius: 1.5rem;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 1.5rem;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.sidebar-widgets .widget:hover,
.widget-area .widget:hover {
    border-color: #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 0.9375rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0f172a;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 18px;
    background-color: #8564b5;
    border-radius: 4px;
}

/* Стилизация поиска (стандартный и блочный Gutenberg) */
.widget_search form,
.wp-block-search {
    display: flex;
    gap: 0.5rem;
    position: relative;
}

.widget_search input[type="search"],
.widget_search input[type="text"],
.wp-block-search__input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    font-size: 0.875rem;
    color: #0f172a;
    outline: none;
    transition: all 0.2s;
}

.widget_search input[type="search"]:focus,
.widget_search input[type="text"]:focus,
.wp-block-search__input:focus {
    border-color: #8564b5;
    box-shadow: 0 0 0 3px rgba(133, 100, 181, 0.1);
}

.widget_search input[type="submit"],
.widget_search button,
.wp-block-search__button {
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    background-color: #0f172a;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.widget_search input[type="submit"]:hover,
.widget_search button:hover,
.wp-block-search__button:hover {
    background-color: #8564b5;
}

/* Списки виджетов (Рубрики, Свежие записи, Архивы) */
.widget_categories ul,
.widget_archive ul,
.widget_recent_entries ul,
.widget_pages ul,
.widget_meta ul,
.wp-block-categories,
.wp-block-archives,
.wp-block-latest-posts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.widget_categories li,
.widget_archive li,
.widget_recent_entries li,
.widget_pages li,
.widget_meta li,
.wp-block-categories li,
.wp-block-archives li,
.wp-block-latest-posts li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.625rem;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}

.widget_categories li:last-child,
.widget_archive li:last-child,
.widget_recent_entries li:last-child,
.widget_pages li:last-child,
.widget_meta li:last-child,
.wp-block-categories li:last-child,
.wp-block-archives li:last-child,
.wp-block-latest-posts li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget_categories a,
.widget_archive a,
.widget_recent_entries a,
.widget_pages a,
.widget_meta a,
.wp-block-categories a,
.wp-block-archives a,
.wp-block-latest-posts a {
    color: #334155;
    transition: color 0.2s;
}

.widget_categories a:hover,
.widget_archive a:hover,
.widget_recent_entries a:hover,
.widget_pages a:hover,
.widget_meta a:hover,
.wp-block-categories a:hover,
.wp-block-archives a:hover,
.wp-block-latest-posts a:hover {
    color: #8564b5;
}

/* Счетчик количества записей в скобках у категорий и архивов */
.widget_categories li span,
.widget_archive li span {
    background-color: #d8c9f2;
    color: #1e293b;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

/* Облако тегов (Tag Cloud) */
.widget_tag_cloud .tagcloud,
.wp-block-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.widget_tag_cloud a,
.wp-block-tag-cloud a {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.75rem !important;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    text-decoration: none;
}

.widget_tag_cloud a:hover,
.wp-block-tag-cloud a:hover {
    background-color: #8564b5;
    border-color: #8564b5;
    color: #ffffff;
    transform: translateY(-1px);
}

/* =========================================
   СТИЛИ ФУТЕРА (из Popcake 2)
   ========================================= */

.footer-system::before { 
    content: ''; 
    position: absolute; 
    top: -20%; 
    left: 10%; 
    width: 700px; 
    height: 700px; 
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%); 
    filter: blur(80px); 
    z-index: 0; 
    animation: pulse 10s infinite alternate; 
    pointer-events: none;
}
@keyframes pulse { 0% { opacity: 0.8; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1.05); } }

/* Стили для ссылок внутри меню футера, сгенерированных WordPress */
.footer-tw-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.footer-tw-menu a {
    color: #E2E8F0;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    display: block;
}
.footer-tw-menu a:hover {
    color: #A78BFA;
    transform: translateX(6px);
}

/* =========================================
   ИНТЕГРАЦИЯ С WORDPRESS ADMIN BAR (WPADMINBAR)
   ========================================= */

/* Десктоп и планшеты от 783px (высота админ-бара 32px) */
@media screen and (min-width: 783px) {
    body.admin-bar #main-nav {
        top: 32px !important;
    }
    body.admin-bar aside .sticky.top-28 {
        top: calc(7rem + 32px) !important;
    }
    body.admin-bar #mobile-menu {
        top: 32px !important;
    }
}

/* Мобильные устройства до 782px (высота админ-бара 46px) */
@media screen and (max-width: 782px) {
    body.admin-bar #main-nav {
        top: 46px !important;
    }
    body.admin-bar aside .sticky.top-28 {
        top: calc(7rem + 46px) !important;
    }
    body.admin-bar #mobile-menu {
        top: 46px !important;
    }
}

/* --- Интерактивные реакции (Telegram Style) --- */
.reaction-pill {
    position: relative;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-width: 76px;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media screen and (min-width: 640px) {
    .reaction-pill {
        min-width: 84px;
    }
}

/* Плавное появление/исчезновение цифры при 0 <-> 1 (Apple / Telegram Style) */
.reaction-pill__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 55px;
    opacity: 1;
    margin-left: 0.5rem;
    transform: translateX(0) scale(1);
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease-in-out,
                margin-left 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media screen and (min-width: 640px) {
    .reaction-pill__count:not(.count-hidden) {
        margin-left: 0.625rem;
    }
}

.reaction-pill__count.count-hidden {
    max-width: 0 !important;
    opacity: 0 !important;
    margin-left: 0 !important;
    transform: translateX(-14px) scale(0.4) !important;
    pointer-events: none;
}


.reaction-pill.active {
    background-color: rgba(133, 100, 181, 0.12) !important;
    border-color: #8564b5 !important;
    color: #8564b5 !important;
    box-shadow: 0 4px 12px -2px rgba(133, 100, 181, 0.2);
}

.reaction-pill.active .reaction-pill__count {
    color: #8564b5 !important;
}

/* Эффект пружинного отскока (Pop) при клике */
@keyframes telegramReactionPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.35) rotate(-6deg); }
    50% { transform: scale(0.85) rotate(4deg); }
    75% { transform: scale(1.1) rotate(-2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.reaction-pop-active .reaction-pill__emoji {
    animation: telegramReactionPop 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Эффект всплывающих и разлетающихся микро-частиц в нескольких траекториях (Telegram Style) */
@keyframes reactionParticleBurst {
    0% {
        transform: translate(-50%, -50%) scale(0.3) rotate(0deg);
        opacity: 1;
    }
    65% {
        opacity: 0.9;
    }
    100% {
        transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, -65px))) scale(var(--ts, 1.3)) rotate(var(--tr, 0deg));
        opacity: 0;
    }
}

.reaction-particle {
    position: absolute;
    pointer-events: none;
    z-index: 20;
    font-size: 1.15rem;
    opacity: 0;
    animation: reactionParticleBurst 1.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Исправление обрезки правого края и дробной ширины в iframe комментариев ВКонтакте */
#vk_comments {
    width: 100%;
    overflow-x: hidden;
}

#vk_comments iframe {
    width: 100% !important;
    max-width: 100% !important;
}

/* =========================================
   TELEGRAM SPOILER EFFECT (Футер)
   ========================================= */
.tg-spoiler-text {
    color: transparent !important; /* Ультимативно скрываем текст от Tailwind */
    background-color: rgba(148, 163, 184, 0.1); /* Лёгкая подложка 0.1 */
    /* Изолированные, редкие частицы цвета текста (#94A3B8), увеличенный масштаб */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.25' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.58 0 0 0 0 0.64 0 0 0 0 0.72 0 0 0 20 -12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.8'/%3E%3C/svg%3E");
    background-size: 60px 60px; 
    border-radius: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    /* Ультра-замедленная анимация шума (в 2 раза медленнее) */
    animation: tg-noise 1.8s steps(1) infinite;
    padding: 0 2px;
}

/* 10 кадров случайного смещения для эффекта хаоса */
@keyframes tg-noise {
    0%, 100% { background-position: 0px 0px; }
    10% { background-position: -15px -20px; }
    20% { background-position: 25px 10px; }
    30% { background-position: -10px 35px; }
    40% { background-position: 20px -15px; }
    50% { background-position: -30px 25px; }
    60% { background-position: 15px 40px; }
    70% { background-position: -20px -30px; }
    80% { background-position: 35px 15px; }
    90% { background-position: -15px 30px; }
}

.tg-spoiler-text.is-revealed {
    color: #94A3B8 !important;
    background-color: transparent;
    background-image: none;
    animation: none;
    user-select: text;
    -webkit-user-select: text;
    padding: 0;
}
