/* ============================================================
   FF INFO v3 — Fixed & Premium
   Mobile-first, no backdrop-filter, clean grid
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Saira:wght@400;500;600&family=Share+Tech+Mono&display=swap');

/* ── Variables ── */
:root {
  --bg0:    #02060c;
  --bg1:    #05101c;
  --bg2:    #081624;
  --bg3:    #0c1e30;
  --panel:  #0b1826;
  --panel2: #0e2035;

  --fire:   #ff5500;
  --fire2:  #ff8c2a;
  --gold:   #ffcc00;
  --cyan:   #00d4ff;
  --cyan2:  #7eeaff;

  --txt:    #dce8f5;
  --txt2:   #6a8caa;
  --txt3:   #2e4a62;
  --border: #152840;

  --bronze:  #cd7f32;
  --silver:  #a0bcd0;
  --goldr:   #ffd700;
  --plat:    #00e5cc;
  --diamond: #2299ff;
  --heroic:  #bb44ff;
  --gmaster: #ff3300;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Saira', sans-serif;
  background: var(--bg0);
  color: var(--txt);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Background ── */
#bg-wrap {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 140% 50% at 50% -10%, rgba(255,85,0,.1) 0%, transparent 55%),
    radial-gradient(ellipse 80%  50% at 90% 110%, rgba(0,212,255,.06) 0%, transparent 55%),
    #02060c;
}

#particles-canvas {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  width: 100%; height: 100%;
}

.page-wrap {
  position: relative; z-index: 2;
  max-width: 1100px; margin: 0 auto; padding: 0 16px;
}

/* ── Header ── */
.site-header {
  padding: 40px 0 28px;
  text-align: center;
  position: relative;
}
.site-header::before {
  content: '';
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 50%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--fire) 40%, var(--gold) 60%, transparent);
  opacity: .5;
}

.logo-row {
  display: inline-flex; align-items: center; gap: 16px; margin-bottom: 8px;
}

.logo-emblem {
  width: 54px; height: 54px;
  position: relative; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-emblem::before {
  content: '';
  position: absolute; inset: 0;
  border: 2px solid var(--fire); transform: rotate(45deg); border-radius: 4px;
  animation: spin-slow 8s linear infinite; opacity: .65;
}
.logo-emblem::after {
  content: '';
  position: absolute; inset: 8px;
  border: 1px solid var(--gold); transform: rotate(45deg); border-radius: 2px;
  animation: spin-slow 8s linear infinite reverse; opacity: .35;
}
@keyframes spin-slow { to { transform: rotate(calc(45deg + 360deg)); } }

.logo-fire { position: relative; z-index: 1; font-size: 1.8rem; animation: fire-glow 3s ease-in-out infinite; }
@keyframes fire-glow {
  0%,100% { filter: drop-shadow(0 0 8px rgba(255,85,0,.7)); }
  50%      { filter: drop-shadow(0 0 20px rgba(255,136,0,1)); }
}

.logo-text { text-align: left; }
.logo-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(2.6rem, 8vw, 3.8rem);
  font-weight: 700; letter-spacing: .07em; line-height: 1;
  background: linear-gradient(110deg, #ff5500 0%, #ffcc00 50%, #ff8800 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: .58rem; letter-spacing: .25em; color: var(--txt3); text-transform: uppercase;
}
.header-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: .65rem; letter-spacing: .15em; color: var(--txt3); text-transform: uppercase;
  margin-top: 8px;
}

/* ── Search Card ── */
.search-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px 20px;
  max-width: 700px; margin: 0 auto 12px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
/* Corner brackets */
.search-card::before { content:''; position:absolute; top:-1px; left:-1px; width:14px; height:14px; border:2px solid var(--fire); border-right:none; border-bottom:none; border-radius:4px 0 0 0; }
.search-card::after  { content:''; position:absolute; bottom:-1px; right:-1px; width:14px; height:14px; border:2px solid var(--fire); border-left:none; border-top:none; border-radius:0 0 4px 0; }

