:root {
    --bg: #0e1015;
    --surface: #161922;
    --surface-2: #1f2431;
    --surface-3: #2a3040;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #f2f4f8;
    --text-muted: #98a2b3;
    --accent: #5865f2;
    --accent-hover: #4752c4;
    --gold: #f5b942;
    --danger: #e5484d;
    --danger-hover: #c9373c;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

    body.drawer-open {
        overflow: hidden;
    }

.app-shell {
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.hidden {
    display: none !important;
}

button, input, select {
    font: inherit;
    color: inherit;
}

/* ==================== КНОПКИ И ПОЛЯ ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: var(--surface-2);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
}

    .btn:hover {
        background: var(--surface-3);
    }

    .btn:active {
        transform: scale(0.97);
    }

    .btn:disabled {
        opacity: 0.55;
        pointer-events: none;
    }

.btn-primary {
    background: var(--accent);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--accent-hover);
    }

.btn-secondary {
    background: var(--surface-2);
    border-color: var(--border-strong);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
}

    .btn-ghost:hover {
        background: var(--surface-2);
    }

.btn-danger {
    background: var(--danger);
    color: #fff;
}

    .btn-danger:hover {
        background: var(--danger-hover);
    }

.btn-danger-ghost {
    background: transparent;
    border-color: rgba(229, 72, 77, 0.35);
    color: #ff8085;
}

    .btn-danger-ghost:hover {
        background: rgba(229, 72, 77, 0.14);
    }

.btn-icon {
    width: 38px;
    padding: 0;
}

.btn-sm {
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
}

.btn-full {
    width: 100%;
}

.link-btn {
    background: none;
    border: none;
    color: #8b98ff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
}

    .link-btn:hover {
        text-decoration: underline;
    }

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

    .field input[type="text"],
    .field input[type="url"],
    .field input[type="password"],
    .field input[type="search"],
    .field input[type="file"],
    .field select {
        width: 100%;
        background: var(--bg);
        border: 1px solid var(--border-strong);
        border-radius: var(--radius-sm);
        padding: 9px 12px;
        color: var(--text);
        font-size: 14px;
        outline: none;
    }

        .field input:focus, .field select:focus {
            border-color: var(--accent);
        }

    .field input[type="range"] {
        accent-color: var(--accent);
        cursor: pointer;
    }

.field-hint, .muted-text {
    font-size: 12px;
    color: var(--text-muted);
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}

.form-error {
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: rgba(229, 72, 77, 0.14);
    border: 1px solid rgba(229, 72, 77, 0.4);
    color: #ff9498;
    font-size: 13px;
}

.form-info {
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.4);
    color: #bfc6ff;
    font-size: 13px;
}

/* ==================== АВАТАРКИ ==================== */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f5be8, #7b4fe8);
    color: #fff;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

    .avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.avatar-md {
    width: 40px;
    height: 40px;
    font-size: 15px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 24px;
}

/* ==================== АВТОРИЗАЦИЯ ==================== */

.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 390px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
}

.seg-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--border);
}

.seg-tab {
    height: 34px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

    .seg-tab.active {
        background: var(--surface-2);
        color: var(--text);
    }

/* ==================== ШАПКА ==================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(14, 16, 21, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 17px;
    font-weight: 800;
    flex-shrink: 0;
}

.search-wrap {
    position: relative;
    flex: 1;
    min-width: 140px;
}

    .search-wrap input {
        width: 100%;
        height: 38px;
        padding: 0 32px 0 12px;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border);
        background: var(--surface);
        font-size: 14px;
        outline: none;
    }

        .search-wrap input:focus {
            border-color: var(--accent);
        }

.icon-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.select-compact {
    height: 38px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.user-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 10px 0 6px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    cursor: pointer;
}

    .user-menu-btn:hover {
        background: var(--surface-2);
    }

.user-menu-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}

.burger-icon {
    font-size: 15px;
    color: var(--text-muted);
}

/* ==================== КОНТЕНТ И ЛЕНТА ==================== */

.main-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px 12px 60px;
}

