:root {
  color-scheme: dark;
  --bg: #07070c;
  --bg-2: #0c0b14;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);
  --text: #eeecf8;
  --muted: #9391ab;
  --dim: #5f5d77;
  --accent: #8b5cf6;
  --accent-2: #a78bfa;
  --accent-3: #c4b5fd;
  --teal: #2dd4bf;
  --green: #22c55e;
  --red: #f43f5e;
  --amber: #f59e0b;
  --pink: #ec4899;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  cursor: default;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
code, kbd { font-family: var(--mono); font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.16); }
::-webkit-scrollbar-track { background: transparent; }

/* ============ background ============ */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; will-change: transform; }
.b1 { width: 520px; height: 520px; left: -140px; top: -160px; background: radial-gradient(circle, #6d28d9, transparent 65%); animation: float1 22s ease-in-out infinite alternate; }
.b2 { width: 460px; height: 460px; right: -120px; bottom: -160px; background: radial-gradient(circle, #0f766e, transparent 65%); animation: float2 26s ease-in-out infinite alternate; opacity: .35; }
.b3 { width: 380px; height: 380px; left: 45%; top: 30%; background: radial-gradient(circle, #9333ea, transparent 65%); animation: float3 30s ease-in-out infinite alternate; opacity: .18; }
@keyframes float1 { to { transform: translate(140px, 90px) scale(1.15); } }
@keyframes float2 { to { transform: translate(-160px, -80px) scale(1.1); } }
@keyframes float3 { to { transform: translate(-200px, 120px) scale(.9); } }
.grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 60% 30%, #000 10%, transparent 75%);
}
#particles { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ============ layout ============ */
.app {
  position: relative; z-index: 1; height: 100vh;
  display: grid;
  grid-template-columns: 232px 1fr;
  grid-template-rows: 44px 1fr;
  grid-template-areas: "title title" "side main";
  animation: appIn .7s var(--ease) both;
}
@keyframes appIn { from { opacity: 0; transform: scale(.985); } }

/* ============ titlebar ============ */
.titlebar { grid-area: title; display: flex; align-items: center; gap: 12px; padding-left: 16px; border-bottom: 1px solid var(--border); background: rgba(7,7,12,.55); backdrop-filter: blur(20px); }
.drag { flex: 1; height: 100%; display: flex; align-items: center; gap: 10px; }
.logo { width: 22px; height: 22px; border-radius: 6px; }
.brand { font: 600 14px var(--font-display); letter-spacing: .2px; }
.ver { font-size: 11px; color: var(--muted); padding: 1px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); }
.status-chip { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: all .4s var(--ease); }
.status-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); transition: background .4s; }
.status-chip.on { color: #bbf7d0; border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.08); }
.status-chip.on .dot { background: var(--green); box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.win-ctl { display: flex; height: 100%; }
.wbtn { width: 48px; height: 100%; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s; }
.wbtn svg { width: 16px; height: 16px; }
.wbtn:hover { background: var(--surface-2); color: var(--text); }
.wbtn.close:hover { background: #e81123; color: #fff; }

/* ============ sidebar ============ */
.sidebar { grid-area: side; display: flex; flex-direction: column; padding: 16px 12px; border-right: 1px solid var(--border); background: rgba(7,7,12,.35); backdrop-filter: blur(20px); }
.nav { position: relative; display: flex; flex-direction: column; gap: 4px; }
.nav-indicator {
  position: absolute; left: 0; right: 0; top: 0; height: 42px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(139,92,246,.22), rgba(139,92,246,.06));
  border: 1px solid rgba(139,92,246,.28);
  transition: transform .45s var(--spring);
}
.nav-indicator::before { content: ""; position: absolute; left: -12px; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-2); box-shadow: 0 0 12px var(--accent); }
.nav-item { position: relative; z-index: 1; height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border-radius: 12px; color: var(--muted); font-weight: 500; transition: color .25s, background .25s; }
.nav-item:hover { color: var(--text); background: var(--surface); }
.nav-item.active { color: var(--text); background: transparent; }
.nav-item.active svg { color: var(--accent-2); }
.nav-item svg { transition: transform .35s var(--spring), color .25s; }
.nav-item:hover svg { transform: scale(1.12); }
.pip { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: transparent; transition: all .3s; }
.pip.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font: 700 10px/18px var(--font); font-style: normal; text-align: center; transform: scale(0); transition: transform .3s var(--spring); }
.badge.show { transform: scale(1); }

.sidebar { overflow-y: auto; overflow-x: hidden; }
.nav-count { margin-left: auto; font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); transition: all .3s; }
.nav-count.on { background: rgba(34,197,94,.15); color: #86efac; }
.nav-count:empty { display: none; }

.acc-switch { margin-top: auto; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.acc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.acc-add { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); background: var(--surface-2); transition: all .2s; }
.acc-add svg { width: 14px; height: 14px; }
.acc-add:hover { color: var(--text); background: var(--accent); transform: rotate(90deg); }
.acc-add[disabled] { opacity: .3; pointer-events: none; }
.acc-list { display: flex; flex-wrap: wrap; gap: 6px; }
.acc { position: relative; width: 32px; height: 32px; border-radius: 10px; transition: transform .35s var(--spring); animation: pop .45s var(--spring) both; }
.acc img { width: 100%; height: 100%; border-radius: 9px; image-rendering: pixelated; background: var(--surface-2); opacity: .55; transition: opacity .25s; }
.acc::before { content: ""; position: absolute; inset: -3px; border-radius: 12px; border: 2px solid var(--ac); opacity: 0; transform: scale(.85); transition: all .35s var(--spring); }
.acc:hover { transform: translateY(-2px); }
.acc:hover img { opacity: .9; }
.acc.active img { opacity: 1; }
.acc.active::before { opacity: 1; transform: none; box-shadow: 0 0 12px -2px var(--ac); }
.acc .dot { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--dim); border: 2.5px solid #0e0d17; transition: background .3s; }
.acc.run .dot { background: var(--green); animation: ping 1.6s infinite; }
.acc-active { width: 100%; display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 7px 9px; border-radius: 10px; background: rgba(0,0,0,.2); color: var(--text); font-weight: 600; transition: background .2s; }
.acc-active:hover { background: rgba(0,0,0,.35); }
.acc-active-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.acc-active svg { width: 14px; height: 14px; color: var(--dim); }
.acc-active:hover svg { color: var(--accent-2); }

.avatar { width: 36px; height: 36px; border-radius: 9px; image-rendering: pixelated; background: var(--surface-2); }
.avatar.lg { width: 72px; height: 72px; border-radius: 16px; }

.prof-pill { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--text); background: color-mix(in srgb, var(--ac, var(--accent)) 14%, transparent); border: 1px solid color-mix(in srgb, var(--ac, var(--accent)) 35%, transparent); cursor: pointer; transition: all .3s; }
.prof-pill img { width: 20px; height: 20px; border-radius: 99px; image-rendering: pixelated; }
.prof-pill small { color: var(--muted); font-weight: 500; }
.prof-pill:empty { display: none; }
.content.switching .page.active > * { animation: swapProfile .45s var(--ease) both; }
@keyframes swapProfile { 0% { opacity: .2; transform: translateX(10px); } }

/* ============ content / pages ============ */
.content { grid-area: main; position: relative; overflow: hidden; }
.page { position: absolute; inset: 0; overflow-y: auto; padding: 24px 28px 28px; display: none; flex-direction: column; gap: 16px; }
.page.active { display: flex; }
.page.enter > * { animation: rise .55s var(--ease) both; }
.page.enter > *:nth-child(2) { animation-delay: .05s; }
.page.enter > *:nth-child(3) { animation-delay: .1s; }
.page.enter > *:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; backdrop-filter: blur(12px); }
.card-title { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head .card-title { margin: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h2 { font: 700 26px var(--font-display); letter-spacing: -.3px; }
.page-head p { color: var(--muted); margin-top: 2px; }
.head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 12px; }
.link { color: var(--accent-2); font-size: 12px; font-weight: 600; transition: color .2s; }
.link:hover { color: var(--accent-3); }

/* ============ controls ============ */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 11px; font-weight: 600; transition: transform .2s var(--ease), background .2s, box-shadow .3s, border-color .2s; }
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(.96); }
.btn.primary { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 6px 20px -6px rgba(139,92,246,.7), inset 0 1px 0 rgba(255,255,255,.2); }
.btn.primary:hover { box-shadow: 0 8px 28px -6px rgba(139,92,246,.9), inset 0 1px 0 rgba(255,255,255,.25); transform: translateY(-1px); }
.btn.ghost { background: var(--surface-2); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-3); border-color: var(--border-2); }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }
.btn-row.center { justify-content: center; }
.btn.loading { pointer-events: none; opacity: .7; }
.btn.loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); transition: all .25s var(--ease); }
.icon-btn:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-3); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.spin svg { animation: spin .7s var(--ease); }

