/* PTCG 练牌室 · 官网样式
   配色取自客户端 Assets/PTCGUI/UIFactory.cs 的调色板，保证与游戏内观感一致。 */

:root {
  --bg: #0b0d12;          /* UIFactory.Bg */
  --panel: #151921;       /* UIFactory.Panel */
  --panel-2: #1d222c;     /* UIFactory.PanelLight */
  --line: rgba(255, 255, 255, .08);
  --text: #f2f5fa;        /* UIFactory.TextColor */
  --muted: #a8b3c4;       /* UIFactory.Muted */
  --accent: #f0c25c;      /* UIFactory.Accent */
  --danger: #e15c52;      /* UIFactory.Danger */
  --good: #5cc785;        /* UIFactory.Good */
  --radius: 14px;
  --gap: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.75 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC",
        -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- 顶栏 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 13, 18, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: .5px;
}
.brand img { border-radius: 9px; }

.nav { display: flex; gap: 20px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- 首屏 ---------- */
.hero { padding: 72px 0 56px; }

.kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 2px;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 5.2vw, 46px);
  line-height: 1.3;
  letter-spacing: .5px;
}

.lead {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}
.lead strong { color: var(--text); }

/* ---------- 区块 ---------- */
.band { padding: 64px 0; }
.band.alt { background: var(--panel); border-block: 1px solid var(--line); }

h2 {
  margin: 0 0 26px;
  font-size: clamp(23px, 3.2vw, 30px);
  letter-spacing: .5px;
}

h3 { margin: 0 0 10px; font-size: 18px; }

.section-note {
  margin: -10px 0 26px;
  color: var(--muted);
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
}
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: var(--gap); }

.card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.band.alt .card { background: var(--panel-2); }
.card p { margin: 0; color: var(--muted); }
.card p b { color: var(--text); }

.formula {
  margin: 0 0 12px !important;
  padding: 12px 14px;
  background: rgba(240, 194, 92, .08);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  color: var(--text) !important;
  font-size: 15px;
}

.ticks { margin: 0; padding: 0; list-style: none; color: var(--muted); }
.ticks li { position: relative; padding-left: 22px; margin-bottom: 10px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
}

/* ---------- 回合流程 ---------- */
.flow {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 12px;
}
.flow li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 14px;
  align-items: start;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
/* 序号占第一列并跨两行，标题与说明都落在第二列，否则说明会被挤进 40px 的序号列 */
.flow li::before {
  content: counter(step);
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(240, 194, 92, .14);
  color: var(--accent);
  font-weight: 700;
}
.flow b { grid-column: 2; grid-row: 1; display: block; margin-bottom: 2px; }
.flow span { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 15px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin-bottom: 26px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15px;
  min-width: 620px;
}
caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { background: rgba(255, 255, 255, .04); color: var(--text); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--accent); font-weight: 600; white-space: nowrap; }
td { color: var(--muted); }

/* ---------- 截图墙 ---------- */
/* 界面截图是横屏对局界面，单列全宽才看得清 */
.shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
.shots figure { margin: 0; }
.shots img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.shots .ph {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.shots figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ---------- 常见问题 ---------- */
details {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
summary { cursor: pointer; font-weight: 600; }
details p { margin: 12px 0 0; color: var(--muted); }
details[open] summary { color: var(--accent); }

/* ---------- 页脚 ---------- */
.site-foot {
  padding: 40px 0 46px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  text-align: center;
}
.disclaimer {
  margin: 0 auto 18px;
  max-width: 820px;
  color: var(--muted);
  font-size: 14px;
}
.beian { margin: 0; font-size: 14px; }
.beian a { color: var(--muted); }
.beian a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .hero { padding: 48px 0 40px; }
  .band { padding: 48px 0; }
  .nav { gap: 14px; font-size: 14px; }
  .flow li { grid-template-columns: 32px 1fr; }
  .flow li::before { width: 32px; height: 32px; }
}
