:root{
  --bg:#0b0d12;
  --card:#121522;
  --card2:#0f1220;
  --text:#f3f4f6;
  --muted:#a7afc2;
  --border:rgba(255,255,255,.12);
  --shadow:0 18px 60px rgba(0,0,0,.55);
  --accent:#6d5efc;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
  background:radial-gradient(1200px 600px at 15% 20%, rgba(109,94,252,.22), transparent 60%),
             radial-gradient(900px 500px at 75% 55%, rgba(80,170,255,.14), transparent 55%),
             var(--bg);
  color:var(--text);
}

a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

.wrap{
  max-width:1180px;
  margin:26px auto 56px;
  padding:0 18px;
}

.page-head{
  position:relative;
  padding:8px 0 18px;
}

.back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:600;
  opacity:.92;
}

.head-right{
  position:absolute;
  right:0;
  top:0;
}

h1{
  margin:14px 0 6px;
  font-size:44px;
  letter-spacing:-.02em;
}

.lead{
  margin:0;
  color:var(--muted);
  max-width:820px;
  line-height:1.45;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  border:1px solid var(--border);
  padding:11px 14px;
  font-weight:700;
  background:rgba(255,255,255,.06);
  color:var(--text);
  text-decoration:none !important;
  box-shadow:0 10px 24px rgba(0,0,0,.35);
}

.btn:hover{background:rgba(255,255,255,.09)}
.btn-primary{
  border-color:rgba(109,94,252,.55);
  background:rgba(109,94,252,.18);
}

.panel{
  margin-top:18px;
  display:grid;
  grid-template-columns: 420px 1fr;
  gap:18px;
  align-items:start;
}

.panel-left, .panel-right{
  border:1px solid var(--border);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  box-shadow:var(--shadow);
  overflow:hidden;
}

.panel-left{padding:14px}
.panel-right{padding:16px}

.search-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:2px;
}

#searchInput{
  width:100%;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.25);
  color:var(--text);
  padding:12px 12px;
  outline:none;
}

#searchInput::placeholder{color:rgba(167,175,194,.75)}

.count{
  white-space:nowrap;
  color:var(--muted);
  font-weight:600;
  font-size:13px;
  padding-right:6px;
}

.games{
  margin-top:12px;
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  max-height:66vh;
  overflow:auto;
  padding-right:4px;
}

.games::-webkit-scrollbar{width:10px}
.games::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.12);
  border-radius:999px;
}

.game-tile{
  display:grid;
  grid-template-columns: 82px 1fr 26px;
  align-items:center;
  gap:12px;
  border:1px solid var(--border);
  border-radius:18px;
  padding:10px;
  background:rgba(0,0,0,.18);
  cursor:pointer;
  transition:transform .08s ease, background .12s ease, border-color .12s ease;
}

.game-tile:hover{transform:translateY(-1px);background:rgba(0,0,0,.25)}
.game-tile.active{
  border-color:rgba(109,94,252,.6);
  background:rgba(109,94,252,.10);
}

.game-img{
  width:82px;height:46px;border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  overflow:hidden;
  background:rgba(255,255,255,.04);
}

.game-img img{width:100%;height:100%;object-fit:cover;display:block}

.game-meta{
  min-width:0;
}
.game-name{
  font-weight:800;
  letter-spacing:-.01em;
  line-height:1.15;
}
.game-sub{
  color:var(--muted);
  font-size:12.5px;
  margin-top:2px;
}

.chev{
  opacity:.7;
  font-size:18px;
}

.details-title{
  font-size:22px;
  font-weight:900;
  letter-spacing:-.01em;
  margin:2px 0 6px;
}

.details-sub{
  color:var(--muted);
  margin:0 0 12px;
}

.profile-list{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:10px;
}

.profile-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px 12px;
  background:rgba(0,0,0,.18);
}

.profile-name{
  font-weight:700;
  line-height:1.25;
}
.profile-meta{
  color:var(--muted);
  font-size:12.5px;
  margin-top:2px;
}

.profile-left{min-width:0}
.profile-left *{word-break:break-word}

.howto{
  margin-top:16px;
  border-top:1px solid rgba(255,255,255,.08);
  padding-top:14px;
}

.howto h2{margin:0 0 8px;font-size:16px}
.howto ol{margin:0 0 10px 18px;color:var(--muted);line-height:1.55}
.howto b{color:var(--text)}
.hint{margin:0;color:var(--muted);font-size:13px}

.details-empty{
  padding:16px 6px 10px;
}

@media (max-width: 980px){
  .panel{grid-template-columns:1fr}
  .head-right{position:static;margin-top:12px}
  h1{font-size:36px}
  .games{max-height:none}
}
