:root {
    --notif-gold: #FFD700;
    --notif-magenta: #D633FF;
    --notif-green: #45D483;
    --notif-blue: #4EA5FF;
    --notif-red: #FF4D5F;
}

#notificationBackdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: block;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition: opacity 280ms ease, visibility 280ms ease, backdrop-filter 280ms ease;
}

#notificationBackdrop.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#notificationDropdown {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 0;
    top: auto;
    z-index: 10001;
    width: min(520px, calc(100vw - 16px));
    max-height: min(78vh, 720px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    color: #fff;
    background:
        radial-gradient(circle at 16% 0%, rgba(255, 215, 0, 0.14), transparent 34%),
        linear-gradient(145deg, rgba(18, 18, 22, 0.9), rgba(5, 5, 8, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -20px 80px rgba(0, 0, 0, 0.62), 0 0 50px rgba(255, 215, 0, 0.08);
    transform: translate3d(-50%, 110%, 0) scale(0.98);
    transition: transform 520ms cubic-bezier(0.18, 0.9, 0.18, 1.04), opacity 260ms ease, visibility 260ms ease;
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
}

#notificationDropdown.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(-50%, 0, 0) scale(1);
}

@media (min-width: 860px) {
    #notificationDropdown {
        bottom: 22px;
        width: min(460px, calc(100vw - 44px));
        border-radius: 28px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        transform: translate3d(-50%, 34px, 0) scale(0.98);
    }

    #notificationDropdown.open {
        transform: translate3d(-50%, 0, 0) scale(1);
    }
}

#notificationDropdown .dropdown-handle {
    width: 42px;
    height: 5px;
    flex: 0 0 auto;
    margin: 10px auto 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    cursor: grab;
}

.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px 10px;
    border: 0;
}

.dropdown-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.22rem;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: 0;
}

.dropdown-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#notificationDropdown .header-icon-btn,
#notificationDropdown .mark-all-read-btn {
    min-width: 36px;
    min-height: 36px;
    border: 0;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

#notificationDropdown .header-icon-btn {
    display: inline-grid;
    place-items: center;
    padding: 0;
}

#notificationDropdown .header-icon-btn i {
    font-size: 20px;
}

#notificationDropdown .mark-all-read-btn {
    padding: 0 12px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

#notificationDropdown .header-icon-btn:hover,
#notificationDropdown .mark-all-read-btn:hover {
    color: #090909;
    background: var(--notif-gold);
    transform: translateY(-1px);
}

#notificationDropdown .mark-all-read-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

#notificationDropdown #notificationList {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0 0 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 215, 0, 0.32) transparent;
}

#notificationDropdown #notificationList::-webkit-scrollbar {
    width: 8px;
}

#notificationDropdown #notificationList::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 215, 0, 0.28);
}

.notification-group-header {
    list-style: none;
    padding: 12px 18px 13px;
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.notification-item {
    position: relative;
    overflow: hidden;
    list-style: none;
    margin: 0;
    padding: 0;
    background: transparent;
}

#notificationDropdown.open .notification-item {
    animation: notif-card-enter 480ms cubic-bezier(0.18, 0.9, 0.18, 1.04) both;
}

@keyframes notif-card-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notif-swipe-bg {
    position: absolute;
    inset: 0 12px 10px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
    color: #fff;
    border-radius: 22px;
    background: linear-gradient(90deg, rgba(255, 77, 95, 0.76), rgba(255, 77, 95, 0.1));
}

.notif-swipe-bg i {
    font-size: 22px;
}

.notif-swipe-container {
    position: relative;
    z-index: 2;
    width: 100%;
    background: transparent;
    user-select: none;
    transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.notif-card {
    position: relative;
    overflow: hidden;
    margin: 0 12px 10px;
    padding: 14px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 14% 0%, rgba(255, 215, 0, 0.08), transparent 36%),
        linear-gradient(145deg, rgba(9, 9, 20, 0.98), rgba(0, 0, 16, 0.94));
    border: 1px solid rgba(255, 215, 0, 0.14);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), 0 0 26px var(--notif-glow, rgba(255, 215, 0, 0.08));
    backdrop-filter: blur(20px) saturate(145%);
    -webkit-backdrop-filter: blur(20px) saturate(145%);
}

.notif-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 8% 12%, var(--notif-glow, rgba(255, 215, 0, 0.14)), transparent 38%);
}

.notification-item.unread .notif-card::after {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--notif-accent, var(--notif-gold));
    box-shadow: 0 0 16px var(--notif-glow, rgba(255, 215, 0, 0.5));
}

.notif-card-main {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.notification-clickable-area {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.notif-avatar,
.notif-icon-avatar,
.prox-toast-avatar,
.prox-toast-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    flex: 0 0 auto;
}

.notif-avatar,
.prox-toast-avatar {
    display: block;
    object-fit: cover;
    color: transparent;
    font-size: 0;
    background: #000010;
    box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.18), 0 0 24px var(--notif-glow, rgba(255, 215, 0, 0.14));
}

.notif-icon-avatar,
.prox-toast-icon {
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--notif-accent, var(--notif-gold));
    background: #000010;
    box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.18), 0 0 24px var(--notif-glow, rgba(255, 215, 0, 0.14));
}

.notif-icon-avatar i,
.prox-toast-icon i {
    font-family: 'Material Icons Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 26px;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    font-feature-settings: 'liga';
}

.notif-copy,
.prox-toast-copy {
    min-width: 0;
}

.notif-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 7px;
    color: var(--notif-accent, var(--notif-gold));
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.notif-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--notif-accent, var(--notif-gold));
    box-shadow: 0 0 14px var(--notif-glow, rgba(255, 215, 0, 0.3));
}

