/* ================================================================
   GameTracker — ChatATG
   Separate stylesheet for /gametracker page
================================================================ */

/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080c14;
  --bg2:       #0e1420;
  --bg3:       #141a2e;
  --surface:   rgba(255,255,255,.04);
  --surface-b: rgba(255,255,255,.08);
  --border:    rgba(255,255,255,.07);
  --border-2:  rgba(255,255,255,.12);

  --accent:    #38bdf8;
  --accent2:   #818cf8;
  --gold:      #f5c842;
  --purple:    #c084fc;
  --green:     #22c55e;
  --orange:    #f97316;
  --red:       #ef4444;
  --yellow:    #eab308;

  --text:      #e2e8f0;
  --text-2:    #94a3b8;
  --text-3:    #64748b;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --ease:      cubic-bezier(.22,1,.36,1);
  --ease-in:   cubic-bezier(.55,0,1,.45);

  --nav-h:     64px;
  --max-w:     1320px;

  --sidebar-w: 270px;
  --right-w:   250px;
}

html { scroll-behavior: smooth; font-size: 17px; }

body {
  font-family: 'Nunito', 'Noto Sans Thai', 'Noto Sans Thai', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 99px; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
code {
  font-family: 'DM Mono', 'Fira Code', monospace;
  font-size: .85em;
  background: rgba(255,255,255,.07);
  padding: 2px 6px;
  border-radius: 5px;
  word-break: break-all;
}

/* ================================================================
   NAV
================================================================ */
.gt-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: var(--nav-h);
  background: rgba(8,12,20,.92);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}

.gt-nav-left { display: flex; align-items: center; gap: 20px; }
.gt-nav-right { display: flex; align-items: center; gap: 10px; }

.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; color: var(--text);
}
.nav-brand img { width: 26px; height: 26px; border-radius: 7px; }

.nav-divider {
  width: 1px; height: 20px;
  background: var(--border-2);
  flex-shrink: 0;
}

.nav-game-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 7px;
  background: rgba(245,200,66,.08);
  border: 1px solid rgba(245,200,66,.2);
  color: var(--gold); font-size: 12px; font-weight: 600;
}

/* Language switcher */
.lang-switcher {
  display: flex; align-items: center; gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 3px;
}
.lang-btn {
  padding: 4px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  border: none; background: transparent;
  color: var(--text-3); cursor: pointer;
  transition: all .15s;
}
.lang-btn.active {
  background: var(--surface-b);
  color: var(--text);
}
.lang-btn:hover:not(.active) { color: var(--text-2); }

/* Back button */
.btn-nav-back {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.btn-nav-back:hover { background: var(--surface-b); color: var(--text); }

/* ================================================================
   LAYOUT
================================================================ */
.gt-main { padding-top: var(--nav-h); }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ================================================================
   HERO / IMPORT SECTION
================================================================ */
.gt-hero {
  position: relative; overflow: hidden;
  padding: 72px 32px 60px;
  text-align: center;
}

.hero-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(56,189,248,.10) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(129,140,248,.06) 0%, transparent 60%);
}

/* Floating background chars */
.hero-bg-chars {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: space-evenly;
  pointer-events: none; overflow: hidden;
  padding: 0 40px;
}
.hero-bg-img {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; opacity: .07; filter: blur(1.5px);
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .hero-bg-img { width: 50px; height: 50px; }
}

.hero-inner { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 99px;
  background: rgba(56,189,248,.1); border: 1px solid rgba(56,189,248,.22);
  color: var(--accent); font-size: 12px; font-weight: 600;
  letter-spacing: .04em; margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub {
  color: var(--text-2); font-size: 17px;
  max-width: 560px; margin: 0 auto 42px; line-height: 1.7;
}

/* ================================================================
   IMPORT CARD
================================================================ */
.import-card {
  max-width: 780px; margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* Platform / Method tabs bar */
.import-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  gap: 8px; flex-wrap: wrap;
}

.method-tabs {
  display: flex;
}
.method-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 20px;
  font-size: 14px; font-weight: 600;
  color: var(--text-3); background: transparent; border: none;
  cursor: pointer; position: relative; transition: color .15s;
  white-space: nowrap;
}
.method-tab.active { color: var(--accent); }
.method-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.method-tab:hover:not(.active) { color: var(--text-2); }
.method-tab svg { flex-shrink: 0; }

