/* ============================================================
   PVE技术探索 — 主题样式
   深色科技风 · 像素级对齐 · 内容卡 + 右侧栏
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  /* 深色主题（默认，匹配截图） */
  --bg-page: #0a1428;
  --bg-surface: rgba(20, 40, 70, 0.35);
  --bg-surface-hover: rgba(30, 55, 95, 0.55);
  --bg-surface-strong: rgba(15, 30, 55, 0.7);
  --bg-elevated: rgba(35, 60, 100, 0.45);
  --bg-input: rgba(15, 30, 55, 0.6);

  --border-soft: rgba(74, 158, 255, 0.12);
  --border: rgba(74, 158, 255, 0.2);
  --border-strong: rgba(74, 158, 255, 0.35);

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-heading: #ffffff;
  --text-link: #6fb1ff;

  --accent: #4a9eff;
  --accent-hover: #6fb5ff;
  --accent-deep: #1983FE;
  --accent-pressed: #0d5fcc;
  --accent-tag: rgba(74, 158, 255, 0.18);
  --accent-tag-text: #6fb1ff;

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 4px 18px rgba(74, 158, 255, 0.25);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --container-max: 1480px;
  --gap: 32px;
  --gap-lg: 40px;
}

/* 浅色主题（toggle 用） */
[data-theme="light"] {
  --bg-page: #f5f8fc;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f6ff;
  --bg-surface-strong: #ffffff;
  --bg-elevated: #ffffff;
  --bg-input: #ffffff;

  --border-soft: rgba(25, 131, 254, 0.1);
  --border: rgba(25, 131, 254, 0.18);
  --border-strong: rgba(25, 131, 254, 0.35);

  --text-primary: #1f2937;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-heading: #0f172a;
  --text-link: #1983FE;

  --accent: #1983FE;
  --accent-hover: #0d5fcc;
  --accent-deep: #0d5fcc;
  --accent-pressed: #0a4499;
  --accent-tag: rgba(25, 131, 254, 0.1);
  --accent-tag-text: #1983FE;

  --shadow-card: 0 6px 24px rgba(15, 23, 42, 0.08);
  --shadow-pop: 0 4px 18px rgba(25, 131, 254, 0.25);
}

/* ---------- 基础重置 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(74, 158, 255, 0.08), transparent 40%),
    radial-gradient(circle at 85% 100%, rgba(25, 131, 254, 0.05), transparent 40%);
}

a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-hover); }

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

button { font: inherit; cursor: pointer; border: none; background: transparent; color: inherit; }

ul { list-style: none; }

/* ---------- 容器 ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- 顶部 Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 20, 40, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.85);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  font-size: 17px;
  color: var(--text-heading);
}

.brand .brand-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  background: linear-gradient(135deg, #6fb1ff, #1983FE);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  transition: background .2s ease, color .2s ease;
}

.main-nav a:hover {
  color: var(--text-heading);
  background: var(--bg-surface-hover);
}

.main-nav a.active {
  color: var(--text-heading);
  background: var(--accent-tag);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-tools a,
.header-tools button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: background .2s ease, color .2s ease;
}

.header-tools a:hover,
.header-tools button:hover {
  background: var(--bg-surface-hover);
  color: var(--accent-hover);
}

.theme-toggle { color: var(--text-secondary); }

/* ---------- 主区域布局 ---------- */
.site-main { padding: 36px 0 80px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--gap-lg);
  align-items: start;
}

/* ---------- 文章卡片 ---------- */
.post-list { display: flex; flex-direction: column; gap: var(--gap); }

.post-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}

.post-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border);
  transform: translateY(-2px);
}

.post-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: linear-gradient(135deg, #1e3a6b, #0d1f3f);
}

.post-thumb svg { width: 60%; height: 60%; }

