/* ===================================================================
   СОДЕРЖАНИЕ:
   1.  Основная сетка и карточки постов
   2.  Фильтры, поиск и сортировка
   3.  Скелетная загрузка (Skeleton) и анимации появления
   4.  Стили для отдельной страницы поста (Single Post)
       4.1. Контейнер контента и типографика
       4.2. Статистика, лайки и кнопки "Поделиться"
       4.3. Блок "Содержание" (ToC)
       4.4. Блоки "Похожие записи"
       4.5. Bento-блок (Призыв к действию)
   5.  Интерфейсные модули и виджеты
       5.1. Всплывающее уведомление (Flyout)
       5.2. Пагинация
       5.3. Прогресс-бар прокрутки страницы
       5.4. Кнопка "Наверх" с прогрессом
       5.5. Кнопка восстановления позиции прокрутки
       5.6. Тост-уведомления (Toast)
       5.7. Модальное окно
       5.8. Режим фокусировки (Focus Mode)
   6.  Специальные режимы и эффекты
       6.1. Новогодний режим (Снежинки)
       6.2. Защита от копирования
   7.  Вспомогательные классы и общие элементы
   8.  Ключевые кадры анимаций (@keyframes)
   9.  Общие адаптивные стили (Media Queries)
=================================================================== */

/* ===================================================================
   1. ОСНОВНАЯ СЕТКА И КАРТОЧКИ ПОСТОВ
=================================================================== */

.page-blog-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
    width: 100%;
    margin: 0 auto;
    position: relative;
    min-height: 600px; /* Для предотвращения скачка высоты при загрузке */
    transition: height 0.3s ease;
}

.page-blog-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.page-blog-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 25px;
}

.page-blog-meta-top {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-weight: 600;
}

.page-blog-title {
    margin: 0 0 15px;
    font-size: 1.4em;
    line-height: 1.3;
    font-weight: 700;
}

.page-blog-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog-title a:hover {
    color: #ffd450;
}

.page-blog-excerpt {
    color: #555;
    line-height: 1.6;
    font-size: 0.95em;
    margin-bottom: 20px;
}

/* Статистика в карточке */
.page-stats {
    display: flex;
    gap: 15px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.page-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 5px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    font-size: 0.9em;
    font-weight: 500;
}

.page-stat .icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.page-stat--views {
    color: #666;
}

.page-stat--views .icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%236b7280"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>');
}

/* Лайки в карточке */
.page-blog-item .page-stat--likes {
    cursor: pointer;
}

.page-blog-item .page-stat--likes:hover {
    background: #fffdf5;
    border-color: #ffd450;
}

.page-blog-item .page-stat--likes .icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%236b7280"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
}

.page-blog-item .page-stat--likes.liked {
    border-color: #ffd450;
    color: #d4a017;
    background: #fffdf5;
}

.page-blog-item .page-stat--likes.liked .icon {
    animation: heartBeat 0.6s ease;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffd450"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
}

/* ===================================================================
   2. ФИЛЬТРЫ, ПОИСК И СОРТИРОВКА
=================================================================== */

.pbp-wrapper {
    margin-bottom: 30px;
    position: relative;
}

.pbp-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    align-items: center;
    width: 100%;
}

.pbp-search-wrapper {
    position: relative;
    display: flex;
    flex-grow: 1;
    align-items: center;
}

.pbp-search-field {
    flex-grow: 1;
    width: 100%;
    padding: 10px 35px 10px 15px;
    border: 2px solid #eee;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fff;
    color: #333;
    outline: none;
    height: 42px;
    box-sizing: border-box;
}

#pbp-search-clear-btn {
    position: absolute;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    background: #e0e0e0;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, background 0.2s;
    z-index: 5;
}

#pbp-search-clear-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

#pbp-search-clear-btn:hover {
    background: #999;
}

