/* vike AI 技术站 — shared styles. Dark theme, single green accent. */
:root {
  --bg: #0f1318;
  --panel: #161c23;
  --panel-2: #1b2129;
  --border: #262e38;
  --text: #e8ecf1;
  --muted: #98a2ad;
  --accent: #3ecf8e;
  --accent-dim: rgba(62, 207, 142, 0.1);
  --accent-text: #0a2e1f;
  --danger: #e5534b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  flex-wrap: wrap;
}
.brand { color: var(--text); font-weight: 700; font-size: 18px; }
.brand span { color: var(--accent); font-weight: 600; }
.brand:hover { text-decoration: none; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--muted); font-size: 14px; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--border); }
.eyebrow {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 14px;
}
.hero h1 { font-size: 44px; line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 18px; }
.lede { font-size: 19px; color: var(--text); max-width: 640px; }
.lede-sub { color: var(--muted); max-width: 640px; margin-top: 8px; }
.btn-row { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  color: var(--text);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-small { padding: 7px 16px; font-size: 14px; }

/* ---------- sections ---------- */
.section { padding: 52px 0; border-bottom: 1px solid var(--border); }
.kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.section h2 { font-size: 26px; margin-bottom: 22px; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) {
  .grid-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 48px 0 40px; }
}

.card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  color: var(--text);
}
a.card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.card .num {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 10px;
}
.card .tag {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.card h3 { font-size: 18px; line-height: 1.5; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }
.card .more { color: var(--accent); margin-top: 14px; font-size: 14px; font-weight: 600; }

/* ---------- featured ---------- */
.featured {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 32px;
  margin: 52px 0;
}
.featured h2 { font-size: 26px; margin-bottom: 12px; }
.featured p { color: var(--muted); max-width: 680px; margin-bottom: 22px; }

/* ---------- footer ---------- */
.site-footer {
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- article pages ---------- */
.article { padding: 56px 0; }
.article .tag { color: var(--accent); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.article h1 { font-size: 32px; line-height: 1.4; margin-bottom: 16px; }
.article .lede { font-size: 17px; color: var(--muted); max-width: 680px; }
.notice {
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  padding: 14px 18px;
  margin: 28px 0;
  border-radius: 0 8px 8px 0;
}
.article hr { border: none; border-top: 1px solid var(--border); margin: 32px 0 20px; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- game pages ---------- */
.game-page { padding: 48px 0 56px; }
.game-page .tag { color: var(--accent); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.game-page h1 { font-size: 30px; margin-bottom: 10px; }
.game-page .lede { color: var(--muted); max-width: 640px; }
.hud {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 24px 0 18px;
  padding: 12px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
}
.hud .spacer { flex: 1; }
.hud b { color: var(--accent); }
.hint { color: var(--muted); font-size: 14px; margin-top: 16px; }
.back-link { margin-top: 28px; }

/* gomoku */
.gomoku-board {
  display: grid;
  grid-template-columns: repeat(15, 28px);
  width: max-content;
  background: #dcb26a;
  border: 2px solid #8a5f14;
  border-radius: 4px;
}
.g-cell {
  width: 28px;
  height: 28px;
  box-shadow: inset 0 0 0 1px rgba(120, 72, 20, 0.45);
  cursor: pointer;
}
.g-cell.black::after,
.g-cell.white::after,
.g-cell:hover:not(.black):not(.white)::after {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  margin: 2px;
  border-radius: 50%;
}
.g-cell.black::after {
  background: radial-gradient(circle at 35% 30%, #555, #000 70%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.g-cell.white::after {
  background: radial-gradient(circle at 35% 30%, #fff, #c4c4c4 70%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.g-cell:hover:not(.black):not(.white)::after { background: rgba(0, 0, 0, 0.28); }

/* minesweeper */
.ms-board {
  display: grid;
  grid-template-columns: repeat(9, 38px);
  gap: 2px;
  width: max-content;
}
.ms-cell {
  width: 38px;
  height: 38px;
  background: #2b323c;
  border: 1px solid #3d4652;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  user-select: none;
}
.ms-cell:hover:not(.open) { background: #343d49; }
.ms-cell.open { background: var(--panel); border-color: #232a33; cursor: default; }
.ms-cell.hit { background: var(--danger); }
.ms-cell.n1 { color: #58a6ff; }
.ms-cell.n2 { color: #3fb950; }
.ms-cell.n3 { color: #f85149; }
.ms-cell.n4 { color: #bc8cff; }
.ms-cell.n5 { color: #ff7b72; }
.ms-cell.n6 { color: #39c5cf; }
.ms-cell.n7 { color: #e3b341; }
.ms-cell.n8 { color: #8b949e; }

/* tank */
#tank-canvas {
  display: block;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #10151a;
  max-width: 100%;
  height: auto;
}