.post-thumb.cat-pve    { background: linear-gradient(135deg, #1e3a6b 0%, #0d2547 100%); }
.post-thumb.cat-nas    { background: linear-gradient(135deg, #0f4a55 0%, #082631 100%); }
.post-thumb.cat-excel  { background: linear-gradient(135deg, #1d5a36 0%, #0a2e1c 100%); }
.post-thumb.cat-computer { background: linear-gradient(135deg, #1e3a6b 0%, #0d2547 100%); }

.post-body { display: flex; flex-direction: column; min-width: 0; }

.post-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: 0.3px;
  line-height: 1.4;
  margin-bottom: 10px;
  transition: color .2s ease;
}

.post-card:hover .post-title { color: var(--accent-hover); }

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.post-meta .icon { display: inline-flex; align-items: center; gap: 5px; }
.post-meta svg { width: 14px; height: 14px; opacity: 0.85; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  background: var(--accent-tag);
  color: var(--accent-tag-text);
  letter-spacing: 0.3px;
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.read-more:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: var(--shadow-pop);
  transform: translateY(-1px);
}

/* ---------- 分页 ---------- */
.pagination {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.pagination a:hover { background: var(--accent); color: #fff; }
.pagination a.current {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-pop);
}
.pagination a.disabled { color: var(--text-muted); pointer-events: none; }

/* ---------- 右侧 Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 88px; }

.widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
}

.widget h3 {
  color: var(--text-heading);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

/* 搜索 */
.widget-search input {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  color: var(--text-primary);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.widget-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74,158,255,0.15); }

.widget-search input::placeholder { color: var(--text-muted); }

/* 关于 */
.widget-about .author {
  color: var(--text-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.widget-about .bio { color: var(--text-secondary); font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.widget-about .pill {
  display: inline-flex;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  transition: background .2s ease;
}
.widget-about .pill:hover { background: var(--accent-hover); color: #fff; }

/* 列表型 widget */
.widget-list li { padding: 8px 0; border-bottom: 1px dashed var(--border-soft); }
.widget-list li:last-child { border-bottom: none; }
.widget-list a { color: var(--text-secondary); font-size: 14px; transition: color .2s ease, padding .2s ease; }
.widget-list a:hover { color: var(--accent-hover); padding-left: 4px; }
.widget-list a::before { content: "▸"; margin-right: 6px; color: var(--accent); opacity: .7; }

/* ---------- 栏目页特有：分类筛选条 ---------- */
.column-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 28px;
}

.column-header h1 {
  font-size: 26px;
  color: var(--text-heading);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.column-header .crumb { color: var(--text-secondary); font-size: 13px; margin-bottom: 10px; }
.column-header .crumb a:hover { color: var(--accent-hover); }
.column-header p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

.column-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.column-filter a {
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.column-filter a:hover, .column-filter a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- 内容页 ---------- */
.article {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 36px 40px;
  margin-bottom: 28px;
}

.article-header { border-bottom: 1px solid var(--border-soft); padding-bottom: 22px; margin-bottom: 26px; }

.article-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: 0.3px;
  line-height: 1.35;
  margin-bottom: 14px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 13px;
  flex-wrap: wrap;
}

.share-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.share-row span { color: var(--text-muted); margin-right: 4px; }
.share-row a {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--text-secondary);
  transition: background .2s ease, color .2s ease;
}
.share-row a:hover { background: var(--accent); color: #fff; }

.article-body {
  font-size: 17px;
  line-height: 1.9;
  color: var(--text-primary);
}

.article-body p { margin-bottom: 18px; }
.article-body h2 {
  font-size: 22px;
  color: var(--text-heading);
  margin: 32px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}
.article-body h3 { font-size: 18px; color: var(--text-heading); margin: 24px 0 12px; }
.article-body ul, .article-body ol { margin: 0 0 18px 22px; color: var(--text-primary); }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text-heading); }
.article-body code {
  background: rgba(74, 158, 255, 0.12);
  color: var(--accent-hover);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 14px;
}
.article-body pre {
  background: #0a1424;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  overflow-x: auto;
  margin-bottom: 22px;
  color: #cbd5e1;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
}
.article-body pre code { background: transparent; padding: 0; color: inherit; }
.article-body a { color: var(--text-link); border-bottom: 1px dashed var(--border); }
.article-body a:hover { color: var(--accent-hover); }

.callout {
  background: linear-gradient(180deg, rgba(74,158,255,0.07), rgba(74,158,255,0.02));
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
  color: var(--text-primary);
  font-size: 14px;
}

.article-tags {
  display: flex; align-items: center; gap: 8px;
  margin: 28px 0 8px;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.article-nav .nav-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color .2s ease, transform .2s ease;
}
.article-nav .nav-card:hover { border-color: var(--border); transform: translateY(-1px); }

.article-nav .label { color: var(--text-muted); font-size: 12px; margin-bottom: 4px; }
.article-nav .title { color: var(--text-heading); font-size: 14px; font-weight: 600; }
.article-nav .nav-card.next { text-align: right; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: rgba(8, 18, 36, 0.6);
  border-top: 1px solid var(--border-soft);
  padding: 32px 0 40px;
  margin-top: 60px;
}

[data-theme="light"] .site-footer { background: rgba(245, 248, 252, 0.9); }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 13px;
}

.footer-logo { display: inline-flex; align-items: center; }
.footer-logo svg { width: 36px; height: 36px; }
.footer-copyright { color: var(--text-secondary); }
.footer-icp {
  margin-left: 14px;
  color: var(--text-muted);
  font-size: 12px;
}
.footer-icp a {
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border-soft);
}
.footer-icp a:hover { color: var(--accent-hover); }

.back-to-top {
  position: fixed;
  right: 26px;
  bottom: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
  z-index: 90;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--accent-hover); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .site-header .container { height: 56px; gap: 12px; }
  .main-nav { display: none; }
  .post-card { grid-template-columns: 1fr; }
  .post-thumb { aspect-ratio: 16/9; }
  .article { padding: 24px 18px; }
  .article-title { font-size: 24px; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav .nav-card.next { text-align: left; }
}

/* ---------- 小工具 ---------- */
::selection { background: rgba(74, 158, 255, 0.35); color: #fff; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(74, 158, 255, 0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(74, 158, 255, 0.45); }
