/*
Theme Name: PG国际
Theme Uri: https://pg-international.example.com
Description: 独立游戏发行主题 — 为 PG国际 定制，聚焦游戏展示、发行动态与开发者故事。
Version: 1.0.0
Author: PG国际
Author Uri: https://pg-international.example.com
*/

/* ============ 设计令牌 ============ */
:root {
  --bg: #12131c;
  --bg-alt: #1b1d2b;
  --bg-raised: #21243480;
  --line: rgba(237, 238, 245, 0.12);
  --line-strong: rgba(237, 238, 245, 0.22);
  --accent: #6e56ff;
  --accent-soft: rgba(110, 86, 255, 0.16);
  --accent-warm: #ff8a4c;
  --text: #edeef5;
  --text-muted: #9497ac;
  --text-faint: #63667c;
  --radius-s: 4px;
  --radius-m: 10px;
  --font-display: "Syne", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --measure: 68ch;
}

@font-face {
  font-family: "Syne";
  src: local("Syne");
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18, 19, 28, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.01em;
}

.brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #12131c;
}

.brand .sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--text-faint);
}

.main-nav { display: flex; gap: 36px; }

.main-nav a {
  font-size: 15px;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  border-color: var(--accent);
}

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 108px 0 96px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -160px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}

.hero .eyebrow-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  color: var(--text-faint);
  font-size: 14px;
}

.hero .eyebrow-line span.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-warm);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 15ch;
  margin: 0 0 28px;
}

.hero .lede {
  max-width: var(--measure);
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero .cta-row { display: flex; gap: 16px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-s);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { transform: translateY(-1px); background: #7d67ff; }

.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.hero-stats .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
}

.hero-stats .stat span {
  color: var(--text-faint);
  font-size: 14px;
}

/* ============ 分区标题（用于关卡感分隔） ============ */
.section {
  padding: 88px 0;
  position: relative;
}

.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  margin: 0;
  max-width: 20ch;
}

.section-head p {
  color: var(--text-muted);
  max-width: 40ch;
  margin: 10px 0 0;
}

.section-head .link-more {
  font-size: 14px;
  color: var(--accent);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
}

.section-head .link-more:hover { border-color: var(--accent); }

/* ============ 游戏展示 - 不等宽关卡卡片 ============ */
.game-strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 20px;
}

.game-strip .game-card:first-child { grid-row: span 2; }

.game-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--bg-alt);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: border-color 0.2s ease;
}

.game-card:hover { border-color: var(--line-strong); }

.game-card .thumb {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, var(--accent-soft), transparent 60%);
}

.game-card .body {
  position: relative;
  padding: 22px;
  background: linear-gradient(180deg, transparent, rgba(18, 19, 28, 0.92) 55%);
}

.game-card .tag {
  display: inline-block;
  font-size: 12px;
  color: var(--accent-warm);
  margin-bottom: 8px;
}

.game-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
}

.game-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

/* ============ 文章列表 ============ */
.post-list { display: flex; flex-direction: column; }

.post-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.post-item:first-child { border-top: none; }

.post-item .date {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-faint);
  font-size: 14px;
  padding-top: 4px;
}

.post-item .date b {
  display: block;
  font-size: 26px;
  color: var(--text);
}

.post-item h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
}

.post-item h3 a:hover { color: var(--accent); }

.post-item .excerpt {
  color: var(--text-muted);
  max-width: var(--measure);
  margin: 0 0 14px;
}

.post-item .meta {
  font-size: 13px;
  color: var(--text-faint);
  display: flex;
  gap: 16px;
}

/* ============ 文章正文页 ============ */
.post-header { padding: 88px 0 40px; border-bottom: 1px solid var(--line); }

.post-header .category {
  color: var(--accent-warm);
  font-size: 14px;
  margin-bottom: 18px;
  display: inline-block;
}

.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 22px;
  max-width: 20ch;
}

.post-header .meta {
  color: var(--text-faint);
  font-size: 14px;
  display: flex;
  gap: 18px;
}

.post-content {
  max-width: var(--measure);
  padding: 56px 0;
  font-size: 17px;
}

.post-content p { margin: 0 0 22px; color: #dcdde6; }

.post-content h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 44px 0 18px;
}

.post-content h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 14px;
}

.post-content img { border-radius: var(--radius-m); margin: 28px 0; }

.post-content blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  color: var(--text-muted);
}

.post-content a { color: var(--accent); border-bottom: 1px solid var(--line-strong); }

.post-content pre {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 18px;
  overflow-x: auto;
  font-size: 14px;
}

.post-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 56px;
}

.post-tags a {
  font-size: 13px;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 6px 14px;
}

.post-tags a:hover { border-color: var(--accent); color: var(--text); }

/* ============ 侧栏（归档页可选） ============ */
.layout-with-side {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
}

.side-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 24px;
  margin-bottom: 24px;
}

.side-block h4 {
  font-family: var(--font-display);
  font-size: 15px;
  margin: 0 0 16px;
  color: var(--text-muted);
}

.side-block ul { list-style: none; margin: 0; padding: 0; }
.side-block li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.side-block li:first-child { border-top: none; }

/* ============ 评论 ============ */
.comments { padding: 56px 0 88px; border-top: 1px solid var(--line); }

.comments h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 32px;
}

.comment-list { list-style: none; margin: 0; padding: 0; }

.comment-item {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
}

.comment-item .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
}

.comment-item .author { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.comment-item .date { color: var(--text-faint); font-size: 12px; margin-left: 10px; font-weight: 400; }
.comment-item .content { color: var(--text-muted); font-size: 14px; }

.comment-form { margin-top: 40px; display: grid; gap: 14px; max-width: var(--measure); }

.comment-form input,
.comment-form textarea {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--text);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
}

.comment-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comment-form textarea { min-height: 120px; resize: vertical; }

/* ============ 分页 ============ */
.pager {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 40px 0 88px;
}

.pager a, .pager span {
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.pager .current { border-color: var(--accent); color: var(--text); }

/* ============ 404 ============ */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: 120px;
  font-weight: 800;
  color: var(--accent-soft);
  line-height: 1;
}

.error-page h1 { font-family: var(--font-display); font-size: 28px; margin: 12px 0 16px; }
.error-page p { color: var(--text-muted); margin-bottom: 28px; }

/* ============ 页脚 ============ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
}

.site-footer .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding-bottom: 40px;
}

.site-footer .cols { display: flex; gap: 64px; }

.site-footer .col h5 {
  font-size: 13px;
  color: var(--text-faint);
  margin: 0 0 14px;
  font-weight: 500;
}

.site-footer .col a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.site-footer .col a:hover { color: var(--text); }

.site-footer .bottom {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 13px;
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .game-strip { grid-template-columns: 1fr; }
  .game-strip .game-card:first-child { grid-row: auto; }
  .layout-with-side { grid-template-columns: 1fr; }
  .post-item { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 28px; }
  .site-footer .top { flex-direction: column; }
  .site-footer .cols { gap: 32px; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
