.panda-notify-root {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 80;
    overflow: visible;
}

.panda-notify-root.is-floating {
    position: fixed;
    right: 22px;
    bottom: 92px;
    z-index: 1200;
}

.panda-notify-btn {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    overflow: visible !important;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.panda-notify-btn:hover {
    transform: translateY(-1px);
}

.panda-notify-btn:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .20);
    outline-offset: 2px;
}

.panda-notify-badge {
    position: absolute;
    right: -6px;
    top: -7px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    border: 2px solid #fff;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    box-sizing: border-box;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 6px 12px rgba(239, 68, 68, .28);
}

.panda-notify-root.has-unread .panda-notify-badge {
    display: inline-flex;
}

.panda-notify-panel {
    position: fixed;
    right: 18px;
    top: 70px;
    width: min(390px, calc(100vw - 24px));
    max-height: min(620px, calc(100vh - 92px));
    border: 1px solid #dbe6f5;
    border-radius: 16px;
    background: #fff;
    color: #172033;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(.98);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
}

.panda-notify-menu-item {
    overflow: visible;
}

.panda-notify-menu-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-style: normal;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    box-shadow: 0 5px 12px rgba(239, 68, 68, .24);
    flex: 0 0 auto;
}

.panda-notify-menu-badge[hidden] {
    display: none;
}

.panda-notify-root.is-open .panda-notify-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.panda-notify-head {
    padding: 15px 16px 13px;
    border-bottom: 1px solid #e7edf6;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, #f8fbff, #eef5ff);
}

.panda-notify-title {
    font-size: 15px;
    font-weight: 1000;
    color: #102033;
}

.panda-notify-sub {
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
    font-weight: 800;
}

