/* ============================================================
   SA-MP.VN — pages.css
   Style trang con: bảng xếp hạng, tải xuống, cửa hàng, nạp thẻ
   ============================================================ */

/* ============================================================
   LEADERBOARD (thiết kế riêng — rõ ràng, đầy đủ)
   ============================================================ */
.lb-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.lb-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all .2s ease;
  position: relative;
}
.lb-tab:hover { color: #fff; border-color: var(--accent); }
.lb-tab.is-active { background: var(--accent); border-color: var(--accent); color: #000; }
.lb-tab .soon {
  font-size: 9px;
  background: var(--accent-2);
  color: #fff;
  padding: 2px 6px;
  letter-spacing: .08em;
}
.lb-tab[disabled] { opacity: .5; cursor: not-allowed; }

.lb-updated {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
  margin-bottom: 26px;
}
.lb-updated i { color: var(--accent); margin-right: 6px; }

/* Podium top 3 */
.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}
.podium-card {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 26px 22px 22px;
  overflow: hidden;
  transition: all .25s ease;
}
.podium-card:hover { transform: translateY(-4px); }
.podium-card--1 {
  border-color: rgba(255, 180, 0, .55);
  background: linear-gradient(180deg, rgba(255, 180, 0, .09) 0%, var(--bg-panel) 60%);
  order: 2;
}
.podium-card--2 { order: 1; border-color: rgba(255, 255, 255, .22); }
.podium-card--3 { order: 3; border-color: rgba(255, 94, 26, .4); }
.podium-card__rank {
  position: absolute;
  top: -6px; right: 10px;
  font-family: var(--font-mono);
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, .05);
}
.podium-card--1 .podium-card__rank { color: rgba(255, 180, 0, .14); }
.podium-card__medal {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border-strong);
}
.podium-card--1 .podium-card__medal { background: var(--accent); color: #000; border-color: var(--accent); }
.podium-card--2 .podium-card__medal { background: rgba(255, 255, 255, .12); color: #e4e4e7; }
.podium-card--3 .podium-card__medal { background: var(--accent-2-dim); color: var(--accent-2); border-color: rgba(255, 94, 26, .4); }
.podium-card__name {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium-card__name a:hover { color: var(--accent); }
.podium-card__value {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -.02em;
}
.podium-card--2 .podium-card__value { color: #e4e4e7; }
.podium-card--3 .podium-card__value { color: var(--accent-2); }
.podium-card__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 4px;
}
.podium-card__meta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted-2);
}
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.status-dot::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}
.status-dot--on { color: var(--success); }
.status-dot--on::before { background: var(--success); box-shadow: 0 0 8px rgba(53, 208, 127, .7); }
.status-dot--off { color: var(--muted-2); }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.pagination__info { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-2); margin-right: 12px; }
.page-btn {
  min-width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  transition: all .15s ease;
}
.page-btn:hover { color: #fff; border-color: var(--accent); }
.page-btn.is-active { background: var(--accent); border-color: var(--accent); color: #000; }

/* ============================================================
   DOWNLOAD PAGE
   ============================================================ */
.dl-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 26px;
}
.dl-card {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 26px;
  position: relative;
  transition: border-color .2s ease;
}
.dl-card:hover { border-color: rgba(255, 180, 0, .4); }
.dl-card__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.dl-card__icon {
  width: 52px; height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 180, 0, .35);
  color: var(--accent);
  font-size: 21px;
}
.dl-card__file { font-family: var(--font-mono); font-size: 15.5px; font-weight: 800; word-break: break-all; }
.dl-card__sub { margin-top: 4px; font-size: 12.5px; color: var(--muted-2); }
.dl-card__verified {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  flex-shrink: 0;
  padding: 5px 11px;
  background: rgba(53, 208, 127, .1);
  border: 1px solid rgba(53, 208, 127, .35);
  color: #7fe8b0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.dl-card__specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.dl-spec { padding: 13px 16px; border-right: 1px solid var(--border); }
.dl-spec:last-child { border-right: 0; }
.dl-spec b { display: block; font-family: var(--font-mono); font-size: 13.5px; font-weight: 700; }
.dl-spec span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.dl-card__sha {
  margin-bottom: 18px;
  padding: 11px 14px;
  border: 1px dashed var(--border-strong);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-2);
  word-break: break-all;
  line-height: 1.6;
}
.dl-card__sha b { display: block; color: var(--muted); letter-spacing: .1em; margin-bottom: 4px; }

