/* =========================================
   XZENTOSIA - SAVED PLAYERS UI (same theme)
   ========================================= */

:root{
  --bg-app:#121418;
  --bg-panel:#1b1e24;
  --bg-input:#0f1114;

  --primary:#FFC107;
  --primary-hover:#ffca2c;
  --accent:#4fc3f7;

  --text-main:#ffffff;
  --text-muted:#8b9bb4;

  --border:rgba(255,255,255,0.08);
  --border-hover:rgba(255,255,255,0.15);

  --shadow-card:0 4px 6px rgba(0,0,0,0.2);
  --radius:8px;

  --nav-height:60px;
  --content-width:1400px;
}

*{box-sizing:border-box}

body{
  margin:0;
  padding:0;
  font-family:'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  background-color:var(--bg-app);
  color:var(--text-main);
  line-height:1.5;
}

/* ================= NAV BAR ================= */
.navbar{
  height:var(--nav-height);
  background:#16181d;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 24px;
  position:sticky;
  top:0;
  z-index:1000;
}

.nav-brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.nav-brand h1{
  font-size:20px;
  font-weight:800;
  margin:0;
  letter-spacing:.5px;
  color:#fff;
}

.nav-brand h1 span{color:var(--primary)}

.badge{
  background:#2a2e36;
  color:var(--text-muted);
  font-size:11px;
  padding:2px 6px;
  border-radius:4px;
  text-transform:uppercase;
  font-weight:700;
}

.nav-info{
  display:flex;
  align-items:center;
  gap:16px;
}

.nav-info small{
  color:var(--text-muted);
  font-size:12px;
}

.nav-link{
  color:var(--accent);
  text-decoration:none;
  font-size:13px;
  font-weight:600;
}
.nav-link:hover{text-decoration:underline}

/* ================= SUB HEADER ================= */
.sub-header{
  background:#1b1e24;
  border-bottom:1px solid var(--border);
  padding:0 24px;
}

.tab-container{
  max-width:var(--content-width);
  margin:0;
  display:flex;
  gap:24px;
}

.tab-link{
  background:none;
  border:none;
  color:var(--primary);
  padding:14px 0;
  font-size:14px;
  font-weight:800;
  cursor:default;
  position:relative;
}

.tab-link::after{
  content:"";
  position:absolute;
  bottom:-1px;
  left:0;
  width:100%;
  height:3px;
  background:var(--primary);
  border-radius:3px 3px 0 0;
}

/* ================= MAIN ================= */
.main-content{
  max-width:var(--content-width);
  margin:0 auto;
  padding:24px;
}

.fade-in{animation:fadeIn .25s ease-out}
@keyframes fadeIn{
  from{opacity:0;transform:translateY(5px)}
  to{opacity:1;transform:translateY(0)}
}

/* ================= SEARCH SECTION ================= */
.search-section{
  background:var(--bg-panel);
  padding:20px;
  border-radius:var(--radius);
  border:1px solid var(--border);
  margin-bottom:24px;
  box-shadow:var(--shadow-card);
}

.section-label{
  display:block;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:1px;
  font-weight:800;
  color:var(--text-muted);
  margin-bottom:12px;
}

.input-group{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.form-input{
  background:var(--bg-input);
  border:1px solid var(--border);
  color:#fff;
  padding:0 16px;
  height:44px;
  border-radius:4px;
  font-size:14px;
  outline:none;
  flex:1;
  min-width:220px;
}
.form-input:focus{border-color:var(--primary)}

.status-line{
  margin-top:12px;
  font-size:13px;
  color:var(--text-muted);
  font-family:monospace;
}

.muted{ color:var(--text-muted); opacity:.8; }

/* ================= BUTTONS ================= */
.btn-ghost{
  height:44px;
  padding:0 14px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.06);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
.btn-ghost:hover{
  background:rgba(255,255,255,0.09);
  border-color:rgba(255,255,255,0.18);
}

/* ================= CARDS ================= */
.dash-card{
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:20px;
  box-shadow:var(--shadow-card);
}

.card-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:16px;
  padding-bottom:12px;
  border-bottom:1px solid rgba(255,255,255,0.05);
}

