/* Nerd-Pastell Category Manager Widget */

.widget:has(.npcm-card),
.pastel-window:has(.npcm-card) {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.widget:has(.npcm-card) > .window-title,
.pastel-window:has(.npcm-card) > .window-title {
    display: none !important;
}

.pastel-window:has(.npcm-card) > *,
.widget:has(.npcm-card) > * {
    margin-inline: 0 !important;
}

.sidebar .widget:has(.npcm-card),
.sidebar .pastel-window:has(.npcm-card) {
    width: 100% !important;
}

.npcm-card {
    width: 100%;
    overflow: hidden;
    border: 2px solid #d8c8f3;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 20px 50px rgba(100, 78, 160, 0.16);
}

.npcm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    color: #fff;
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #9f82e8, #c4a9f7);
}

.npcm-body {
    position: relative;
    padding: 18px 24px 20px;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 120, 173, 0.18), transparent 26%),
        radial-gradient(circle at 82% 30%, rgba(111, 220, 207, 0.16), transparent 24%),
        radial-gradient(circle at 60% 92%, rgba(169, 139, 232, 0.14), transparent 28%),
        linear-gradient(180deg, #fffafe 0%, #fff7fb 100%);
}

.npcm-body::before {
    position: absolute;
    inset: 12px;
    content: "";
    border-radius: 18px;
    background-image:
        radial-gradient(circle, rgba(255, 209, 102, 0.58) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(255, 120, 173, 0.36) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(111, 220, 207, 0.38) 0 1px, transparent 2px);
    background-size: 68px 68px, 94px 94px, 120px 120px;
    background-position: 10px 12px, 32px 48px, 70px 20px;
    opacity: 0.55;
    pointer-events: none;
}

.npcm-list,
.npcm-twinkle {
    position: relative;
    z-index: 1;
}

.npcm-list {
    display: grid;
    gap: 4px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.npcm-list li {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.npcm-list a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: #2f2a60;
    text-decoration: none;
}

.npcm-list a:not(:has(.npcm-icon-wrap)) {
    grid-template-columns: 1fr auto;
}

.npcm-list a:hover .npcm-name {
    color: #ff78ad;
}

.npcm-icon-wrap {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: #fff;
    border: 2px solid #bfa7f3;
    border-radius: 12px;
    box-shadow:
        0 8px 14px rgba(100, 78, 160, 0.08),
        inset 0 0 0 2px rgba(255,255,255,0.85);
}

.npcm-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 0 !important;
    image-rendering: pixelated;
}

.npcm-name {
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 0.98rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: color 160ms ease;
}

.npcm-count {
    color: #9a94b8;
    font-family: "Nunito", system-ui, sans-serif;
    font-weight: 800;
}

.npcm-twinkle {
    position: absolute;
    font-size: 1.1rem;
    line-height: 1;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.npcm-twinkle-1 {
    top: 16px;
    left: 24px;
    color: #ffd166;
}

.npcm-twinkle-2 {
    right: 30px;
    top: 46px;
    color: #ff8fc0;
}

.npcm-twinkle-3 {
    right: 74px;
    bottom: 24px;
    color: #6fdccf;
}

@media (max-width: 680px) {
    .npcm-body {
        padding: 16px 20px 18px;
    }

    .npcm-name {
        font-size: 0.9rem;
    }
}
