/* LootWeekly Prototype — 组件层：卡片 / 表格 / 标签页 / 计算器 / 步骤 / FAQ / 页脚 */

/* ---------- 答案卡 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.stat {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(23, 34, 50, 0.92), rgba(17, 26, 39, 0.92));
  padding: 16px 16px 14px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.stat:hover { transform: translateY(-2px); border-color: rgba(246, 196, 69, 0.36); }

.stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gold);
}

.stat--blue::before { background: var(--blue); }
.stat--green::before { background: var(--green); }
.stat--red::before { background: var(--red); }

.stat__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}

.stat__value {
  display: block;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 3px;
  line-height: 1.3;
}

.stat__note { display: block; font-size: 0.75rem; color: var(--muted); }
.stat__note a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(148, 163, 186, 0.4); }

/* ---------- 卡片 ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
}

.card--flat { background: var(--bg-soft); }
.card--gold { border-color: rgba(246, 196, 69, 0.3); background: linear-gradient(150deg, rgba(246, 196, 69, 0.07), var(--surface) 60%); }

.card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.card__title .idx {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(246, 196, 69, 0.14);
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  flex-shrink: 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stack > * + * { margin-top: 16px; }

.answer {
  border: 1px solid rgba(246, 196, 69, 0.34);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  background: linear-gradient(100deg, rgba(246, 196, 69, 0.09), rgba(17, 26, 39, 0.35) 60%);
  padding: 16px 20px;
  margin: 0 0 20px;
  font-size: 1.02rem;
}

.answer strong { color: var(--gold-2); }

/* ---------- 表格 ---------- */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: auto;
  margin-bottom: 8px;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 580px; }

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 11px 16px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(246, 196, 69, 0.035); }
tbody tr.is-hidden { display: none; }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.table-note {
  font-size: 0.76rem;
  color: var(--faint);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 22px;
}

th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--text); }

th[data-sort] .arrow {
  display: inline-block;
  margin-left: 6px;
  opacity: 0.35;
  font-size: 0.75em;
}

th[data-sort][aria-sort="descending"] .arrow,
th[data-sort][aria-sort="ascending"] .arrow { opacity: 1; color: var(--gold); }
th[data-sort][aria-sort="ascending"] .arrow { transform: rotate(180deg); }

/* ---------- 徽标 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.chip--gold { color: #1e1605; background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.chip--legendary { color: #ffd9a8; background: rgba(255, 154, 68, 0.14); border-color: rgba(255, 154, 68, 0.36); }
.chip--epic { color: #dcc4ff; background: rgba(176, 123, 255, 0.14); border-color: rgba(176, 123, 255, 0.34); }
.chip--rare { color: #b7d8ff; background: rgba(74, 168, 255, 0.13); border-color: rgba(74, 168, 255, 0.32); }
.chip--common { color: #c3cfe0; background: rgba(148, 163, 186, 0.12); border-color: rgba(148, 163, 186, 0.26); }

.chip--sample {
  color: #ffd166;
  background: rgba(246, 196, 69, 0.1);
  border: 1px dashed rgba(246, 196, 69, 0.45);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.63rem;
}

.chip--verified { color: #a8f0cc; background: rgba(61, 220, 151, 0.1); border-color: rgba(61, 220, 151, 0.3); }
.chip--src { color: var(--muted); background: rgba(148, 163, 186, 0.09); border-color: rgba(148, 163, 186, 0.2); font-weight: 600; }

/* ---------- 筛选 / 标签页 ---------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  flex-wrap: wrap;
}

.tab {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease;
}

.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--gold); color: #1e1605; font-weight: 800; }

.toolbar__count { font-size: 0.78rem; color: var(--faint); margin-left: auto; }

.search-input { width: 100%; max-width: 320px; }
.field input, .field select, .search-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(7, 10, 16, 0.65);
  color: var(--text);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.field input:focus, .field select:focus, .search-input:focus {
  border-color: rgba(246, 196, 69, 0.6);
  outline: none;
  box-shadow: 0 0 0 3px rgba(246, 196, 69, 0.12);
}

/* ---------- 期望次数计算器 ---------- */
.calc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(246, 196, 69, 0.06), var(--surface) 55%);
  padding: 22px;
}

.calc__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}

.field__hint { font-size: 0.72rem; color: var(--faint); margin-top: 5px; }

.calc__out {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid var(--border-soft);
  padding-top: 18px;
}

.calc__cell { text-align: center; }