.panda-notify-readall {
    border: 1px solid #dbe6f5;
    border-radius: 999px;
    background: #fff;
    color: #2563eb;
    height: 30px;
    padding: 0 11px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.panda-notify-readall:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.panda-notify-list {
    max-height: 430px;
    overflow: auto;
    padding: 7px;
}

.panda-notify-item {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #fff;
    padding: 11px 10px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.panda-notify-item + .panda-notify-item {
    margin-top: 4px;
}

.panda-notify-item:hover {
    background: #f8fbff;
    border-color: #e3ecfb;
}

.panda-head-asset-popover {
    display: none;
}

@media (max-width: 768px) {
    .sy-head-user {
        position: relative !important;
        min-width: 118px !important;
        max-width: min(156px, 38vw) !important;
        padding: 5px 8px !important;
        gap: 7px !important;
        cursor: pointer !important;
        overflow: visible !important;
    }

    .sy-head-user .tx {
        display: inline-flex !important;
        width: 28px !important;
        height: 28px !important;
        flex: 0 0 28px !important;
    }

    .sy-head-user .info {
        display: flex !important;
        align-items: center !important;
        min-width: 0 !important;
        gap: 2px !important;
    }

    .sy-head-user .info .name {
        display: block !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 12px !important;
        line-height: 1.1 !important;
        text-align: center !important;
    }

    .sy-head-user .head-balance-line {
        display: block !important;
        width: 100% !important;
        overflow: hidden !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    .sy-head-user .head-balance-line b {
        display: inline-block !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        padding: 1px 5px !important;
        font-size: 10px !important;
        line-height: 1.45 !important;
        text-align: left !important;
    }

    .sy-head-user .head-balance-line em,
    .sy-head-user .head-rent-time {
        display: none !important;
    }

    .sy-head-user .drop {
        display: none !important;
    }

    .panda-head-asset-popover {
        display: block;
        position: fixed;
        right: 10px;
        top: 66px;
        z-index: 1200;
        width: min(248px, calc(100vw - 20px));
        border: 1px solid #dbe6f5;
        border-radius: 16px;
        background: #fff;
        color: #172033;
        box-shadow: 0 22px 60px rgba(15, 23, 42, .22);
        padding: 10px;
        opacity: 0;
        transform: translateY(-8px) scale(.98);
        pointer-events: none;
        transition: opacity .16s ease, transform .16s ease;
    }

    .panda-head-asset-popover::before {
        content: "";
        position: absolute;
        right: 28px;
        top: -6px;
        width: 10px;
        height: 10px;
        background: inherit;
        border-left: 1px solid #dbe6f5;
        border-top: 1px solid #dbe6f5;
        transform: rotate(45deg);
    }

    .sy-head-user.is-asset-open .panda-head-asset-popover {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .panda-head-asset-title {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 4px 4px 9px;
        color: #172033;
        font-size: 13px;
        font-weight: 1000;
    }

    .panda-head-asset-title i {
        width: 28px;
        height: 28px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #eff6ff;
        color: #2563eb;
    }

    .panda-head-asset-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 36px;
        padding: 8px 9px;
        border-radius: 11px;
        background: #f8fbff;
        border: 1px solid #e7edf6;
    }

    .panda-head-asset-row + .panda-head-asset-row {
        margin-top: 6px;
    }

    .panda-head-asset-row span {
        color: #64748b;
        font-size: 12px;
        font-weight: 900;
        white-space: nowrap;
    }

    .panda-head-asset-row b {
        min-width: 0;
        color: #102033;
        font-size: 13px;
        font-weight: 1000;
        text-align: right;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .panda-head-asset-row.is-gift b {
        color: #b45309;
    }

    .panda-head-asset-row.is-rent b {
        color: #0f766e;
    }

    .panda-head-asset-logout {
        margin-top: 8px;
        min-height: 34px;
        border-radius: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        background: #fff7ed;
        color: #b45309;
        border: 1px solid #fed7aa;
        font-size: 12px;
        font-weight: 900;
        text-decoration: none;
    }
}

html[data-panda-ui="dark"] .panda-head-asset-popover {
    background: #101a2b;
    border-color: rgba(96, 165, 250, .28);
    color: #eaf2ff;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .42);
}

html[data-panda-ui="dark"] .panda-head-asset-popover::before {
    border-color: rgba(96, 165, 250, .28);
}

html[data-panda-ui="dark"] .panda-head-asset-title,
html[data-panda-ui="dark"] .panda-head-asset-row b {
    color: #f8fbff;
}

html[data-panda-ui="dark"] .panda-head-asset-row {
    background: rgba(15, 23, 42, .82);
    border-color: rgba(148, 163, 184, .20);
}

html[data-panda-ui="dark"] .panda-head-asset-row span {
    color: #a9bad1;
}

html[data-panda-ui="anime"] .panda-head-asset-popover {
    background: #fff8fb;
    border-color: #ffd1e6;
    box-shadow: 0 22px 60px rgba(190, 24, 93, .18);
}

html[data-panda-ui="anime"] .panda-head-asset-popover::before {
    border-color: #ffd1e6;
}

html[data-panda-ui="anime"] .panda-head-asset-title {
    color: #3d2134;
}

html[data-panda-ui="anime"] .panda-head-asset-title i {
    background: #fff1f7;
    color: #be185d;
}

html[data-panda-ui="anime"] .panda-head-asset-row {
    background: #fffafd;
    border-color: #ffd6e8;
}

html[data-panda-ui="anime"] .panda-head-asset-row span {
    color: #7c506a;
}

.panda-notify-item.is-unread {
    background: #f8fbff;
    border-color: #dbeafe;
}

.panda-notify-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    color: #2563eb;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .10);
}

.panda-notify-item[data-level="success"] .panda-notify-mark {
    background: #ecfdf5;
    color: #16a34a;
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, .14);
}

.panda-notify-item[data-level="warning"] .panda-notify-mark {
    background: #fff7ed;
    color: #d97706;
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, .16);
}

.panda-notify-item[data-level="danger"] .panda-notify-mark {
    background: #fef2f2;
    color: #dc2626;
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .14);
}