.mirror-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.mirror {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 12px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  transition: all .2s ease;
  text-align: center;
}
.mirror i { font-size: 20px; color: var(--muted-2); transition: color .2s ease; }
.mirror:hover { border-color: var(--accent); color: #fff; }
.mirror:hover i { color: var(--accent); }

/* Bảng yêu cầu hệ thống */
.sysreq { border: 1px solid var(--border); background: var(--bg-panel); }
.sysreq table { width: 100%; border-collapse: collapse; }
.sysreq th, .sysreq td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.sysreq th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.sysreq td:first-child { font-family: var(--font-mono); font-weight: 600; color: var(--muted-2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.sysreq td:nth-child(2) { color: var(--muted); }
.sysreq td:nth-child(3) { color: var(--accent); }
.sysreq tr:last-child td { border-bottom: 0; }

/* 3 bước */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.step {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 28px 24px;
  position: relative;
}
.step__num {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 18px;
}
.step__title { font-size: 16px; font-weight: 800; text-transform: uppercase; }
.step__desc { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

/* FAQ accordion */
.faq { border: 1px solid var(--border); background: var(--bg-panel); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }
.faq-item__q {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  transition: color .15s ease;
}
.faq-item__q i { margin-left: auto; font-size: 12px; color: var(--muted-2); transition: transform .25s ease; }
.faq-item__q:hover { color: var(--accent); }
.faq-item.is-open .faq-item__q { color: var(--accent); }
.faq-item.is-open .faq-item__q i { transform: rotate(180deg); }
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-item__a p { padding: 0 16px 14px; color: var(--muted); font-size: 13.5px; max-width: 720px; }

/* ============================================================
   SHOP
   ============================================================ */
.shop-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.shop-cat {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  transition: all .2s ease;
}
.shop-cat:hover { color: #fff; border-color: var(--accent); }
.shop-cat.is-active { background: var(--accent); border-color: var(--accent); color: #000; }
.shop-balance {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 180, 0, .4);
  background: var(--accent-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}
.shop-grid {
  display: grid;
  /* tự nhồi số cột vừa bề ngang thay vì cố định 3 -> đỡ trống hai bên, trang ngắn lại */
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 12px;
}
.shop-item {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  transition: all .25s ease;
  overflow: hidden;
}
.shop-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--rarity, transparent);
  opacity: .9;
}
.shop-item:hover { transform: translateY(-4px); border-color: var(--rarity, var(--border-strong)); }
.shop-item--common    { --rarity: #9ca3af; }
.shop-item--rare      { --rarity: #38bdf8; }
.shop-item--epic      { --rarity: #c084fc; }
.shop-item--legendary { --rarity: #FFB400; }
.shop-item__badge {
  position: absolute;
  top: 9px; right: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  background: var(--accent-2);
  color: #fff;
  letter-spacing: .06em;
}
.shop-item__icon {
  width: 58px; height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .03);
  color: var(--rarity, var(--muted));
  font-size: 24px;
  margin-bottom: 18px;
}
.shop-item__rarity {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rarity, var(--muted-2));
  margin-bottom: 6px;
}
.shop-item__name { font-size: 16px; font-weight: 800; text-transform: uppercase; }
.shop-item__desc { margin-top: 8px; font-size: 13px; color: var(--muted); flex: 1; white-space: pre-line; word-break: break-word; overflow-wrap: anywhere; line-height: 1.55; }
.shop-item__foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.shop-item__price {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 800;
  color: var(--accent);
}
.shop-item__price small { font-size: 11px; color: var(--muted-2); font-weight: 600; }

/* ============================================================
   NẠP THẺ (form telco)
   ============================================================ */
.telco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.telco {
  padding: 16px 12px;
  border: 1px solid var(--border-strong);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .2s ease;
  color: var(--muted);
}
.telco:hover { color: #fff; border-color: var(--accent); }
.telco.is-selected { background: var(--accent); border-color: var(--accent); color: #000; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.status-pill--success { background: rgba(53, 208, 127, .12); color: #6fe3a5; }
.status-pill--failed  { background: rgba(255, 69, 69, .12);  color: #ff8080; }
.status-pill--pending { background: var(--accent-dim);        color: var(--accent); }

/* Responsive trang con */
@media (max-width: 1100px) {
  .dl-hero { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .podium { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
@media (max-width: 900px) {
  .mirror-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .podium { grid-template-columns: 1fr; }
  .podium-card--1 { order: 1; }
  .podium-card--2 { order: 2; }
  .podium-card--3 { order: 3; }
  .lb-table-wrap { overflow-x: auto; }
  .lb-table-wrap .data-table { min-width: 560px; }
}
@media (max-width: 600px) {
  .shop-grid { grid-template-columns: 1fr; }
  .shop-balance { margin-left: 0; width: 100%; justify-content: center; }
  .dl-card__specs { grid-template-columns: 1fr; }
  .dl-spec { border-right: 0; border-bottom: 1px solid var(--border); }
  .dl-spec:last-child { border-bottom: 0; }
  .telco-grid { grid-template-columns: 1fr; }
}