.view-header {
    margin-bottom: 16px;
}

.context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.context-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-tags-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.profile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-ident {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-name {
    font-size: 20px;
    font-weight: 800;
}

.badge-admin {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(88, 101, 242, 0.22);
    color: #a9b3ff;
    border: 1px solid rgba(88, 101, 242, 0.4);
}

.profile-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: var(--bg);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.profile-tab {
    height: 36px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

    .profile-tab.active {
        background: var(--accent);
        color: #fff;
    }

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==================== КАРТОЧКА КОУБА ==================== */

.coub-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.coub-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
}

.author-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    min-width: 0;
    text-align: left;
}

    .author-btn:disabled {
        cursor: default;
    }

.author-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.author-name {
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.origin-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--text-muted);
    flex-shrink: 0;
}

    .origin-badge.created {
        background: rgba(56, 189, 248, 0.14);
        color: #7dd3fc;
    }

.coub-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
    min-width: 32px;
    padding: 0 9px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

    .action-btn:hover {
        background: var(--surface-3);
        color: var(--text);
    }

    .action-btn.fav-active {
        background: rgba(245, 185, 66, 0.16);
        border-color: rgba(245, 185, 66, 0.5);
        color: var(--gold);
    }

    .action-btn.del-btn:hover {
        background: rgba(229, 72, 77, 0.18);
        border-color: rgba(229, 72, 77, 0.45);
        color: #ff8a8e;
    }

/* ==================== ПЛЕЕР ==================== */

.player-stage {
    position: relative;
    isolation: isolate;
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    max-height: 72vh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

    .player-stage:fullscreen {
        max-height: none;
        width: 100vw;
        height: 100vh;
    }

.player-video {
    width: 100%;
    max-height: 72vh;
    display: block;
    object-fit: contain;
    background: #000;
    cursor: pointer;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.player-stage:fullscreen .player-video {
    max-height: 100vh;
    height: 100%;
    transform: none;
    -webkit-transform: none;
}

.player-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 3px solid rgba(88, 101, 242, 0.28);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    pointer-events: none;
    z-index: 4;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.player-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(14, 16, 21, 0.72);
    color: #fff;
    font-size: 22px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.unmute-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(14, 16, 21, 0.82);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    z-index: 6;
}

.player-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 6;
    transition: opacity 0.2s ease;
}

    .player-bar.faded {
        opacity: 0;
        pointer-events: none;
    }

.pbtn {
    height: 30px;
    min-width: 32px;
    padding: 0 8px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(22, 25, 34, 0.82);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pvol {
    width: 88px;
    accent-color: var(--accent);
    cursor: pointer;
    touch-action: none;
}

.pspacer {
    flex: 1;
}

/* ==================== НИЗ КАРТОЧКИ ==================== */

.coub-foot {
    padding: 11px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coub-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.coub-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 32px;
}

.coub-title-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.coub-source-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #8b98ff;
    text-decoration: none;
    flex-shrink: 0;
}

    .coub-source-link:hover {
        text-decoration: underline;
        color: #b4bdff;
    }

.coub-tags-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #a9b1d6;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

    .coub-tags-toggle:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

.coub-tags-panel {
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.coub-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-chip {
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
}

    .tag-chip:hover {
        border-color: var(--accent);
        color: var(--text);
    }

    .tag-chip.active {
        background: rgba(88, 101, 242, 0.22);
        border-color: var(--accent);
        color: #c5ccff;
    }

.tag-edit-trigger {
    margin-top: 8px;
    padding: 3px 9px;
    font-size: 12px;
    color: #8b98ff;
    background: transparent;
    border: 1px dashed rgba(139, 152, 255, 0.4);
    border-radius: 8px;
    cursor: pointer;
}

    .tag-edit-trigger:hover {
        background: rgba(139, 152, 255, 0.12);
    }

.tag-edit-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag-edit-input {
    flex: 1 1 180px;
    min-width: 0;
    padding: 6px 10px;
    font-size: 13px;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    outline: none;
}

    .tag-edit-input:focus {
        border-color: var(--accent);
    }

/* ==================== ВЫДВИЖНОЕ МЕНЮ ==================== */

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.56);
    z-index: 2000;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 90vw);
    background: var(--surface);
    border-left: 1px solid var(--border-strong);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 36px rgba(0, 0, 0, 0.55);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
}

