#cbhContextMenu {
    position: fixed;
    min-width: 210px;
    max-width: min(320px, calc(100vw - 16px));
    background: rgba(20, 20, 25, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
    z-index: 99999;
    opacity: 0;
    transform: scale(0.94);
    transform-origin: top left;
    transition: opacity .14s ease, transform .14s ease;
    pointer-events: none;
}

#cbhContextMenu.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.ctx-header {
    padding: 10px 14px 8px;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.28);
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-family: 'Hack Font', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background .12s, color .12s;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.ctx-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.ctx-item:active { background: rgba(255, 255, 255, 0.14); }

.ctx-item.primary-action {
    color: #fff;
    background: rgba(179, 0, 0, 0.18);
    border-left: 3px solid rgba(220, 40, 40, 0.9);
}

.ctx-item.primary-action:hover {
    background: rgba(179, 0, 0, 0.3);
}

.ctx-item.disabled,
.ctx-item.disabled:hover,
.ctx-item.disabled:active {
    color: rgba(255, 255, 255, 0.28);
    background: transparent;
    cursor: default;
}

.ctx-item.danger { color: rgba(255, 95, 86, 0.85); }
.ctx-item.danger:hover { background: rgba(255, 95, 86, 0.1); color: #ff5f56; }

.ctx-item.danger.disabled,
.ctx-item.danger.disabled:hover,
.ctx-item.danger.disabled:active {
    color: rgba(255, 255, 255, 0.28);
    background: transparent;
    cursor: default;
}

.ctx-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin: 3px 0;
}

.ctx-icon {
    font-size: 15px;
    opacity: 0.65;
    width: 16px;
    text-align: center;
}

#cbhHoldRing {
    position: fixed;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(179, 0, 0, 0.7);
    margin-left: -26px;
    margin-top: -26px;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    z-index: 99998;
    transition: none;
}

#cbhHoldRing.animating {
    transition: transform 0.6s ease, opacity 0.3s ease;
    transform: scale(1);
    opacity: 1;
}

.folder.is-cut,
.search-item.is-cut {
    opacity: 0.45;
    filter: saturate(0.55);
}

.folder.is-cut .folder-logo,
.search-item.is-cut img {
    transform: scale(0.96);
}

#cbhContextToast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    max-width: min(420px, calc(100vw - 24px));
    padding: 11px 15px;
    background: rgba(20, 20, 25, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 3px solid rgba(65, 190, 120, 0.95);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity .18s ease, transform .18s ease;
    z-index: 100002;
}

#cbhContextToast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

#cbhContextToast.error {
    border-left-color: rgba(255, 95, 86, 0.95);
}

.cbh-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(5px);
}

.cbh-dialog {
    width: min(440px, calc(100vw - 28px));
    background: linear-gradient(180deg, rgba(33, 15, 19, 0.98), rgba(17, 17, 21, 0.98));
    border: 1px solid rgba(179, 0, 0, 0.46);
    border-radius: 8px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.72);
    padding: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', sans-serif;
}

.cbh-dialog-title {
    font-family: 'Hack Font', monospace;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 9px;
}

.cbh-dialog-message {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 14px;
    overflow-wrap: anywhere;
}

.cbh-dialog-input {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    margin: 2px 0 15px;
    padding: 0 12px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    outline: none;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-family: 'Hack Font', monospace;
    font-size: 14px;
}

.cbh-dialog-input:focus {
    border-color: rgba(220, 40, 40, 0.85);
    box-shadow: 0 0 0 3px rgba(220, 40, 40, 0.14);
}

.cbh-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cbh-dialog-btn {
    min-height: 44px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.cbh-dialog-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
}

.cbh-dialog-btn.primary {
    background: linear-gradient(135deg, #9d1118, #c42027);
}

.cbh-dialog-btn.danger {
    background: linear-gradient(135deg, #8b0c12, #d21e2a);
}

.cbh-dialog-btn:active {
    transform: translateY(1px);
}

@media (max-width: 640px) {
    #cbhContextMenu {
        min-width: 230px;
    }

    .ctx-item {
        min-height: 42px;
        font-size: 14px;
    }

    .cbh-dialog {
        padding: 16px;
    }
}