.pbp-sort-select {
    width: auto;
    min-width: 140px;
    padding: 0 30px 0 15px;
    border: 2px solid #eee;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    outline: none;
    height: 42px;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffd450%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    transition: all 0.3s ease;
}

.pbp-search-field:focus,
.pbp-sort-select:focus,
.pbp-search-field:hover,
.pbp-sort-select:hover {
    border-color: #ffd450;
}

#pbp-loader {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffd450;
    color: #333;
    font-weight: 500;
    padding: 5px 15px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    z-index: 10;
}

.page-blog-not-found {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.2em;
}

.pbp-skeleton {
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0 25%, #f5f5f5 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: pbpShimmer 1.5s infinite linear;
    border-radius: 5px;
    display: block;
    width: 100%;
    opacity: 1 !important;
}

.page-blog-item.skeleton {
    display: flex;
    flex-direction: column;
    pointer-events: none;
    user-select: none;
    border-color: #eee !important;
    box-shadow: none !important;
    background: #fff !important;
    transform: none !important;
    position: relative;
    z-index: 1;
    min-height: 400px;
    height: 100%;
    box-sizing: border-box;
}

.page-blog-item.skeleton .page-blog-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-blog-item.skeleton .sk-date {
    height: 12px;
    width: 30%;
    margin-bottom: 15px;
}

.page-blog-item.skeleton .sk-title {
    height: 24px;
    width: 90%;
    margin-bottom: 10px;
}

.page-blog-item.skeleton .sk-title-2 {
    height: 24px;
    width: 60%;
    margin-bottom: 20px;
}

.page-blog-item.skeleton .sk-text {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
}

.page-blog-item.skeleton .sk-text-last {
    height: 14px;
    width: 80%;
    margin-bottom: 20px;
}

.page-blog-item.skeleton .sk-footer {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #f9f9f9;
}

.page-blog-item.skeleton .sk-stat {
    height: 30px;
    width: 60px;
    border-radius: 5px;
}

.pbp-fade-in {
    animation: pbpFadeIn 0.4s ease-out forwards;
}

#pbp-content-wrapper {
    max-width: 840px;
    margin: 40px auto;
    background: #fff;
    padding: 40px 50px;
    border-radius: 5px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

#pbp-content-wrapper p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 24px;
    color: #000;
}

#pbp-content-wrapper blockquote {
    font-family: Georgia, serif;
    font-size: 1.2em;
    font-style: italic;
    color: #333;
    padding: 20px 30px;
    margin: 40px 0;
    border-left: none;
    position: relative;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

#pbp-content-wrapper blockquote::before {
    content: "“";
    font-family: Arial, sans-serif;
    font-size: 80px;
    color: #ffd450;
    position: absolute;
    top: -40px;
    left: 10px;
    opacity: 0.5;
}

#pbp-content-wrapper blockquote::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: #ffd450;
    margin-top: 20px;
}

.page-blog-single-stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    margin: 40px 0;
    padding: 20px 0 0 0;
    border-top: 1px solid #f0f0f0;
    color: #999;
    font-size: 14px;
    background: transparent;
}

.page-blog-single-stats .page-stat {
    background: transparent;
    border: none;
    padding: 0;
    font-weight: 500;
    color: #999;
}

.page-blog-single-stats .page-stat--likes {
    padding: 6px 12px !important;
    border-radius: 5px;
    color: #999 !important;
    border: 1px solid #eee;
    font-weight: 700 !important;
    position: relative;
    overflow: visible;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.page-blog-single-stats .page-stat--likes:hover {
    background: #fffdf5;
    border-color: #ffd450;
    color: #ffd450 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 212, 80, 0.25);
}

.page-blog-single-stats .page-stat--likes .icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999999"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
    opacity: 1;
}

.page-blog-single-stats .page-stat--likes:hover .icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffd450"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
}

.page-blog-single-stats .page-stat--likes.liked {
    background: #ffd450;
    color: #fff !important;
    border-color: #ffd450;
}