.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 11px; background: rgba(0,0,0,.28); border: 1px solid var(--border); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; user-select: text; }
.input:focus { border-color: rgba(139,92,246,.6); box-shadow: 0 0 0 4px rgba(139,92,246,.15); background: rgba(0,0,0,.4); }
.input.center { text-align: center; font-size: 16px; font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 44px; }
.eye { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.eye:hover { color: var(--text); background: var(--surface-2); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.field > span em { font-style: normal; color: var(--dim); font-weight: 500; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
.field.block { margin-top: 16px; }

.stepper { display: inline-flex; align-items: center; height: 38px; border-radius: 11px; background: rgba(0,0,0,.28); border: 1px solid var(--border); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.stepper:focus-within { border-color: rgba(139,92,246,.6); box-shadow: 0 0 0 4px rgba(139,92,246,.15); }
.stepper button { width: 34px; height: 100%; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s; }
.stepper button svg { width: 14px; height: 14px; }
.stepper button:hover { background: var(--surface-2); color: var(--text); }
.stepper button:active svg { transform: scale(.8); }
.stepper input { width: 56px; height: 100%; text-align: center; background: none; border: 0; outline: none; font-family: var(--mono); font-weight: 600; user-select: text; }
.stepper .suffix { font-size: 12px; color: var(--dim); margin-left: -12px; padding-right: 4px; pointer-events: none; }
.stepper.bump input { animation: bump .3s var(--spring); }
@keyframes bump { 50% { transform: scale(1.18); color: var(--accent-3); } }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { position: relative; width: 42px; height: 24px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border-2); transition: background .3s var(--ease), border-color .3s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #cfcde0; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .4s var(--spring), background .3s, width .2s; }
.switch:active i::after { width: 20px; }
.switch input:checked + i { background: linear-gradient(135deg, #8b5cf6, #6d28d9); border-color: transparent; box-shadow: 0 0 16px -2px rgba(139,92,246,.6); }
.switch input:checked + i::after { transform: translateX(18px); background: #fff; }
.switch:active input:checked + i::after { transform: translateX(14px); }
.switch.big span { font-weight: 600; color: var(--muted); transition: color .3s; }
.switch.big input:checked ~ span { color: var(--text); }
.switch.big { padding: 7px 14px 7px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-of-type { border-bottom: 0; }
.toggle-row b { display: block; font-weight: 600; }
.toggle-row small { color: var(--muted); font-size: 12px; }
.num-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); }
.num-row:last-child { border-bottom: 0; }
.num-row > span { color: var(--muted); font-weight: 500; }
.collapsible { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .4s var(--ease), opacity .3s, margin .4s var(--ease); }
.collapsible > * { min-height: 0; }
.collapsible.open { grid-template-rows: 1fr; opacity: 1; margin-top: 6px; }
.collapsible .input { margin: 2px 0; }

.seg { display: flex; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); position: relative; }
.seg button { padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted); transition: all .25s; }
.seg button.active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.search svg { width: 15px; height: 15px; }
.search input { width: 140px; background: none; border: 0; outline: none; user-select: text; }

/* ============ dropdown ============ */
.dropdown { position: relative; flex: 1; min-width: 0; }
.dd-btn { width: 100%; height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 12px; background: rgba(0,0,0,.3); border: 1px solid var(--border); text-align: left; transition: border-color .2s, background .2s; }
.dd-btn:hover { border-color: var(--border-2); }
.dropdown.open .dd-btn { border-color: rgba(139,92,246,.55); box-shadow: 0 0 0 4px rgba(139,92,246,.12); }
.dd-ic { color: var(--accent-2); }
.dd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-label.placeholder { color: var(--muted); }
.dd-chev { width: 16px; height: 16px; color: var(--muted); transition: transform .3s var(--ease); }
.dropdown.open .dd-chev { transform: rotate(180deg); }
.dd-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; padding: 6px; border-radius: 14px; background: rgba(20,18,32,.96); border: 1px solid var(--border-2); box-shadow: 0 20px 50px -10px rgba(0,0,0,.7); backdrop-filter: blur(20px); opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top; pointer-events: none; transition: opacity .2s, transform .3s var(--ease); max-height: 240px; overflow-y: auto; }
.dropdown.open .dd-menu { opacity: 1; transform: none; pointer-events: auto; }
.dd-opt { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-align: left; color: var(--muted); transition: background .15s, color .15s; }
.dd-opt:hover { background: var(--surface-2); color: var(--text); }
.dd-opt.sel { color: var(--text); }
.dd-opt.sel::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px var(--accent); }
.dd-opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-opt small { color: var(--dim); font-family: var(--mono); font-size: 11px; flex-shrink: 0; }
.dd-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }

/* ============ home ============ */
.hero { display: grid; grid-template-columns: 170px 1fr 280px; gap: 24px; padding: 22px 24px; overflow: visible; background: linear-gradient(135deg, rgba(139,92,246,.1), rgba(255,255,255,.02) 50%, rgba(45,212,191,.05)); z-index: 2; }
.hero::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(167,139,250,.5), transparent 40%, transparent 60%, rgba(45,212,191,.3)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.hero-art { position: relative; display: grid; place-items: end center; }
.hero-glow { position: absolute; bottom: 0; left: 50%; width: 140px; height: 36px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(139,92,246,.55), transparent 70%); filter: blur(6px); transition: background .6s; }
.running .hero-glow { background: radial-gradient(ellipse, rgba(34,197,94,.55), transparent 70%); }
@font-face { font-family: "Minecraft"; src: url("https://cdn.jsdelivr.net/npm/typeface-minecraft@1.0.0/files/minecraft.woff2") format("woff2"), url("https://cdn.jsdelivr.net/npm/typeface-minecraft@1.0.0/files/minecraft.woff") format("woff"); font-display: swap; }
.hero-skin { --px: 6px; position: relative; display: flex; flex-direction: column; align-items: center; opacity: 0; transition: opacity .6s; }
.hero-skin.loaded { opacity: 1; }
.mc-nametag { margin-bottom: 10px; padding: 3px 6px 1px; max-width: 220px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: rgba(0,0,0,.42); color: #fff; font: 16px/1.25 "Minecraft", "Consolas", monospace; letter-spacing: .5px; -webkit-font-smoothing: none; font-smooth: never; text-shadow: none; animation: tagBob 4s ease-in-out infinite; }
@keyframes tagBob { 50% { transform: translateY(-3px); } }
.mc-note { position: absolute; top: 18%; z-index: 3; pointer-events: none; font: 700 20px var(--font); text-shadow: 0 0 10px currentColor; animation: noteUp 1.6s ease-out forwards; }
@keyframes noteUp { from { opacity: 0; transform: translate(0, 10px) scale(.6); } 15% { opacity: 1; } to { opacity: 0; transform: translate(var(--dx), -70px) scale(1.1) rotate(15deg); } }
.mc-stage { position: relative; width: calc(var(--px) * 16); height: calc(var(--px) * 32); perspective: 900px; perspective-origin: 50% 30%; filter: drop-shadow(0 12px 18px rgba(0,0,0,.5)); }
.mc-model, .mc-model div { position: absolute; transform-style: preserve-3d; }
.mc-model { left: 50%; top: calc(var(--px) * 8); width: 0; height: 0; }
.mc-model .mc-face { background-repeat: no-repeat; image-rendering: pixelated; backface-visibility: visible; }

.hero-main { display: flex; flex-direction: column; min-width: 0; padding-top: 4px; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--accent-2); letter-spacing: .4px; }
.hero-title { font: 800 34px/1.1 var(--font-display); letter-spacing: -.8px; margin-top: 2px; background: linear-gradient(90deg, #fff, #c4b5fd 60%, #5eead4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); margin-top: 6px; }
.hero-row { display: flex; gap: 8px; margin-top: 18px; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin-top: auto; padding-top: 18px; }

.play { position: relative; flex-shrink: 0; white-space: nowrap; height: 56px; padding: 0 34px 0 28px; display: flex; align-items: center; gap: 12px; border-radius: 16px; font: 800 17px var(--font-display); letter-spacing: 1.5px; color: #fff; background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%); box-shadow: 0 10px 34px -8px rgba(139,92,246,.9), inset 0 1px 0 rgba(255,255,255,.25), inset 0 -2px 0 rgba(0,0,0,.2); transition: transform .3s var(--spring), box-shadow .3s, background .5s; overflow: hidden; isolation: isolate; }
.play::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); animation: shine 3.6s ease-in-out infinite; z-index: -1; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.play:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 44px -8px rgba(139,92,246,1), inset 0 1px 0 rgba(255,255,255,.3); }
.play:active { transform: scale(.97); }
.play-ic { width: 20px; height: 20px; transition: transform .4s var(--spring); }
.play:hover .play-ic { transform: scale(1.15); }
.play-ring { position: absolute; inset: -2px; border-radius: inherit; border: 2px solid rgba(196,181,253,.6); opacity: 0; animation: ring 2.4s ease-out infinite; }
@keyframes ring { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }
.play.stop { background: linear-gradient(135deg, #f43f5e, #be123c); box-shadow: 0 10px 34px -8px rgba(244,63,94,.85), inset 0 1px 0 rgba(255,255,255,.25); }
.play.stop:hover { box-shadow: 0 16px 44px -8px rgba(244,63,94,1), inset 0 1px 0 rgba(255,255,255,.3); }
.play.stop .play-ring { border-color: rgba(253,164,175,.6); }
.play.swap .play-ic, .play.swap .play-txt { animation: swap .4s var(--ease); }
@keyframes swap { 0% { opacity: 0; transform: translateY(10px); } }
.session { display: flex; flex-direction: column; }
.session-label { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; }
.session-time { font-size: 24px; font-weight: 700; color: var(--dim); transition: color .4s; }
.running .session-time { color: var(--text); }

.hero-side { display: flex; flex-direction: column; gap: 14px; }
.mine-viz { padding: 14px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--border); }
.mv-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mv-head .card-title { margin: 0; }
.mv-dim { font-size: 12px; color: var(--accent-3); font-weight: 600; }
.mv-svg { width: 100%; height: 104px; display: block; overflow: visible; }
.mv-svg .blk { fill: rgba(255,255,255,.04); stroke: rgba(255,255,255,.06); stroke-width: 1; transition: fill .4s; }
.mv-svg .blk.dig { fill: rgba(139,92,246,.18); stroke: rgba(139,92,246,.3); }
.mv-svg .path { fill: none; stroke: url(#mvGrad); stroke-width: 2.5; stroke-dasharray: 5 6; stroke-linecap: round; }
.running .mv-svg .path { animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.mv-svg .miner { fill: var(--teal); filter: drop-shadow(0 0 5px var(--teal)); }
.dims { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dims .stepper { width: 100%; }
.dims .stepper input { flex: 1; width: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { display: flex; align-items: center; gap: 14px; padding: 16px; transition: transform .35s var(--ease), border-color .3s, background .3s; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%); opacity: .5; transition: opacity .3s, transform .5s var(--ease); }
.kpi:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.kpi:hover::after { opacity: 1; transform: scale(1.3); }
.kpi-ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
.kpi-v { display: block; font-size: 22px; font-weight: 700; line-height: 1.1; }
.kpi-l { font-size: 12px; color: var(--muted); }
.kpi-v.flash { animation: flash .6s var(--ease); }
@keyframes flash { 30% { color: var(--c); text-shadow: 0 0 14px var(--c); } }

.home-bottom { display: grid; grid-template-columns: 300px 1fr; gap: 16px; flex: 1; min-height: 190px; }
.feat-list { display: flex; flex-direction: column; gap: 6px; }
.feat { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; background: rgba(0,0,0,.18); border: 1px solid transparent; color: var(--muted); text-align: left; transition: all .25s var(--ease); }
.feat:hover { border-color: var(--border-2); color: var(--text); transform: translateX(3px); }
.feat span { flex: 1; font-weight: 500; }
.feat-state { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--dim); }
.feat-state::before { content: "WYŁ"; }
.feat.on { color: var(--text); }
.feat.on svg { color: var(--green); }
.feat.on .feat-state { background: rgba(34,197,94,.14); color: #86efac; }
.feat.on .feat-state::before { content: "WŁ"; }
.mini-log { display: flex; flex-direction: column; min-height: 0; }
.mini-log-list { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; font-family: var(--mono); font-size: 12px; mask-image: linear-gradient(transparent, #000 40%); }
.ml { display: flex; gap: 10px; padding: 3px 0; animation: slideIn .4s var(--ease); }
.ml time { color: var(--dim); }
.ml.error span { color: #fda4af; }
.ml.success span { color: #86efac; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } }

/* ============ commands ============ */
.list-card { padding: 8px; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cmd-header { display: grid; grid-template-columns: 1fr 170px 44px; gap: 12px; padding: 8px 12px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }
.cmd-list { display: flex; flex-direction: column; gap: 4px; }
.cmd-row { display: grid; grid-template-columns: 1fr 170px 44px; gap: 12px; align-items: center; padding: 6px 12px 6px 6px; border-radius: 12px; transition: background .2s; animation: rowIn .45s var(--ease) both; }
.cmd-row:hover { background: rgba(255,255,255,.025); }
.cmd-row .input { font-family: var(--mono); height: 38px; }
.cmd-row.out { animation: rowOut .35s var(--ease) forwards; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes rowOut { to { opacity: 0; transform: translateX(30px); height: 0; padding-top: 0; padding-bottom: 0; margin-top: -4px; } }
.del { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--dim); transition: all .2s; }
.del:hover { color: var(--red); background: rgba(244,63,94,.1); }
.empty { display: none; flex-direction: column; align-items: center; gap: 10px; padding: 50px 0; color: var(--muted); }
.empty svg { width: 38px; height: 38px; color: var(--dim); stroke-width: 1.4; }
.empty.show { display: flex; animation: rise .5s var(--ease); }

/* ============ reconnect ============ */
.steps { list-style: none; display: flex; gap: 8px; }
.steps li { flex: 1; display: flex; flex-direction: column; gap: 8px; position: relative; font-size: 12px; color: var(--muted); }
.steps li::after { content: ""; position: absolute; top: 14px; left: 34px; right: 4px; height: 2px; background: linear-gradient(90deg, rgba(139,92,246,.4), rgba(139,92,246,.05)); }
.steps li:last-child::after { display: none; }
.steps i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; font: 700 12px var(--mono); font-style: normal; color: var(--accent-3); background: rgba(139,92,246,.14); border: 1px solid rgba(139,92,246,.3); }

/* ============ drop ============ */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.item { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); transition: all .3s var(--ease); animation: rise .5s var(--ease) both; overflow: hidden; }
.item::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 0%, rgba(139,92,246,.18), transparent 60%); opacity: 0; transition: opacity .4s; }
.item.on { border-color: rgba(139,92,246,.35); }
.item.on::before { opacity: 1; }
.item:hover { transform: translateY(-2px); border-color: var(--border-2); }
.item.on:hover { border-color: rgba(139,92,246,.55); }
.item-top { position: relative; display: flex; align-items: center; gap: 12px; }
.item-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(0,0,0,.3); border: 1px solid var(--border); }
.item-icon img { width: 30px; height: 30px; image-rendering: pixelated; transition: transform .4s var(--spring); }
.item:hover .item-icon img { transform: scale(1.15) rotate(-6deg); }
.item-name { flex: 1; font-weight: 600; }
.chip { position: relative; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; color: var(--muted); background: rgba(0,0,0,.25); border: 1px solid var(--border); cursor: pointer; transition: all .25s; }
.chip svg { width: 12px; height: 12px; opacity: 0; margin-left: -18px; transition: all .25s var(--spring); }
.chip.on { color: var(--teal); border-color: rgba(45,212,191,.35); background: rgba(45,212,191,.08); }
.chip.on svg { opacity: 1; margin-left: 0; }
.chip.disabled { opacity: .35; pointer-events: none; }
.chip.ph { visibility: hidden; }

/* ============ food ============ */
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.lg { display: flex; align-items: center; gap: 6px; }
.lg::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.lg.lg-pick::before { background: var(--teal); }
.lg.lg-food::before { background: var(--amber); }
.hotbar { display: flex; gap: 6px; padding: 8px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--border); width: max-content; }
.slot { position: relative; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.035); border: 2px solid rgba(255,255,255,.06); font: 700 11px var(--mono); color: var(--dim); transition: all .3s var(--ease); }
.slot:hover { background: rgba(255,255,255,.07); transform: translateY(-2px); }
.slot .n { position: absolute; top: 3px; left: 6px; }
.slot img, .slot svg { width: 30px; height: 30px; image-rendering: pixelated; animation: pop .4s var(--spring); }
@keyframes pop { from { transform: scale(0); } }
.slot.is-pick { border-color: var(--teal); background: rgba(45,212,191,.1); box-shadow: 0 0 18px -4px rgba(45,212,191,.6); color: var(--teal); }
.slot.is-food { border-color: var(--amber); background: rgba(245,158,11,.1); box-shadow: 0 0 18px -4px rgba(245,158,11,.6); color: var(--amber); }
.food-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.food { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 13px; background: rgba(0,0,0,.2); border: 1px solid var(--border); text-align: left; transition: all .3s var(--ease); }
.food img { width: 34px; height: 34px; image-rendering: pixelated; transition: transform .4s var(--spring); }
.food:hover { border-color: var(--border-2); }
.food:hover img { transform: scale(1.12) rotate(-8deg); }
.food.sel { border-color: rgba(245,158,11,.5); background: rgba(245,158,11,.07); box-shadow: 0 0 0 3px rgba(245,158,11,.1); }
.food b { display: block; font-weight: 600; }
.hunger { display: flex; gap: 2px; margin-top: 4px; }
.hunger i { width: 9px; height: 9px; border-radius: 2px; background: var(--surface-3); }
.hunger i.f { background: #d97706; }
.hunger i.h { background: linear-gradient(90deg, #d97706 50%, var(--surface-3) 50%); }

/* ============ console ============ */
.console-wrap { flex: 1; display: grid; grid-template-columns: 1fr 250px; gap: 16px; min-height: 0; }
.console { padding: 0; overflow: hidden; background: rgba(0,0,0,.4); display: flex; }
.log { flex: 1; overflow-y: auto; padding: 14px 16px; font: 12.5px/1.7 var(--mono); user-select: text; }
.le { display: flex; gap: 12px; padding: 0 6px; border-radius: 6px; }
.le:hover { background: rgba(255,255,255,.03); }
.le.new { animation: slideIn .35s var(--ease); }
.le time { color: var(--dim); flex-shrink: 0; }
.le .tag { flex-shrink: 0; width: 62px; font-weight: 700; font-size: 11px; }
.le.info .tag { color: var(--accent-2); }
.le.success .tag { color: var(--green); }
.le.error .tag { color: var(--red); }
.le.error .m { color: #fecdd3; }
.le mark { background: rgba(245,158,11,.3); color: inherit; border-radius: 3px; }
.jump { position: absolute; bottom: 14px; left: 50%; display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--accent); box-shadow: 0 8px 20px -4px rgba(139,92,246,.7); transform: translate(-50%, 60px); transition: transform .4s var(--spring); }
.jump svg { width: 14px; height: 14px; }
.jump.show { transform: translate(-50%, 0); }
.diag { display: flex; flex-direction: column; gap: 4px; }
.diag-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.diag-row:last-child { border: 0; }
.diag-row svg { width: 15px; height: 15px; color: var(--dim); }
.diag-row span { color: var(--muted); }
.diag-row b { margin-left: auto; font-weight: 600; max-width: 120px; text-align: right; }
.diag-row b.ok { color: var(--green); }
.diag-row b.bad { color: var(--red); }

/* ============ discord ============ */
.dc-status { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--border); }
.dc-status b { display: block; font-size: 15px; }
.dc-status small { color: var(--muted); font-size: 12px; }
.dc-orb { position: relative; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: rgba(88,101,242,.15); color: #8b95ff; border: 1px solid rgba(88,101,242,.35); }
.dc-orb::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); border: 3px solid #0d0c16; }
.dc-status.ok .dc-orb::after { background: var(--green); animation: ping 1.6s infinite; }
.dc-status.ok b { color: #86efac; }
.dc-cmds { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.dc-cmds li { display: flex; align-items: center; justify-content: space-between; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.dc-cmds li:last-child { border: 0; }
.dc-cmds span { color: var(--muted); font-size: 13px; }

/* ============ overlays ============ */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(5,5,10,.6); backdrop-filter: blur(14px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s var(--ease), visibility 0s .35s; }
.overlay.show { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .35s var(--ease); }
.overlay > * { transform: scale(.92) translateY(10px); transition: transform .5s var(--spring); }
.overlay.show > * { transform: none; }
.cd-box, .modal { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px 40px; border-radius: 22px; background: rgba(20,18,32,.9); border: 1px solid var(--border-2); box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(139,92,246,.1); width: 380px; }
.cd-box { position: relative; }
.cd-ring { width: 150px; height: 150px; transform: rotate(-90deg); }
.cd-track { fill: none; stroke: var(--surface-3); stroke-width: 6; }
.cd-prog { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 0; filter: drop-shadow(0 0 8px var(--accent)); transition: stroke-dashoffset 1s linear, stroke .4s; }
.cd-num { position: absolute; top: 32px; left: 50%; width: 150px; height: 150px; margin-left: -75px; display: grid; place-items: center; font-size: 56px; font-weight: 800; }
.cd-num.tick { animation: tick .5s var(--spring); }
@keyframes tick { from { transform: scale(1.5); opacity: 0; } }
.cd-box h3, .modal h3 { font: 700 20px var(--font-display); margin-top: 16px; }
.cd-box p, .modal p { color: var(--muted); margin: 6px 0 20px; }
.cd-box kbd { margin-left: 6px; font-size: 10px; }
.modal .input { margin-bottom: 4px; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: 380px; padding: 12px 16px 12px 12px; border-radius: 14px; background: rgba(24,22,38,.95); border: 1px solid var(--border-2); box-shadow: 0 16px 40px -10px rgba(0,0,0,.7); backdrop-filter: blur(20px); animation: toastIn .5s var(--spring); overflow: hidden; position: relative; }
.toast.out { animation: toastOut .35s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
.toast .t-ic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; flex-shrink: 0; }
.toast.success .t-ic { background: rgba(34,197,94,.15); color: var(--green); }
.toast.error .t-ic { background: rgba(244,63,94,.15); color: var(--red); }
.toast.warn .t-ic { background: rgba(245,158,11,.15); color: var(--amber); }
.toast.info .t-ic { background: rgba(139,92,246,.15); color: var(--accent-2); }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: .5; transform-origin: left; animation: life 4s linear forwards; }
.toast.success::after { color: var(--green); }
.toast.error::after { color: var(--red); }
.toast.warn::after { color: var(--amber); }
.toast.info::after { color: var(--accent); }
@keyframes life { to { transform: scaleX(0); } }

.saved { position: fixed; left: 50%; bottom: 18px; z-index: 55; display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; font-size: 12px; font-weight: 600; color: #86efac; background: rgba(20,40,30,.85); border: 1px solid rgba(34,197,94,.3); transform: translate(-50%, 60px); transition: transform .45s var(--spring); backdrop-filter: blur(10px); }
.saved svg { width: 14px; height: 14px; }
.saved.show { transform: translate(-50%, 0); }

/* ============ accounts page ============ */
.btn.danger:hover { background: rgba(244,63,94,.12); border-color: rgba(244,63,94,.4); color: #fda4af; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.acc-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 16px; overflow: visible; animation: rise .5s var(--ease) both; transition: border-color .3s, transform .35s var(--ease), box-shadow .3s; }
.acc-card::before { content: ""; position: absolute; left: 16px; right: 16px; top: -1px; height: 2px; border-radius: 0 0 4px 4px; background: var(--ac); opacity: .8; box-shadow: 0 0 14px var(--ac); }
.acc-card:hover { transform: translateY(-2px); border-color: var(--border-2); }
.acc-card.active { border-color: color-mix(in srgb, var(--ac) 45%, transparent); }
.acc-card.run { box-shadow: 0 0 0 1px rgba(34,197,94,.15), 0 12px 40px -18px rgba(34,197,94,.45); }
.acc-card.out { animation: cardOut .35s var(--ease) forwards; }
@keyframes cardOut { to { opacity: 0; transform: scale(.94); } }
.ac-top { display: flex; align-items: center; gap: 12px; }
.ac-top img { width: 46px; height: 46px; border-radius: 12px; image-rendering: pixelated; background: var(--surface-2); }
.ac-name { flex: 1; min-width: 0; }
.ac-name b { display: block; font: 700 16px var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-name small { font-size: 12px; color: var(--muted); }
.ac-state { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ac-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.acc-card.run .ac-state { background: rgba(34,197,94,.14); color: #86efac; }
.acc-card.run .ac-state::before { background: var(--green); animation: ping 1.6s infinite; }
.ac-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ac-stat { padding: 9px 10px; border-radius: 11px; background: rgba(0,0,0,.22); border: 1px solid var(--border); }
.ac-stat span { display: block; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }
.ac-stat b { font-family: var(--mono); font-size: 15px; }
.ac-row { display: flex; gap: 8px; }
.ac-row .dropdown { min-width: 0; }
.ac-row .dd-btn, .ac-row .icon-btn { height: 38px; }
.ac-row .icon-btn { width: 38px; }
.ac-actions { display: flex; gap: 8px; }
.ac-play { flex: 1; justify-content: center; height: 40px; border-radius: 12px; font-weight: 700; letter-spacing: .8px; background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 6px 20px -8px rgba(139,92,246,.8); }
.ac-play:hover { box-shadow: 0 8px 26px -6px rgba(139,92,246,1); }
.ac-play.stop { background: linear-gradient(135deg, #f43f5e, #be123c); box-shadow: 0 6px 20px -8px rgba(244,63,94,.8); }
.ac-del.confirm { color: #fff; background: var(--red); border-color: transparent; width: auto; padding: 0 12px; font-size: 12px; font-weight: 700; }
.acc-card.add { display: grid; place-items: center; min-height: 250px; border-style: dashed; color: var(--muted); cursor: pointer; background: transparent; }
.acc-card.add::before { display: none; }
.acc-card.add:hover { color: var(--text); border-color: rgba(139,92,246,.5); background: rgba(139,92,246,.05); }
.acc-card.add div { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 600; }
.acc-card.add svg { width: 30px; height: 30px; padding: 8px; box-sizing: content-box; border-radius: 14px; background: var(--surface-2); transition: transform .4s var(--spring); }
.acc-card.add:hover svg { transform: rotate(90deg) scale(1.1); background: var(--accent); color: #fff; }
.dd-opt[disabled] { opacity: .45; pointer-events: none; }
.dd-opt em { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--surface-3); color: var(--muted); flex-shrink: 0; }
.tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; color: var(--muted); font-size: 13px; }
.tip svg { color: var(--accent-2); margin-top: 1px; }
.tip kbd { font-size: 11px; padding: 1px 5px; }
.le .who { flex-shrink: 0; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--ac, var(--muted)); }
.ml .who { color: var(--ac, var(--muted)); font-weight: 700; flex-shrink: 0; }
#logAcc button { display: flex; align-items: center; gap: 6px; }
#logAcc button i { width: 7px; height: 7px; border-radius: 50%; background: var(--ac); }
#logAcc:empty { display: none; }

/* ============ license ============ */
.lic-chip { display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); transition: all .25s; }
.lic-chip svg { width: 14px; height: 14px; color: var(--accent-2); }
.lic-chip:hover { color: var(--text); border-color: var(--border-2); }
.lic-chip.warn { color: #fcd34d; border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.08); }
.lic-chip.warn svg { color: var(--amber); }
body.unlicensed .lic-chip { display: none; }

.gate { position: fixed; inset: 44px 0 0 0; z-index: 45; display: grid; place-items: center; background: rgba(6,6,11,.72); backdrop-filter: blur(22px) saturate(1.2); opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s .5s; }
body.unlicensed .gate { opacity: 1; visibility: visible; transition: opacity .5s var(--ease); }
.gate-box { width: 420px; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 36px 22px; border-radius: 24px; background: rgba(20,18,32,.85); border: 1px solid var(--border-2); box-shadow: 0 40px 100px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(139,92,246,.12), 0 0 80px -30px rgba(139,92,246,.5); transform: translateY(12px) scale(.97); transition: transform .6s var(--spring); }
body.unlicensed .gate-box { transform: none; }
.gate-logo { position: relative; width: 76px; height: 76px; margin-bottom: 18px; }
.gate-logo img { width: 100%; height: 100%; border-radius: 20px; position: relative; z-index: 1; }
.gate-ring { position: absolute; inset: -8px; border-radius: 26px; background: conic-gradient(from 0deg, transparent, var(--accent), var(--teal), transparent 70%); animation: spin 3s linear infinite; filter: blur(6px); opacity: .8; }
.gate h2 { font: 800 24px var(--font-display); letter-spacing: -.4px; }
.gate-sub { color: var(--muted); margin: 6px 0 22px; }
.gate-form { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.gate-input { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid var(--border-2); transition: border-color .2s, box-shadow .2s; }
.gate-input:focus-within { border-color: rgba(139,92,246,.7); box-shadow: 0 0 0 4px rgba(139,92,246,.16); }
.gate-input svg { color: var(--accent-2); }
.gate-input input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 15px; letter-spacing: .6px; text-transform: uppercase; user-select: text; }
.gate-input input::placeholder { color: var(--dim); text-transform: none; letter-spacing: .3px; }
.gate-input.shake { animation: shake .45s; border-color: rgba(244,63,94,.6); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.gate-error { min-height: 0; max-height: 0; overflow: hidden; font-size: 13px; color: #fda4af; transition: max-height .35s var(--ease); text-align: left; }
.gate-error.show { max-height: 80px; }
.gate-btn { height: 48px; justify-content: center; font-size: 15px; border-radius: 14px; }
.gate-retry { display: none; margin-top: 2px; }
.gate-retry.show { display: block; }
.gate-checking { display: none; align-items: center; gap: 10px; color: var(--muted); padding: 18px 0 26px; }
.gate.checking .gate-checking { display: flex; }
.gate.checking .gate-form { display: none; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--surface-3); border-top-color: var(--accent-2); animation: spin .8s linear infinite; }
.gate-hwid { display: flex; align-items: center; gap: 8px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); width: 100%; font-size: 12px; color: var(--dim); }
.gate-hwid code { flex: 1; text-align: left; font-size: 11px; background: none; border: 0; color: var(--muted); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm svg { width: 14px; height: 14px; }

.lic-modal { width: 400px; }
.lic-badge { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; color: var(--green); background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); }
.lic-badge svg { width: 28px; height: 28px; }
.lic-rows { width: 100%; margin: 16px 0 4px; text-align: left; }
.lic-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.lic-rows div:last-child { border: 0; }
.lic-rows span { color: var(--muted); }

/* ============ copy settings ============ */
.copy-modal { width: 600px; }
.copy-modal .check small { white-space: nowrap; }
.copy-cols { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; text-align: left; margin-bottom: 4px; }
.check-list { display: flex; flex-direction: column; gap: 4px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; transition: background .2s; }
.check:hover { background: var(--surface-2); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check i { width: 18px; height: 18px; flex-shrink: 0; display: grid; place-items: center; border-radius: 6px; border: 1.5px solid var(--border-2); transition: all .25s var(--spring); }
.check i svg { width: 12px; height: 12px; stroke-width: 3; color: #fff; transform: scale(0); transition: transform .3s var(--spring); }
.check input:checked + i { background: var(--accent); border-color: var(--accent); }
.check input:checked + i svg { transform: scale(1); }
.check span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check small { color: var(--dim); font-size: 11px; }
.check img { width: 20px; height: 20px; border-radius: 6px; image-rendering: pixelated; }
.check.warn small { color: var(--amber); }

/* ============ sidebar account quick actions ============ */
.acc .x { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: #2a2838; border: 1.5px solid #0e0d17; color: var(--muted); opacity: 0; transform: scale(.5); transition: all .25s var(--spring); z-index: 2; }
.acc .x svg { width: 9px; height: 9px; stroke-width: 3.2; }
.acc:hover .x { opacity: 1; transform: none; }
.acc .x:hover { background: var(--red); color: #fff; }
.acc.arm img { filter: grayscale(1) brightness(.6); opacity: 1; }
.acc.arm::after { content: "Usunąć?"; position: absolute; left: 50%; bottom: -17px; transform: translateX(-50%); font-size: 9px; font-weight: 800; color: #fda4af; white-space: nowrap; }
.acc.arm .x { opacity: 1; transform: scale(1.15); background: var(--red); color: #fff; animation: pulseX 1s infinite; }
@keyframes pulseX { 50% { box-shadow: 0 0 0 4px rgba(244,63,94,.3); } }
.acc.over img { opacity: .25; }
.acc.out { animation: accOut .3s var(--ease) forwards; }
@keyframes accOut { to { transform: scale(0); opacity: 0; width: 0; margin-right: -6px; } }

.ctx { position: fixed; z-index: 70; min-width: 200px; padding: 6px; border-radius: 13px; background: rgba(22,20,34,.97); border: 1px solid var(--border-2); box-shadow: 0 18px 50px -10px rgba(0,0,0,.8); backdrop-filter: blur(20px); opacity: 0; transform: scale(.95); transform-origin: top left; pointer-events: none; transition: opacity .15s, transform .25s var(--spring); }
.ctx.show { opacity: 1; transform: none; pointer-events: auto; }
.ctx-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); font-weight: 700; }
.ctx-head img { width: 22px; height: 22px; border-radius: 6px; image-rendering: pixelated; }
.ctx button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--muted); text-align: left; }
.ctx button svg { width: 15px; height: 15px; }
.ctx button:hover { background: var(--surface-2); color: var(--text); }
.ctx button.danger:hover { background: rgba(244,63,94,.14); color: #fda4af; }
.ctx hr { border: 0; height: 1px; background: var(--border); margin: 4px 2px; }

.acc-card.locked { opacity: .6; }
.acc-card.locked .ac-play { background: var(--surface-3); box-shadow: none; pointer-events: none; }
.ac-lock { font-size: 11px; font-weight: 700; color: var(--amber); display: none; align-items: center; gap: 6px; }
.acc-card.locked .ac-lock { display: flex; }
.ac-lock svg { width: 13px; height: 13px; }

/* ============ responsive ============ */
@media (max-width: 1120px) {
  .app { grid-template-columns: 76px 1fr; }
  .sidebar { padding: 16px 12px; align-items: stretch; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item span { display: none; }
  .nav-item .pip, .nav-item .badge { position: absolute; top: 7px; right: 9px; margin: 0; }
  .nav-item .badge { min-width: 16px; height: 14px; line-height: 14px; font-size: 9px; padding: 0 4px; top: 4px; right: 4px; }
  .nav-item .nav-count { position: absolute; top: 2px; right: 0; padding: 0 4px; font-size: 9px; }
  .acc-switch { padding: 8px 0; background: none; border: 0; }
  .acc-head span, .acc-active { display: none; }
  .acc-head { justify-content: center; }
  .acc-list { flex-direction: column; align-items: center; gap: 8px; }
  .hero { grid-template-columns: 130px 1fr 250px; gap: 20px; }
  .hero-skin { --px: 5.4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ============ admin notices & updates ============ */
.notice-stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.notice-stack:empty { display: none; }
.notice { --c: var(--accent-2); position: relative; display: flex; gap: 12px; width: 360px; padding: 14px 40px 14px 14px; border-radius: 14px; background: rgba(24,22,38,.96); border: 1px solid var(--border-2); border-left: 3px solid var(--c); box-shadow: 0 18px 44px -12px rgba(0,0,0,.75), 0 0 40px -20px var(--c); backdrop-filter: blur(20px); animation: toastIn .55s var(--spring); user-select: text; }
.notice.out { animation: toastOut .35s var(--ease) forwards; }
.notice.success { --c: var(--green); } .notice.warn { --c: var(--amber); } .notice.error { --c: var(--red); }
.notice.update { --c: var(--teal); }
.n-ic { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.n-ic svg { width: 17px; height: 17px; }
.n-b { min-width: 0; flex: 1; }
.n-b small { display: block; font-size: 11px; color: var(--dim); }
.n-b b { display: block; font-size: 14px; margin-top: 1px; overflow-wrap: anywhere; }
.n-b p { color: #bcbad0; font-size: 12.5px; margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow-y: auto; }
.n-x { position: absolute; top: 9px; right: 9px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--dim); transition: color .2s, background .2s; }
.n-x:hover { color: var(--text); background: var(--surface-3); }
.n-x svg { width: 14px; height: 14px; }
.n-actions { display: flex; gap: 8px; margin-top: 10px; }
.n-actions .btn { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.n-actions .btn svg { width: 14px; height: 14px; }
.upd-progress { display: none; align-items: center; gap: 10px; width: 100%; margin-top: 10px; }
.upd-progress.show { display: flex; }
.upd-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.upd-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--teal)); transition: width .3s var(--ease); }
.upd-status { font-size: 11.5px; color: var(--muted); min-width: 34px; text-align: right; }
.upd-error { display: none; color: #fda4af; font-size: 12.5px; margin-top: 8px; }
.upd-error.show { display: block; }
#updModal { z-index: 70; }
.upd-modal { width: 440px; }
.upd-badge { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; color: var(--teal); background: rgba(45,212,191,.12); border: 1px solid rgba(45,212,191,.3); }
.upd-badge svg { width: 28px; height: 28px; }
.upd-notes { width: 100%; max-height: 160px; overflow-y: auto; text-align: left; white-space: pre-wrap; font-size: 13px; color: #cfcde0; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--border); margin-bottom: 4px; user-select: text; }
.upd-notes:empty { display: none; }
.upd-modal .upd-progress { margin: 14px 0 0; }
