*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #080b14;
  --bg2:      #0c1020;
  --card:     #111827;
  --card2:    #161e30;
  --border:   #1e2840;
  --border2:  #263350;
  --gold:     #f5a623;
  --gold2:    #e8930d;
  --red:      #ff4757;
  --green:    #2ed573;
  --blue:     #4d90fe;
  --text:     #e2e8f0;
  --text2:    #94a3b8;
  --text3:    #4a5568;
  --ff-font:  'Rajdhani', sans-serif;
  --hud:      'Orbitron', sans-serif;
  --ui:       'Inter', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--ui); background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }

/* BG PARTICLES */
.bg-particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-particles span {
  position: absolute; display: block; border-radius: 50%;
  width: 2px; height: 2px; background: var(--gold); opacity: 0.15;
  animation: float 14s infinite;
}
.bg-particles span:nth-child(1)  { left:8%;  top:15%; animation-delay:0s;   animation-duration:13s; }
.bg-particles span:nth-child(2)  { left:22%; top:65%; animation-delay:2s;   animation-duration:10s; width:3px;height:3px; }
.bg-particles span:nth-child(3)  { left:48%; top:12%; animation-delay:4s;   animation-duration:16s; }
.bg-particles span:nth-child(4)  { left:72%; top:42%; animation-delay:1s;   animation-duration:11s; width:4px;height:4px;opacity:.08;}
.bg-particles span:nth-child(5)  { left:88%; top:68%; animation-delay:3s;   animation-duration:9s;  }
.bg-particles span:nth-child(6)  { left:38%; top:82%; animation-delay:5s;   animation-duration:15s; }
.bg-particles span:nth-child(7)  { left:62%; top:50%; animation-delay:2.5s; animation-duration:18s; }
.bg-particles span:nth-child(8)  { left:80%; top:8%;  animation-delay:0.5s; animation-duration:12s; }
.bg-particles span:nth-child(9)  { left:14%; top:92%; animation-delay:3.5s; animation-duration:9s;  }
.bg-particles span:nth-child(10) { left:4%;  top:48%; animation-delay:1.5s; animation-duration:20s; width:3px;height:3px; }
@keyframes float { 0%,100%{transform:translateY(0) scale(1);opacity:.12;} 50%{transform:translateY(-50px) scale(1.5);opacity:.3;} }

/* APP SHELL */
.app { position: relative; z-index: 1; max-width: 1300px; margin: 0 auto; padding: 0 20px 60px; }