.page-blog-single-stats .page-stat--likes.liked .icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
}

.page-stat--likes.pbp-anim-pulse .icon,
.page-stat--likes.pbp-anim-pulse {
    animation: heartBeat 0.4s ease-in-out;
}

.page-stat--likes.pbp-anim-boom::before,
.page-stat--likes.pbp-anim-boom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.page-stat--likes.pbp-anim-boom::before {
    background: transparent;
    animation: pbp-boom-1 0.6s ease-out forwards;
    box-shadow: -15px -15px 0 #ffd450, -25px -5px 0 #ffca28, -15px 15px 0 #ffb300, 0px -25px 0 #ffe082;
}

.page-stat--likes.pbp-anim-boom::after {
    background: transparent;
    animation: pbp-boom-2 0.6s ease-out forwards;
    box-shadow: 15px -15px 0 #ffd450, 25px -5px 0 #ffca28, 15px 15px 0 #ffb300, 0px 25px 0 #ffe082;
}

.pbp-share-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.pbp-share-btn {
    padding: 8px 16px;
    border-radius: 5px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s;
}

.pbp-share-btn:hover {
    transform: translateY(-2px);
}

.pbp-share-btn.tg {
    background: #24A1DE;
}

.pbp-share-btn.vk {
    background: #0077FF;
}

.pbp-toc {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-left: 4px solid #ffd450;
    padding: 20px;
    margin: 30px 0;
    max-width: 450px;
}

.pbp-toc-header {
    font-weight: 700;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.pbp-toc-list {
    margin-top: 15px !important;
    display: none;
}

.pbp-toc-list a {
    text-decoration: none;
    color: #333;
    border-bottom: 1px dashed #ccc;
}

.pbp-toc-list a:hover {
    color: #d4a017;
    border-color: #d4a017;
}

.pbp-toc-sub {
    margin-left: 15px;
    font-size: 0.95em;
}

.pbp-inline-related {
    background: #0d121d;
    border-radius: 5px;
    padding: 20px;
    margin: 30px 0;
}

.pbp-ir-label {
    color: #a5a5a5;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.pbp-ir-link {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.pbp-ir-link:hover {
    color: #ffd450;
}

.pbp-related-section {
    max-width: 680px;
    margin: 60px auto 40px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.pbp-related-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
    margin-bottom: 20px;
    white-space: nowrap;
}

.pbp-related-title::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, #ffd450, transparent);
}

.pbp-related-list {
    display: grid;
    gap: 12px;
}

.pbp-rel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pbp-rel-row:hover {
    border-color: #ffd450;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 212, 80, 0.25);
    z-index: 2;
    padding-left: 25px;
}

.pbp-rel-row::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 6px;
    height: 6px;
    background: #ffd450;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.pbp-rel-row:hover::before {
    transform: translateY(-50%) scale(1);
}

.pbp-rel-heading {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.2s;
}

.pbp-rel-row:hover .pbp-rel-heading {
    color: #000;
}

.pbp-rel-meta {
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 5px;
    margin-left: 10px;
    flex-shrink: 0;
}

.pbp-bento-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin: 50px 0 40px !important;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.pbp-bento-content {
    background: #f7f7f7 !important;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    padding: 30px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.pbp-bento-title {
    font-size: 22px !important;
    line-height: 1.3 !important;
    font-weight: 800 !important;
    color: #111 !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
}

.pbp-bento-desc {
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #555 !important;
    margin: 0 !important;
}

.pbp-bento-action {
    background: #ffd450 !important;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(255, 212, 80, 0.25);
    transition: transform 0.3s ease;
}

.pbp-bento-action:hover {
    transform: translateY(-3px);
}

.pbp-bento-action::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    pointer-events: none;
}

.pbp-bento-action a,
.pbp-bento-action button,
.pbp-bento-action input[type="submit"],
.pbp-bento-action .scf-button {
    background: #000000 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    text-transform: none !important;
    padding: 16px 32px !important;
    border-radius: 5px !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    white-space: nowrap;
    display: inline-block !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    position: relative;
    z-index: 2;
    line-height: 1.2 !important;
}

