/* ===== Tier Liên Quân — toàn bộ giao diện ===== */

:root {
  --bg: #070b14;
  --bg-soft: #0b1220;
  --panel: #101a2e;
  --line: rgba(201, 162, 39, 0.35);
  --gold: #c9a227;
  --gold-soft: rgba(201, 162, 39, 0.14);
  --blue: #2563eb;
  --text: #f8fafc;
  --muted: #94a3b8;

  --tier-s: #ef4444;
  --tier-a: #f5c542;
  --tier-b: #8b5cf6;
  --tier-c: #94a3b8;
  --tier-d: #b45309;
  --tier-f: #52525b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(900px 420px at 50% -180px, rgba(37, 99, 235, 0.35), transparent 70%),
    radial-gradient(600px 300px at 100% 0%, rgba(201, 162, 39, 0.10), transparent 70%);
  min-height: 100vh;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

/* ---------- Header ---------- */
.hero__title {
  margin: 8px 0 4px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Thanh chọn đường ---------- */
.lanes {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.lanes::-webkit-scrollbar { display: none; }

.lane {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(16, 26, 46, 0.85);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.lane:hover { transform: translateY(-1px); border-color: var(--gold); }

.lane[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.30), rgba(201, 162, 39, 0.12));
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.35), 0 6px 18px -8px rgba(201, 162, 39, 0.8);
}

/* ---------- Trạng thái ---------- */
.status {
  margin: 18px 2px;
  font-size: 14px;
  color: var(--muted);
  min-height: 20px;
}

.status__retry {
  appearance: none;
  margin-left: 10px;
  border: 1px solid var(--line);
  background: var(--gold-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.status__retry:hover { border-color: var(--gold); }

/* ---------- Danh sách tướng ---------- */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(22, 34, 58, 0.95), rgba(16, 26, 46, 0.95));
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-radius: 14px;
  box-shadow: 0 10px 24px -18px #000, inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.row:hover { border-color: rgba(201, 162, 39, 0.45); }

.row__champ {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.row__img,
.row__fallback {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  object-fit: cover;
  background: var(--bg-soft);
}

.row__fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  color: var(--gold);
}

.row__name {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* ---------- Huy hiệu tier ---------- */
.tier-slot { display: flex; justify-content: flex-start; }

.tier {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0b1220;
  background: var(--tier-c);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 18px -10px rgba(0, 0, 0, 0.9);
}

.tier--S { background: var(--tier-s); color: #fff; box-shadow: 0 0 18px -2px rgba(239, 68, 68, 0.75); }
.tier--A { background: var(--tier-a); color: #1a1405; box-shadow: 0 0 16px -4px rgba(245, 197, 66, 0.7); }
.tier--B { background: var(--tier-b); color: #fff; }
.tier--C { background: var(--tier-c); color: #0b1220; }
.tier--D { background: var(--tier-d); color: #fff; }
.tier--F { background: var(--tier-f); color: #e2e8f0; }

/* ---------- Nút vote ---------- */
.votes {
  display: flex;
  gap: 6px;
}

.vote {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 11px;
  border-radius: 12px;
  cursor: pointer;
  min-width: 58px;
  justify-content: center;
}

.vote__icon { font-size: 15px; line-height: 1; }
.vote__count { font-variant-numeric: tabular-nums; }

.vote--up { color: #4ade80; border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.10); }
.vote--down { color: #f87171; border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.10); }

.vote:hover { filter: brightness(1.15); }

.vote.is-bouncing { animation: pop 180ms ease-out; }

@keyframes pop {
  0% { transform: scale(1); }
  55% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .vote.is-bouncing { animation: none; }
  .lane, .row { transition: none; }
}

/* ---------- Footer ---------- */
.foot {
  margin-top: 26px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

/* ---------- Màn hình nhỏ ---------- */
@media (max-width: 380px) {
  .hero__title { font-size: 26px; }
  .row { grid-template-columns: 56px 1fr auto; gap: 8px; padding: 9px 10px; }
  .row__img, .row__fallback { width: 48px; height: 48px; }
  .tier { width: 38px; height: 38px; font-size: 18px; }
  .vote { padding: 7px 8px; min-width: 52px; font-size: 13px; }
}
