:root{
  --c-bg: #f8fafc;
  --c-card: #ffffff;
  --c-card-hover: #f1f5f9;
  --c-text: #1e293b;
  --c-sub: #64748b;
  --c-primary: #3b82f6;
  --c-primary-hover: #2563eb;
  --c-border: #e2e8f0;
  --c-border-light: #f1f5f9;
  --c-accent: #0ea5e9;
  --c-success: #10b981;
  --c-warning: #f59e0b;
  --c-error: #ef4444;
  --c-shadow: rgba(0, 0, 0, 0.08);
  --c-shadow-hover: rgba(0, 0, 0, 0.12);
}
/* CSS Reset 和初始化 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--c-text);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 标题元素重置 */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--c-text);
}

/* 段落重置 */
p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* 列表重置 */
ul, ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 链接重置 */
a {
  color: var(--c-primary);
  text-decoration: none;
  background-color: transparent;
  transition: color 0.15s ease-in-out;
}

a:hover {
  color: var(--c-primary-hover);
  text-decoration: none;
}

/* 图片重置 */
img {
  max-width: 100%;
  height: auto;
  border-style: none;
  vertical-align: middle;
}

/* 表单元素重置 */
button, input, optgroup, select, textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button, input {
  overflow: visible;
}

button, select {
  text-transform: none;
}

button, [type="button"], [type="reset"], [type="submit"] {
  -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  padding: 0;
  border-style: none;
}

input[type="radio"],
input[type="checkbox"] {
  box-sizing: border-box;
  padding: 0;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
  -webkit-appearance: listbox;
}

textarea {
  overflow: auto;
  resize: vertical;
}

/* 表格重置 */
table {
  border-collapse: collapse;
}

/* 代码元素重置 */
code, kbd, pre, samp {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1em;
}

pre {
  margin-top: 0;
  margin-bottom: 1rem;
  overflow: auto;
}

/* 引用重置 */
blockquote {
  margin: 0 0 1rem;
}

/* 水平线重置 */
hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid var(--c-border);
}

/* 细节元素重置 */
details {
  display: block;
}

summary {
  display: list-item;
  cursor: pointer;
}

/* 模板元素重置 */
template {
  display: none;
}

/* 隐藏元素重置 */
[hidden] {
  display: none !important;
}
.container{max-width:1100px;margin:0 auto;padding:0 16px}
.site-header{position:sticky;top:0;background:rgba(255,255,255,.95);backdrop-filter:saturate(180%) blur(20px);border-bottom:1px solid var(--c-border);z-index:10;box-shadow:0 1px 3px var(--c-shadow)}
.header-inner{display:flex;align-items:center;gap:20px;height:56px}

/* 网站名称样式 */
.logo{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--c-text);
  font-size: 20px;
  position: relative;
  text-decoration: none;
  transition: all 0.3s ease;
}

.logo span {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: 1px;
  position: relative;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.logo span::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
  border-radius: 8px;
  z-index: -1;
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.3s ease;
}

.logo:hover span::before {
  transform: scale(1);
  opacity: 1;
}

.logo:hover {
  transform: translateY(-1px);
}