.pbp-bento-action a:hover,
.pbp-bento-action button:hover {
    background: #333333 !important;
    transform: scale(1.05);
    color: #fff !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2) !important;
}

.pbp-flyout {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 300px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 20px 20px 25px 20px;
    border-left: 5px solid #ffd450;
    display: none;
    overflow: hidden;
}

.pbp-flyout-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 700;
}

.pbp-flyout-link {
    font-weight: 600;
    text-decoration: none;
    color: #333;
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.pbp-flyout-link:hover {
    color: #d4a017;
}

.pbp-flyout-meta {
    font-size: 11px;
    color: #888;
}

#pbp-flyout-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    color: #ccc;
    cursor: pointer;
}

.pbp-flyout-timer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #f0f0f0;
}

#pbp-flyout-timer-bar {
    height: 100%;
    background: #ffd450;
    width: 100%;
    display: block;
}

.page-blog-pagination {
    margin-top: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.page-blog-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    background: #fff;
    border: 2px solid #eee;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-blog-pagination a.page-numbers:hover,
.page-blog-pagination .current {
    background: #ffd450;
    border-color: #ffd450;
    color: #333;
}

#pbp-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 99999;
    pointer-events: none;
}

#pbp-progress-bar {
    height: 100%;
    background: #ffd450;
    width: 0%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: width 0.1s ease-out;
}

.pbp-to-top {
    position: fixed;
    bottom: 30px;
    right: 25px;
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 9900;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
}

.pbp-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pbp-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 212, 80, 0.4);
}

.pbp-to-top .dashicons {
    font-size: 20px;
    color: #333;
    z-index: 2;
    line-height: 44px;
    width: 44px;
    text-align: center;
}

.pbp-progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.pbp-progress-ring__circle {
    transition: stroke-dashoffset 0.1s linear;
    stroke-linecap: round;
}

body.flyout-active .pbp-to-top {
    bottom: 210px;
}

#pbp-restore-scroll {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
}

#pbp-restore-scroll.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

#pbp-restore-scroll:hover {
    background: #ffd450;
    color: #000;
    box-shadow: 0 8px 25px rgba(255, 212, 80, 0.4);
}

.pbp-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: all 0.5s ease;
}

.pbp-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.pbp-toast .dashicons {
    color: #ffd450;
    font-size: 20px;
}

.pbp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.pbp-modal-box {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    max-width: 450px;
    width: 90%;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: pbpSlideDown 0.4s ease;
}

.pbp-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    border: none;
    background: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.pbp-modal-title {
    margin-top: 0;
    font-size: 22px;
    color: #333;
}

.pbp-modal-card {
    background: #f9fafb;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    text-align: left;
}

.pbp-card-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    line-height: 1.3;
}

.pbp-card-title a {
    text-decoration: none;
    color: #000;
}

.pbp-card-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.pbp-btn-primary {
    display: inline-block;
    background: #ffd450;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.2s;
}

.pbp-btn-primary:hover {
    background: #ffd350a9;
    color: #fff;
}

#pbp-focus-toggle {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: 1px solid #ddd;
    color: #999;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 5px;
    transition: all 0.2s;
    z-index: 1001;
}

#pbp-focus-toggle:hover {
    color: #333;
    border-color: #999;
}

body.pbp-focus-active {
    overflow: hidden;
}

.pbp-focus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 99998;
    display: none;
}

.pbp-focus-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    overflow-y: auto;
    padding: 40px 20px;
    display: none;
    text-align: center;
}

.pbp-focus-content {
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    text-align: left;
    font-size: 18px;
    line-height: 1.8;
    color: #222;
}

.pbp-focus-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #eee;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.pbp-focus-close:hover {
    background: #ddd;
}