.drawer-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    min-width: 0;
}

.drawer-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .drawer-user-meta strong {
        font-size: 15px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .drawer-user-meta small {
        font-size: 12px;
        color: var(--text-muted);
    }

.drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 4px;
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

    .drawer-nav-item:hover {
        background: var(--surface-2);
    }

    .drawer-nav-item.active {
        background: rgba(88, 101, 242, 0.2);
        color: #bcc4ff;
    }

.drawer-divider {
    height: 1px;
    background: var(--border);
    margin: 0 14px;
}

.drawer-tags {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    gap: 8px;
}

.drawer-tags-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.drawer-section-title {
    font-size: 14px;
    font-weight: 700;
}

.drawer-section-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.tag-filter-input {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 13px;
    outline: none;
}

.tags-toggle-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

.tag-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 9px;
    background: var(--bg);
    border: 1px solid var(--border);
    cursor: pointer;
}

.tag-toggle-info {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 13px;
}

.tag-toggle-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-toggle-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* Тумблер в стиле Coub */
.switch {
    position: relative;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--surface-3);
    transition: background 0.18s ease;
}

    .switch-slider::before {
        content: "";
        position: absolute;
        width: 16px;
        height: 16px;
        left: 3px;
        top: 3px;
        border-radius: 50%;
        background: #fff;
        transition: transform 0.18s ease;
    }

.switch input:checked + .switch-slider {
    background: var(--accent);
}

    .switch input:checked + .switch-slider::before {
        transform: translateX(16px);
    }

.drawer-foot {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==================== МОДАЛКИ ==================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.66);
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.modal-card {
    width: 100%;
    max-width: 440px;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-lg {
    max-width: 540px;
}

.modal-sm {
    max-width: 380px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

    .modal-head h3 {
        margin: 0;
        font-size: 17px;
    }

.avatar-upload-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar-upload-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.create-preview {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
}

    .create-preview video {
        width: 100%;
        max-height: 240px;
        display: block;
        object-fit: contain;
    }

.preview-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(14, 16, 21, 0.84);
    border-color: rgba(255, 255, 255, 0.25);
}

.progress-wrap {
    height: 8px;
    border-radius: 999px;
    background: var(--bg);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.15s ease;
}

.confirm-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-muted);
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ==================== ПУСТО / ЗАГРУЗКА / ТОСТЫ ==================== */

.empty-state {
    text-align: center;
    padding: 56px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.empty-icon {
    font-size: 38px;
    margin-bottom: 10px;
}

.empty-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.empty-sub {
    font-size: 14px;
    color: var(--text-muted);
}

.feed-loader {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(88, 101, 242, 0.28);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.sentinel {
    height: 1px;
}

.toast-container {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 2200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: rgba(22, 25, 34, 0.96);
    color: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

/* ==================== МОБИЛЬНАЯ АДАПТАЦИЯ ==================== */

@media (max-width: 680px) {
    .topbar-inner {
        flex-wrap: wrap;
        padding: 8px 10px;
    }

    .search-wrap {
        order: 3;
        flex-basis: 100%;
    }

    .hide-sm {
        display: none;
    }

    .two-cols {
        grid-template-columns: 1fr;
    }

    .main-wrap {
        padding: 12px 8px 50px;
    }

    .pvol {
        width: 68px;
    }
}