.card-header h3{
  margin:0;
  font-size:18px;
  border-left:4px solid var(--accent);
  padding-left:12px;
  line-height:1;
}

/* ================= GRID LIST ================= */
.cards-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(320px, 1fr));
  gap:16px;
}

/* JS uses .card */
.card{
  border:1px solid var(--border);
  border-radius:12px;
  padding:14px;
  background:linear-gradient(145deg,rgba(35,39,46,0.6),rgba(25,28,34,0.9));
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(0,0,0,0.35);
  border-color:rgba(255,255,255,0.2);
}

.card .row{
  display:flex;
  align-items:center;
  gap:14px;
}

.card .meta{
  min-width:0;
  flex:1;
}

.card .meta b{
  display:block;
  font-size:18px;
  font-weight:900;
  color:#fff;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.kvline{
  margin-top:6px;
  display:flex;
  align-items:center;
  gap:8px;
  font-family:monospace;
}
.kvline small{
  color:var(--text-muted);
  text-transform:uppercase;
  letter-spacing:0.8px;
  font-weight:800;
  font-size:11px;
}
.kvline .uid{
  color:#fff;
  font-weight:800;
  background:rgba(255,255,255,0.08);
  padding:4px 8px;
  border-radius:8px;
}

/* ================= AVATAR OVERLAY (icon + frame) ================= */
.avatar{
  width:76px;
  height:76px;
  border-radius:16px;
  border:2px solid rgba(255,255,255,0.08);
  overflow:hidden;
  position:relative;
  background:#000;
  flex:0 0 auto;
}

.avatar .icon{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  z-index:1;
}

.avatar .frame{
  position:absolute;
  inset:-6%;
  width:112%;
  height:112%;
  object-fit:contain;
  display:block;
  pointer-events:none;
  z-index:2;
}

/* ================= DETAIL TOP BAR ================= */
.detail-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.detail-pill{
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.10);
  padding:8px 12px;
  border-radius:999px;
  font-weight:900;
  color:#fff;
}

/* ================= PROFILE ALIGNMENT (like screenshot) ================= */
.card-title{
  margin:0 0 16px 0;
  font-size:16px;
  font-weight:800;
  color:#fff;
  border-left:3px solid var(--primary);
  padding-left:10px;
}

.profile-layout{
  display:flex;
  flex-direction:column;
}

.profile-top{
  display:flex;
  align-items:center;
  gap:18px;
}

/* bigger avatar in detail */
.profile-top .avatar{
  width:92px;
  height:92px;
  border-radius:18px;
}

.profile-info{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:10px;
  min-width:0;
  flex:1;
}

.profile-info .name{
  font-size:34px;
  font-weight:900;
  color:#fff;
  margin:0;
  line-height:1.05;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.profile-info .uid{
  margin:0;
  font-size:14px;
  color:var(--text-muted);
  font-family:monospace;
  font-weight:900;
  background:rgba(255,255,255,0.08);
  padding:6px 10px;
  border-radius:8px;
  align-self:flex-start;
}

/* ================= CHARTS ================= */
.charts-grid{
  margin-top:18px;
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:24px;
  width:100%;
}

.chart-container{
  min-height:320px;
  display:flex;
  flex-direction:column;
  min-width:0;
}

.chart-wrapper{
  flex:1;
  position:relative;
  width:100%;
  height:100%;
}

@media (max-width:1000px){
  .charts-grid{ grid-template-columns:1fr; }
}

/* ================= FOOTER ================= */
.footer{
  text-align:center;
  padding:40px 0;
  color:var(--text-muted);
  font-size:12px;
  border-top:1px solid var(--border);
  margin-top:40px;
}

.banner-error{
  background:#e74c3c;
  color:#fff;
  text-align:center;
  padding:12px;
  font-weight:900;
}

/* ================= MOBILE ================= */
@media (max-width:768px){
  .navbar{
    flex-direction:column;
    height:auto;
    padding:12px;
    align-items:flex-start;
    gap:12px;
  }
  .nav-info{
    width:100%;
    justify-content:space-between;
  }
  .input-group{
    flex-direction:column;
  }
  .form-input, .btn-ghost{
    width:100%;
  }
  .main-content{
    padding:16px;
  }
}