.import-body { padding: 28px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Drop Zone ── */
.drop-zone {
  border: 2px dashed rgba(255,255,255,.10);
  border-radius: var(--radius-lg);
  padding: 42px 28px; text-align: center;
  cursor: pointer; transition: all .2s;
  background: rgba(255,255,255,.015);
  position: relative;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(56,189,248,.05);
}
.drop-zone svg { opacity: .45; margin-bottom: 12px; }
.dz-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.dz-sub { color: var(--text-3); font-size: 14px; line-height: 1.6; }
.dz-path {
  display: inline-block; margin-top: 10px;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--text-2); word-break: break-all;
}
.btn-choose {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px; padding: 9px 20px; border-radius: 9px;
  background: var(--accent); color: #000;
  font-weight: 700; font-size: 13px;
  cursor: pointer; transition: opacity .15s;
}
.btn-choose:hover { opacity: .85; }

/* ── URL Input ── */
.url-wrap { display: flex; flex-direction: column; gap: 10px; }
.url-wrap label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.url-textarea {
  width: 100%; padding: 12px 14px;
  border-radius: var(--radius); resize: none;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-2);
  color: var(--text); font-size: 12px;
  font-family: 'DM Mono', monospace;
  outline: none; transition: border-color .15s;
}
.url-textarea:focus { border-color: var(--accent); }
.url-textarea::placeholder { color: var(--text-3); }

.url-hint {
  font-size: 12px; color: var(--text-3); line-height: 1.6;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}

/* ── Status ── */
.import-status { min-height: 18px; font-size: 12.5px; margin-top: 10px; color: var(--green); }
.import-status.error { color: var(--red); }
.import-status.warn  { color: var(--orange); }

/* ── Analyze Button ── */
.btn-analyze {
  width: 100%; margin-top: 20px; padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 700; font-size: 16px;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .15s, transform .12s;
  letter-spacing: .01em;
}
.btn-analyze:disabled { opacity: .35; cursor: not-allowed; transform: none !important; }
.btn-analyze:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.btn-analyze:active:not(:disabled) { transform: translateY(0); }

/* ================================================================
   LOADING
================================================================ */
.gt-loading {
  display: none; text-align: center;
  padding: 80px 24px;
}
.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(56,189,248,.15);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-label {
  color: var(--text-2); font-size: 15px; margin-bottom: 28px;
}

.loading-steps {
  display: flex; flex-direction: column; gap: 8px;
  max-width: 320px; margin: 0 auto;
}
.loading-step {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,.03);
  font-size: 13px; color: var(--text-3);
  transition: all .3s;
}
.loading-step.active { background: rgba(56,189,248,.08); color: var(--accent); }
.loading-step.done   { color: var(--green); }
.step-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* ================================================================
   RESULTS
================================================================ */
.gt-results { display: none; }

/* ── Aria AI Card ── */
.aria-wrap { padding: 0 32px 36px; max-width: var(--max-w); margin: 0 auto; }

