/*
Theme Name: ResDemo 资源站
Theme URI: http://127.0.0.1:8080
Author: DSH Demo
Description: 资源下载站演示主题：卡片列表、网盘下载框、VIP 门禁样式。
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: resdemo
*/

:root{
  --bg:#f6f7fb; --card:#fff; --text:#1b1f2a; --muted:#6b7280;
  --brand:#3b6cf6; --brand-2:#7c3aed; --accent:#ff6b35;
  --line:#e8eaf1; --radius:14px; --shadow:0 4px 18px rgba(19,25,45,.07);
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);overflow-x:hidden;
  font:15px/1.75 -apple-system,"Segoe UI","Microsoft YaHei",system-ui,sans-serif}
a{color:var(--brand);text-decoration:none}
a:hover{color:var(--brand-2)}
img{max-width:100%;height:auto;border-radius:10px}
.wrap{max-width:1180px;margin:0 auto;padding:0 18px}

/* ---------- header ---------- */
.site-header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.site-header .wrap{display:flex;align-items:center;gap:22px;height:64px}
.logo{font-size:19px;font-weight:800;letter-spacing:.5px;color:var(--text)}
.logo span{color:var(--brand)}
.nav{display:flex;gap:18px;flex:1}
.nav a{color:#444;font-size:14px}
.nav a:hover{color:var(--brand)}
.search{margin-left:auto}
.search input{border:1px solid var(--line);border-radius:999px;padding:8px 14px;width:190px;outline:none}
.search input:focus{border-color:var(--brand)}

/* ---------- hero ---------- */
.hero{margin:26px 0 8px;padding:38px 32px;border-radius:20px;color:#fff;
  background:linear-gradient(135deg,#3b6cf6,#7c3aed 55%,#ff6b35)}
.hero h1{margin:0 0 8px;font-size:26px}
.hero p{margin:0;opacity:.9}
.hero .stats{margin-top:18px;display:flex;gap:26px;font-size:13px;opacity:.95}

/* ---------- grid ---------- */
.section-title{display:flex;align-items:center;gap:10px;margin:28px 0 14px;font-size:17px;font-weight:700}
.section-title:before{content:"";width:4px;height:18px;border-radius:2px;background:var(--brand)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:18px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  overflow:hidden;box-shadow:var(--shadow);transition:.22s;display:flex;flex-direction:column}
.card:hover{transform:translateY(-3px);box-shadow:0 12px 26px rgba(19,25,45,.12)}
.card .thumb{position:relative;aspect-ratio:16/10;background:#eef0f6;overflow:hidden}
.card .thumb img{width:100%;height:100%;object-fit:cover;border-radius:0;display:block}
.card .badge{position:absolute;left:10px;top:10px;background:rgba(0,0,0,.62);color:#fff;
  font-size:11px;padding:3px 9px;border-radius:999px;backdrop-filter:blur(4px)}
.card .body{padding:13px 15px 16px;display:flex;flex-direction:column;gap:8px;flex:1}
.card h3{margin:0;font-size:14.5px;line-height:1.5;font-weight:600;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card h3 a{color:var(--text)}
.card h3 a:hover{color:var(--brand)}
.card .meta{margin-top:auto;display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}
.tag{display:inline-block;background:#eef2ff;color:#4f46e5;border-radius:6px;
  padding:1px 8px;font-size:11.5px;margin-right:6px}

/* ---------- single ---------- */
.post-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:26px;margin:26px 0}
.post-layout>main,.post-layout>aside{min-width:0}
@media(max-width:900px){.post-layout{grid-template-columns:1fr}}
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:26px 28px;box-shadow:var(--shadow)}
.crumbs{font-size:12.5px;color:var(--muted);margin-bottom:12px}
.entry-title{margin:0 0 12px;font-size:24px;line-height:1.45}
.entry-meta{display:flex;gap:14px;font-size:12.5px;color:var(--muted);
  padding-bottom:16px;margin-bottom:18px;border-bottom:1px dashed var(--line)}
.entry-content{font-size:15px;line-height:1.9;color:#2b3140;overflow-wrap:anywhere}
.entry-content h3{font-size:17px;margin:22px 0 10px;padding-left:10px;border-left:3px solid var(--brand)}
.entry-content p{margin:0 0 12px}
.entry-content img{margin:8px 0;border-radius:10px;max-width:100%;height:auto}
.info-table{width:100%;border-collapse:collapse;margin:14px 0;font-size:14px;background:#fafbfe;border-radius:10px;overflow:hidden}
.info-table th{width:96px;text-align:left;color:var(--muted);font-weight:400;padding:7px 12px;border-bottom:1px solid #eef0f6;white-space:nowrap}
.info-table td{padding:7px 12px;border-bottom:1px solid #eef0f6}
.info-table tr:last-child th,.info-table tr:last-child td{border-bottom:0}

/* 下载框 */
.dl-box{margin:26px 0 6px;padding:20px 22px;border-radius:14px;
  background:linear-gradient(135deg,#eef4ff,#f5f0ff);border:1px solid #dbe4ff}
.dl-box h3{margin:0 0 12px;font-size:16px;border:0;padding:0}
.dl-btn{display:inline-block;background:linear-gradient(135deg,var(--brand),var(--brand-2));
  color:#fff!important;padding:10px 26px;border-radius:10px;font-weight:600;font-size:14px}
.dl-btn:hover{filter:brightness(1.06)}
.dl-code{margin-left:14px;font-size:13px;color:#444}
.dl-code code{background:#fff;border:1px solid var(--line);padding:2px 8px;border-radius:6px;color:var(--accent);font-weight:700}
.dl-tip{margin:12px 0 0;font-size:12.5px;color:var(--muted)}
.dl-vip{background:linear-gradient(135deg,#fff7ed,#fef2f2);border-color:#fed7aa}

/* sidebar */
.side h3{font-size:14px;margin:0 0 12px;padding-bottom:8px;border-bottom:1px solid var(--line)}
.side .item{display:flex;gap:10px;padding:8px 0;border-bottom:1px dashed var(--line);font-size:13px}
.side .item:last-child{border:0}
.side .item .n{color:var(--accent);font-weight:800;font-size:12px;min-width:16px}
.side .item a{color:#333}

/* pager */
.pager{display:flex;justify-content:center;gap:8px;margin:34px 0}
.pager a,.pager span{padding:7px 13px;border-radius:8px;background:#fff;border:1px solid var(--line);font-size:13px}
.pager .current{background:var(--brand);color:#fff;border-color:var(--brand)}

/* footer */
.site-footer{margin-top:46px;padding:26px 0;background:#fff;border-top:1px solid var(--line);
  text-align:center;color:var(--muted);font-size:12.5px}
