/* O Jailbreaks — the members pages: the leaderboard (leaderboard/), help tickets (support/) and the forum (forum/).
   Builds on styles.css: colours, header, buttons, the lock panel (.pp-gate) and the footer all come from there. */

.mb { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; padding: calc(var(--header-h) + 56px) var(--gutter) 0; }
.mb-page::before { /* one soft glow, like the home screen */
  content: ''; position: fixed; z-index: 0; top: -20vh; left: 50%; width: min(1100px, 120vw); aspect-ratio: 1; translate: -50% 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(47, 107, 255, .16), transparent 70%);
}

/* Entrance: everything rises in, one after another */
.mb-in { animation: mb-up .9s var(--ease) both; animation-delay: calc(var(--d, 0) * 90ms + 80ms); }
@keyframes mb-up { from { opacity: 0; transform: translateY(22px); } }

.mb-hero { margin-bottom: 34px; }
.mb-title { margin: 22px 0 16px; font-size: clamp(60px, 8vw, 112px); }
.mb-accent { background: linear-gradient(180deg, #8fb6ff, var(--blue) 85%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mb-lede { max-width: 58ch; font-size: 16.5px; line-height: 1.7; color: var(--muted); }

/* Who's logged in */
.mb-who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; font-size: 14px; color: var(--text-2); }
.mb-who img { width: 30px; height: 30px; border-radius: 50%; background: var(--discord); }
.mb-who b { color: #fff; font-weight: 600; }
.mb-who .pp-mbtn { height: 34px; }

/* The leaderboard */
.mb-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.mb-tabs { display: inline-flex; padding: 5px; border-radius: 15px; border: 1px solid var(--line); background: rgba(10, 16, 30, .6); }
.mb-tabs button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; font: 600 13.5px var(--font); color: var(--muted); transition: color .25s, background .25s, box-shadow .25s; }
.mb-tabs button .ico { font-size: 16px; }
.mb-tabs button:hover { color: var(--text); }
.mb-tabs button[aria-pressed="true"] { color: #061022; background: linear-gradient(180deg, #f6f9ff, #d6e3ff); box-shadow: 0 8px 22px -8px rgba(150, 185, 255, .8), inset 0 1px 0 #fff; }

.mb-you {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px 18px; border-radius: 16px;
  border: 1px solid rgba(79, 141, 255, .45); background: linear-gradient(100deg, rgba(47, 107, 255, .16), rgba(47, 107, 255, .04) 70%);
}
.mb-you-rank { font: 900 30px/1 var(--display); color: #fff; min-width: 2.2ch; }
.mb-you p { font-size: 14.5px; color: var(--text-2); }
.mb-you p b { color: #fff; font-weight: 600; }
.mb-you p small { margin-left: 4px; color: var(--muted); }

.mb-board { display: grid; gap: 6px; }
.mb-row {
  display: grid; grid-template-columns: 42px 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(10, 16, 30, .55); animation: mb-row .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms);
}
@keyframes mb-row { from { opacity: 0; transform: translateY(8px); } }
.mb-rank { font: 800 20px/1 var(--display); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.mb-row.top .mb-rank { font-size: 24px; }
.mb-row.r1 { border-color: rgba(245, 197, 74, .5); background: linear-gradient(100deg, rgba(245, 197, 74, .12), rgba(10, 16, 30, .55) 60%); }
.mb-row.r2 { border-color: rgba(200, 212, 230, .4); background: linear-gradient(100deg, rgba(200, 212, 230, .09), rgba(10, 16, 30, .55) 60%); }
.mb-row.r3 { border-color: rgba(214, 140, 84, .45); background: linear-gradient(100deg, rgba(214, 140, 84, .1), rgba(10, 16, 30, .55) 60%); }
.mb-row.is-you { border-color: rgba(79, 141, 255, .65); box-shadow: 0 0 0 1px rgba(79, 141, 255, .35); }
.mb-av { width: 40px; height: 40px; border-radius: 50%; background: var(--panel); object-fit: cover; }
.mb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.mb-val { font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mb-val small { margin-left: 5px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.mb-row.is-loading { height: 62px; animation: mb-pulse 1.4s ease-in-out infinite alternate; }
@keyframes mb-pulse { from { opacity: .35; } to { opacity: .8; } }
.mb-empty { padding: 34px 20px; border-radius: 16px; border: 1px dashed var(--line-2); text-align: center; color: var(--muted); }
.mb-fine { display: grid; gap: 4px; margin-top: 16px; font-size: 13px; color: var(--dim); }

/* The help ticket form */
.mb-panel { padding: 24px; border-radius: 22px; border: 1px solid var(--line-2); background: linear-gradient(160deg, rgba(17, 26, 46, .72), rgba(7, 11, 20, .82)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.mb-form { display: grid; gap: 20px; }
.mb-field { display: grid; gap: 8px; }
.mb-field > span { font: 600 14.5px var(--font); color: #fff; }
.mb-field > small { margin-top: -4px; font-size: 13px; color: var(--muted); }
.mb-field select, .mb-field textarea {
  width: 100%; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(6, 10, 20, .8); color: var(--text); font: 400 15px/1.55 var(--font);
  transition: border-color .25s, box-shadow .25s;
}
.mb-field select { height: 50px; padding: 0 44px 0 16px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9cbff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; }
.mb-field select option { background: #0a101d; color: var(--text); }
.mb-field textarea { min-height: 150px; padding: 14px 16px; resize: vertical; }
.mb-field select:focus, .mb-field textarea:focus { outline: 0; border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(47, 107, 255, .15); }
.mb-count { justify-self: end; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.mb-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.mb-submit p { flex: 1 1 260px; font-size: 13.5px; color: var(--muted); }
.mb-form .btn[disabled] { opacity: .6; pointer-events: none; }
.mb-done { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pp-gate.is-ok .pp-lock-ico { border-color: rgba(71, 230, 161, .45); background: rgba(71, 230, 161, .12); color: var(--green); box-shadow: 0 0 28px -8px rgba(71, 230, 161, .6); }
.mb .pp-gate { margin-bottom: 18px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Help tickets: what it's about, then its questions */
.tk-types { border: 0; margin: 0; padding: 0; min-width: 0; }
.tk-step { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 0; font: 700 16px var(--font); color: #fff; }
.tk-step b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(47, 107, 255, .2); box-shadow: inset 0 0 0 1px rgba(79, 141, 255, .5); font: 700 12.5px var(--mono); color: #a9cbff; }
.tk-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tk-type {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(6, 10, 20, .6); transition: border-color .25s, background .25s, box-shadow .25s, transform .25s var(--ease);
}
.tk-type input { position: absolute; opacity: 0; pointer-events: none; }
.tk-type:hover { border-color: var(--line-3); background: rgba(47, 107, 255, .06); transform: translateY(-1px); }
.tk-type:has(input:focus-visible) { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.tk-type:has(input:checked) { border-color: rgba(79, 141, 255, .75); background: linear-gradient(140deg, rgba(47, 107, 255, .22), rgba(47, 107, 255, .05)); box-shadow: 0 14px 34px -18px rgba(47, 107, 255, .9); }
.tk-type-emoji { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: rgba(255, 255, 255, .05); font-size: 22px; }
.tk-type-text { display: grid; gap: 3px; }
.tk-type-text b { font: 600 15px var(--font); color: #fff; }
.tk-type-text small { font-size: 12.8px; line-height: 1.4; color: var(--muted); }
.tk-fields { display: grid; gap: 20px; padding-top: 24px; border-top: 1px solid var(--line); }
.tk-fields .tk-step { margin-bottom: -4px; }
.tk-questions { display: grid; gap: 20px; }
.tk-optional { font-weight: 500; font-size: 12.5px; color: var(--dim); }
.mb-field input[type="text"] {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(6, 10, 20, .8); color: var(--text);
  font: 400 15px var(--font); transition: border-color .25s, box-shadow .25s;
}
.mb-field input[type="text"]::placeholder, .mb-field textarea::placeholder { color: var(--dim); }
.mb-field input[type="text"]:focus { outline: 0; border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(47, 107, 255, .15); }
.tk-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-pill { position: relative; cursor: pointer; }
.tk-pill input { position: absolute; opacity: 0; pointer-events: none; }
.tk-pill span { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(6, 10, 20, .7); font: 500 14px var(--font); color: var(--text-2); transition: border-color .25s, background .25s, color .25s; }
.tk-pill:hover span { border-color: var(--line-3); color: #fff; }
.tk-pill input:focus-visible + span { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.tk-pill input:checked + span { border-color: rgba(79, 141, 255, .75); background: rgba(47, 107, 255, .18); color: #fff; }
.tk-copy { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; line-height: 1.5; color: var(--text-2); cursor: pointer; }
.tk-copy input { flex-shrink: 0; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue); cursor: pointer; }
.tk-closed { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 18px; border-color: rgba(71, 230, 161, .35); background: rgba(71, 230, 161, .06); }
.tk-closed .ico { font-size: 17px; color: var(--green); margin-right: 4px; }

/* Help tickets: their open ticket, live */
.tk-chat { display: grid; gap: 0; }
.tk-chat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 18px; margin-bottom: 14px; padding: 18px 22px; }
.tk-chat-who { display: grid; gap: 4px; min-width: 0; }
.tk-kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tk-live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(71, 230, 161, .6); animation: tk-live 2s ease-out infinite; }
@keyframes tk-live { 70% { box-shadow: 0 0 0 8px rgba(71, 230, 161, 0); } 100% { box-shadow: 0 0 0 0 rgba(71, 230, 161, 0); } }
.tk-chat-title { font: 800 clamp(22px, 3.2vw, 30px)/1.2 var(--font); letter-spacing: -.02em; color: #fff; }
.tk-meta { font-size: 13.5px; color: var(--muted); }
.tk-chat-head .pp-mbtn { height: 40px; }
.tk-msgs { max-height: min(64vh, 680px); overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 2px 0; scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
.tk-chat .fm-reply { margin-top: 14px; }
.tk-chat .tk-copy { margin-top: 14px; }
.fm-msg.is-mine { border-color: rgba(79, 141, 255, .35); background: linear-gradient(140deg, rgba(47, 107, 255, .1), rgba(10, 16, 30, .55) 70%); }

.mb-footer { margin-top: 110px; }
.mb-footer .footer-bottom a { color: var(--text-2); transition: color .2s; }
.mb-footer .footer-bottom a:hover { color: #fff; }

@media (max-width: 680px) {
  .mb { padding-top: calc(var(--header-h) + 28px); }
  .mb-controls { flex-direction: column; align-items: stretch; }
  .mb-tabs { display: flex; }
  .mb-tabs button { flex: 1; justify-content: center; padding: 0 10px; }
  .mb-row { grid-template-columns: 30px 34px minmax(0, 1fr) auto; gap: 10px; padding: 9px 12px; }
  .mb-av { width: 34px; height: 34px; }
  .mb-panel { padding: 18px; }
  .mb-submit .btn { width: 100%; justify-content: space-between; }
  .tk-type-grid { grid-template-columns: 1fr; }
  .tk-chat-head { padding: 16px; }
  .tk-chat-head .pp-mbtn { width: 100%; justify-content: center; }
  .tk-msgs { max-height: 70vh; }
  .mb-footer .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
}
