/*
Theme Name: 易站设计
Theme URI: https://sitetoeasy.cn
Description: 根据原静态站视觉制作的 WordPress 主题，支持资源管理后台化。
Version: 1.0
Author: Tigerhu
*/

/* ============ 基础重置 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #1a1d24;
  --sub: #6b7280;
  --line: #e8eaed;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.04);
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============ 布局 ============ */
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ============ 页头 ============ */
header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.logo span { color: var(--sub); font-size: 13px; font-weight: 400; margin-left: 10px; letter-spacing: 0; vertical-align: baseline; }
.nav-link { color: var(--text); text-decoration: none; font-weight: 600; }
.nav-link:hover { color: var(--accent); }
.search-form { display: flex; align-items: center; gap: 8px; }
.search-form input {
  width: 260px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); font-size: 13px; color: var(--text);
  outline: none; transition: border-color .2s;
}
.search-form input:focus { border-color: var(--accent); }
.search-form input::placeholder { color: #9ca3af; }
.search-form button {
  height: 38px; padding: 0 18px; border: none;
  background: var(--accent); color: #fff; border-radius: 8px;
  font-size: 13px; cursor: pointer; transition: background .2s;
}
.search-form button:hover { background: var(--accent-hover); }
.search-empty { text-align: center; color: var(--sub); padding: 60px 20px; grid-column: 1 / -1; }


/* ============ 首页 Hero ============ */
.hero { text-align: center; padding: 72px 20px 48px; }
.hero h1 { font-size: 38px; line-height: 1.25; letter-spacing: -.5px; margin-bottom: 16px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { color: var(--sub); font-size: 16px; max-width: 560px; margin: 0 auto; }

/* ============ 首页三块 ============ */
.home-block { margin-bottom: 56px; }
.block-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.block-title { display: flex; align-items: center; gap: 12px; }
.block-title .cat-icon { width: 40px; height: 40px; border-radius: 10px; font-size: 20px; margin: 0; }
.cat-icon.c1 { background: #eef2ff; color: #6366f1; }
.cat-icon.c2 { background: #ecfdf5; color: #10b981; }
.cat-icon.c3 { background: #fff7ed; color: #f97316; }
.block-title h2 { font-size: 21px; letter-spacing: -.3px; }
.block-count { font-size: 13px; color: var(--sub); }
.block-more { color: var(--accent); font-size: 14px; font-weight: 600; }
.block-more:hover { color: var(--accent-hover); }
.home-grid { padding: 0; }
.home-grid .item-thumb { aspect-ratio: 16/9; font-size: 34px; }

/* ============ 页标题 ============ */
.page-head { padding: 48px 0 8px; }
.page-head h1 { font-size: 30px; letter-spacing: -.4px; }
.page-head p { color: var(--sub); font-size: 15px; margin-top: 8px; }

/* ============ 筛选条 ============ */
.filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 24px 0 8px; }
.filters a {
  padding: 7px 16px; border-radius: 20px; font-size: 14px;
  background: var(--card); border: 1px solid var(--line); color: var(--sub);
}
.filters a.active, .filters a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============ 资源网格 ============ */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 20px 0 24px; }
.item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.item:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.08); }
.item-thumb {
  aspect-ratio: 16/10; background: linear-gradient(135deg, #eef2ff, #f3f4f6);
  display: grid; place-items: center; color: #a5b4fc; font-size: 40px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.item:hover .item-thumb img { transform: scale(1.04); }
.item-body { padding: 18px 20px; }
.item-tag {
  display: inline-block; font-size: 12px; color: var(--accent);
  background: #eef2ff; padding: 2px 10px; border-radius: 12px; margin-bottom: 10px;
}
.item-body h3 { font-size: 16px; margin-bottom: 6px; }
.item-body p { font-size: 13px; color: var(--sub); margin-bottom: 16px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 600;
  background: var(--accent); color: #fff; transition: background .2s;
}
.btn:hover { background: var(--accent-hover); }
.btn.sm { padding: 8px 18px; font-size: 13px; }
.btn.ghost { background: #f3f4f6; color: var(--text); }
.btn.ghost:hover { background: #e5e7eb; }
.item-foot { display: flex; align-items: center; justify-content: space-between; }
.item-meta { font-size: 12px; color: #9ca3af; }

/* ============ 详情页 ============ */
.detail { padding: 40px 0 80px; }
.crumb { font-size: 13px; color: var(--sub); margin-bottom: 24px; }
.crumb a:hover { color: var(--accent); }
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; }
.detail-main { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.detail-main h1 { font-size: 26px; margin-bottom: 12px; }
.detail-meta { font-size: 13px; color: var(--sub); margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.detail-cover {
  background: linear-gradient(135deg, #eef2ff, #f3f4f6);
  border-radius: 10px; display: grid; place-items: center; color: #a5b4fc; font-size: 64px;
  margin-bottom: 24px;
}
.detail-cover img { width: 100%; height: auto; display: block; border-radius: 10px; }
.detail-section { margin-bottom: 24px; }
.detail-section h2 { font-size: 17px; margin-bottom: 12px; padding-left: 10px; border-left: 3px solid var(--accent); }
.detail-section p, .detail-section li { font-size: 14px; color: #4b5563; line-height: 1.9; }
.detail-section ul { padding-left: 20px; }
.screens { display: grid; grid-template-columns: 1fr; gap: 16px; }
.screen {
  background: #f3f4f6; border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; display: block;
}
.screen img { width: 100%; height: auto; display: block; }
.side { position: sticky; top: 88px; align-self: start; }
.download-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.download-card:last-child { margin-bottom: 0; }
.download-card h3 { font-size: 16px; margin-bottom: 6px; }
.download-card .tip { font-size: 12px; color: var(--sub); margin-bottom: 20px; }
.download-card .btn { width: 100%; margin-bottom: 12px; }
.code-box {
  background: #f3f4f6; border: 1px dashed var(--line); border-radius: 8px;
  padding: 12px 14px; font-size: 14px; letter-spacing: 1px; word-break: break-all;
  margin-top: 8px;
}
.notice { font-size: 12px; color: #9ca3af; line-height: 1.7; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ============ 详情：标签 / 文件信息 ============ */
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.detail-tag {
  display: inline-block; font-size: 13px; color: var(--accent);
  background: #eef2ff; border: 1px solid #dbeafe; border-radius: 999px;
  padding: 4px 12px; text-decoration: none; transition: background .2s;
}
.detail-tag:hover { background: #dbeafe; }
.file-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 28px; }
.fi-item {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
}
.fi-label { font-size: 12px; color: var(--sub); }
.fi-val { font-size: 15px; font-weight: 600; color: var(--text); word-break: break-all; }

/* ============ 详情：网盘卡片 / 二维码 ============ */
.disk-badge {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 6px; margin-bottom: 10px; color: #6d28d9; background: #f5f3ff;
}
.disk-baidu .disk-badge { color: #1d4ed8; background: #eff6ff; }
.disk-baidu .btn { background: #2563eb; }
.disk-baidu .btn:hover { background: #1d4ed8; }
.code-label { font-size: 13px; color: var(--sub); margin-top: 14px; }
.yz-copy { cursor: pointer; transition: background .2s; }
.yz-copy:hover { background: #e5e7eb; }
.yz-copy.copied { color: #16a34a; border-color: #16a34a; }
.qrcode-wrap { text-align: center; margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--line); }
.qrcode-wrap img { width: 160px; height: 160px; object-fit: contain; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px; }
.qrcode-tip { font-size: 12px; color: var(--sub); margin-top: 8px; }

/* 预览图已改为直接大图展示，点击放大灯箱已移除 */

/* ============ 页脚 ============ */
footer {
  background: var(--card); border-top: 1px solid var(--line);
  padding: 28px 20px; text-align: center; color: var(--sub); font-size: 13px;
}
footer a, footer a:hover { color: inherit; text-decoration: none; }

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .cats, .grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout, .blog-post-layout { grid-template-columns: 1fr; }
  .side { position: static; }
}
@media (max-width: 600px) {
  .hero { padding: 48px 16px 32px; }
  .hero h1 { font-size: 28px; }
  .cats, .grid { grid-template-columns: 1fr; }
  .search-form input { width: 150px; }
  .search-form button { padding: 0 12px; }
  .screens { grid-template-columns: 1fr; }
  .file-info { grid-template-columns: 1fr; }
}

/* ============ 文章列表 / 正文 ============ */
.blog-wrap { max-width: 1080px; margin: 36px auto; padding: 0 20px; }
.blog-head { margin-bottom: 28px; }
.blog-head h1 { font-size: 30px; margin: 0 0 8px; letter-spacing: -.4px; }
.blog-head p { color: var(--sub); margin: 0; }
.blog-post-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.blog-post-layout .post-content {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.yz-copy-long { white-space: pre-wrap; line-height: 1.7; letter-spacing: 0; }
.post-list { display: grid; gap: 18px; }
.post-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.post-card h2 { margin: 0 0 8px; font-size: 20px; }
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-meta { color: #9ca3af; font-size: 13px; margin-bottom: 10px; }
.post-excerpt { color: #4b5563; line-height: 1.7; margin-bottom: 14px; }
.post-content { line-height: 1.9; color: #374151; }
.post-content h2, .post-content h3 { margin: 28px 0 12px; line-height: 1.4; }
.post-content p { margin: 0 0 18px; }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; }
.post-content ul, .post-content ol { padding-left: 22px; margin: 0 0 18px; }
.post-content a { color: var(--accent); }
.yz-img-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0 0 18px; }
.yz-img-grid img { width: 100%; height: auto; display: block; border-radius: 8px; }
.back { display: inline-block; margin-bottom: 20px; color: var(--sub); text-decoration: none; }
.back:hover { color: var(--accent); }
.empty { padding: 40px; text-align: center; color: var(--sub); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

/* 后台资源字段表格 */
.yz-meta-table th { width: 180px; vertical-align: top; }
.yz-meta-table textarea { width: 100%; }


/* 首页栏目子目录（跟在大标题后面） */
.subcats { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin: 0 0 0 6px; }
.subcat { display: inline-block; font-size: 12px; font-weight: 400; color: var(--sub); background: none; border: 0; border-radius: 0; padding: 0; text-decoration: none; transition: color .2s; }
.subcat:hover { color: var(--accent); }
.filters .subfilter { font-size: 13px; color: var(--sub); }

/* 分页 */
.yz-pagination { margin: 0 0 56px; text-align: center; }
.yz-pagination .page-numbers { display: inline-block; min-width: 36px; height: 36px; line-height: 34px; padding: 0 10px; margin: 0 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font-size: 14px; text-decoration: none; transition: all .2s; }
.yz-pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.yz-pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.yz-pagination .page-numbers.dots { border: 0; background: none; }
