/* Notification bell */
.bell-btn {
  position: relative; width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border-radius: 999px;
  background: linear-gradient(180deg, #2a2a33, #1a1a21); border: 1px solid var(--line-2); color: var(--ink);
}
.bell-btn:hover, .bell-btn.is-open { border-color: var(--yellow); }
.bell-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform-origin: 50% 15%; }
.bell-btn.has-new svg { animation: bell-ring 3.2s ease-in-out 1s infinite; }
@keyframes bell-ring { 0%, 86%, 100% { transform: rotate(0); } 88% { transform: rotate(14deg); } 91% { transform: rotate(-12deg); } 94% { transform: rotate(8deg); } 97% { transform: rotate(-4deg); } }
.bell-dot {
  position: absolute; top: -4px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; font: 800 10.5px/1 var(--font); color: var(--yellow-ink); background: var(--yellow);
  box-shadow: 0 0 0 2px var(--bg);
}
.bell-dot[hidden] { display: none; }

.bell-panel {
  position: fixed; z-index: 1000; width: 380px; max-height: min(620px, calc(100vh - 90px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 18px;
  background: rgba(18, 18, 23, .97); border: 1px solid var(--line-2); box-shadow: var(--shadow-2);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: bell-in .18s var(--ease);
}
.bell-panel[hidden] { display: none; }
@keyframes bell-in { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 639px) {
  .bell-panel { left: 8px; right: 8px; top: 64px; width: auto; max-height: calc(100svh - 80px); }
}
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 18px; border-bottom: 1px solid var(--line); }
.bell-head strong { font-size: 16px; }
.bell-x { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; background: transparent; border: 0; color: var(--ink-2); }
.bell-x:hover { color: var(--ink); background: var(--panel-2); }
.bell-x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.bell-list { overflow-y: auto; overscroll-behavior: contain; }
.bell-list ul { list-style: none; margin: 0; padding: 6px; }
.bell-list > ul > li > a, .bell-list > ul > li:not(.bell-top) > div { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start; padding: 10px 10px; border-radius: 12px; color: var(--ink-2); text-decoration: none; }
.bell-list > ul > li > a:hover { background: var(--panel-2); }
.bell-list li.is-new > a, .bell-list li.is-new:not(.bell-top) > div { background: rgba(255, 191, 58, .06); }
.bell-ava { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); color: var(--ink); font-weight: 800; overflow: visible; }
.bell-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.bell-kind { position: absolute; right: -4px; bottom: -4px; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 0 2px #121217; }
.bell-kind svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.k-like { background: #ff4d6d; } .k-like svg { fill: #fff; stroke: none; }
.k-comment { background: #4f8cff; }
.k-tip { background: var(--yellow); } .k-tip svg { stroke: var(--yellow-ink); }
.k-sale { background: #2fbf71; }
.k-follow { background: #9b7bff; }
.bell-txt { font-size: 14px; line-height: 1.4; min-width: 0; }
.bell-txt b { color: var(--ink); font-weight: 700; }
.bell-txt q { display: block; margin-top: 3px; color: var(--ink-3); quotes: "“" "”"; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-txt time, .bell-top time { display: block; margin-top: 3px; font-size: 12px; color: var(--muted-2); }
.bell-coin { width: 15px; height: 15px; vertical-align: -2px; margin: 0 2px 0 3px; }
.bell-empty { margin: 0; padding: 44px 20px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 10px; }
.bell-empty svg { width: 30px; height: 30px; fill: none; stroke: var(--muted-2); stroke-width: 1.6; }

/* the Top Contributor notification */
.bell-top { padding: 4px; }
.bell-top-in {
  position: relative; overflow: hidden; padding: 18px 18px 16px; border-radius: 14px; color: var(--ink-2);
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 191, 58, .22), transparent 55%), linear-gradient(160deg, #241c0c, #15120c 55%, #121014);
  border: 1px solid rgba(255, 199, 90, .45);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .18);
}
.bell-top-in::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 236, 190, .14) 50%, transparent 65%); background-size: 260% 100%; animation: tc-sheen 4.5s ease-in-out infinite; }
.bell-top-in strong { display: block; margin: 12px 0 8px; font-size: 18px; color: #fff3d6; }
.bell-top-in p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.45; }
.bell-top-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px; border-radius: 999px; font: 800 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: #2a1a00; background: linear-gradient(135deg, #fff1c4, #ffcf5c 40%, #f0a92c 75%, #ffe39a); box-shadow: 0 4px 16px rgba(255, 180, 60, .35); }
.bell-top-badge svg { width: 15px; height: 15px; fill: #2a1a00; stroke: #2a1a00; stroke-width: 1.2; stroke-linejoin: round; }
.bell-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.bell-perks li { position: relative; padding-left: 24px; color: var(--ink); font-size: 14px; }
.bell-perks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg, #ffe39a, #f0a92c); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8'/%3E%3C/svg%3E"); }
.bell-perks li::after { content: ""; position: absolute; left: 5px; top: 5.5px; width: 6px; height: 3.5px; border-left: 2px solid #2a1a00; border-bottom: 2px solid #2a1a00; transform: rotate(-45deg); }
.bell-top-go { display: inline-flex; margin-top: 14px; padding: 10px 16px; border-radius: 999px; font-weight: 800; font-size: 13.5px; color: var(--yellow-ink); background: var(--yellow); text-decoration: none; }
.bell-top-go:hover { filter: brightness(1.07); }

/* the Top Contributor badge, wherever a name appears (shared by the community and the profile) */
.tc-mark { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 4px; vertical-align: -3px; border-radius: 50%; background: linear-gradient(135deg, #fff1c4, #ffcf5c 45%, #e89a1f); box-shadow: 0 0 10px rgba(255, 191, 58, .45); }
.tc-mark svg { width: 11px; height: 11px; fill: #2a1a00; stroke: #2a1a00; stroke-width: 1; stroke-linejoin: round; }
.tc-badge {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px;
  font: 800 11.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #2a1a00;
  background: linear-gradient(135deg, #fff1c4, #ffcf5c 40%, #f0a92c 75%, #ffe39a);
  box-shadow: 0 6px 22px rgba(255, 180, 60, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.tc-badge svg { width: 16px; height: 16px; fill: #2a1a00; stroke: #2a1a00; stroke-width: 1.2; stroke-linejoin: round; }
.tc-badge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); background-size: 260% 100%; animation: tc-sheen 3.6s ease-in-out infinite; }
@keyframes tc-sheen { 0% { background-position: 130% 0; } 60%, 100% { background-position: -130% 0; } }
.tc-ring { position: relative; }
.tc-ring::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; padding: 3px; background: conic-gradient(from 200deg, #fff1c4, #ffcf5c, #e89a1f, #ffe39a, #fff1c4); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .bell-btn.has-new svg, .tc-badge::after, .bell-top-in::after { animation: none; }
}

.bell-sys { background: rgba(255, 191, 58, .15); color: var(--yellow); font-size: 20px; border: 1px solid rgba(255, 191, 58, .4); }