.pbp-snowflake {
    position: fixed;
    top: -20px;
    z-index: 999999;
    color: #a0c4ff;
    user-select: none;
    pointer-events: none;
    animation: pbp-fall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

body.pbp-xmas-mode .pbp-badge-new {
    background: #d63638 !important;
    color: #fff !important;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(214, 54, 56, 0.4);
}

.pbp-no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.pbp-copy-alert {
    position: fixed;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.pbp-badge-new {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #ffd450;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="black"><path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"/></svg>') no-repeat center / contain;
    mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="black"><path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"/></svg>') no-repeat center / contain;
    vertical-align: middle;
    margin-right: 4px;
    margin-bottom: 2px;
}

.pbp-badge-new.text-mode {
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes pbpShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pbpFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pbp-fall {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(110vh) rotate(360deg); }
}

@keyframes pbpSlideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pbp-boom-1 {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; box-shadow: -30px -30px 0 transparent, -40px -10px 0 transparent, -30px 30px 0 transparent, 0px -40px 0 transparent; }
}

@keyframes pbp-boom-2 {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; box-shadow: 30px -30px 0 transparent, 40px -10px 0 transparent, 30px 30px 0 transparent, 0px 40px 0 transparent; }
}

@keyframes pbp-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .page-blog-container {
        grid-template-columns: 1fr !important;
        padding: 0;
        gap: 20px;
    }
    .page-blog-item.skeleton {
        min-height: 350px;
    }

    .pbp-filters {
        flex-wrap: nowrap;
    }
    .pbp-search-field {
        min-width: 0;
    }

    .pbp-related-grid.page-blog-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px !important;
    }
    .pbp-related-grid .page-blog-item {
        min-width: 260px;
        scroll-snap-align: start;
        margin-bottom: 0;
    }

    .pbp-flyout {
        right: 15px;
        left: 15px;
        width: auto;
        bottom: 15px !important;
        border-left: none;
        border-top: 4px solid #ffd450;
    }
    
    .pbp-to-top {
        right: 15px;
        bottom: 20px;
        width: 40px;
        height: 40px;
    }
    .pbp-to-top .dashicons {
        line-height: 40px;
        font-size: 18px;
    }
    .pbp-progress-ring {
        width: 40px;
        height: 40px;
    }
    .pbp-progress-ring__circle {
        cx: 20; cy: 20; r: 18;
    }
    body.flyout-active .pbp-to-top {
        opacity: 0 !important;
        pointer-events: none;
        transform: translateY(50px);
    }
    
    #pbp-restore-scroll {
        bottom: 80px;
        padding: 8px 16px;
        font-size: 13px;
        width: auto;
        white-space: nowrap;
        background: rgba(30, 30, 30, 0.95);
        backdrop-filter: blur(5px);
    }
    
    #pbp-content-wrapper {
        padding: 20px;
        margin: 20px auto;
        box-shadow: none;
        border: 1px solid #eee;
    }

    .pbp-bento-wrapper {
        grid-template-columns: 1fr !important;
        gap: 15px;
        margin: 30px 0 !important;
    }
    .pbp-bento-content {
        padding: 25px !important;
    }
    .pbp-bento-title {
        font-size: 20px !important;
    }
    .pbp-bento-action {
        padding: 30px 20px !important;
        min-height: 100px;
    }
    .pbp-bento-action a,
    .pbp-bento-action button {
        width: 100%;
        text-align: center;
        padding: 18px 20px !important;
    }
}

@media (max-width: 600px) {
    .pbp-related-section {
        margin: 40px 10px;
        max-width: 100%;
        box-shadow: none;
    }
    .pbp-related-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .pbp-rel-row {
        padding: 12px 15px;
    }
    .pbp-rel-row:hover {
        padding-left: 15px;
        transform: none;
    }
    .pbp-rel-row::before {
        display: none;
    }
    .pbp-rel-heading {
        white-space: normal;
        font-size: 14px;
        line-height: 1.3;
    }
}