:root {
  color-scheme: dark;
  --bg: #0d0e11;
  --surface: #13151a;
  --surface-2: #181b21;
  --surface-3: #20242c;
  --accent: #6a97e4;
  --accent-soft: rgba(106, 151, 228, .13);
  --accent-bright: #88adeb;
  --text: #f4f6f9;
  --muted: #9298a5;
  --muted-2: #6e7480;
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.15);
  --success: #64d6a4;
  --warning: #e8ba6b;
  --danger: #ed7b83;
  --shadow: 0 24px 70px rgba(0,0,0,.32);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --nav-h: 72px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); min-width: 320px; min-height: 100vh; line-height: 1.55; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(circle at 82% 5%, rgba(106,151,228,.06), transparent 30%); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: rgba(106,151,228,.34); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 999; padding: 10px 16px; background: var(--accent); color: #08101d; border-radius: 10px; font-weight: 750; transition: top .2s; }
.skip-link:focus { top: 12px; }

h1,h2,h3,h4,p { margin-top: 0; }
h1,h2,h3,h4 { line-height: 1.15; letter-spacing: -.025em; }
h1 { font-size: clamp(2.2rem, 5vw, 4.8rem); }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
h3 { font-size: 1.08rem; }
p { color: var(--muted); }

.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.page { padding: 38px 0 96px; animation: page-in .35s ease both; }
.page.narrow { width: min(700px, calc(100% - 40px)); margin-inline: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(2rem,4vw,3rem); margin-bottom: 8px; }
.page-head p { margin-bottom: 0; max-width: 620px; }
.section { margin-top: 50px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2,.section-head h3 { margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--accent-bright); font-size: .75rem; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); }
.tiny { font-size: .78rem; }
.hide { display: none !important; }

.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 690; cursor: pointer; transition: transform .18s, background .18s, border-color .18s, color .18s; }
.btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.25); background: var(--surface-3); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #0b1422; box-shadow: 0 8px 30px rgba(106,151,228,.18); }
.btn-primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(255,255,255,.05); color: var(--text); }
.btn-danger { color: var(--danger); border-color: rgba(237,123,131,.25); background: rgba(237,123,131,.07); }
.btn-sm { min-height: 36px; padding-inline: 12px; font-size: .84rem; border-radius: 10px; }
.btn-icon { width: 42px; padding: 0; border-radius: 50%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.card { background: rgba(19,21,26,.9); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(255,255,255,.02) inset; }
.panel { padding: 24px; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.035); color: var(--muted); font-size: .76rem; font-weight: 650; }
.pill.success { color: var(--success); background: rgba(100,214,164,.08); border-color: rgba(100,214,164,.18); }
.pill.warning { color: var(--warning); background: rgba(232,186,107,.08); border-color: rgba(232,186,107,.18); }
.pill.danger { color: var(--danger); background: rgba(237,123,131,.08); border-color: rgba(237,123,131,.18); }
.pill.premium { color:#ffd873; background:rgba(255,200,71,.09); border-color:rgba(255,200,71,.25); }

.username { display:inline-flex; align-items:center; gap:4px; font-weight:760; }.username.nick-blue { color:#83b4ff; }.username.nick-gold { color:#ffd873; }.username.nick-pink { color:#ff8fc7; }.username.nick-green { color:#75e3b0; }.username.nick-purple { color:#bd9aff; }.username.effect-glow { text-shadow:0 0 10px currentColor; }.username.effect-gradient { color:transparent; background:linear-gradient(90deg,#6a97e4,#c99cff,#ffd873); background-clip:text; -webkit-background-clip:text; }.username.effect-pulse { animation:nick-pulse 2.2s ease-in-out infinite; }.username .premium-crown { display:inline-grid; color:#ffd873; }.username .premium-crown svg { width:14px; height:14px; fill:rgba(255,216,115,.2); }

.field { display: grid; gap: 8px; }
.field label,.label { color: #d8dbe1; font-size: .83rem; font-weight: 650; }
.input,.select,.textarea { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 11px; background: #101217; color: var(--text); transition: border-color .18s, box-shadow .18s; }
.textarea { min-height: 110px; padding-block: 12px; resize: vertical; }
.input::placeholder,.textarea::placeholder { color: #616773; }
.input:focus,.select:focus,.textarea:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px rgba(106,151,228,.12); }
.field-error { color: var(--danger); font-size: .78rem; min-height: 1em; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: .86rem; cursor: pointer; }
.checkbox input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.form-stack { display: grid; gap: 17px; }
.full { grid-column: 1 / -1; }

.avatar { width: 40px; height: 40px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: linear-gradient(145deg,#293143,#151922); border: 1px solid var(--line-strong); color: #c8d9f4; font-weight: 760; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 88px; height: 88px; font-size: 1.7rem; }
.avatar-sm { width: 30px; height: 30px; font-size: .72rem; }

.skeleton { position: relative; overflow: hidden; background: #171a20; border-radius: 10px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg,transparent,rgba(255,255,255,.055),transparent); animation: shimmer 1.4s infinite; }
.loader { width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted); }
.brand-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; color: #0b1422; background: var(--accent); font-weight: 900; font-size: 1.4rem; }
.brand-loader-mark { width:50px; height:50px; }

.empty { padding: 54px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 1.4rem; }
.empty h3 { margin-bottom: 7px; }
.empty p { max-width: 480px; margin: 0 auto 20px; }

.toast-stack { position: fixed; z-index: 1000; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(370px,calc(100% - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 14px 15px; border: 1px solid var(--line-strong); border-radius: 13px; background: #1a1d23; box-shadow: var(--shadow); animation: toast-in .3s ease both; }
.toast.success svg { color: var(--success); }.toast.error svg { color: var(--danger); }
.toast strong { display: block; font-size: .88rem; }.toast span { color: var(--muted); font-size: .8rem; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } }
@keyframes nick-pulse { 50% { opacity:.68; filter:brightness(1.3); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

@media (max-width: 700px) {
  .container { width: min(100% - 28px,1180px); }
  .page { padding-top: 24px; padding-bottom: 104px; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .panel { padding: 18px; }
  .toast-stack { right: 14px; bottom: 88px; width: calc(100% - 28px); }
}
