.uc-panel::-webkit-scrollbar {
    width: 6px;
}

.uc-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

/* --- Bar --- */
#ucBar {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 0;
    right: 0;
    width: calc(100% - 32px);
    max-width: 1100px;
    margin: 0 auto;
    background: rgba(18, 18, 20, 0.96);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid #ee0000;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    z-index: 10060;
    font-family: Inter, Arial, sans-serif;
}

.uc-wrap {
    padding: 12px 18px;
    display: flex;
    gap: 8px 20px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.uc-text h3 {
    color: #fff;
    margin: 0 0 2px;
    font-size: 16px;
}

.uc-text h3::before {
    content: "\1F36A";
    margin-right: 6px;
}

.uc-text p {
    margin: 0;
    color: #bbb;
    font-size: 13px;
    max-width: 620px;
}

.css-uc-policy {
    color: #e5e5e5;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.css-uc-policy:hover {
    color: #ff4d4d;
}

.uc-actions {
    display: flex;
    gap: 8px;
}

/* --- Buttons --- */
.uc-btn {
    padding: 7px 14px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: 0.2s;
}

.uc-btn.primary {
    background: #ee0000 !important;
    color: #fff;
}

.uc-btn.primary:hover {
    background: #d10000 !important;
    box-shadow: 0 4px 16px rgba(238, 0, 0, 0.4);
}

.uc-btn.ghost {
    background: transparent;
    border-color: #555;
    color: #ddd;
}

.uc-btn.ghost:hover {
    border-color: #888;
    color: #fff;
}

.uc-btn.dark {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.uc-btn.dark:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* --- Settings panel --- */
#ucOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 9911199;
}

.uc-panel {
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    background: #141416;
    padding: 0 20px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    animation: ucSlide 0.3s ease;
}

@keyframes ucSlide {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.uc-panel-head {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 0 -20px 8px;
    padding: 12px 20px 10px;
    background: #141416;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1;
}

.uc-panel-head h3 {
    flex: 1 1 auto;
    color: #fff;
    margin: 0;
}

.uc-panel-head button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.uc-panel-head .close-btn {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    line-height: 1;
    transition: 0.2s;
}

.uc-panel-head .close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Categories --- */
.uc-cat {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.uc-cat:last-child {
    margin-bottom: 0;
}

.uc-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.uc-cat strong {
    color: #fff;
}

.uc-cat p {
    color: #aaa;
    font-size: 13px;
    margin: 2px 0 0 58px;
}

/* --- Switch --- */
.uc-switch {
    position: relative;
    width: 46px;
    height: 24px;
    flex: 0 0 46px;
    margin: 0;
    cursor: pointer;
}

.uc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.uc-switch span {
    position: absolute;
    inset: 0;
    background: #444;
    border-radius: 50px;
    transition: 0.3s;
}

.uc-switch span:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
}

.uc-switch input:checked + span {
    background: #ee0000 !important;
}

.uc-switch input:checked + span:before {
    transform: translateX(22px);
}

.uc-switch input:disabled + span {
    opacity: 0.55;
    cursor: not-allowed;
}

/* --- Tools --- */
.css-uc-tools {
    margin-left: 58px;
}

.css-uc-tools-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.css-uc-tool {
    margin: 0;
    border: 1px solid #3f3f3f;
    border-radius: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
}

.css-uc-tool-name {
    border: 1px solid #666;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
}

.css-uc-tool-desc {
    font-size: 13px;
    line-height: 1.45;
    color: #cfcfcf;
}

.css-uc-tool-empty {
    font-size: 12px;
    color: #8f8f8f;
    font-style: italic;
}
