/* ================= Header: bell, streak, email banner ================= */
.bell {
  position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border-radius: 9px; background: transparent; border: 1px solid var(--border); color: var(--muted);
}
.bell:hover { color: var(--text); border-color: var(--border-strong, var(--muted)); }
.bell-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: grid; place-items: center; font-size: 10px; font-weight: 800; background: var(--danger); color: #fff;
}
.streak-pill { margin-left: .35rem; padding: 0 .35rem; border-radius: 5px; font-size: .68rem; font-weight: 800; background: rgba(0, 0, 0, .2); }
.email-banner {
  max-width: 1200px; margin: .8rem auto 0; padding: .6rem 1rem; border-radius: 10px;
  display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .35); color: #fde68a; font-size: .9rem;
}
#banner { padding: 0 16px; }
#banner:empty { display: none; }
.email-banner a { color: #fde68a; font-weight: 700; }
.plink { color: inherit; text-decoration: none; }
.plink:hover { text-decoration: underline; }
.link-btn { background: none; border: none; padding: 0; color: var(--accent-strong); font-weight: 600; cursor: pointer; text-decoration: underline; }
.forgot-link { display: block; margin: .4rem 0 0 auto; font-size: .85rem; }

/* ================= Notifications panel ================= */
.notif-panel {
  position: fixed; top: 64px; right: 16px; z-index: 50; width: min(380px, calc(100vw - 32px)); max-height: 70vh;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface-solid, #102218); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
}
.notif-head { padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.notif-list { overflow-y: auto; }
.notif { display: flex; gap: .7rem; padding: .7rem 1rem; color: var(--text); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.notif:hover { background: rgba(255, 255, 255, .04); }
.notif.unread { background: rgba(34, 197, 94, .06); }
.notif-ico { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; font-weight: 800; background: rgba(255, 255, 255, .07); color: var(--muted); }
.notif-bet_won .notif-ico, .notif-achievement .notif-ico { background: rgba(34, 197, 94, .15); color: #4ade80; }
.notif-bet_lost .notif-ico { background: rgba(248, 113, 113, .15); color: #f87171; }
.notif-rank .notif-ico, .notif-level .notif-ico { background: rgba(250, 204, 21, .15); color: #facc15; }
.notif-gift .notif-ico { background: rgba(96, 165, 250, .15); color: #93c5fd; }
.notif-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.notif-text b { font-size: .9rem; }
.notif-time { font-size: .72rem; color: var(--muted); }
.notif-empty { padding: 1.2rem 1rem; }

/* ================= Profile ================= */
.profile-head { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; border-left: 3px solid var(--tier) !important; }
.profile-main { flex: 1; min-width: 0; }
.profile-name { margin: 0 0 .3rem; font-size: 1.8rem; }
.profile-meta { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }
.profile-meta a { color: inherit; }
.profile-actions { display: flex; gap: .4rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.profile-stats .stat b small { font-size: .7rem; font-weight: 600; }
.form-row { display: flex; gap: 3px; margin-top: .35rem; flex-wrap: wrap; }
.form-chip { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.form-chip.w { background: rgba(34, 197, 94, .2); color: #4ade80; }
.form-chip.l { background: rgba(248, 113, 113, .2); color: #f87171; }

.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.ach { display: flex; gap: .7rem; padding: .65rem .75rem; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--border); opacity: .55; }
.ach.on { opacity: 1; border-color: rgba(250, 204, 21, .4); background: rgba(250, 204, 21, .06); }
.ach-icon { width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 1.05rem; background: rgba(255, 255, 255, .06); color: var(--muted); }
.ach.on .ach-icon { background: rgba(250, 204, 21, .18); color: #facc15; }
.ach-reward { margin-top: .2rem; color: var(--muted); }
.ach.on .ach-reward { color: #fde68a; }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.mini-ticket { padding: .7rem .8rem; border-radius: 10px; background: rgba(0, 0, 0, .2); border: 1px solid var(--border); border-left: 3px solid var(--muted); }
.mini-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.mini-leg { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 .5rem; padding: .3rem .4rem; margin-top: .2rem; border-radius: 6px; font-size: .85rem; }
.mini-leg > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-leg > .muted { grid-column: 1; }
.mini-leg > b { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.mini-foot { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: .5rem; font-size: .78rem; color: var(--muted); }
.mini-foot b { color: var(--text); }

/* ================= Settings & legal ================= */
.narrow { max-width: 440px; margin: 0 auto; }
.danger-zone { border-color: rgba(248, 113, 113, .35) !important; }
.btn-danger { background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .5); color: #fca5a5; }
.btn-danger:hover { background: rgba(248, 113, 113, .2); }
.legal { max-width: 760px; line-height: 1.65; }
.legal h2 { margin-top: 1.4rem; font-size: 1.05rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin: .25rem 0; }

/* ================= Live ================= */
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: .35rem; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); animation: live-pulse 1.6s infinite; vertical-align: middle; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
.live-head { display: flex; align-items: center; color: #fca5a5 !important; }
.match-live { border-color: rgba(239, 68, 68, .35) !important; }
.live-score { color: #fca5a5; }
.live-min { color: #fca5a5 !important; font-weight: 700; }
.leg-live-winning { background: rgba(34, 197, 94, .06); border-left-color: rgba(34, 197, 94, .6) !important; }
.leg-live-winning .leg-tag { color: #4ade80; }
.leg-live-losing { background: rgba(248, 113, 113, .06); border-left-color: rgba(248, 113, 113, .6) !important; }
.leg-live-losing .leg-tag { color: #f87171; }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

@media (max-width: 520px) {
  .profile-name { font-size: 1.4rem; }
  .notif-panel { top: 110px; }
}

/* ================= Invite friends ================= */
.invite-hero h1 { margin-bottom: .3rem; }
.invite-link { display: flex; gap: .5rem; margin: 1rem 0 .7rem; }
.invite-link input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; }
.share-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.invite-rules { padding-left: 1.2rem; line-height: 1.8; }
.invite-note { margin: .6rem 0 0; padding: .55rem .75rem; border-radius: 8px; font-size: .9rem; background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .35); }
.badge.open { background: rgba(96, 165, 250, .14); color: #93c5fd; }
