/* ===== Accounts, profile, leaderboard ===== */
.offline-mode [data-nav="leaderboard"] { display: none; }
.auth-box { display: flex; align-items: center; position: relative; }
.btn-discord { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: #5865F2; color: #fff !important; font-weight: 600; font-size: 13.5px; text-decoration: none !important; transition: background .2s, transform .2s; white-space: nowrap; }
.btn-discord:hover { background: #4752c4; transform: translateY(-1px); }
.btn-discord.big { padding: 13px 24px; font-size: 15px; border-radius: 12px; margin-top: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; position: relative; }
.user-chip:hover { border-color: var(--primary); }
.user-chip img { width: 30px; height: 30px; border-radius: 50%; }
.uc-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-lv, .lvb { --c: #888; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--c); color: #fff; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; position: absolute; right: 2px; top: 2px; box-shadow: 0 0 0 2px var(--surface); }
.sync-dot[data-s="saving"] { background: #f59e0b; animation: cdiBlink .8s step-end infinite alternate; }
.sync-dot[data-s="err"] { background: #ef4444; }
@media (max-width: 760px) { .uc-name { display: none; } .btn-discord span { display: none; } }
.user-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 80; animation: fade .18s; }
.um-head { display: flex; gap: 10px; align-items: center; padding: 8px; }
.um-head img { width: 42px; height: 42px; border-radius: 50%; }
.um-head small { display: block; color: var(--muted); font-size: 12.5px; }
.um-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 8px; }
.um-stats div { background: var(--surface-2); border-radius: 10px; padding: 8px 4px; text-align: center; }
.um-stats b { display: block; font-family: var(--font-head); font-size: 15px; }
.um-stats span { font-size: 11px; color: var(--muted); }
.user-menu a, .user-menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 9px; border: none; background: none; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-decoration: none !important; }
.user-menu a:hover, .user-menu button:hover { background: var(--primary-soft); color: var(--primary); }

.login-card { max-width: 520px; margin: 40px auto; text-align: center; padding: 40px 34px; }
.lc-icon { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px; display: grid; place-items: center; background: #5865F2; color: #fff; }
.lc-icon svg { width: 34px; height: 34px; }
.welcome-strip { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 20px; text-decoration: none !important; color: inherit; }
.welcome-strip img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 3px var(--primary-soft); }

/* profile */
.profile-hero { --c: #d90429; display: flex; align-items: center; gap: 24px; padding: 34px 38px; border-radius: 24px; color: #fff; margin-bottom: 22px; position: relative; overflow: hidden; background: linear-gradient(135deg, #111114 10%, color-mix(in srgb, var(--c) 70%, #000) 60%, var(--c)); box-shadow: 0 20px 50px color-mix(in srgb, var(--c) 30%, transparent); }
.profile-hero::after { content: ""; position: absolute; width: 340px; height: 340px; right: -100px; top: -160px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.ph-avatar { width: 104px; height: 104px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .85); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: pop .7s cubic-bezier(.34, 1.56, .64, 1); }
.ph-info h1 { font-size: 34px; margin: 4px 0; }
.ph-user { opacity: .8; font-size: 14px; }
.ph-level { margin-left: auto; text-align: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); border-radius: 18px; padding: 14px 22px; backdrop-filter: blur(6px); position: relative; z-index: 1; }
.ph-level b { font-family: var(--font-head); font-size: 42px; display: block; line-height: 1; }
.ph-level span { font-size: 12px; opacity: .85; }
@media (max-width: 700px) { .profile-hero { flex-direction: column; text-align: center; } .ph-level { margin: 0; } }
.pstat { padding: 22px 22px; }
.ps-icon { font-size: 22px; }
.ps-val { font-family: var(--font-head); font-size: 30px; font-weight: 700; margin: 6px 0 2px; letter-spacing: -.5px; }
.ps-label { font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.prof-settings { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--border); cursor: pointer; transition: .25s; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: .25s; }
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch input:checked + span::before { transform: translateX(20px); }

/* leaderboard */
.my-rank { padding: 14px 20px; margin-bottom: 26px; border-left: 4px solid var(--primary); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 18px; margin: 10px 0 30px; }
.pod { display: flex; flex-direction: column; align-items: center; text-decoration: none !important; color: inherit; width: 180px; animation: podIn .9s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i) * .15s + .1s); }
@keyframes podIn { from { opacity: 0; transform: translateY(60px); } }
.pod img { width: 76px; height: 76px; border-radius: 50%; border: 4px solid var(--surface); box-shadow: 0 8px 22px rgba(0, 0, 0, .2); position: relative; z-index: 1; transition: transform .3s; }
.pod:hover img { transform: scale(1.08) rotate(-4deg); }
.pod-1 img { width: 96px; height: 96px; border-color: #f5b400; }
.pod-crown { font-size: 26px; animation: bob 2.4s ease-in-out infinite; }
.pod-1 .pod-crown { font-size: 34px; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.pod-name { font-weight: 700; margin-top: 8px; text-align: center; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-val { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.pod-step { width: 100%; border-radius: 16px 16px 6px 6px; display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-size: 36px; font-weight: 700; transform-origin: bottom; animation: rise 1s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i) * .15s + .3s); }
.pod-1 .pod-step { height: 150px; background: linear-gradient(180deg, #f5b400, #b07800); box-shadow: 0 16px 36px rgba(245, 180, 0, .35); }
.pod-2 .pod-step { height: 110px; background: linear-gradient(180deg, #a8b0bd, #6b7280); }
.pod-3 .pod-step { height: 82px; background: linear-gradient(180deg, #d98a4a, #8a4b1d); }
@media (max-width: 620px) { .pod { width: 31%; } .pod img { width: 56px; height: 56px; } .pod-1 img { width: 70px; height: 70px; } }
.lb-list { padding: 8px; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; text-decoration: none !important; color: inherit; transition: background .2s, transform .2s; animation: eqIn .5s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i) * 30ms); }
.lb-row:hover { background: var(--surface-2); transform: translateX(4px); }
.lb-row.me { background: var(--primary-soft); box-shadow: inset 4px 0 0 var(--primary); }
.lb-rank { width: 42px; font-family: var(--font-head); font-weight: 700; color: var(--muted); text-align: center; font-size: 15px; }
.lb-row img { width: 40px; height: 40px; border-radius: 50%; }
.lb-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.lb-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name small { color: var(--muted); font-size: 12.5px; }
.lb-meta { font-size: 13px; color: var(--muted); width: 56px; text-align: right; }
.lb-val { font-family: var(--font-head); font-weight: 700; min-width: 110px; text-align: right; }
@media (max-width: 620px) { .lb-meta { display: none; } .lb-val { min-width: 0; font-size: 13px; } }

/* ===== compact navigation ===== */
.nav-links { align-items: center; }
.nav-links a { white-space: nowrap; }
.nav-more { position: relative; }
.nav-more-btn { padding: 7px 12px; border-radius: 9px; border: none; background: none; color: var(--text-2); font: inherit; font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; }
.nav-more-btn:hover, .nav-more:focus-within .nav-more-btn { background: var(--bg-2); }
.nav-more-btn span { font-size: 10px; margin-left: 2px; }
.nav-more:has(a.active) .nav-more-btn { color: var(--primary); font-weight: 600; }
.nav-more-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none; flex-direction: column; z-index: 90; }
.nav-more:hover .nav-more-menu, .nav-more:focus-within .nav-more-menu { display: flex; }
.nav-more-menu a { padding: 9px 12px !important; border-radius: 8px; }
.nav-more::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; } /* hover bridge */
@media (max-width: 1280px) {
  .menu-btn { display: grid; }
  .nav-links { display: none; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-tools { margin-left: auto; }
  .nav-more-btn { display: none; }
  .nav-more-menu { display: flex; position: static; box-shadow: none; border: none; padding: 0; min-width: 0; background: none; }
}
.gate-card { animation: pageIn .6s cubic-bezier(.16, 1, .3, 1); }
.gate-lock { font-size: 46px; width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 24px; display: grid; place-items: center; background: var(--primary-soft); animation: pop .7s cubic-bezier(.34, 1.56, .64, 1); }
.gate-card .btn-discord.big { margin: 14px 0 14px; }