/* HEADER */
.header {
  background: linear-gradient(90deg,#090e1e,#0f1628,#090e1e);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 4px 32px rgba(245,166,35,.1);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; gap: 12px; flex-wrap: wrap;
}
.logo-group { display: flex; align-items: center; gap: 14px; }
.logo-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg,var(--gold),var(--gold2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--hud); font-size: 14px; font-weight: 900;
  color: #000; letter-spacing: 1px;
  box-shadow: 0 4px 16px rgba(245,166,35,.3);
}
.logo-title { font-family: var(--hud); font-size: 20px; font-weight: 900; color: var(--gold); letter-spacing: 3px; }
.logo-sub { font-size: 10px; color: var(--text3); letter-spacing: 1px; margin-top: 2px; }
.header-credits { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.credit-row { display: flex; align-items: center; gap: 6px; }
.credit-lbl { font-size: 9px; color: var(--text3); letter-spacing: 1.5px; text-transform: uppercase; }
.credit-row a { font-family: var(--ff-font); font-size: 14px; font-weight: 700; color: var(--gold); text-decoration: none; }
.credit-row a:hover { color: #fff; }
.credit-row a.blue { color: var(--blue); }
.credit-row a.blue:hover { color: #80b0ff; }

/* LAYOUT */
.layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.left-col, .right-col { display: flex; flex-direction: column; gap: 20px; }
@media(max-width:900px) { .layout { grid-template-columns: 1fr; } }

/* CARDS */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,transparent,var(--gold),transparent);
  opacity: .5;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card-head h2 { font-family: var(--ff-font); font-size: 17px; font-weight: 700; letter-spacing: .5px; flex: 1; }
.card-head span { font-size: 16px; }
.step-badge {
  width: 28px; height: 28px;
  background: linear-gradient(135deg,var(--gold),var(--gold2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--hud); font-size: 11px; font-weight: 900; color: #000;
  flex-shrink: 0;
}
.live-pill {
  background: var(--red); color: #fff; font-size: 9px; font-weight: 700;
  letter-spacing: 2px; padding: 2px 8px; border-radius: 20px;
  animation: blink 1.5s infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:.4;} }

/* STATUS DOT */
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-dot.idle    { background: var(--text3); }
.status-dot.ok      { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-dot.error   { background: var(--red);   box-shadow: 0 0 8px var(--red); }

/* AUTH TABS */
.auth-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.atab {
  flex: 1; padding: 8px 4px;
  background: none; border: 1px solid var(--border2);
  border-radius: 8px; color: var(--text2);
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: var(--ff-font); letter-spacing: .5px;
  transition: all .2s;
}
.atab.active { border-color: var(--gold); color: var(--gold); background: rgba(245,166,35,.08); }
.atab:hover:not(.active) { border-color: var(--border2); color: var(--text); }
.atab-pane { display: none; }
.atab-pane.active { display: block; }

/* FIELDS */
.field-group { margin-bottom: 12px; }
.field-group label { display: block; font-size: 10px; font-weight: 600; color: var(--text3); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.inp {
  width: 100%;
  background: var(--bg2); border: 1.5px solid var(--border2);
  border-radius: 8px; color: var(--text);
  font-size: 13px; padding: 10px 12px; outline: none;
  font-family: monospace; transition: border-color .2s;
}
.inp:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,166,35,.08); }
.inp::placeholder { color: var(--text3); }

/* BUTTONS */
.btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border: none; border-radius: 10px;
  font-family: var(--ff-font); font-size: 15px; font-weight: 700; letter-spacing: 1px;
  cursor: pointer; transition: all .2s; margin-top: 4px;
}
.btn-auth {
  background: linear-gradient(135deg,var(--gold),var(--gold2));
  color: #000; box-shadow: 0 4px 20px rgba(245,166,35,.3);
}
.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(245,166,35,.5); }
.btn-change {
  flex: 1;
  background: linear-gradient(135deg,#2ed573,#1db954);
  color: #000; box-shadow: 0 4px 18px rgba(46,213,115,.3);
}
.btn-change:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(46,213,115,.5); }
.btn-copy {
  flex: 1; background: var(--card2); border: 1.5px solid var(--border2);
  color: var(--text);
}
.btn-copy:hover { border-color: var(--gold); color: var(--gold); }
.btn-reauth {
  width: 100%; background: none; border: 1px solid var(--border2);
  color: var(--text2); font-size: 12px; padding: 7px; border-radius: 8px;
  cursor: pointer; margin-top: 10px; transition: all .2s; font-family: var(--ui);
}
.btn-reauth:hover { border-color: var(--gold); color: var(--gold); }

/* LOADER */
.loader-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 10px 14px;
  background: var(--bg2); border-radius: 8px;
  font-size: 13px; color: var(--text2);
}
.spinner {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 2px solid var(--border); border-top-color: var(--gold);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to{transform:rotate(360deg);} }
.hidden { display: none !important; }