.calc__num {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.calc__label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.calc__verdict {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(74, 168, 255, 0.08);
  border: 1px solid rgba(74, 168, 255, 0.22);
  font-size: 0.88rem;
  color: #cfe4ff;
}

/* ---------- 步骤 ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }

.steps li {
  position: relative;
  padding: 0 0 22px 44px;
  margin: 0;
  counter-increment: step;
}

.steps li:last-child { padding-bottom: 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold);
  background: rgba(246, 196, 69, 0.12);
  border: 1px solid rgba(246, 196, 69, 0.34);
}

.steps li::after {
  content: "";
  position: absolute;
  left: 13.5px;
  top: 30px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(var(--border), transparent);
}

.steps li:last-child::after { display: none; }
.steps strong { display: block; margin-bottom: 2px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.18s ease;
}

.faq-item.open { border-color: rgba(246, 196, 69, 0.34); }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  text-align: left;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.45;
}

.faq-q:hover { background: rgba(255, 255, 255, 0.02); }

.faq-q__icon {
  margin-left: auto;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  transition: transform 0.22s ease, color 0.18s ease;
}

.faq-item.open .faq-q__icon { transform: rotate(45deg); color: var(--gold); border-color: rgba(246, 196, 69, 0.45); }

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.faq-item.open .faq-a { grid-template-rows: 1fr; }

.faq-a > div { overflow: hidden; }

.faq-a p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 88ch;
}

.faq-a a { color: var(--gold-2); }

/* ---------- 广告位占位 ---------- */
.ad-slot {
  min-height: 108px;
  border: 1px dashed #2b3b55;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  gap: 4px;
  text-align: center;
  padding: 18px;
  color: var(--faint);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: repeating-linear-gradient(45deg, rgba(34, 48, 74, 0.16) 0 10px, transparent 10px 20px);
  margin: 26px 0;
}

.ad-slot small { display: block; letter-spacing: 0.04em; text-transform: none; font-size: 0.72rem; color: #4d5d75; }

/* ---------- 内链 / 相关页 ---------- */
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.related__card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.related__card:hover {
  border-color: rgba(246, 196, 69, 0.4);
  transform: translateY(-2px);
  text-decoration: none;
  background: var(--surface-2);
}

.related__kicker {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.related__title { font-weight: 800; font-size: 0.98rem; margin-bottom: 4px; line-height: 1.35; }
.related__desc { font-size: 0.8rem; color: var(--muted); margin: 0; }

/* ---------- 更新日志时间线 ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative;
  padding: 0 0 18px 26px;
  margin: 0;
  border-left: 1px solid var(--border);
  margin-left: 5px;
}
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
}
.timeline li:first-child::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(246, 196, 69, 0.14); }
.timeline time { display: block; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.timeline p { margin: 2px 0 0; font-size: 0.88rem; color: var(--muted); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: #060910;
  padding: 40px 0 28px;
  position: relative;
  z-index: 1;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 28px;
}

.footer__about p { font-size: 0.84rem; color: var(--muted); max-width: 40ch; }

.footer h3 {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}

.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--muted); font-size: 0.86rem; text-decoration: none; }
.footer a:hover { color: var(--gold); }

.footer__bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 18px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--faint);
}

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(23, 34, 50, 0.92);
  color: var(--muted);
  display: grid;
  place-items: center;
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
  backdrop-filter: blur(8px);
}

.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { color: var(--gold); border-color: rgba(246, 196, 69, 0.4); }

/* ---------- 滚动入场 ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .related { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .calc__grid { grid-template-columns: 1fr; }
  .calc__out { grid-template-columns: 1fr; gap: 14px; }
  .calc__cell { display: flex; align-items: baseline; justify-content: space-between; text-align: left; }
  .card { padding: 18px; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 14px; }
}

/* ---------- 开箱记录器（chest-tracker） ---------- */
.hunt {
  background: linear-gradient(160deg, var(--surface-2), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.hunt__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hunt__kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.hunt__title { font-size: 1.06rem; margin: 6px 0 0; }

.hunt__note { font-size: 0.75rem; color: var(--faint); line-height: 1.5; }

.hunt__counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hunt-ctr {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.hunt-ctr__label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.hunt-ctr__value {
  display: block;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hunt-ctr__row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 11px;
}

.hunt-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.hunt-btn:hover { border-color: var(--gold-deep); color: var(--gold-2); }
.hunt-btn:active { transform: translateY(1px); }
.hunt-btn--ghost { background: transparent; color: var(--muted); }

.hunt__milestone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(246, 196, 69, 0.08);
  border: 1px solid rgba(246, 196, 69, 0.26);
  font-size: 0.85rem;
}

.hunt__milestone strong { color: var(--gold-2); font-variant-numeric: tabular-nums; }

.hunt__bar {
  height: 6px;
  margin-top: 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.hunt__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transition: width 0.24s ease;
}

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

.hunt__panel {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.hunt__panel h3 { font-size: 0.9rem; margin: 0 0 10px; }

.hunt-list { display: grid; gap: 4px; }

.hunt-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0;
  font-size: 0.83rem;
  color: var(--muted);
  cursor: pointer;
}

.hunt-list input { width: 15px; height: 15px; accent-color: var(--gold); cursor: pointer; }
.hunt-list input:checked + span { color: var(--text); }

.hunt__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 0.73rem;
  color: var(--faint);
}

@media (max-width: 860px) {
  .hunt__counters { grid-template-columns: 1fr; }
  .hunt__grid { grid-template-columns: 1fr; }
  .hunt { padding: 16px; }
}