.notif-title,
.prox-toast-title {
    margin: 0;
    color: #fff;
    font-size: 0.96rem;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0;
}

.notif-message,
.prox-toast-body {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    line-height: 1.35;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.notif-time,
.prox-toast-meta {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.74rem;
    line-height: 1;
}

.notif-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.notif-meta-chip {
    border-radius: 999px;
    padding: 5px 8px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.72rem;
    font-weight: 600;
}

.notif-actions,
.prox-toast-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.notif-action-btn,
.notif-reply-btn,
.prox-toast-action {
    border: 0;
    border-radius: 999px;
    padding: 7px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.notif-action-btn.primary,
.prox-toast-action.primary,
.quick-reply-send-btn {
    color: #090909;
    background: linear-gradient(135deg, var(--notif-accent, var(--notif-gold)), #fff1a8);
}

.notif-action-btn:hover,
.notif-reply-btn:hover,
.prox-toast-action:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.16);
}

.quick-reply-area {
    display: none;
    gap: 8px;
    padding: 12px 14px 14px 82px;
}

.quick-reply-area.active {
    display: flex;
    animation: notif-card-enter 280ms ease both;
}

.quick-reply-input {
    min-width: 0;
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 9px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.quick-reply-input:focus {
    border-color: var(--notif-accent, var(--notif-gold));
}

.quick-reply-send-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.quick-reply-send-btn i {
    font-size: 17px;
    line-height: 1;
}

.quick-reply-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.notification-empty-state {
    padding: 44px 24px 50px;
    text-align: center;
    color: rgba(255, 255, 255, 0.62);
}

.notification-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    color: var(--notif-gold);
    background: rgba(255, 215, 0, 0.08);
    box-shadow: 0 0 34px rgba(255, 215, 0, 0.12);
}

.notification-empty-icon i {
    font-size: 28px;
}

.notification-empty-state h4 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.notification-empty-state p {
    margin: 8px 0 0;
    font-size: 0.88rem;
}

#notificationDropdown .dropdown-footer {
    padding: 10px 16px 16px !important;
    border-top: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px;
}

#clearAllNotifsBtn,
#closeNotifsBtn {
    border: 0 !important;
    border-radius: 999px !important;
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease, opacity 180ms ease;
}

#clearAllNotifsBtn {
    color: #fff !important;
    background: rgba(255, 77, 95, 0.18) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 77, 95, 0.28);
}

#clearAllNotifsBtn:not(:disabled):hover {
    color: #fff !important;
    background: var(--notif-red) !important;
    transform: translateY(-1px);
}

#clearAllNotifsBtn:disabled,
#clearAllNotifsBtn.is-disabled {
    opacity: 0.42;
    color: rgba(255, 255, 255, 0.45) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: none;
    cursor: not-allowed !important;
}

#closeNotifsBtn {
    color: #090909 !important;
    background: var(--notif-gold) !important;
}

#inAppNotification {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: 50%;
    width: min(430px, calc(100vw - 24px));
    z-index: 2147483647;
    opacity: 0;
    pointer-events: none;
    color: #fff;
    transform: translate3d(-50%, -130%, 0) scale(0.98);
    transition: transform 680ms cubic-bezier(0.18, 0.9, 0.18, 1.08), opacity 260ms ease;
    touch-action: pan-y;
}

#inAppNotification.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(-50%, 0, 0) scale(1);
}

#inAppNotification.clickable {
    cursor: pointer;
}

#inAppNotification.prox-dynamic-toast.clickable {
    background: transparent !important;
    border-left: 0 !important;
}

#inAppNotification.prox-dynamic-toast.clickable::after {
    content: none !important;
}

#inAppNotification.visible:not(.prox-dynamic-toast),
#inAppNotification.show:not(.prox-dynamic-toast) {
    padding: 12px 16px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(20, 20, 24, 0.86), rgba(8, 8, 12, 0.78));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 34px rgba(255, 215, 0, 0.12);
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.prox-toast-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 10px;
    background: linear-gradient(145deg, rgba(20, 20, 24, 0.84), rgba(8, 8, 12, 0.72));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62), 0 0 42px var(--notif-glow, rgba(255, 215, 0, 0.16));
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
}

.prox-toast-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 18% 10%, var(--notif-glow, rgba(255, 215, 0, 0.18)), transparent 34%);
}

.prox-toast-inner {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.in-app-notif-close {
    display: none !important;
}

.notif-kind-match {
    --notif-accent: var(--notif-gold);
    --notif-glow: rgba(255, 215, 0, 0.26);
}

.notif-kind-message {
    --notif-accent: var(--notif-magenta);
    --notif-glow: rgba(214, 51, 255, 0.24);
}

.notif-kind-checkin {
    --notif-accent: var(--notif-green);
    --notif-glow: rgba(69, 212, 131, 0.22);
}

.notif-kind-venue {
    --notif-accent: var(--notif-blue);
    --notif-glow: rgba(78, 165, 255, 0.22);
}

.notif-kind-urgent {
    --notif-accent: var(--notif-red);
    --notif-glow: rgba(255, 77, 95, 0.28);
}

.notif-kind-info {
    --notif-accent: var(--notif-gold);
    --notif-glow: rgba(255, 215, 0, 0.16);
}

.nav-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid var(--bg, #000010);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #090909;
    background: var(--notif-gold);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.28);
}

.superlike-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--notif-magenta), var(--notif-gold));
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(214, 51, 255, 0.5);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.superlike-badge i {
    font-size: 12px;
}