.aria-card {
  background: linear-gradient(135deg, rgba(56,189,248,.06), rgba(129,140,248,.06));
  border: 1px solid rgba(56,189,248,.16);
  border-radius: var(--radius-xl); padding: 28px 34px;
  position: relative; overflow: hidden;
}
.aria-card::after {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,.08), transparent 70%);
  pointer-events: none;
}
.aria-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.aria-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.aria-name { font-weight: 700; font-size: 17px; }
.aria-role { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.aria-text {
  font-size: 15px; line-height: 1.85;
  white-space: pre-wrap; color: var(--text);
}
.aria-meta {
  margin-top: 16px; font-size: 13px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.aria-meta b { color: var(--text-2); }

/* ── Section ── */
.gt-section {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 32px 56px;
}
.section-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.section-header h2 { font-size: 20px; font-weight: 700; }
.section-bar {
  width: 4px; height: 20px; border-radius: 2px; flex-shrink: 0;
  background: linear-gradient(to bottom, var(--accent), var(--accent2));
}

/* ── Banner Grid ── */
.banners-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
}
@media (max-width: 520px) { .banners-grid { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .banners-grid { grid-template-columns: 1fr; } }

/* ── Banner Card ── */
.banner-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.banner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
  border-color: var(--border-2);
}

.bc-head {
  padding: 16px 18px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.bc-name { font-weight: 700; font-size: 15px; }
.bc-meta { color: var(--text-3); font-size: 12px; margin-top: 3px; }
.bc-badges { display: flex; gap: 5px; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; line-height: 1;
}
.badge-guaranteed { background: rgba(34,197,94,.12); color: var(--green);  border: 1px solid rgba(34,197,94,.22); }
.badge-soft-pity  { background: rgba(249,115,22,.12); color: var(--orange); border: 1px solid rgba(249,115,22,.22); }
.badge-win-good   { background: rgba(34,197,94,.10); color: var(--green); }
.badge-win-bad    { background: rgba(239,68,68,.10);  color: var(--red); }

/* Pity bars */
.bc-pity { padding: 14px 18px 8px; }
.pity-row { margin-bottom: 10px; }
.pity-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; margin-bottom: 5px;
}
.pity-num { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; }
.pity-bar-bg {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,.05); overflow: hidden;
}
.pity-bar-fill {
  height: 100%; border-radius: 3px;
  transition: width .7s var(--ease);
}

/* 5-star items */
.bc-stars { padding: 0 18px 14px; }
.stars-label {
  font-size: 11px; font-weight: 600;
  color: var(--text-3); letter-spacing: .04em;
  margin-bottom: 8px; text-transform: uppercase;
}
.stars-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.star-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px 4px 5px; border-radius: 8px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  font-size: 12px; cursor: default; transition: background .15s;
}
.star-chip:hover { background: rgba(255,255,255,.08); }
.star-chip img {
  width: 20px; height: 20px; border-radius: 50%;
  object-fit: cover; background: rgba(255,255,255,.07); flex-shrink: 0;
}
.chip-pity  { color: var(--text-3); font-size: 10px; }
.chip-win   { font-size: 10px; font-weight: 700; }
.chip-win.w { color: var(--green); }
.chip-win.l { color: var(--red); }
.chip-win.g { color: var(--text-3); }

/* Stats strip */
.bc-stats {
  display: flex; border-top: 1px solid var(--border);
}
.bc-stat {
  flex: 1; padding: 12px 14px; text-align: center;
  border-right: 1px solid var(--border);
}
.bc-stat:last-child { border-right: none; }
.stat-val { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-lbl { font-size: 10px; color: var(--text-3); margin-top: 3px; text-transform: uppercase; letter-spacing: .04em; }

/* ── Reset button ── */
.btn-reset {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-3); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.btn-reset:hover { border-color: var(--accent); color: var(--text); }

/* ================================================================
   CHARACTERS SHOWCASE
================================================================ */
.chars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 12px;
}
.char-tile {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 8px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: default; transition: all .15s;
}
.char-tile:hover { background: var(--surface-b); transform: translateY(-2px); }
.char-tile img {
  width: 54px; height: 54px; border-radius: 50%;
  object-fit: cover; background: rgba(255,255,255,.05);
}
.char-tile-name {
  font-size: 11px; color: var(--text-3);
  text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; width: 100%;
}

/* ================================================================
   HOW-TO SECTION
================================================================ */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.how-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: border-color .15s;
}
.how-card:hover { border-color: var(--border-2); }
.how-num {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff;
  margin-bottom: 14px;
}
.how-title { font-weight: 600; font-size: 15px; margin-bottom: 7px; }
.how-text { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }

