/* Профиль игрока и топ */

main { min-height: 60vh; }

/* ---------- карточка профиля ---------- */

.pcard {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 40px;
  padding: 28px;
  border-radius: 24px;
  background:
    radial-gradient(90% 120% at 100% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
}
.skeleton-card { height: 190px; }
.pinfo { flex: 1; min-width: 0; }
.pname { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pname h1 { margin: 0; font-size: 40px; letter-spacing: -0.035em; line-height: 1.05; overflow-wrap: anywhere; }
.psub { margin-top: 4px; color: var(--muted); }
.plevel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 12px; font-weight: 600; }
.badge { padding: 5px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 14px; }
.ptitle { color: var(--text); }
.prank { color: var(--muted); text-decoration: none; }
.prank:hover { color: var(--accent); }
.xpbar.big { height: 10px; border-radius: 5px; max-width: 520px; }
.xpbar.big i { border-radius: 5px; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 14px; }
.stat { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat b { display: block; font-size: 28px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }

/* ---------- достижения ---------- */

.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.ach {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  opacity: .45;
}
.ach.got { opacity: 1; border-color: rgba(255, 116, 23, .35); }
.ach b { display: block; font-size: 15px; }
.ach span { font-size: 13px; color: var(--muted); }
.ach-icon {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-3);
  color: var(--muted);
}
.ach.got .ach-icon { background: var(--accent); color: var(--accent-ink); }

/* ---------- курсоры ---------- */

.cursors { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.cursor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 16px 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: default;
}
.cursor.unlocked { cursor: pointer; }
.cursor.unlocked:hover { border-color: var(--border-strong); }
.cursor.on { border-color: var(--accent); background: var(--accent-soft); }
.cursor-art { height: 46px; display: grid; place-items: center; }
.cursor b { font-size: 14px; }
.cursor span { font-size: 12px; color: var(--muted); text-align: center; }
.cursor:not(.unlocked) b { color: var(--muted); }

/* ---------- собранные пазлы ---------- */

.puzzles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.puzzle { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.puzzle:hover { border-color: var(--border-strong); }
.puzzle img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.puzzle div { padding: 10px 12px 12px; }
.puzzle b { display: block; }
.puzzle span { font-size: 13px; color: var(--muted); }

/* ---------- топ ---------- */

.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); overflow-x: auto; }
.seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface-3); color: var(--text); }

.toplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.toplist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.toplist li.me { border-color: var(--accent); }
.toplist li.empty { color: var(--muted); padding: 20px; }
.toplist a { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.toplist a span { min-width: 0; }
.toplist b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toplist small { color: var(--muted); font-size: 13px; }
.place { width: 30px; text-align: center; font-weight: 800; font-size: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.place.p1 { color: #ffc93d; }
.place.p2 { color: #d7dbe4; }
.place.p3 { color: #e09a62; }
.value { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:last-child { grid-column: span 2; }
}
@media (max-width: 600px) {
  .pcard { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; margin-top: 20px; }
  .pname h1 { font-size: 30px; }
  .toplist li { padding: 10px 12px; gap: 10px; }
  .value { font-size: 14px; }
}

/* ---------- подписка ---------- */

.plus-hero { padding: 56px 0 28px; max-width: 720px; }
.plus-hero h1 { margin: 16px 0 10px; font-size: clamp(34px, 5vw, 56px); line-height: 1.02; letter-spacing: -0.04em; }
.plus-hero p { font-size: 17px; margin: 0; }
.plus-hero .badge { display: inline-block; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tier { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.tier.best { border-color: var(--accent); background: radial-gradient(100% 80% at 100% 0%, var(--accent-soft), transparent 70%), var(--surface); }
.tier-head { display: flex; align-items: center; justify-content: space-between; font-size: 18px; }
.now { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text); }
.price { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.tier ul { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tier li { padding-left: 24px; position: relative; color: #c9c9d2; }
.tier li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.plus-note { margin: 18px 0 0; }
.btn.wide { width: 100%; }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; } }