/* PLAYER CARD */
.player-card {
  margin-top: 14px;
  background: linear-gradient(135deg,#0d1528,#111e36);
  border: 1px solid var(--border2);
  border-radius: 12px; padding: 14px;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }
.player-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.player-avatar {
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg,#1a2a4a,#0d1528);
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900; color: var(--gold);
  font-family: var(--hud); flex-shrink: 0;
}
.player-info { flex: 1; }
.player-name { font-family: var(--ff-font); font-size: 17px; font-weight: 700; color: #fff; }
.player-meta-row { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.meta-chip {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; letter-spacing: .5px;
}
.uid-chip   { background: rgba(245,166,35,.12); color: var(--gold); border: 1px solid rgba(245,166,35,.2); }
.region-chip{ background: rgba(77,144,254,.12);  color: var(--blue); border: 1px solid rgba(77,144,254,.2); }
.player-status-badge {
  font-size: 10px; font-weight: 800; padding: 4px 10px;
  border-radius: 6px; letter-spacing: 1px; white-space: nowrap;
}
.player-status-badge.active { background: rgba(46,213,115,.12); color: var(--green); border: 1px solid rgba(46,213,115,.25); }
.player-status-badge.banned { background: rgba(255,71,87,.12); color: var(--red);   border: 1px solid rgba(255,71,87,.25); }
.player-details-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.detail-item { background: rgba(255,255,255,.03); border-radius: 8px; padding: 8px 10px; }
.detail-lbl { font-size: 9px; color: var(--text3); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 3px; }
.detail-val { font-size: 12px; color: var(--text); font-weight: 600; word-break: break-all; }
.detail-val.mono { font-family: monospace; font-size: 11px; }

/* TOOLBAR */
.toolbar { margin-bottom: 14px; }
.toolbar-section { margin-bottom: 10px; }
.tlabel { display: block; font-size: 9px; font-weight: 600; letter-spacing: 2px; color: var(--text3); text-transform: uppercase; margin-bottom: 7px; }
.fmt-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; background: var(--card2);
  border: 1px solid var(--border2); border-radius: 7px;
  color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; margin-right: 6px; margin-bottom: 4px;
  transition: all .2s; font-family: var(--ui);
}
.fmt-btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }
.fmt-btn.highlight .h-mark { background: linear-gradient(135deg,#ffff00,#ffd700); color:#000; padding:0 4px; border-radius:3px; font-weight:800; font-size:12px; }
.color-palette { display: flex; flex-wrap: wrap; gap: 6px; }
.cbtn {
  width: 26px; height: 26px; border-radius: 6px;
  border: 2px solid transparent; cursor: pointer;
  transition: all .2s; position: relative;
}
.cbtn:hover { transform: scale(1.3); border-color: #fff; box-shadow: 0 0 10px rgba(255,255,255,.4); z-index: 2; }
.cbtn[title]::after {
  content: attr(title); position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%);
  background: #1a2040; color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 4px;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s;
  border: 1px solid var(--border2);
}
.cbtn:hover::after { opacity: 1; }

/* BIO TEXTAREA */
.bio-wrap { margin-bottom: 12px; }
.bio-textarea {
  width: 100%; min-height: 110px; resize: vertical;
  background: var(--bg2); border: 1.5px solid var(--border2); border-radius: 10px;
  color: var(--text); font-family: monospace; font-size: 14px;
  padding: 12px 14px; outline: none; line-height: 1.6;
  transition: border-color .2s;
}
.bio-textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,166,35,.08); }
.bio-textarea::placeholder { color: var(--text3); }
.bio-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; color: var(--text3); }
.clear-btn { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 11px; padding: 2px 8px; border-radius: 4px; transition: all .2s; }
.clear-btn:hover { color: var(--red); background: rgba(255,71,87,.1); }

.bio-actions { display: flex; gap: 10px; margin-bottom: 6px; }
.copy-ok { font-size: 12px; color: var(--green); background: rgba(46,213,115,.08); border-radius: 6px; padding: 6px 10px; margin-top: 6px; }

/* OUTPUT PANEL */
.output-panel {
  margin-top: 14px;
  background: linear-gradient(135deg,#0a1220,#0f1828);
  border: 1px solid var(--border2);
  border-radius: 12px; overflow: hidden;
  animation: fadeIn .3s ease;
}
.output-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.output-icon { font-size: 18px; }
.output-title { font-family: var(--ff-font); font-size: 16px; font-weight: 700; color: var(--text); }
.output-grid { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.out-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; }
.out-lbl { color: var(--text3); min-width: 120px; flex-shrink: 0; font-size: 12px; padding-top: 1px; }
.out-val { color: var(--text); font-weight: 500; word-break: break-all; }
.out-val.mono { font-family: monospace; font-size: 12px; color: var(--gold); }
.out-val.small { font-size: 11px; }
.output-credits {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text3); text-align: center;
}
.output-credits a { color: var(--gold); text-decoration: none; }
.output-credits a:hover { color: #fff; }

/* FORMAT REF */
.ref-card .card-head { margin-bottom: 12px; }
.ref-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width:600px) { .ref-cols { grid-template-columns: 1fr; } }
.ref-section-title { font-size: 11px; color: var(--text2); font-weight: 600; margin-bottom: 8px; }
.ref-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); margin-bottom: 5px; }
.ref-item code { background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-size: 11px; color: var(--gold); }
.dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; display: inline-block; }