/* ================================================================
   GAME SELECTOR (multi-game ready)
================================================================ */
.game-selector {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 0 24px 36px;
  max-width: var(--max-w); margin: 0 auto;
  justify-content: center;
}
.game-tile {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 11px;
  background: var(--surface); border: 2px solid var(--border);
  cursor: pointer; transition: all .15s; font-size: 13px; font-weight: 600;
}
.game-tile.active {
  border-color: var(--accent);
  background: rgba(56,189,248,.08); color: var(--accent);
}
.game-tile:hover:not(.active) { border-color: var(--border-2); }
.game-tile img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; }
.game-tile .coming-soon {
  font-size: 9px; font-weight: 600; letter-spacing: .05em;
  color: var(--text-3); background: var(--surface-b);
  padding: 2px 6px; border-radius: 4px; text-transform: uppercase;
}

/* ================================================================
   TOAST
================================================================ */
.gt-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a2030; border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 12px 20px;
  font-size: 13.5px; color: var(--text);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  z-index: 9999; transition: transform .3s var(--ease);
  pointer-events: none; white-space: nowrap;
}
.gt-toast.show { transform: translateX(-50%) translateY(0); }

/* ================================================================
   FOOTER
================================================================ */
.gt-footer {
  text-align: center; padding: 28px 24px;
  font-size: 12px; color: var(--text-3);
  border-top: 1px solid var(--border);
}
.gt-footer a { color: var(--accent); }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 960px) {
  :root { --sidebar-w: 220px; --right-w: 200px; }
  .tracker-layout { padding: 0 20px 32px; gap: 14px; }
}
@media (max-width: 768px) {
  .gt-nav { padding: 0 16px; }
  .gt-hero  { padding: 52px 20px 44px; }
  .container, .gt-section, .aria-wrap { padding-left: 20px; padding-right: 20px; }
  .tracker-layout { padding: 0 20px 28px; }
  .import-card { border-radius: var(--radius-lg); }
  .import-topbar { padding: 0 16px; }
  .import-body { padding: 22px; }
  .hero-title { font-size: 2rem; }
  .banners-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .nav-brand span { display: none; }
  .how-grid { grid-template-columns: 1fr; }
  .chars-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  .hero-sub { font-size: 15px; }
  .method-tab { padding: 14px 12px; font-size: 13px; }
}

/* ── Utility ── */
.hidden { display: none !important; }
.text-center { text-align: center; }

/* ================================================================
   WUWATRACKER-STYLE 3-COLUMN RESULTS LAYOUT
================================================================ */
.tracker-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--right-w);
  grid-template-areas: "left center right";
  gap: 18px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px 40px;
  align-items: start;
}
.tracker-left   { grid-area: left; }
.tracker-center { grid-area: center; display: flex; flex-direction: column; gap: 16px; }
.tracker-right  { grid-area: right; }

.tl-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.tl-header h2 { font-size: 13px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }

/* ── Banner Sidebar Cards (.bsc) ── */
.banner-sidebar { display: flex; flex-direction: column; gap: 8px; }

.bsc {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg2);
  cursor: pointer; min-height: 96px;
  transition: border-color .2s, transform .18s var(--ease), box-shadow .2s;
}
.bsc:hover { border-color: var(--border-2); transform: translateX(2px); }
.bsc.active { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(245,200,66,.25); }

.bsc-art {
  position: absolute; top: 0; right: 0; bottom: 0; width: 58%;
  background-size: cover; background-position: center top;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.5) 45%, rgba(0,0,0,.92) 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.5) 45%, rgba(0,0,0,.92) 100%);
}

.bsc-info { position: relative; z-index: 1; padding: 11px 12px; }