.nav{display:flex;gap:14px;margin-left:auto}
.nav a{padding:8px 12px;border-radius:8px;color:var(--c-sub);transition:all 0.2s ease}
.nav a.active,.nav a:hover{background:var(--c-primary);color:#ffffff;box-shadow:0 2px 4px var(--c-shadow)}
.search{display:flex;gap:8px}
.search input{background:var(--c-card);border:1px solid var(--c-border);outline:none;border-radius:12px;padding:8px 12px;color:var(--c-text);min-width:220px;height:40px;flex:1 1 auto;transition:border-color 0.2s ease}
.search input:focus{border-color:var(--c-primary);box-shadow:0 0 0 3px rgba(59, 130, 246, 0.1)}
.search button{background:var(--c-primary);color:#fff;border:0;border-radius:12px;padding:0 14px;cursor:pointer;height:40px;flex:0 0 72px;transition:background-color 0.2s ease}
.search button:hover{background:var(--c-primary-hover)}
.post-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px;margin:24px 0}
.card{background:var(--c-card);border:1px solid var(--c-border);border-radius:16px;overflow:hidden;box-shadow:0 1px 3px var(--c-shadow);transition:all 0.3s ease}
.card:hover{transform:translateY(-2px);box-shadow:0 4px 12px var(--c-shadow-hover);border-color:var(--c-primary)}
.card a{display:block;color:inherit;padding:20px}
.card h3{margin:8px 0 8px;font-size:18px;color:var(--c-text);line-height:1.4}
.card p{margin:0;color:var(--c-sub);font-size:14px;line-height:1.5}
.meta{color:var(--c-sub);font-size:12px;display:flex;gap:12px;align-items:center}
.meta span{display:flex;align-items:center;gap:4px}
.content{background:var(--c-card);border:1px solid var(--c-border);border-radius:16px;padding:24px;box-shadow:0 1px 3px var(--c-shadow)}
.sidebar{margin-top:24px;background:var(--c-card);border:1px solid var(--c-border);border-radius:16px;padding:20px;box-shadow:0 1px 3px var(--c-shadow)}
.tag-cloud a{display:inline-block;margin:4px;padding:6px 12px;border:1px solid var(--c-border);border-radius:20px;color:var(--c-sub);background:var(--c-card);transition:all 0.2s ease}
.tag-cloud a:hover{background:var(--c-primary);color:#ffffff;border-color:var(--c-primary);transform:translateY(-1px)}
.post-footer{margin-top:24px;display:flex;justify-content:space-between;align-items:center;padding:16px 0;border-top:1px solid var(--c-border-light)}
.site-footer{border-top:1px solid var(--c-border);margin-top:40px;background:var(--c-card);box-shadow:0 -1px 3px var(--c-shadow)}

.site-footer .container{padding:20px 16px;color:var(--c-sub)}
img{border-radius:8px}
/* 标题样式增强 */
h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
  font-weight: 600;
}

/* 文章内容样式 */
.content h3 {
  color: var(--c-text);
  border-left: 4px solid var(--c-primary);
  padding-left: 16px;
  margin: 24px 0 16px;
}

.content p {
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--c-text);
}

.content ul, .content ol {
  padding-left: 0;
  margin-bottom: 16px;
}

.content ul li {
  margin-bottom: 8px;
  line-height: 1.6;
}





.content ol li {
  margin-bottom: 8px;
  line-height: 1.6;
}



/* 标签样式增强 */
.tag {
  display: inline-block;
  padding: 4px 8px;
  background: var(--c-primary);
  color: white;
  border-radius: 12px;
  font-size: 12px;
  margin: 2px;
}
/* mobile nav toggle */
.menu-toggle{display:none;align-items:center;justify-content:center;height:36px;padding:0 12px;border:1px solid var(--c-border);border-radius:8px;background:var(--c-card);color:var(--c-text);cursor:pointer;transition:all 0.2s ease}
.menu-toggle:hover{background:var(--c-card-hover);border-color:var(--c-primary)}
.menu-toggle:active{transform:translateY(1px)}

@media (max-width:640px){.container{padding:0 20px}.header-inner{flex-wrap:wrap;height:auto;padding-top:8px;padding-bottom:8px}.nav{order:3;width:100%}.search{order:2;margin-left:auto;width:100%;margin:8px 0}}

@media (max-width:768px){
  .menu-toggle{display:inline-flex;margin-left:auto}
  .site-header .nav{display:none;flex-direction:column;gap:8px;width:100%;margin:8px 0 0}
  .site-header .nav.open{display:flex;background:#fff;border:1px solid var(--c-border);border-radius:12px;padding:8px}
  .search{width:100%;order:3}
  .search input{min-width:0;flex:1 1 auto;width:auto}
  .search button{flex:0 0 80px}
}