/* ── SEARCH LAYOUT: mobile-first stack ── */
.search-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

/* On wider screens, put UID + Region side by side */
@media (min-width: 500px) {
  .search-fields {
    flex-direction: row;
    align-items: flex-end;
  }
  .field-uid    { flex: 1; }
  .field-region { flex: 0 0 175px; }
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field-lbl {
  font-family: 'Share Tech Mono', monospace;
  font-size: .6rem; letter-spacing: .22em; color: var(--txt3); text-transform: uppercase;
  display: flex; align-items: center; gap: 5px;
}
.field-lbl::before { content: ''; width: 5px; height: 1px; background: var(--fire); display: inline-block; }

.field-input,
.field-sel {
  background: var(--bg0);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--txt);
  font-family: 'Saira', sans-serif;
  font-size: 1rem; font-weight: 500;
  padding: 12px 14px; outline: none; width: 100%;
  -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.field-input::placeholder { color: var(--txt3); }
.field-input:focus,
.field-sel:focus {
  border-color: var(--fire);
  box-shadow: 0 0 0 3px rgba(255,85,0,.12);
}
.field-sel {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%232e4a62' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
  background-color: var(--bg0);
}

/* Full-width search button always */
.btn-search {
  width: 100%;
  background: linear-gradient(135deg, #ff5500, #ff8800);
  border: none; border-radius: 10px;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.05rem; font-weight: 700; letter-spacing: .14em;
  padding: 14px 24px; cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s;
  box-shadow: 0 4px 22px rgba(255,85,0,.45);
}
.btn-search::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: translateX(-100%); transition: transform .5s;
}
.btn-search:hover::before { transform: translateX(100%); }
.btn-search:hover  { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,85,0,.6); }
.btn-search:active { transform: translateY(1px); }
.btn-search:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Recent searches ── */
.recent-wrap { max-width: 700px; margin: 0 auto 26px; display: none; }
.recent-lbl {
  font-family: 'Share Tech Mono', monospace;
  font-size: .58rem; letter-spacing: .2em; color: var(--txt3); text-transform: uppercase; margin-bottom: 8px;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 30px; padding: 5px 13px;
  font-size: .78rem; color: var(--txt2); cursor: pointer;
  transition: all .2s;
}
.chip:hover { border-color: var(--fire); color: var(--fire2); background: rgba(255,85,0,.08); }

/* ── Loading ── */
.loading-wrap { display: none; max-width: 700px; margin: 0 auto 20px; }
.loading-wrap.active { display: block; }
.loading-hud {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
}
.spin-ring {
  width: 30px; height: 30px; flex-shrink: 0;
  border: 2px solid var(--border);
  border-top-color: var(--fire); border-right-color: var(--gold);
  border-radius: 50%; animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-txt-wrap { flex: 1; }
.loading-title {
  font-family: 'Rajdhani', sans-serif; font-size: .9rem; font-weight: 700;
  letter-spacing: .08em; color: var(--txt); margin-bottom: 8px;
}
.loading-track { height: 3px; background: var(--border); border-radius: 3px; overflow: hidden; }
.loading-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fire), var(--gold), var(--fire));
  background-size: 200%;
  animation: bar-sweep 1.4s ease-in-out infinite;
  border-radius: 3px;
}
@keyframes bar-sweep {
  0%   { width:0%;  margin-left:0%;    background-position:0%; }
  50%  { width:65%; margin-left:10%;   background-position:100%; }
  100% { width:0%;  margin-left:100%;  background-position:200%; }
}

/* ── Error ── */
.error-wrap { display: none; max-width: 700px; margin: 0 auto 20px; }
.error-wrap.active { display: block; }
.error-hud {
  background: #150606; border: 1px solid #4a1010;
  border-radius: 12px; padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
}
.error-msg { color: #ff9090; font-size: .88rem; }

/* ── Results ── */
#results { display: none; opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
#results.visible { display: block; opacity: 1; transform: none; }

/* ── Player Hero Banner ── */
.player-hero {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 18px;
  margin-bottom: 16px;
  position: relative; overflow: hidden;
  box-shadow: 0 0 60px rgba(255,85,0,.07), 0 8px 40px rgba(0,0,0,.5);
}
.player-hero::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,85,0,.06) 0%, transparent 50%, rgba(0,212,255,.04) 100%);
}
.player-hero::after {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(ellipse, rgba(255,85,0,.1), transparent 70%);
  pointer-events: none;
}