/* PHONE PREVIEW */
.preview-card { background: var(--card); }
.phone-wrap { display: flex; justify-content: center; padding: 10px 0 16px; }
.phone {
  width: 265px;
  background: linear-gradient(160deg,#181830,#0d0d20);
  border-radius: 34px;
  border: 3px solid #252545;
  padding: 18px 10px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04);
}
.phone-notch { width: 70px; height: 10px; background: #0a0a18; border-radius: 0 0 10px 10px; margin: 0 auto 14px; }
.phone-screen { background: linear-gradient(160deg,#0d1428,#080e1a); border-radius: 18px; overflow: hidden; border: 1px solid #1a2038; }
.ff-ui { font-family: var(--ff-font); }
.ff-topbar { background: linear-gradient(180deg,#182040,#0e1628); padding: 14px 10px 10px; display: flex; gap: 10px; border-bottom: 1px solid #1a2840; }
.ff-avatar-block { position: relative; flex-shrink: 0; }
.ff-avatar { width: 52px; height: 52px; border-radius: 10px; background: #0a1020; border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.ff-lvl { position: absolute; bottom: -4px; right: -4px; background: var(--gold); color: #000; font-size: 8px; font-weight: 900; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--hud); border: 1.5px solid #0e1628; }
.ff-player-block { flex: 1; }
.ff-pname { font-family: var(--hud); font-size: 13px; font-weight: 900; color: #fff; letter-spacing: 1.5px; }
.ff-puid { font-size: 8px; color: #4a5568; margin-top: 2px; font-family: monospace; }
.ff-rank { font-size: 10px; color: var(--gold); margin-top: 5px; }
.ff-bio-area { padding: 8px 10px; }
.ff-bio-label { font-size: 7px; letter-spacing: 2px; color: #3a4460; font-weight: 700; margin-bottom: 5px; font-family: var(--hud); }
.ff-bio-box { background: rgba(255,255,255,.02); border: 1px solid #1a2440; border-radius: 7px; padding: 8px; min-height: 50px; }
.ff-bio-text { font-size: 12px; color: #b0bcd0; line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
.ph-text { color: #2a3450; font-style: italic; }
.ff-stats { display: flex; border-top: 1px solid #1a2440; padding: 8px 10px; }
.ff-stat { flex: 1; text-align: center; }
.ff-stat:not(:last-child) { border-right: 1px solid #1a2440; }
.ff-stat-v { font-family: var(--hud); font-size: 12px; font-weight: 700; color: var(--gold); }
.ff-stat-k { font-size: 7px; color: #3a4460; margin-top: 1px; letter-spacing: 1px; text-transform: uppercase; }

/* API DOCS */
.docs-card {}
.endpoint { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; padding: 8px 12px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; }
.method { background: var(--gold); color: #000; font-size: 9px; font-weight: 800; padding: 2px 8px; border-radius: 4px; white-space: nowrap; letter-spacing: .5px; }
.endpoint code { font-size: 13px; color: var(--text); font-family: monospace; flex: 1; }
.ep-desc { font-size: 11px; color: var(--text3); width: 100%; }
.param-list { margin-top: 10px; }
.param { font-size: 12px; color: var(--text2); padding: 5px 0; border-bottom: 1px solid var(--border); }
.param:last-child { border-bottom: none; }
.param code { color: var(--gold); background: rgba(245,166,35,.08); padding: 1px 5px; border-radius: 3px; margin-right: 4px; }
.req { background: rgba(255,71,87,.12); color: var(--red); font-size: 10px; padding: 1px 6px; border-radius: 4px; font-weight: 600; }

/* FOOTER */
.footer { text-align: center; padding: 24px 0 8px; border-top: 1px solid var(--border); margin-top: 20px; font-size: 12px; color: var(--text3); display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer a { color: var(--gold); text-decoration: none; font-weight: 600; }
.footer a:hover { color: #fff; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
