/* static/css/modals.css - Стили модальных окон */

/* ===================================================
   МОДАЛЬНЫЕ ОКНА - БАЗОВЫЕ СТИЛИ
   =================================================== */

.modal-overlay-js {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overscroll-behavior: contain;
}

.modal-overlay-js.active {
    opacity: 1;
    visibility: visible;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* ===================================================
   GLASS-ЭФФЕКТ
   =================================================== */

.glass-modal {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-overlay-js.active .glass-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.glass-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0C0C0E;
    z-index: 0;
    opacity: 1;
    pointer-events: none;
}

@keyframes glassModalBeforeFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.glass-modal.blur-ready::before,
#searchHistoryBox.blur-ready::before {
    animation: glassModalBeforeFadeOut 0.35s ease forwards;
}

.glass-modal {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

.glass-modal > * {
    position: relative;
    z-index: 1;
}

/* ===================================================
   ПОИСК - ОКНО 1: ИСТОРИЯ
   =================================================== */

.search-modal-overlay {
    align-items: flex-start;
    padding-top: 73px;
    padding-bottom: 20px;
    background: rgba(0, 0, 0, 0.25);
}

.search-modal-overlay.results-mode {
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 20px;
}

.search-modal-overlay.results-mode.stick-bottom {
    align-items: flex-end;
    padding-top: 0;
}

.search-windows-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.window-history {
    width: 363px;
    min-height: 447px;
    padding: 7px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.tabs-container {
    width: 347px;
    height: 33px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    padding: 3px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.tab-item {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tab-item:hover { color: rgba(255, 255, 255, 0.7); }
.tab-item.active { color: #fff; background: transparent; }

.search-all-type-filters {
    width: 347px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: -6px 0 10px;
}

.window-history.all-tab-mode .search-all-type-filters {
    display: flex;
}

.search-all-type-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-all-type-btn img {
    width: 18px;
    height: 18px;
    display: block;
    opacity: 0.58;
    filter: brightness(0) saturate(100%) invert(100%);
    transition: opacity 0.16s ease, filter 0.16s ease, transform 0.16s ease;
}

.search-all-type-btn:hover img,
.search-all-type-btn.active img {
    opacity: 1;
    transform: scale(1.03);
}

.search-all-type-btn:focus-visible {
    outline: none;
}

#historyResults {
    width: 347px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 380px;
    scrollbar-gutter: stable;
}

.history-total-count {
    width: 347px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    text-align: left;
}

.history-row {
    width: 347px;
    height: 50px;
    display: flex;
    align-items: center;
    margin-bottom: 13px;
    padding: 0 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    box-sizing: border-box;
}

.history-row:hover { background: rgba(255, 255, 255, 0.06); }

.hist-mini-cover {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

.hist-text-block { flex: 1; min-width: 0; }

.hist-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hist-sub {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.hist-lightning {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hist-lightning img {
    width: 14px;
    height: 14px;
    display: block;
    opacity: 0.6;
}

/* Стили для результатов поиска юзеров */
.user-row {
    width: 347px;
    height: 50px;
    display: flex;
    align-items: center;
    margin-bottom: 0;
    padding: 0 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    box-sizing: border-box;
}

.user-row:hover { background: rgba(255, 255, 255, 0.06); }

.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

/* ===================================================
   ПОИСК - ОКНО 2: РЕЗУЛЬТАТЫ
   =================================================== */

.window-results {
    width: 667px;
    display: block;
    margin-top: 0;
    padding-bottom: 0;
}

.results-content {
    border-radius: 18px;
    overflow: hidden;
    overflow-y: auto;
    margin-top: 0;
    max-height: calc(100vh - 30px);
    transition: none;
}

.search-results-top-block {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 12, 14, 0);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-block-initial.search-block-results.search-results-shell {
    width: 447px;
    max-width: calc(100% - 20px);
    height: 34px;
    border-radius: 999px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 6px;
    box-sizing: border-box;
}

.search-results-side-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-results-side-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.search-results-side-btn .header-side-icon-mask {
    background-color: rgba(255, 255, 255, 0.6);
}

.search-results-input {
    flex: 1;
    min-width: 0;
    height: 32px;
    border-radius: 999px;
    border: none;
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    padding: 0 10px;
    box-sizing: border-box;
}

.search-results-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.universe-header {
    width: 100%;
    height: 75px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.universe-header.active { display: flex; }

.universe-filters {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 12px 12px;
}

.results-content.has-results .universe-filters {
    display: flex;
}

.filter-chip {
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.3);
}

.filter-chip.filter-chip-icon-only {
    width: 30px;
    min-width: 30px;
    padding: 0;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-chip.filter-chip-icon-only:hover,
.filter-chip.filter-chip-icon-only.active {
    background: transparent;
    border-color: transparent;
}

.filter-chip-icon {
    width: 16px;
    height: 16px;
    display: block;
    opacity: 0.6;
    filter: brightness(0) saturate(100%) invert(100%);
    transition: opacity 0.2s ease;
}

.filter-chip.filter-chip-icon-only:hover .filter-chip-icon,
.filter-chip.filter-chip-icon-only.active .filter-chip-icon {
    opacity: 0.85;
}

.search-filters-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 12px 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.22s ease, padding 0.22s ease;
}

.search-filters-panel.open {
    max-height: 240px;
    opacity: 1;
    transform: translateY(0);
    padding: 0 12px 14px;
    pointer-events: auto;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.filter-title {
    width: 100%;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
}

.filter-option {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-option.active {
    color: #000;
    background: #F72D4B;
    border-color: transparent;
    outline: none;
}

.filter-option.active:hover {
    background: #F72D4B;
}

.filter-option:hover {
    background: rgba(255, 255, 255, 0.3);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 187px);
    gap: 20px;
    justify-content: center;
    padding-bottom: 10px;
}

.results-grid .library-anime-card {
    width: 187px;
    height: 393px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15px;
    position: relative;
    z-index: 0;
    transition: transform 0.35s ease;
    --meta-highlight-top: calc(266px + 15px);
}

.res-cover {
    width: 187px;
    height: 266px;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.2s ease;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
}

.results-grid .library-anime-card:hover .res-cover { transform: scale(1.03); }

.results-grid .library-anime-card.in-library::before {
    content: '';
    position: absolute;
    top: var(--meta-highlight-top);
    right: -6px;
    bottom: -6px;
    left: -6px;
    margin-top: 10px;
    border: 1px solid transparent;
    border-radius: 16px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)) padding-box,
        linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%) border-box;
    z-index: -1;
    pointer-events: none;
}

.res-title {
    width: min(187px, 100%);
    padding: 0 2px;
    box-sizing: border-box;
    font-weight: 900;
    font-size: 15px;
    color: #fff;
    margin-top: 18px;
    line-height: 1.25;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.res-info {
    width: 187px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
    text-align: center;
    line-height: 1.2;
}

.res-buttons-block {
    width: 187px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.15s ease;
    background: transparent;
}

.icon-btn:hover { transform: scale(1.15); color: #F72D4B; }

/* ===================================================
   МОДАЛКА АККАУНТА (805x927)
   =================================================== */

.account-modal-overlay {
    align-items: center;
    justify-content: center;
    padding-top: 0;
}

.account-window {
    width: 805px;
    height: 927px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    background: transparent;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-overlay-js.active .account-window {
    opacity: 1;
    transform: scale(1);
}

/* Библиотека: 805x859 */
.library-block {
    width: 805px;
    height: 859px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(12, 12, 14, 1);
    transition: background-color 0.3s ease 0.15s;
}

.library-block::before {
    content: none;
}

.library-block.blur-ready { background: rgb(12 12 14 / 0%); }

/* Блюр для library-block применяется сразу */
.library-block {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

.library-block > * { position: relative; z-index: 1; }

/* Якорь скролла - ВВЕРХ */
.scroll-anchor {
    position: sticky;
    bottom: 12px;
    margin-left: auto;
    margin-right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    font-size: 16px;
}

.scroll-anchor:hover { background: rgba(255, 255, 255, 0.2); }

/* Панель аккаунта: 805x57 */
.account-panel {
    width: 805px;
    height: 57px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    box-sizing: border-box;
}

.account-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0C0C0E;
    z-index: -1;
    opacity: 1;
    transition: opacity 0.3s ease 0.15s;
    border-radius: 18px;
}

.account-panel.blur-ready::before { opacity: 0.3; }

.account-panel {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

.account-panel > * { position: relative; z-index: 1; }

.panel-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.panel-avatar-wrapper {
    position: relative;
    cursor: pointer;
}

.panel-avatar {
    width: 37px;
    height: 37px;
    border-radius: 50%;
    object-fit: cover;
    background: #333;
}

.panel-avatar-fallback {
    inset: 0;
    width: 37px;
    height: 37px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.panel-username-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.panel-username {
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    width: 150px;
}

.panel-username:focus {
    border-bottom: 1px solid #F72D4B;
}

.panel-handle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.avatar-history-modal-overlay {
    align-items: center;
    padding-top: 0;
}

.avatar-history-window {
    width: 520px;
    max-width: calc(100vw - 24px);
    max-height: min(86vh, 780px);
    border-radius: 18px;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.avatar-history-title {
    text-align: center;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
}

.avatar-history-meta {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
}

.avatar-history-actions {
    display: flex;
    justify-content: center;
}

.avatar-history-upload-btn {
    width: 137px;
    height: 33px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.avatar-history-upload-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.avatar-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 10px;
    overflow-y: auto;
    min-height: 100px;
}

.avatar-history-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.avatar-history-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-history-item.current {
    border-color: rgba(89, 255, 95, 0.8);
}

.avatar-history-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.user-badges-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    margin-right: 0;
    vertical-align: middle;
}

.user-badge-tip,
.glass-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-badge-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.ellipsis-tip {
    position: relative;
}

.ellipsis-tip::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translateX(-50%) translateY(6px);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid rgba(12, 12, 14, 0.88);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 12010;
}

.ellipsis-tip::after {
    content: attr(data-ellipsis-label);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(6px);
    background: rgba(12, 12, 14, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
    padding: 8px 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 12011;
}

.ellipsis-tip:hover::before,
.ellipsis-tip:hover::after,
.ellipsis-tip:focus-visible::before,
.ellipsis-tip:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.user-badge-tip::before,
.glass-tooltip::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translateX(-50%) translateY(6px);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid rgba(12, 12, 14, 0.88);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 35;
}

.user-badge-tip::after,
.glass-tooltip::after {
    content: attr(data-badge-label);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(6px);
    background: rgba(12, 12, 14, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
    padding: 8px 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 36;
}

.user-badge-tip:hover::before,
.user-badge-tip:hover::after,
.user-badge-tip:focus-within::before,
.user-badge-tip:focus-within::after,
.glass-tooltip:hover::before,
.glass-tooltip:hover::after,
.glass-tooltip:focus-within::before,
.glass-tooltip:focus-within::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.panel-icons {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.panel-icon {
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.panel-icon:hover { transform: scale(1.15); }

.panel-logout {
    font-size: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.panel-logout:hover { transform: scale(1.15); color: #F72D4B; }

/* ===================================================
   БИБЛИОТЕКА - ОБЪЕДИНЁННЫЙ СКРОЛЛ
   =================================================== */

.lists-section {
    width: 100%;
    padding: 15px 0 20px 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: visible;
}

/* Маска для скрытия за 805px */
.library-block {
    clip-path: inset(0 0 0 0);
}

/* Объединённый контейнер для списков и плейлистов */
.combined-lists-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 27px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    padding-left: 82px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
    /* Убираем горизонтальную прокрутку */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.combined-lists-container::-webkit-scrollbar { 
    display: none;
}

/* Запрет перетаскивания изображений */
.combined-lists-container img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.lists-block,
.playlists-block {
    flex-shrink: 0;
}

.section-title {
    font-weight: 900;
    font-size: 18px;
    color: #fff;
    margin-bottom: 15px;
}

.lists-grid {
    display: grid;
    grid-template-columns: repeat(3, 114px);
    grid-template-rows: repeat(2, auto);
    gap: 12px 12px;
    flex-shrink: 0;
}

.list-card {
    width: 114px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease;
    position: relative;
}


.list-card.active::before {
    content: '';
    position: absolute;
    width: 126px;
    height: 126px;
    top: 57px;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    border: 1px solid transparent;
    z-index: -1;
}

.list-covers {
    width: 114px;
    height: 114px;
    display: grid;
    grid-template-columns: 57px 57px;
    grid-template-rows: 57px 57px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.list-covers img,
.list-covers .cover-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder {
    background: rgba(255, 255, 255, 0.05);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-info {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-height: 2.6em; /* 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 114px;
    word-break: break-word;
}

.list-info .count { color: rgba(255, 255, 255, 0.6); }

/* Плейлисты - grid с заполнением по колонкам */
.playlists-grid {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: 114px;
    gap: 12px 12px;
    flex-shrink: 0;
}

.playlist-card {
    width: 114px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.35s ease;
    position: relative;
}


.playlist-card.active::before {
    content: '';
    position: absolute;
    width: 126px;
    height: 126px;
    top: 57px;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    border: 1px solid transparent;
    z-index: -1;
}

.playlist-image-container {
    position: relative;
    width: 114px;
    height: 114px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.playlist-image-container .playlist-cover {
    display: block;
    width: 114px;
    height: 114px;
    border-radius: 0; /* Container handles radius */
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.playlist-cover-default {
    filter: grayscale(100%);
    opacity: 0.6;
}

/* Lock icon — centered on image */
.playlist-lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

/* Three dots button — bottom-right on image */
.playlist-actions-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 6;
    cursor: pointer;
    line-height: 1;
}
.playlist-card:hover .playlist-actions-btn {
    opacity: 1;
}
.playlist-actions-btn:hover {
    background: #F72D4B;
}

.add-playlist-btn {
    width: 114px;
    height: 114px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.add-playlist-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.add-playlist-btn:hover { background: rgba(0, 0, 0, 0.3); }

.add-playlist-btn span {
    width: 12px;
    height: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    line-height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Содержимое списка */
.list-content-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 20px 0;
}

.list-content-title-wrap {
    width: 630px;
    max-width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
}

.list-content-title {
    width: 100%;
    font-weight: 900;
    font-size: 24px;
    color: #fff;
    margin: 20px 0 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: center;
}

.list-content-title.title-animate {
    animation: none;
}

@keyframes listTitlePop {
    0% { transform: scale(0.905); }
    55% { transform: scale(1.105); }
    100% { transform: scale(1); }
}

.list-content-title .count {
    color: rgba(255, 255, 255, 0.6);
}

.list-title-name {
    font-weight: 900;
    font-size: 24px;
    color: #fff;
    margin-bottom: 5px;
}

.list-content-search-toggle {
    position: absolute;
    right: 0;
    top: 20px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease;
    opacity: 0.6;
}

.list-content-search-toggle:hover {
    opacity: 1;
}

.list-content-search-toggle.hidden {
    display: none;
}

.list-content-search {
    width: 630px;
    max-width: 100%;
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 0;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    overflow: hidden;
    pointer-events: none;
    background: transparent;
    padding: 0;
    box-sizing: border-box;
    transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease, margin-bottom 0.3s ease;
}

.list-content-search.open {
    max-height: 56px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    margin-bottom: 16px;
}

.list-search-input {
    width: 100%;
    height: 36px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    padding: 0 56px 0 14px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.list-search-input::-webkit-search-cancel-button,
.list-search-input::-webkit-search-decoration,
.list-search-input::-webkit-search-results-button,
.list-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.list-search-input::-ms-clear,
.list-search-input::-ms-reveal {
    display: none;
    width: 0;
    height: 0;
}

.list-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.list-search-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.list-search-clear {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.list-search-clear-icon {
    width: 12px;
    height: 12px;
    display: block;
    opacity: 0.65;
    transform: rotate(45deg);
}

.list-search-clear.visible {
    opacity: 1;
    pointer-events: auto;
}

.list-search-clear:hover .list-search-clear-icon {
    opacity: 0.9;
}

/* Подзаголовок с количеством аниме и вселенных - кнопки переключения */
.list-content-subtitle {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.list-content-subtitle .stat {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.15s ease;
}

.list-content-subtitle .stat:hover {
    color: rgba(255, 255, 255, 0.7);
}

.list-content-subtitle .stat.active {
    color: #fff;
}

.playlist-universe-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
    width: 630px;
}

.playlist-universe-link {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.playlist-universe-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

.playlist-universe-link.active {
    background: rgba(255, 255, 255, 0.3);
}

.playlist-universe-meta {
    opacity: 0.6;
}

/* Вид по вселенным */
.universes-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 0 85px;
    box-sizing: border-box;
}

/* Черно-белый эффект для не добавленных аниме */
.universes-container .universe-anime-card.not-in-list .res-cover {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.universes-container .universe-anime-card.not-in-list:hover .res-cover {
    filter: grayscale(50%);
    opacity: 0.8;
}

.universes-container .library-anime-card.not-in-list .res-cover {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.universes-container .library-anime-card.not-in-list:hover .res-cover {
    filter: grayscale(50%);
    opacity: 0.8;
    transform: scale(1.03);
}

.universe-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.universe-group:last-child {
    margin-bottom: 0;
}

.universe-name {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 18px;
    color: #fff;
    margin-bottom: 20px;
    margin-left: 10px;
}

.universe-animes {
    display: grid;
    grid-template-columns: repeat(3, 227px);
    column-gap: 0;
    row-gap: 36px;
}

.universe-anime-card {
    width: 187px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 25px;
    box-sizing: content-box;
    cursor: pointer;
    transition: transform 0.35s ease;
    position: relative;
    z-index: 0;
    --meta-highlight-top: 286px;
}

@keyframes universeCardPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.1); }
}

.universe-anime-card,
.library-anime-card,
.list-card,
.playlist-card,
.mv-moment-card-wrap,
.likes-moment-card {
    transition: transform 0.35s ease, filter 0.35s ease;
    will-change: transform, filter;
    filter: brightness(1);
}

.universe-anime-card:hover,
.library-anime-card:hover,
.list-card:hover,
.playlist-card:hover,
.mv-moment-card-wrap:hover,
.likes-moment-card:hover {
    transform: scale(1.03);
    animation: universeCardPulse 1s ease-in-out infinite;
}

.universe-anime-card .res-cover {
    width: 187px;
    height: 266px;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}


.universe-anime-card .res-title {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 15px;
    color: #fff;
    margin-top: 12px;
    line-height: 1.2;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.universe-anime-card .res-info {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
    text-align: center;
    line-height: 1.2;
}

.universe-anime-card .res-buttons-block {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 8px;
}


.list-content-grid {
    display: grid;
    grid-template-columns: repeat(3, 187px);
    gap: 36px;
    justify-content: start;
}

.lazy-card-hidden {
    display: none !important;
}

.list-content-grid::-webkit-scrollbar {
    height: 3px;
}

.list-search-cloud {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: none;
    background: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.list-search-cloud:hover {
    opacity: 1;
}

.list-search-cloud-icon {
    width: 16px;
    height: 16px;
    display: block;
    filter: brightness(0) saturate(100%) invert(100%);
    opacity: 0.6;
    transition: filter 0.15s ease, opacity 0.15s ease;
}

.list-search-cloud.active .list-search-cloud-icon {
    filter: brightness(0) saturate(100%) invert(77%) sepia(75%) saturate(587%) hue-rotate(54deg) brightness(101%) contrast(105%);
    opacity: 1;
}

.list-cloud-results {
    width: 630px;
    max-width: 100%;
    max-height: 240px;
    overflow-y: auto;
    border-radius: 14px;
    background: rgba(12, 12, 14, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 12px;
}

.list-cloud-row {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.list-cloud-row:last-child {
    border-bottom: none;
}

.list-cloud-cover {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.list-cloud-name {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-cloud-add {
    border: none;
    border-radius: 8px;
    height: 26px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.list-cloud-add:disabled {
    opacity: 0.5;
    cursor: default;
}

.list-content-grid::-webkit-scrollbar-track {
    background: transparent;
}

.list-content-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.list-content-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.list-content-grid.universes-view {
    width: 100%;
    display: block;
}

.library-anime-card {
    width: 187px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.35s ease;
    position: relative;
    z-index: 0;
    --meta-highlight-top: 266px;
}

.library-anime-card .res-cover {
    width: 187px;
    height: 266px;
}

.library-anime-card.not-in-list .res-cover {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.library-anime-card.not-in-list:hover .res-cover {
    filter: grayscale(50%);
    opacity: 0.8;
    transform: scale(1.03);
}

.library-anime-card .res-buttons-block {
    width: 187px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 8px;
}

.universe-anime-card.in-library::before,
.library-anime-card.in-library::before {
    content: '';
    position: absolute;
    top: calc(var(--meta-highlight-top) + 8px);
    right: -3px;
    bottom: -3px;
    left: -3px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    z-index: -1;
    pointer-events: none;
    -webkit-mask: none;
    mask: none;
}

.universe-anime-card.in-library::after,
.library-anime-card.in-library::after {
    content: '';
    position: absolute;
    top: calc(var(--meta-highlight-top) + 8px);
    right: -3px;
    bottom: -3px;
    left: -3px;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
    pointer-events: none;
}

.card-library-label {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 1);
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.library-anime-card.in-library:hover {
    animation: none;
}

/* ===================================================
   МОДАЛКА СОЗДАНИЯ ПЛЕЙЛИСТА
   =================================================== */

.create-playlist-modal {
    align-items: center;
    padding-top: 0;
}

.create-playlist-window {
    width: 275px;
    padding: 7px;
    box-sizing: border-box;
    border-radius: 19px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.create-playlist-window::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0C0C0E;
    z-index: -1;
    opacity: 1;
    transition: opacity 0.3s ease 0.15s;
    border-radius: 19px;
}

.create-playlist-window.blur-ready::before { opacity: 0.3; }

.create-playlist-window {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

.create-playlist-window > * { position: relative; z-index: 1; }

.create-playlist-top {
    display: flex;
    gap: 10px;
}

.playlist-cover-upload {
    width: 101px;
    height: 101px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
}

.playlist-cover-upload::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.playlist-cover-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-cover-upload .upload-icon {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.4);
}

.playlist-name-input {
    flex: 1;
    height: 101px;
    background: transparent;
    border: none;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    outline: none;
    resize: none;
    padding: 10px;
    box-sizing: border-box;
}

.playlist-name-input::placeholder { color: rgba(255, 255, 255, 0.3); }

.create-playlist-buttons {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 7px;
}

.create-playlist-buttons-row {
    display: flex;
    gap: 7px;
}

.playlist-btn-secondary {
    flex: 1;
    height: 33px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
    border: none;
    transition: all 0.15s ease;
}

.playlist-btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.playlist-btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }

.playlist-btn-primary {
    width: 100%;
    height: 33px;
    border-radius: 8px;
    background: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #000;
    border: none;
    transition: all 0.15s ease;
}

.playlist-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.playlist-btn-primary:hover { 
    background: rgba(255, 255, 255, 0.9);
}

/* ===================================================
   МОДАЛКА АНИМЕ
   =================================================== */

.anime-detail-modal {
    align-items: center;
    padding-top: 0;
    background: rgba(0, 0, 0, 0.2);
}

.anime-detail-window {
    width: 555px;
    height: 785px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.anime-detail-content {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.anime-detail-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.anime-detail-cover {
    width: 200px;
    height: 284px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.anime-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.anime-detail-title {
    font-weight: 900;
    font-size: 22px;
    color: #fff;
    margin-bottom: 10px;
}

.anime-detail-meta {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
}

.views-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
}

.ep-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.ep-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.ep-btn.movie-btn {
    width: 200px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.ep-btn:hover { background: rgba(255, 255, 255, 0.2); }

.ep-btn.active {
    background: #F72D4B;
    border-color: #F72D4B;
}

.info-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-right: -50px;
}

/* ===================================================
   МОДАЛКА ДОБАВЛЕНИЯ В СПИСОК/ПЛЕЙЛИСТ
   =================================================== */

.add-to-modal {
    align-items: center;
    padding-top: 0;
}

.add-to-window {
    width: 350px;
    padding: 25px;
    box-sizing: border-box;
    border-radius: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.add-to-title {
    font-weight: 900;
    font-size: 18px;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
}

.add-to-section-title {
    font-weight: 700;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.add-to-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.add-to-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.add-to-item:hover { background: rgba(255, 255, 255, 0.1); }
.add-to-item.active { background: rgba(247, 45, 75, 0.2); border-color: #F72D4B; }

.add-to-item-icon {
    width: 24px;
    margin-right: 12px;
    font-size: 16px;
}

.add-to-item-name {
    flex: 1;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.add-to-item-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
}

.add-to-item.active .add-to-item-check {
    border-color: #F72D4B;
    background: #F72D4B;
    color: #fff;
}

/* ===================================================
   МОДАЛКА АВТОРИЗАЦИИ
   =================================================== */

.auth-modal-overlay {
    align-items: center;
    padding-top: 0;
}

.auth-glass-window {
    width: 400px;
    border-radius: 24px;
    padding: 40px;
    box-sizing: border-box;
}

.auth-tabs {
    display: flex;
    width: 100%;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.auth-tab:hover { color: rgba(255, 255, 255, 0.7); }
.auth-tab.active { color: #F72D4B; border-bottom-color: #F72D4B; }

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-avatar-upload {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
}

.auth-avatar-upload:hover { border-color: #F72D4B; }

.auth-avatar-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-avatar-upload .upload-icon {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.3);
}

.auth-input {
    width: 100%;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 15px;
    color: white;
    padding: 0 20px;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
}

.auth-input:focus { border-color: #F72D4B; }

.auth-password-wrap {
    width: 100%;
    position: relative;
    margin-bottom: 15px;
}

.auth-password-wrap .auth-input {
    margin-bottom: 0;
    padding-right: 48px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-password-toggle svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.6);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.15s ease;
}

.auth-password-toggle:hover svg,
.auth-password-toggle.revealed svg {
    stroke: rgba(255, 255, 255, 0.95);
}

.auth-btn {
    width: 100%;
    height: 50px;
    background: #F72D4B;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 10px;
}

.auth-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(247, 45, 75, 0.35);
}

.auth-social-divider {
    margin-top: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-social-divider::before,
.auth-social-divider::after {
    content: '';
    height: 1px;
    flex: 1;
    background: rgba(255, 255, 255, 0.14);
}

.auth-social-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.auth-social-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.auth-social-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
}

.auth-social-mark {
    min-width: 28px;
    min-height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.95);
    background: rgba(0, 0, 0, 0.2);
}

.auth-social-vk .auth-social-mark {
    border-color: rgba(76, 141, 255, 0.65);
    background: rgba(76, 141, 255, 0.2);
}

.auth-social-yandex .auth-social-mark {
    border-color: rgba(255, 47, 0, 0.7);
    background: rgba(255, 47, 0, 0.2);
}

.auth-social-mailru .auth-social-mark {
    border-color: rgba(33, 123, 255, 0.68);
    background: rgba(33, 123, 255, 0.2);
}

.auth-error {
    color: #F72D4B;
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    min-height: 20px;
}

/* ===================================================
   МОДАЛКА НАСТРОЕК
   =================================================== */

.settings-modal-overlay {
    align-items: center;
    padding-top: 0;
}

.settings-window {
    width: 400px;
    border-radius: 24px;
    padding: 30px;
    box-sizing: border-box;
}

.settings-title {
    font-weight: 900;
    font-size: 20px;
    color: #fff;
    text-align: center;
    margin-bottom: 25px;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-label {
    font-weight: 700;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.settings-input {
    width: 100%;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    padding: 0 15px;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
}

.settings-input:focus { border-color: #F72D4B; }

.settings-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 40px;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.6) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.6) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 13px) calc(50% - 3px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.settings-select option {
    background: #0C0C0E;
    color: #fff;
}

.settings-input.error { border-color: #F72D4B; }

.settings-error {
    color: #F72D4B;
    font-size: 11px;
    margin-top: 5px;
}

.settings-btn {
    width: 100%;
    height: 45px;
    background: #F72D4B;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 20px;
}

.settings-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(247, 45, 75, 0.3);
}

.settings-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===================================================
   МОДАЛКА ДРУЗЕЙ (дизайн как у поиска пользователей)
   =================================================== */

.friends-modal-overlay {
    align-items: center;
    padding-top: 0;
}

.friends-window {
    width: 363px;
    min-height: 447px;
    max-height: 80vh;
    border-radius: 18px;
    padding: 7px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.friends-tabs {
    width: 347px;
    height: 33px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    padding: 3px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.friends-tab {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.friends-tab:hover { color: rgba(255, 255, 255, 0.7); }
.friends-tab.active { color: #fff; background: transparent; }

.friends-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    width: 347px;
}

/* Используем такой же стиль как user-row */
.friend-row {
    width: 347px;
    height: 50px;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    box-sizing: border-box;
}

.friend-row:hover { background: rgba(255, 255, 255, 0.06); }

.friend-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-status {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.friend-action {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: #fff;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.friend-action:hover { background: #F72D4B; }
.friend-action.remove:hover { background: #ff4444; }

/* ===================================================
   МОДАЛКА ПОИСКА ПО ЖАНРАМ
   =================================================== */

.genre-search-modal-overlay {
    align-items: center;
    padding-top: 0;
}

.genre-search-window {
    width: min(716px, calc(100vw - 24px));
    max-width: 716px;
    height: min(543px, calc(100vh - 24px));
    max-height: 543px;
    min-height: 360px;
    border-radius: 18px;
    padding: clamp(14px, 2vw, 24px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.genre-search-title {
    display: none;
}

.genres-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 1fr);
    grid-template-rows: repeat(14, minmax(0, auto));
    column-gap: 14px;
    row-gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 0;
    flex: 1 1 auto;
    align-content: start;
    padding: 0 2px 2px 0;
}

.genres-grid .empty-state {
    grid-row: 1 / span 14;
    grid-column: 1;
}

.genre-tag {
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
    border-radius: 12px;
    background: transparent;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    user-select: none;
    position: relative;
}

.genre-tag:hover {
    color: rgba(255, 255, 255, 0.8);
}

.genre-tag.selected {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: transparent;
}

.genre-tag.selected::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 100%;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.genre-search-btn {
    width: 100%;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 0;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.genre-search-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.genre-search-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.genre-search-btn:disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

/* ===================================================
   УТИЛИТЫ
   =================================================== */

.hidden { display: none !important; }

.empty-state {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    padding: 40px 20px;
    text-align: center;
    width: 100%;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 3px; }

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(12, 12, 14, 0.95);
    backdrop-filter: blur(20px);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9999999;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.15s ease;
    z-index: 10;
}

.modal-close-btn:hover { background: #F72D4B; }

/* ===================================================
   МОДАЛКА ДЕЙСТВИЙ С ПЛЕЙЛИСТОМ
   =================================================== */

.playlist-actions-modal-overlay {
    align-items: center;
    padding-top: 0;
}

.playlist-actions-window {
    width: 300px;
    border-radius: 18px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.playlist-actions-window::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0C0C0E;
    z-index: -1;
    opacity: 1;
    transition: opacity 0.3s ease 0.15s;
    border-radius: 18px;
}

.playlist-actions-window.blur-ready::before { opacity: 0.3; }

.playlist-actions-window {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

.playlist-actions-window > * { position: relative; z-index: 1; }

.pa-header {
    display: flex;
    gap: 14px;
    align-items: center;
}

.pa-cover {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.pa-info {
    flex: 1;
    min-width: 0;
}

.pa-title {
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pa-count {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.pa-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pa-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    transition: background 0.15s ease;
}

.pa-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.pa-action-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.pa-action-delete {
    color: #F72D4B;
}

/* Секция редактирования */
.pa-edit-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.pa-edit-row {
    display: flex;
    gap: 10px;
}

.pa-edit-cover-wrap {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.pa-edit-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pa-edit-cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.pa-edit-cover-wrap:hover .pa-edit-cover-overlay {
    opacity: 1;
}

.pa-edit-name {
    flex: 1;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 10px;
    box-sizing: border-box;
    outline: none;
    resize: none;
}

.pa-edit-name:focus {
    border-color: #F72D4B;
}

.pa-edit-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pa-edit-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.pa-edit-toggle {
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pa-edit-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.pa-edit-save {
    width: 100%;
    height: 36px;
    border-radius: 8px;
    background: #fff;
    border: none;
    color: #000;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pa-edit-save:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Секция подтверждения удаления */
.pa-delete-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.pa-delete-text {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-align: center;
}

.pa-delete-buttons {
    display: flex;
    gap: 8px;
}

.pa-delete-cancel {
    flex: 1;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pa-delete-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.pa-delete-confirm {
    flex: 1;
    height: 36px;
    border-radius: 8px;
    background: #F72D4B;
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pa-delete-confirm:hover {
    box-shadow: 0 5px 15px rgba(247, 45, 75, 0.3);
}

/* ===================================================
   МОДАЛКА ПРОСМОТРА МОМЕНТА
   =================================================== */

.moment-viewer-overlay {
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    padding-bottom: 24px;
    background: rgba(0, 0, 0, 0.25);
    overflow-y: auto;
}

.moment-viewer-overlay::-webkit-scrollbar { width: 0; }

.moment-viewer-wrap {
    position: relative;
    width: 805px;
    max-width: 100%;
    display: block;
    min-height: max-content;
    margin: 0 auto;
}

.moment-ad-panel {
    width: 300px;
    padding: 7px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: absolute;
    right: calc(100% + 10px);
    top: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.moment-ad-title {
    font-weight: 900;
    font-size: 14px;
    color: #fff;
}

.moment-ad-card {
    display: none;
    flex-direction: column;
    gap: 8px;
    color: #fff;
    text-decoration: none;
}

.moment-ad-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
}

.moment-ad-name {
    font-weight: 800;
    font-size: 14px;
}

.moment-ad-empty {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.moment-viewer-window {
    width: 805px;
    max-width: 100%;
    margin: 0 auto;
    height: auto;
    min-height: calc(100vh - 10vh - 24px);
    border-radius: 21px 21px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    background: rgba(12, 12, 14, 1);
    padding: 7px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: visible;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease 0.15s;
}

.moment-viewer-window.blur-ready {
    background: rgb(12 12 14 / 0%);
}

.modal-overlay-js.active .moment-viewer-window {
    opacity: 1;
    transform: translateY(0);
}

/* Плеер */
.mv-player {
    height: 457px;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
    background: #000;
    flex-shrink: 0;
}

.mv-player.mv-player-no-content {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.mv-player-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    max-width: 430px;
}

.mv-empty-create-btn {
    min-width: 180px;
}

.mv-player video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mv-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: none;
    z-index: 2;
}

.mv-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.mv-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #fff;
    z-index: 3;
    cursor: pointer;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
    transition: transform 0.15s ease;
}

.mv-play-icon:hover { transform: translate(-50%, -50%) scale(1.1); }

/* Автор поверх плеера снизу */
.mv-author {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    z-index: 4;
}

.mv-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #333;
    flex-shrink: 0;
}

.mv-author-info {
    flex: 1;
    min-width: 0;
}

.mv-author-name {
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mv-author-subs {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.mv-subscribe-btn {
    padding: 6px 14px;
    border-radius: 999px;
    background: #F72D4B;
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.mv-subscribe-btn:hover { box-shadow: 0 4px 12px rgba(247, 45, 75, 0.4); }
.mv-subscribe-btn.subscribed { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }
.mv-subscribe-btn.subscribed:hover { box-shadow: 0 4px 12px rgba(255, 255, 255, 0.18); }

/* Название */
.mv-title-block {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
}

/* Теги */
.mv-tags-block {
    width: 100%;
    height: 37px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-shrink: 0;
}

.mv-tag {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: color 0.15s ease;
}

.mv-tag:hover { color: #fff; }

.mv-more-btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.15s ease;
}

.mv-more-btn:hover { color: #fff; }

/* Описание */
.mv-description {
    padding: 0 20px 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.mv-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 0;
    flex-shrink: 0;
}

.mv-action-btn {
    height: 37px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.15s ease;
}

/* Gradient border on buttons */
.mv-action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.mv-action-btn:hover { background: rgba(255, 255, 255, 0.15); }

.mv-action-btn.active {
    background: rgba(255, 255, 255, 0.6);
    color: rgba(0, 0, 0, 0.6);
}

.mv-action-icon {
    font-size: 16px;
    line-height: 1;
}

.mv-action-icon-img {
    width: 16px;
    height: 16px;
    display: block;
    filter: brightness(0) saturate(100%) invert(100%);
    opacity: 0.6;
}

.mv-action-btn.active .mv-action-icon-img {
    opacity: 1;
}

#mvCreateMomentBtn {
    width: 37px;
    height: 37px;
    padding: 0;
    border-radius: 50%;
}

/* Связанные моменты */
.mv-related-scroll {
    padding-top: 10px;
}

.mv-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 253px);
    gap: 10px;
    justify-content: center;
    padding-bottom: 20px;
}

.mv-moment-card-wrap {
    width: 253px;
    cursor: pointer;
    transition: transform 0.35s ease;
}


.mv-moment-title {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 15px;
    color: #fff;
    margin-top: 6px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    max-height: 2.6em;
    word-break: break-word;
}

.mv-moment-card {
    width: 253px;
    height: 151px;
    border-radius: 13px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.mv-moment-card .mv-moment-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mv-moment-badges {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 7px;
    display: flex;
    justify-content: space-between;
}

.mv-moment-badge {
    height: 23px;
    background: rgba(12, 12, 14, 0.6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
}

/* Комментарии момента */
.comment-replies-modal {
    align-items: center;
    padding-top: 0;
}

.comment-replies-box {
    width: 760px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 70px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comments-controls-bar.moment-comments-controls {
    position: static;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.comments-filter-btn,
.comments-write-btn {
    width: 20px;
    height: 20px;
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comments-filter-btn img,
.comments-write-btn img {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(100%);
    opacity: 0.75;
}

.comments-filter-btn.active img {
    opacity: 1;
}

.comment-replies-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
}

.comment-replies-content {
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 3px;
    overscroll-behavior: contain;
}

.moment-comment-item {
    background: rgba(12, 12, 14, 0.85);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 12px;
    box-sizing: border-box;
}

.moment-comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.moment-comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.moment-comment-username {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
}

.moment-comment-time {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    font-weight: 600;
}

.moment-comment-text {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.comment-replies-empty {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    padding: 26px 10px;
}

.moment-comment-compose {
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.moment-comment-compose textarea {
    flex: 1;
    min-height: 64px;
    max-height: 180px;
    resize: vertical;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 12px;
    box-sizing: border-box;
    outline: none;
}

.moment-comment-submit {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moment-comment-submit img {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(39%) sepia(93%) saturate(2845%) hue-rotate(332deg) brightness(99%) contrast(95%);
}

/* ===================================================
   МОДАЛКА СОЗДАНИЯ МОМЕНТА
   =================================================== */

.moment-create-overlay {
    align-items: center;
    padding-top: 0;
}

.moment-create-window {
    width: 360px;
    border-radius: 24px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.mc-title {
    font-weight: 700;
    font-size: 17px;
    color: #fff;
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.mc-input {
    width: 100%;
    height: 42px;
    background: rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: white;
    padding: 0 14px;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.mc-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(247, 45, 75, 0.6);
    box-shadow: 0 0 0 3px rgba(247, 45, 75, 0.15);
}

.mc-textarea {
    height: 70px;
    padding: 10px 14px;
    resize: none;
    line-height: 1.4;
}

.mc-cover-upload {
    width: 100%;
    height: 100px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.mc-cover-upload:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(247, 45, 75, 0.5);
    transform: scale(1.01);
}

.mc-cover-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mc-cover-upload .upload-icon {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    font-weight: 600;
}

.mc-tags-input-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    background: rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 6px 12px;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.mc-tags-input-wrap:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(247, 45, 75, 0.6);
    box-shadow: 0 0 0 3px rgba(247, 45, 75, 0.15);
}

.mc-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.mc-tag-chip {
    height: 26px;
    padding: 0 10px;
    border-radius: 8px;
    background: rgba(247, 45, 75, 0.15);
    border: 0.5px solid rgba(247, 45, 75, 0.3);
    color: #F72D4B;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: default;
    transition: all 0.15s ease;
}

.mc-tag-chip:hover {
    background: rgba(247, 45, 75, 0.25);
}

.mc-tag-chip-remove {
    cursor: pointer;
    opacity: 0.6;
    font-size: 16px;
    line-height: 1;
    transition: opacity 0.15s ease;
}

.mc-tag-chip-remove:hover { opacity: 1; }

.mc-tag-input {
    flex: 1;
    min-width: 100px;
    background: transparent;
    border: none;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    outline: none;
}

.mc-tags-suggest {
    background: rgba(12, 12, 14, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mc-tag-suggest-item {
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    transition: background 0.15s ease;
}

.mc-tag-suggest-item:hover { background: rgba(255, 255, 255, 0.08); }

.mc-tag-suggest-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.mc-ads-block {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mc-ads-title {
    font-weight: 800;
    font-size: 14px;
    color: #fff;
}

.mc-ads-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mc-ads-empty {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.mc-ad-item {
    width: 110px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.mc-ad-item:hover { transform: scale(1.03); }

.mc-ad-item.active {
    border-color: rgba(247, 45, 75, 0.8);
    background: rgba(247, 45, 75, 0.12);
}

.mc-ad-thumb {
    width: 100%;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-ad-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mc-ad-title {
    text-align: center;
    line-height: 1.1;
}

.mc-ads-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mc-ad-save-btn {
    height: 40px;
    font-size: 13px;
}

.mc-submit-btn {
    width: 100%;
    height: 44px;
    background: linear-gradient(135deg, #F72D4B 0%, #E01F3D 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.2px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 4px 12px rgba(247, 45, 75, 0.25);
    margin-top: 6px;
}

.mc-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(247, 45, 75, 0.4);
}

.mc-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(247, 45, 75, 0.3);
}

/* ===== LIKES MOMENTS GRID ===== */
.likes-moment-grid {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.likes-moment-card {
    width: 253px;
    cursor: pointer;
    transition: transform 0.35s ease;
}


.likes-moment-thumb {
    width: 100%;
    aspect-ratio: 253 / 151;
    border-radius: 13px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.likes-moment-thumb img {
    object-fit: cover;
    display: block;
}

.likes-moment-title {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 14px;
    color: #fff;
    margin-top: 6px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    max-height: 2.6em;
    word-break: break-word;
}

.likes-moment-edit {
    margin-top: 6px;
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
}

.playlist-cover-likes {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.playlist-cover-likes-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    padding: 0;
    box-sizing: border-box;
    opacity: 0.82;
    filter: brightness(0) saturate(100%) invert(100%);
    transform: scale(1.12);
}

/* ===== CHARACTER MODAL ===== */
.character-window {
    width: 893px;
    height: 751px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    background: transparent;
    display: flex;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.character-window::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0C0C0E;
    border-radius: inherit;
    opacity: 1;
    transition: opacity 0.35s ease 0.15s;
    pointer-events: none;
}

.character-window.blur-ready::before {
    opacity: 0;
}

.modal-overlay-js.active .character-window {
    opacity: 1;
    transform: translateY(0);
}

.character-window::-webkit-scrollbar { width: 0; }

.char-modal-left {
    width: 234px;
    height: 749px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    padding: 11px;
    box-sizing: border-box;
}

.char-modal-left::-webkit-scrollbar { width: 0; }

.char-list-item {
    width: 100%;
    height: 43px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    padding: 5px;
    box-sizing: border-box;
    gap: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 7px;
}

.char-list-item:last-child { margin-bottom: 0; }

.char-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.char-list-item.active {
    background: rgba(255, 255, 255, 0.1);
    position: relative;
}

.char-list-item.active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 100px;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.char-list-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.char-list-name {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-modal-right {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.char-modal-right::-webkit-scrollbar { width: 0; }

.char-detail-avatar-wrap {
    width: 146px;
    height: 146px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.char-detail-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.char-detail-name {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 24px;
    color: #fff;
    text-align: center;
    margin-bottom: 4px;
}

.char-detail-age {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-bottom: 20px;
}

.char-detail-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    text-align: left;
    width: 100%;
}

/* ===== INFO MODAL (Posts) ===== */
.info-window {
    width: 893px;
    height: 751px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    background: rgba(12, 12, 14, 0.85);
    display: flex;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-overlay-js.active .info-window {
    opacity: 1;
    transform: translateY(0);
}

.info-window::-webkit-scrollbar { width: 0; }

.info-modal-left {
    width: 234px;
    height: 749px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    padding: 11px;
    box-sizing: border-box;
}

.info-modal-left::-webkit-scrollbar { width: 0; }

.info-list-item {
    width: 100%;
    height: 43px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    padding: 5px 12px;
    box-sizing: border-box;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 7px;
}

.info-list-item:last-child { margin-bottom: 0; }

.info-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.info-list-item.active {
    background: rgba(255, 255, 255, 0.1);
    position: relative;
}

.info-list-item.active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 100px;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.info-list-pinned {
    font-size: 12px;
    margin-right: 6px;
    flex-shrink: 0;
}

.info-list-name {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-modal-right {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.info-modal-right::-webkit-scrollbar { width: 0; }

.info-detail-title {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 22px;
    color: #fff;
    margin-bottom: 6px;
}

.info-detail-meta {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
}

.info-detail-cover-wrap {
    width: 100%;
    max-height: 250px;
    border-radius: 13px;
    overflow: hidden;
    margin-bottom: 20px;
}

.info-detail-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-detail-content {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== TAG MOMENTS GRID (search results) ===== */
.tag-moments-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
}

.tag-moments-grid .mv-moment-card-wrap {
    width: 100%;
}

.tag-moments-grid .mv-moment-card {
    width: 100%;
    height: 0;
    padding-bottom: 59.7%; /* 151/253 aspect ratio */
}

.tag-moments-grid .mv-moment-card .mv-moment-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== SEARCH PLACEHOLDER ===== */
.search-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* ===== ICON OVERRIDES ===== */
.history-total-count {
    width: auto;
    text-align: center;
    align-self: center;
}

.history-users-total-count {
    display: none;
}

.window-history.all-tab-mode #historyResults,
.window-history.all-tab-mode .history-total-count {
    display: none !important;
}

.window-history.all-tab-mode .search-placeholder {
    min-height: 340px;
}

.results-content.search-all-mode .universe-filters {
    display: none !important;
}

.search-all-grid {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px 18px;
}

.search-all-row {
    width: 100%;
    min-height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.search-all-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.search-all-cover {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
}

.search-all-cover-empty {
    background: rgba(255, 255, 255, 0.1);
}

.search-all-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-all-title {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-all-sub {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-all-kind {
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.floating-badge-tooltip {
    position: fixed;
    z-index: 250000;
    pointer-events: none;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(12, 12, 14, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.94);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.floating-badge-tooltip.visible {
    opacity: 1;
}

.scroll-anchor {
    font-size: 0;
}

.scroll-anchor-icon {
    width: 12px;
    height: 14px;
    opacity: 0.6;
    display: block;
}

.list-content-search-toggle-icon {
    width: 14px;
    height: 14px;
    display: block;
}

.panel-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-icon-img {
    width: 18px;
    height: 18px;
    display: block;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.panel-icon:hover .panel-icon-img {
    opacity: 1;
}

#panelFriendsBtn .panel-icon-img {
    width: 24px;
    height: 24px;
}

#panelSettingsBtn .panel-icon-img {
    width: 16px;
    height: 16px;
}

.panel-logout {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-logout-icon {
    width: 18px;
    height: 18px;
    display: block;
    opacity: 0.6;
}

.mv-moment-badge-icon {
    margin-left: 7px;
    opacity: 0.6;
    display: block;
}

.icon-btn-img {
    width: 16px;
    height: 16px;
    opacity: 0.6;
    display: block;
    transition: opacity 0.15s ease, filter 0.15s ease;
}

.icon-btn:hover .icon-btn-img {
    opacity: 1;
}

.icon-btn {
    color: rgba(255, 255, 255, 0.6);
}

.icon-btn:hover {
    color: #fff;
}

.icon-btn-link.copied .icon-btn-img {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(91%) sepia(38%) saturate(4271%) hue-rotate(47deg) brightness(107%) contrast(109%);
}