/* Top line accent */
.hero-accent-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--fire), var(--gold), transparent);
}

.hero-top {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 18px;
}

.hero-avatar {
  width: 64px; height: 64px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--bg3), #10243a);
  border: 2px solid var(--fire); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 20px rgba(255,85,0,.35);
  animation: avatar-pulse 3s ease-in-out infinite;
}
@keyframes avatar-pulse {
  0%,100% { box-shadow: 0 0 16px rgba(255,85,0,.35); }
  50%      { box-shadow: 0 0 32px rgba(255,85,0,.6); }
}

.hero-info { flex: 1; min-width: 0; }

.hero-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  font-weight: 700; letter-spacing: .03em; line-height: 1.1;
  color: #fff; margin-bottom: 6px;
  word-break: break-word;
  text-shadow: 0 0 30px rgba(255,85,0,.3);
}

.hero-uid-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
}
.hero-uid {
  font-family: 'Share Tech Mono', monospace;
  font-size: .72rem; color: var(--txt2);
}
.btn-copy {
  background: none; border: 1px solid var(--border); border-radius: 5px;
  color: var(--txt3); font-size: .6rem; font-family: 'Share Tech Mono', monospace;
  letter-spacing: .05em; padding: 2px 8px; cursor: pointer; transition: all .2s;
}
.btn-copy:hover { border-color: var(--cyan); color: var(--cyan); }

.hero-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 6px; padding: 3px 9px;
  font-size: .68rem; font-weight: 700;
  font-family: 'Rajdhani', sans-serif; letter-spacing: .05em; text-transform: uppercase;
  white-space: nowrap;
}
.b-lv  { background: rgba(255,85,0,.15);  border: 1px solid rgba(255,85,0,.35);  color: var(--fire2); }
.b-ver { background: rgba(0,212,255,.1);  border: 1px solid rgba(0,212,255,.25); color: var(--cyan); }
.b-reg { background: rgba(255,255,255,.05);border: 1px solid var(--border);     color: var(--txt2); }
.b-s   { background: rgba(255,204,0,.1);  border: 1px solid rgba(255,204,0,.3); color: var(--gold); }

/* EXP progress */
.exp-prog { margin-bottom: 18px; }
.prog-labels { display: flex; justify-content: space-between; font-size: .7rem; color: var(--txt3); margin-bottom: 5px; }
.prog-track { height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; }
.prog-fill  { height: 100%; border-radius: 4px; transition: width 1.2s ease; }
.prog-fill.orange { background: linear-gradient(90deg, var(--fire), var(--gold)); }
.prog-fill.blue   { background: linear-gradient(90deg, #0055ff, var(--cyan)); }
.prog-fill.green  { background: linear-gradient(90deg, #009040, #00e676); }
.prog-fill.yellow { background: linear-gradient(90deg, #cc8800, var(--gold)); }
.prog-fill.red    { background: linear-gradient(90deg, #990000, #ff3333); }

/* Hero stats grid */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 480px) {
  .hero-stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 700px) {
  .hero-stats-grid { grid-template-columns: repeat(6, 1fr); }
}

.hstat {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  position: relative; overflow: hidden;
}
.hstat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--fire), transparent);
}
.hstat-lbl {
  font-family: 'Share Tech Mono', monospace;
  font-size: .54rem; color: var(--txt3); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px;
}
.hstat-val {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem; font-weight: 700; color: var(--txt); line-height: 1;
}
.hstat-val.fire  { color: var(--fire2); }
.hstat-val.gold  { color: var(--gold); }
.hstat-val.cyan  { color: var(--cyan); }
.hstat-val.small { font-size: .82rem; color: var(--txt2); }

/* ── Cards grid ── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px; margin-bottom: 24px;
}
@media (min-width: 640px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Card ── */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 16px;
  position: relative; overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .3s;
  animation: card-in .5s ease both;
}
.card:hover {
  border-color: rgba(255,85,0,.25);
  box-shadow: 0 0 26px rgba(255,85,0,.08), 0 6px 28px rgba(0,0,0,.5);
  transform: translateY(-3px);
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--fire) 0%, var(--gold) 50%, transparent 100%);
  opacity: .5;
}
.card:nth-child(1){animation-delay:.05s}
.card:nth-child(2){animation-delay:.1s}
.card:nth-child(3){animation-delay:.15s}
.card:nth-child(4){animation-delay:.2s}
.card:nth-child(5){animation-delay:.25s}
@keyframes card-in { from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none} }

