/* Site-wide look: a clean dark site, with SkyBlock rarity colors, level colors and item tooltips as the accents. */
:root {
  --bg: #0d0f14;
  --bg-2: #13161d;
  --bg-3: #1a1e27;
  --line: #252a35;
  --line-2: #323947;
  --text: #e8eaef;
  --muted: #9aa1b0;
  --faint: #677080;
  --gold: #ffaa00;
  --gold-ink: #1d1400;
  --good: #55ff55;
  --bad: #ff6b6b;
  --radius: 14px;
  --radius-sm: 9px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* SkyBlock rarity colors */
  --r0: #ffffff; --r1: #55ff55; --r2: #5555ff; --r3: #aa00aa; --r4: #ffaa00;
  --r5: #ff55ff; --r6: #55ffff; --r7: #ff5555; --r8: #ff5555; --rx: #6b7280;
  /* the same colors lifted a touch for small text on dark */
  --t2: #7a7aff; --t3: #c84bc8;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.pixel { font-weight: 700; letter-spacing: 0.01em; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; }
main { flex: 1; padding: 28px 0 56px; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(13, 15, 20, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 1.2rem; white-space: nowrap; }
.logo .gem { width: 22px; height: 22px; image-rendering: pixelated; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); padding: 7px 11px; border-radius: 8px; font-size: 0.94rem; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--bg-3); }
.nav a.on { color: var(--text); }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.who { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 5px 10px 5px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); }
.who:hover { border-color: var(--line-2); }
.who .nm { font-weight: 600; font-size: 0.94rem; max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .bar { width: 46px; height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.who .bar i { display: block; height: 100%; background: var(--lc, #aaa); }
@media (max-width: 560px) {
  .nav { display: none; }
  .who .bar { display: none; }
}

/* SkyBlock level prefix, like [120] in chat */
.lvl { font-weight: 700; color: var(--lc, #aaaaaa); white-space: nowrap; }
.lvl::before { content: '['; color: var(--faint); }
.lvl::after { content: ']'; color: var(--faint); }

/* ---------- buttons, inputs, cards ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--bg-3); color: var(--text); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.08s;
}
.btn:hover { background: #222734; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.primary:hover { background: #ffb924; }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn.discord:hover { background: #4752c4; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--bg-3); }
.btn.big { min-height: 50px; padding: 0 24px; font-size: 1.02rem; border-radius: 12px; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 0.875rem; border-radius: 8px; }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.field {
  width: 100%; min-height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--bg-3); color: var(--text); font-size: 1.02rem; outline: none;
}
.field:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 170, 0, 0.18); }
.field::placeholder { color: var(--faint); }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.note { font-size: 0.9rem; color: var(--muted); }
.note.bad { color: var(--bad); }
.note.good { color: var(--good); }

/* XP bar */
.xpbar { height: 10px; border-radius: 5px; background: var(--bg-3); border: 1px solid var(--line); overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: var(--lc, #aaaaaa); border-radius: 5px; transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* ---------- item icons from the sprite sheet ---------- */
.ic {
  display: inline-block; width: var(--s, 32px); height: var(--s, 32px); flex: none;
  background-image: url(/assets/icons.webp); background-repeat: no-repeat;
  background-size: var(--sprite-size, 3200% 4300%); image-rendering: pixelated;
}

/* ---------- Minecraft item tooltip ---------- */
.mc-tip {
  --edge: #2a0f5c;
  position: relative; display: inline-block; text-align: left; font-weight: 600; font-size: 1.12rem; line-height: 1.4;
  background: rgba(16, 1, 16, 0.96); padding: 12px 16px 13px; border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(16, 1, 16, 0.96), inset 0 0 0 2px var(--edge), 0 18px 40px rgba(0, 0, 0, 0.45);
}
.mc-tip .t-name { font-size: 1.28rem; }
.mc-tip .t-line { color: #aaaaaa; }
.mc-tip .t-gap { height: 0.7em; }
.mc-tip .t-rar { font-weight: 700; letter-spacing: 0.02em; }

/* rarity text colors */
.c0 { color: var(--r0); } .c1 { color: var(--r1); } .c2 { color: var(--r2); } .c3 { color: var(--r3); } .c4 { color: var(--r4); }
.c5 { color: var(--r5); } .c6 { color: var(--r6); } .c7 { color: var(--r7); } .c8 { color: var(--r8); } .cx { color: var(--rx); }
.lift.c2 { color: var(--t2); } .lift.c3 { color: var(--t3); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 22px 0 28px; color: var(--faint); font-size: 0.84rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.site-foot a { color: var(--muted); }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; width: min(92vw, 380px); pointer-events: none; }
.toast {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px;
  background: #1b1f29; border: 1px solid var(--line-2); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
.toast.out { animation: toast-out 0.3s ease both; }
.toast b { display: block; font-size: 0.95rem; }
.toast small { display: block; color: var(--muted); font-size: 0.84rem; }
.toast .xp { margin-left: auto; font-weight: 600; color: #55ffff; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