.bsc-pity5 {
  font-size: 28px; font-weight: 800;
  color: var(--gold); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.bsc-pity5.warn { color: var(--orange); }
.bsc-pity5.danger { color: var(--red); }

.bsc-pity4 {
  font-size: 15px; font-weight: 700;
  color: var(--purple); margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.bsc-guarantee {
  font-size: 9px; font-weight: 700; letter-spacing: .05em;
  color: var(--text-3); text-transform: uppercase;
  margin-top: 5px; display: block;
}
.bsc-guarantee.on { color: var(--green); }

.bsc-type {
  font-size: 10px; color: var(--text-3);
  margin-top: 4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 130px;
}

/* ── Center Cards ── */
.tc-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.tc-banner-label {
  font-size: 14px; font-weight: 700; color: var(--gold);
  padding: 0 2px 2px; min-height: 20px;
}

.tc-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-3); margin-bottom: 12px;
}

/* Stats table */
.stats-table { width: 100%; border-collapse: collapse; }
.stats-table td {
  padding: 11px 4px; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.stats-table tr:last-child td { border-bottom: none; }
.stats-table td:first-child { color: var(--text-2); }
.stats-table .stat-r {
  text-align: right; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--text);
}

/* ── Recent Pulls Chips ── */
.recent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
  padding: 6px 0 8px;
  min-height: 80px;
}

.rc-chip {
  position: relative;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 74px;
}

/* Avatar image */
.rc-chip-img {
  width: 72px; height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg3);
  border: 2px solid var(--border);
  display: block;
  transition: transform .15s ease;
}
.rc-chip:hover .rc-chip-img { transform: scale(1.05); }
.rc-chip.star5 .rc-chip-img { border-color: var(--gold); box-shadow: 0 0 10px rgba(245,200,66,.25); }
.rc-chip.star4 .rc-chip-img { border-color: var(--purple); box-shadow: 0 0 8px rgba(192,132,252,.2); }

/* Pity number badge — bottom-left of image */
.rc-chip-badge {
  position: absolute;
  bottom: 24px; left: -2px;
  background: rgba(8,12,20,.85);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  padding: 1px 5px;
  font-size: 10px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  line-height: 1.5;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.rc-chip.star5 .rc-chip-badge { color: var(--gold); border-color: rgba(245,200,66,.4); }
.rc-chip.star4 .rc-chip-badge { color: var(--purple); border-color: rgba(192,132,252,.4); }

/* Win/loss indicator — top-right */
.rc-chip-win {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.rc-chip-win.w { background: var(--green); color: #fff; }
.rc-chip-win.l { background: var(--red);   color: #fff; }

/* Name label below image */
.rc-chip-label {
  margin-top: 5px;
  font-size: 10px; font-weight: 600;
  color: var(--text-3); text-align: center;
  width: 74px;
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.rc-chip.star5 .rc-chip-label { color: var(--gold); }
.rc-chip.star4 .rc-chip-label { color: var(--purple); }

/* ── Pull History Table ── */
.tc-history-card { padding: 16px 0 0; }
.tc-history-card .tc-section-label { padding: 0 18px; }
.tc-history-card .tc-history-header { padding-top: 0; }

.history-scroll { overflow-x: auto; overflow-y: auto; max-height: 380px; }

.history-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.history-table th {
  padding: 10px 16px; text-align: left;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-3);
  background: var(--bg2);
  position: sticky; top: 0; z-index: 1;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.history-table td {
  padding: 9px 16px; border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--text-2); white-space: nowrap; vertical-align: middle;
}
.history-table tr:hover td { background: rgba(255,255,255,.03); }
.history-table .hr-star5 td { background: rgba(245,200,66,.03); }
.history-table .hr-star5 .ht-name { color: var(--gold); font-weight: 700; }
.history-table .hr-star4 .ht-name { color: var(--purple); font-weight: 600; }

.ht-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  object-fit: cover; background: rgba(255,255,255,.06);
  vertical-align: middle; margin-right: 4px;
}
.ht-win  { color: var(--green); font-size: 10px; font-weight: 600; }
.ht-loss { color: var(--red);   font-size: 10px; font-weight: 600; }
.ht-guar { color: var(--text-3); font-size: 10px; }

/* ── Right Luck Card ── */
.luck-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 16px;
  display: flex; flex-direction: column; gap: 0;
}
.luck-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-3); margin-bottom: 10px;
}
.luck-score {
  font-size: 40px; font-weight: 800;
  font-variant-numeric: tabular-nums; line-height: 1;
  color: var(--gold);
}
.luck-score.score-good { color: var(--green); }
.luck-score.score-avg  { color: var(--yellow); }
.luck-score.score-bad  { color: var(--red); }
.luck-label { font-size: 12px; color: var(--text-2); margin: 4px 0 16px; }