.card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.card-icon {
  width: 30px; height: 30px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-size: .85rem; flex-shrink: 0;
}
.card-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: .8rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--txt2);
}

/* Rows */
.row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.04); gap: 8px; font-size: .85rem;
}
.row:last-child { border-bottom: none; padding-bottom: 0; }
.row-lbl { color: var(--txt3); flex-shrink: 0; }
.row-val { color: var(--txt); font-weight: 500; text-align: right; word-break: break-all; }

/* Rank pill */
.rank-pill {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 6px; padding: 3px 9px;
  font-family: 'Rajdhani', sans-serif; font-size: .76rem; font-weight: 700; letter-spacing: .05em;
}

/* Signature */
.sig-box {
  background: var(--bg2); border-left: 3px solid var(--fire);
  border-radius: 0 8px 8px 0; padding: 11px 14px;
  font-size: .83rem; color: var(--txt2); white-space: pre-line; line-height: 1.65; font-style: italic;
}
.sig-box.empty { color: var(--txt3); font-style: normal; font-size: .78rem; }

/* Credit bar */
.credit-track { height: 6px; background: var(--border); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.credit-fill  { height: 100%; border-radius: 6px; transition: width 1.2s ease; }

/* Chip list */
.chip-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.info-chip {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 5px;
  padding: 3px 7px; font-size: .7rem; color: var(--txt3); font-family: 'Share Tech Mono', monospace;
}
.empty-state {
  padding: 10px 0 2px; color: var(--txt3); font-size: .8rem;
  font-family: 'Share Tech Mono', monospace;
}

/* ── Action bar ── */
.action-bar { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 48px; }
.btn-act {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  color: var(--txt2); font-family: 'Rajdhani', sans-serif; font-size: .88rem; font-weight: 600;
  letter-spacing: .08em; padding: 10px 20px; cursor: pointer;
  transition: all .2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-act:hover      { border-color: var(--fire);  color: var(--fire2); box-shadow: 0 0 12px rgba(255,85,0,.15); }
.btn-act.share      { border-color: #152840; color: var(--cyan2); }
.btn-act.share:hover{ border-color: var(--cyan);  box-shadow: 0 0 12px rgba(0,212,255,.15); }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: var(--bg3); border: 1px solid var(--fire);
  border-radius: 8px; padding: 8px 18px;
  font-size: .76rem; font-family: 'Share Tech Mono', monospace; color: var(--fire2);
  opacity: 0; pointer-events: none; z-index: 9999;
  transition: opacity .25s, transform .25s; white-space: nowrap;
  box-shadow: 0 0 18px rgba(255,85,0,.25);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Footer ── */
.site-footer {
  text-align: center; padding: 20px 20px;
  border-top: 1px solid var(--border);
  font-family: 'Share Tech Mono', monospace; font-size: .63rem;
  letter-spacing: .1em; color: var(--txt3); position: relative; z-index: 2;
}
.site-footer em { color: var(--fire); font-style: normal; }
.site-footer a { color: var(--txt3); text-decoration: none; }
.site-footer a:hover { color: var(--fire); }
