body.lenta-body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--theme-text, #e2e8f0);
    background: var(--theme-bg-0, #030508);
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
}

body.lenta-body .scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 120% 90% at 50% -15%, rgba(99, 102, 241, 0.35), transparent 55%),
        radial-gradient(ellipse 70% 50% at 110% 30%, rgba(139, 92, 246, 0.18), transparent 50%),
        radial-gradient(ellipse 55% 45% at -5% 90%, rgba(34, 211, 238, 0.1), transparent 50%),
        linear-gradient(168deg, var(--theme-bg-0, #030508) 0%, var(--theme-bg-1, #050816) 42%, var(--theme-bg-2, #0a0f1e) 100%);
}

body.lenta-body .gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(76px);
    opacity: 0.48;
    mix-blend-mode: screen;
    animation: lenta-blob-float 22s ease-in-out infinite;
}

body.lenta-body .gradient-blob.g1 {
    width: min(58vw, 440px);
    height: min(58vw, 440px);
    background: linear-gradient(140deg, #6366f1, #8b5cf6);
    top: -14%;
    left: -12%;
}

body.lenta-body .gradient-blob.g2 {
    width: min(50vw, 400px);
    height: min(50vw, 400px);
    background: linear-gradient(140deg, #2563eb, #06b6d4);
    bottom: -18%;
    right: -12%;
    animation-delay: -8s;
    animation-duration: 27s;
}

body.lenta-body .gradient-blob.g3 {
    width: min(42vw, 340px);
    height: min(42vw, 340px);
    background: linear-gradient(140deg, #a78bfa, #f472b6);
    top: 38%;
    left: 32%;
    opacity: 0.3;
    animation-delay: -13s;
    animation-duration: 18s;
}

body.lenta-body .noise {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes lenta-blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(3%, 5%) scale(1.05); }
    66% { transform: translate(-4%, -3%) scale(0.96); }
}

.lenta-page {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 56px);
}

.lenta-page .wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.lenta-page .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.lenta-page .top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lenta-pager {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.75);
}

.lenta-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    color: #f8fafc;
    text-decoration: none;
    background: rgba(51, 65, 85, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.22);
    transition: background 0.15s ease, border-color 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
}

.lenta-pager-btn svg {
    width: 20px;
    height: 20px;
}

.lenta-pager-btn:hover:not(.is-disabled) {
    background: rgba(99, 102, 241, 0.35);
    border-color: rgba(129, 140, 248, 0.45);
}

.lenta-pager-btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

.lenta-pager-status {
    min-width: 4.5em;
    padding: 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.lenta-page .top-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.lenta-page .title {
    font-size: 26px;
    font-weight: 800;
    color: #f8fafc;
    margin: 0;
    letter-spacing: -0.03em;
}

.lenta-page .count {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}

.lenta-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.75);
}

.lenta-view-btn {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    background: transparent;
    transition: background 0.15s ease, color 0.15s ease;
}

.lenta-view-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.lenta-view-btn.is-active {
    color: #f8fafc;
    background: rgba(99, 102, 241, 0.35);
}

.lenta-page .lenta-load-bar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.32);
    background: rgba(15, 23, 42, 0.9);
}

.lenta-page .lenta-load-spinner {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.28);
    border-top-color: #818cf8;
    animation: lenta-load-spin 0.75s linear infinite;
}

@keyframes lenta-load-spin {
    to {
        transform: rotate(360deg);
    }
}

.lenta-page .lenta-load-text {
    font-size: 14px;
    font-weight: 700;
    color: #c7d2fe;
}

html.lenta-paging-pending .lenta-page .lenta-load-bar,
.lenta-page:not(.is-list-ready) .lenta-load-bar {
    display: flex;
}

html.lenta-paging-pending .lenta-page .list,
.lenta-page:not(.is-list-ready) .list {
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.lenta-page .list-panel {
    position: relative;
}

.lenta-page.is-list-ready .list .item {
    animation: lenta-item-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--theme-i, 0) * 22ms);
}

@keyframes lenta-item-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lenta-page .list {
    display: grid;
    gap: 16px;
    min-width: 0;
    transition: opacity 0.2s ease;
}

.lenta-page .list--grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    align-items: start;
}

.lenta-page .list--list {
    grid-template-columns: 1fr;
    gap: 12px;
}

.lenta-page .item {
    min-width: 0;
    max-width: 100%;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 4px 16px rgba(2, 6, 23, 0.22);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lenta-page .list--grid > .item {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: auto;
}

.lenta-page .item:hover,
.lenta-page .item:focus-within {
    border-color: rgba(129, 140, 248, 0.45);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.35);
}

.lenta-page .item-link {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.lenta-page .list--grid .item-link {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    overflow: visible;
}

.lenta-page .list--list .item-link {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    align-items: center;
    gap: 14px 16px;
}

.lenta-page .preview-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
}

.lenta-page .preview {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    border: none;
    background: rgba(30, 41, 59, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}

.lenta-page .list--list .preview {
    aspect-ratio: auto;
    height: 112px;
}

.lenta-page .preview img,
.lenta-page .preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lenta-page .preview .lenta-preview-img,
.lenta-page .preview .lenta-preview-video {
    opacity: 1;
    transition: opacity 0.22s ease;
}

.lenta-page .preview .lenta-preview-img:not([src]),
.lenta-page .preview .lenta-preview-video:not([src]) {
    opacity: 0;
}

.lenta-page .preview.theme-media-loading::before {
    z-index: 2;
    pointer-events: none;
}

.lenta-page .preview.is-sensitive img,
.lenta-page .preview.is-sensitive video {
    filter: blur(6px) saturate(0.8);
    transform: none;
    max-width: 100%;
}

.lenta-page .preview-open-hint {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.55);
    color: #f8fafc;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.lenta-page .preview-open-hint svg {
    width: 32px;
    height: 32px;
}