.luck-bars { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.lb-row-header {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-2); margin-bottom: 4px;
}
.lb-row-name { font-weight: 500; }
.lb-row-val  { font-weight: 700; color: var(--text); }
.lb-bar-bg   { height: 5px; border-radius: 3px; background: rgba(255,255,255,.06); overflow: hidden; }
.lb-bar-fill {
  height: 100%; border-radius: 3px; background: var(--gold);
  transition: width .7s var(--ease);
}
.lb-bar-fill.fill-good { background: var(--green); }
.lb-bar-fill.fill-bad  { background: var(--red); }

.luck-global { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.lg-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.lg-row b { color: var(--text); font-weight: 700; }

/* ── Star Filter Bar ── */
.tc-history-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; margin-bottom: 4px;
}
.tc-history-header .tc-section-label { padding: 0; margin-bottom: 0; }

.star-filter-bar { display: flex; gap: 5px; }
.sf-btn {
  padding: 3px 9px; border-radius: 20px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text-3);
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: all .18s ease;
}
.sf-btn:hover { border-color: var(--accent); color: var(--accent); }
.sf-btn.sf-active.sf-5 { background: rgba(245,200,66,.15); border-color: var(--gold); color: var(--gold); }
.sf-btn.sf-active.sf-4 { background: rgba(192,132,252,.15); border-color: var(--purple); color: var(--purple); }
.sf-btn.sf-active.sf-3 { background: rgba(148,163,184,.12); border-color: var(--text-2); color: var(--text-2); }

/* Weapon images in chips — already square-ish, slight tweak */
.rc-chip-weapon { object-fit: contain !important; background: rgba(255,255,255,.06) !important; }
.ht-avatar-weapon { border-radius: 3px !important; object-fit: contain; background: rgba(255,255,255,.08); }

/* ── Tracker Responsive ── */
@media (max-width: 1024px) {
  .tracker-layout { grid-template-columns: 200px 1fr 190px; }
}
/* ── Overall Stats Section ── */
.overall-stats-wrap {
  max-width: var(--max-w); margin: 0 auto 16px;
  padding: 0 24px;
  display: flex; flex-direction: column; gap: 16px;
}

.overall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.ov-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.ov-card-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3);
}
.ov-card-value {
  font-size: 22px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.ov-card-value.good { color: var(--green); }
.ov-card-value.warn { color: var(--yellow); }
.ov-card-value.bad  { color: var(--red); }
.ov-card-value.gold { color: var(--gold); }

.overall-banners {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.ov-banner-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.ov-banner-name {
  font-size: 12px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ov-banner-stats {
  display: flex; gap: 14px; font-size: 12px; color: var(--text-2);
}
.ov-banner-stats span b { color: var(--text); font-weight: 700; }

@media (max-width: 840px) {
  .tracker-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "center" "left" "right";
  }
  .banner-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
  }
}
@media (max-width: 480px) {
  .tracker-layout { padding: 0 16px 24px; }
  .banner-sidebar { grid-template-columns: 1fr 1fr; }
  .rc-chip { width: 56px; }
  .rc-chip-img { width: 54px; height: 54px; border-radius: 8px; }
  .rc-chip-label { width: 56px; font-size: 9px; }
  .rc-chip-badge { bottom: 20px; font-size: 9px; }
}