.panda-notify-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.panda-notify-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #172033;
    font-size: 13px;
    font-weight: 1000;
}

.panda-notify-tag {
    flex: 0 0 auto;
    min-height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3151b7;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 900;
}

.panda-notify-desc {
    margin-top: 5px;
    color: #526276;
    font-size: 12px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.panda-notify-time {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
}

.panda-notify-empty,
.panda-notify-loading {
    margin: 8px;
    padding: 30px 12px;
    border: 1px dashed #dbe6f5;
    border-radius: 13px;
    color: #64748b;
    background: #fbfdff;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

.panda-notify-foot {
    border-top: 1px solid #e7edf6;
    padding: 10px;
    background: #fbfdff;
}

.panda-notify-more {
    min-height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #2563eb;
    background: #fff;
    border: 1px solid #dbe6f5;
    text-decoration: none;
    font-size: 12px;
    font-weight: 1000;
}

.panda-notify-more:hover {
    background: #eff6ff;
}

html[data-panda-ui="dark"] .panda-notify-btn,
html[data-panda-ui="dark"] .panda-notify-panel,
html[data-panda-ui="dark"] .panda-notify-readall,
html[data-panda-ui="dark"] .panda-notify-more {
    background: #101a2b;
    color: #e5edf8;
    border-color: rgba(148, 163, 184, .22);
}

html[data-panda-ui="dark"] .panda-notify-head,
html[data-panda-ui="dark"] .panda-notify-foot {
    background: #0d1727;
    border-color: rgba(148, 163, 184, .18);
}

html[data-panda-ui="dark"] .panda-notify-title,
html[data-panda-ui="dark"] .panda-notify-name {
    color: #f8fbff;
}

html[data-panda-ui="dark"] .panda-notify-sub,
html[data-panda-ui="dark"] .panda-notify-desc {
    color: #a9b7ca;
}

html[data-panda-ui="dark"] .panda-notify-item {
    background: #101a2b;
}

html[data-panda-ui="dark"] .panda-notify-item:hover,
html[data-panda-ui="dark"] .panda-notify-item.is-unread {
    background: #132033;
    border-color: rgba(96, 165, 250, .28);
}

html[data-panda-ui="dark"] .panda-notify-empty,
html[data-panda-ui="dark"] .panda-notify-loading {
    background: #0d1727;
    border-color: rgba(148, 163, 184, .22);
    color: #a9b7ca;
}

html[data-panda-ui="anime"] .panda-notify-btn {
    border-color: rgba(244, 114, 182, .34);
    box-shadow: 0 10px 24px rgba(236, 72, 153, .13);
}

html[data-panda-ui="anime"] .panda-notify-head {
    background: linear-gradient(135deg, #fff5fb, #f7efff);
}

@media (max-width: 720px) {
    .panda-notify-root:not(.is-floating) {
        position: relative;
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        z-index: 90;
    }

    html[data-panda-surface="front"] .sy-head-right .panda-notify-root .panda-notify-btn,
    .sy-head-right .panda-notify-root .panda-notify-btn {
        display: inline-flex !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        padding: 0 !important;
        border-radius: 10px !important;
        line-height: 1 !important;
    }

    .sy-head-right .panda-notify-root .panda-notify-badge {
        top: -5px;
        right: -5px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        font-size: 10px;
        border-width: 2px;
    }

    .panda-notify-panel {
        left: 12px;
        right: 12px;
        top: 64px;
        width: auto;
        max-height: calc(100vh - 82px);
    }

    .panda-notify-list {
        max-height: calc(100vh - 230px);
    }
}

@media (max-width: 420px) {
    .panda-notify-root:not(.is-floating) {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    html[data-panda-surface="front"] .sy-head-right .panda-notify-root .panda-notify-btn,
    .sy-head-right .panda-notify-root .panda-notify-btn {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .panda-notify-btn,
    .panda-notify-panel,
    .panda-notify-item {
        transition: none;
    }
}