.lenta-page .item-link:hover .preview-open-hint,
.lenta-page .item-link:focus-visible .preview-open-hint {
    opacity: 1;
}

.lenta-page .preview-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 8px;
    pointer-events: none;
    z-index: 2;
}

.lenta-page .preview-badges {
    display: inline-flex;
    gap: 6px;
}

.lenta-page .preview-badge {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.2px;
}

.lenta-page .preview-badge.ai {
    background: rgba(99, 102, 241, 0.85);
    border: 1px solid rgba(165, 180, 252, 0.5);
}

.lenta-page .preview-badge.adult {
    background: rgba(239, 68, 68, 0.85);
    border: 1px solid rgba(252, 165, 165, 0.5);
}

.lenta-page .preview-audio {
    color: #a5b4fc;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lenta-page .preview-audio svg {
    width: 22px;
    height: 22px;
}

.lenta-page .item-body {
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    min-height: min-content;
    overflow: visible;
}

.lenta-page .list--grid .item-body {
    flex: 0 0 auto;
    min-height: 0;
    gap: 6px;
}

.lenta-page .list--grid .item-link {
    gap: 8px;
    padding: 12px;
    padding-bottom: 14px;
}

.lenta-page .item-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    min-width: 0;
}

.lenta-page .item-head .type-badge {
    flex-shrink: 0;
}

.lenta-page .item-head .author-row {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
}

.lenta-page .list--list .item-head {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

.lenta-page .list--list .item-head-top {
    display: inline-flex;
    width: auto;
    flex: 0 1 auto;
}

.lenta-page .list--list .item-head .author-row {
    min-height: 0;
    flex: 0 1 auto;
}

.lenta-page .item-head-top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.lenta-page .list--grid .item-head {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
}

.lenta-page .list--grid .item-head-top .item-date {
    flex: 1;
    min-width: 0;
    font-size: 11px;
}

.lenta-page .list--grid .item-head-top .type-badge {
    padding: 3px 7px;
    font-size: 10px;
}

.lenta-page .list--grid .item-head .author-row {
    min-height: 22px;
    width: 100%;
}

.lenta-page .list--grid .name {
    font-size: 13px;
}

.lenta-page .list--grid .stat {
    padding: 4px 8px;
    font-size: 11px;
}

.lenta-page .list--grid .item-link-action {
    display: none;
}

.lenta-page .type-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 9px;
    border-radius: 8px;
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.22);
    border: 1px solid rgba(129, 140, 248, 0.35);
}

.lenta-page .type-badge--image {
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.14);
    border-color: rgba(34, 211, 238, 0.35);
}

.lenta-page .type-badge--video {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(96, 165, 250, 0.38);
}

.lenta-page .type-badge--audio {
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.16);
    border-color: rgba(192, 132, 252, 0.38);
}

.lenta-page .item-date {
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lenta-page .name {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.35;
    color: #f1f5f9;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lenta-page .item-foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.lenta-page .list--grid .item-foot {
    margin-top: 0;
    flex-shrink: 0;
}

.lenta-page .list--grid .stats {
    flex-shrink: 0;
}

.lenta-page .stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.lenta-page .stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #e2e8f0;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.22);
}

.lenta-page .stat svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: #a5b4fc;
}

.lenta-page .stat--likes svg {
    color: #f472b6;
}

.lenta-page .stat--likes {
    background: rgba(244, 114, 182, 0.1);
    border-color: rgba(244, 114, 182, 0.28);
}

.lenta-page .stat-value {
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.lenta-page .author-row {
    min-height: 24px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.lenta-page .author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.lenta-page .author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(99, 102, 241, 0.28);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lenta-page .author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lenta-page .author-name {
    font-size: 12px;
    color: #c7d2fe;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lenta-page .item-link-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    flex: 0 0 auto;
    margin-top: auto;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    color: #f8fafc;
    background: #6366f1;
    border: 1px solid rgba(129, 140, 248, 0.45);
    box-sizing: border-box;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.lenta-page .item-link:hover .item-link-action,
.lenta-page .item-link:focus-visible .item-link-action {
    background: #4f46e5;
}

.lenta-page .item-link-action-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.lenta-page .list--list .item-link-action {
    width: auto;
    margin-top: 0;
    align-self: center;
    justify-self: end;
}

.lenta-page .list--list .item-body {
    flex: 1 1 auto;
}

.lenta-page .list--list .item-foot {
    margin-top: 0;
}


.lenta-page .preview,
.lenta-page .item .preview {
    border-image: none;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .lenta-page .top-actions {
        width: 100%;
        justify-content: space-between;
    }

    .lenta-page .list--grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .lenta-page .list--list .item-link {
        grid-template-columns: 120px minmax(0, 1fr) auto;
        gap: 12px;
    }

    .lenta-page .list--list .preview {
        height: 96px;
    }

    .lenta-page .list--list .item-link-action {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (hover: none), (pointer: coarse) {
    .lenta-page .preview-open-hint {
        opacity: 0.88;
    }
}
