/*
Theme Name: 苏韵 SuYun
Theme URI: https://example.com/suyun
Author: SuYun Studio
Author URI: https://example.com
Description: 一款为个人博客打造的诗意主题。背景由淡化的、不同方向旋转的「苏」字构成，支持丰富的前端动画与深度自定义：颜色、字体、背景苏字密度、布局、社交链接、暗色模式等均可在后台「外观 → 自定义」中配置。
Version: 1.1.3
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: suyun
Tags: blog, two-columns, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   设计变量（可被 customizer 输出的内联样式覆盖）
============================================================ */
:root {
  --sy-primary: #c0392b;
  --sy-primary-dark: #96281b;
  --sy-accent: #d4a017;
  --sy-bg: #faf7f2;
  --sy-surface: #ffffff;
  --sy-text: #2c2a28;
  --sy-text-muted: #7a756e;
  --sy-border: #e8e2d9;
  --sy-radius: 14px;
  --sy-max-width: 1160px;
  --sy-font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --sy-font-title: "Songti SC", "Noto Serif SC", "SimSun", serif;
  --sy-header-h: 72px;
  --sy-shadow: 0 10px 40px rgba(60, 40, 20, 0.08);
  --sy-transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 暗色模式 */
body.sy-dark {
  --sy-bg: #17181c;
  --sy-surface: #1f2127;
  --sy-text: #e8e5e0;
  --sy-text-muted: #9a958d;
  --sy-border: #2e3138;
  --sy-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sy-font-body);
  background: var(--sy-bg);
  color: var(--sy-text);
  line-height: 1.8;
  font-size: 16px;
  transition: background 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}
a { color: var(--sy-primary); text-decoration: none; transition: color var(--sy-transition); }
a:hover { color: var(--sy-primary-dark); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--sy-primary); color: #fff; }

/* ============================================================
   「苏」字背景层 —— 淡化、多方向旋转、缓慢漂浮
============================================================ */
.su-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.su-char {
  position: absolute;
  font-family: var(--sy-font-title);
  font-weight: 700;
  color: var(--sy-primary);
  user-select: none;
  line-height: 1;
  will-change: transform, opacity;
  animation: suFloat var(--su-dur, 18s) ease-in-out infinite alternate;
}
body.sy-dark .su-char { color: var(--sy-accent); }
@keyframes suFloat {
  0%   { transform: translate3d(0, 0, 0) rotate(var(--su-rot, 0deg)); }
  50%  { transform: translate3d(6px, -18px, 0) rotate(calc(var(--su-rot, 0deg) + 8deg)); }
  100% { transform: translate3d(-8px, 10px, 0) rotate(calc(var(--su-rot, 0deg) - 6deg)); }
}
/* 页面主体浮于背景之上 */
.site { position: relative; z-index: 1; }

/* ============================================================
   载入屏 & 页面进场
============================================================ */
.sy-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--sy-bg);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.sy-loader.done { opacity: 0; visibility: hidden; }
.sy-loader-char {
  font-family: var(--sy-font-title); font-size: 64px; font-weight: 700;
  color: var(--sy-primary);
  animation: loaderSpin 1.6s cubic-bezier(0.68, -0.4, 0.27, 1.4) infinite alternate;
}
@keyframes loaderSpin {
  from { transform: rotate(-12deg) scale(0.92); opacity: 0.6; }
  to   { transform: rotate(12deg) scale(1.06); opacity: 1; }
}
.sy-loader-bar { width: 120px; height: 3px; background: var(--sy-border); border-radius: 3px; overflow: hidden; }
.sy-loader-bar::after {
  content: ""; display: block; width: 40%; height: 100%;
  background: var(--sy-primary); border-radius: 3px;
  animation: loaderBar 1.1s ease-in-out infinite;
}
@keyframes loaderBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }

/* ============================================================
   顶部阅读进度条
============================================================ */
.sy-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--sy-primary), var(--sy-accent));
  z-index: 999; transition: width 0.1s linear;
}

/* ============================================================
   头部导航
============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--sy-bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: all var(--sy-transition);
}
.site-header.scrolled {
  border-bottom-color: var(--sy-border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: var(--sy-max-width);
  margin: 0 auto; padding: 0 24px;
  height: var(--sy-header-h);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 40px; width: auto; }
.brand-name {
  font-family: var(--sy-font-title);
  font-size: 26px; font-weight: 700; color: var(--sy-text);
  letter-spacing: 2px;
}
.brand-name:hover { color: var(--sy-primary); }
.brand-tagline { font-size: 12px; color: var(--sy-text-muted); letter-spacing: 3px; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 14px; color: var(--sy-text);
  font-size: 15px; border-radius: 8px; position: relative;
}
.main-nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 2px; background: var(--sy-primary); border-radius: 2px;
  transform: scaleX(0); transform-origin: center;
  transition: transform var(--sy-transition);
}
.main-nav a:hover::after, .main-nav .current-menu-item > a::after { transform: scaleX(1); }
.main-nav .menu-item-has-children { position: relative; }
.main-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 160px;
  background: var(--sy-surface); border: 1px solid var(--sy-border);
  border-radius: 10px; box-shadow: var(--sy-shadow);
  flex-direction: column; gap: 0; padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--sy-transition);
}
.main-nav li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.sy-search-toggle, .sy-dark-toggle {
  width: 38px; height: 38px; border: 1px solid var(--sy-border);
  border-radius: 50%; background: var(--sy-surface); color: var(--sy-text);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all var(--sy-transition);
}
.sy-search-toggle:hover, .sy-dark-toggle:hover {
  color: var(--sy-primary); border-color: var(--sy-primary);
  transform: translateY(-2px) rotate(8deg);
}
.sy-search-bar {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
  background: var(--sy-surface); border-bottom: 1px solid var(--sy-border);
}
.sy-search-bar.open { max-height: 90px; }
.sy-search-bar form { max-width: var(--sy-max-width); margin: 0 auto; padding: 22px 24px; display: flex; gap: 10px; }
.sy-search-bar input[type="search"] {
  flex: 1; padding: 12px 18px; border: 1px solid var(--sy-border);
  border-radius: 10px; background: var(--sy-bg); color: var(--sy-text); font-size: 15px;
}
.sy-search-bar input[type="search"]:focus { outline: 2px solid var(--sy-primary); border-color: transparent; }
.sy-search-bar button {
  padding: 12px 26px; background: var(--sy-primary); color: #fff;
  border: none; border-radius: 10px; cursor: pointer; transition: background var(--sy-transition);
}
.sy-search-bar button:hover { background: var(--sy-primary-dark); }
.menu-toggle { display: none; }

/* ============================================================
   英雄区
============================================================ */
.hero {
  max-width: var(--sy-max-width); margin: 0 auto;
  padding: 72px 24px 48px; text-align: center;
}
.hero-title {
  font-family: var(--sy-font-title);
  font-size: clamp(34px, 5vw, 56px); font-weight: 700;
  letter-spacing: 4px; line-height: 1.3;
}
.hero-title em { font-style: normal; color: var(--sy-primary); }
.hero-sub { margin-top: 14px; color: var(--sy-text-muted); font-size: 17px; letter-spacing: 1px; }
.hero-divider {
  width: 72px; height: 3px; margin: 26px auto 0;
  background: linear-gradient(90deg, var(--sy-primary), var(--sy-accent));
  border-radius: 3px;
}

/* ============================================================
   内容布局
============================================================ */
.content-wrap {
  max-width: var(--sy-max-width); margin: 0 auto;
  padding: 24px 24px 80px;
  display: grid; grid-template-columns: 1fr 300px; gap: 40px;
  align-items: start;
}
.content-wrap.no-sidebar { grid-template-columns: 1fr; }
.content-wrap.sidebar-left { grid-template-columns: 300px 1fr; }
.content-wrap.sidebar-left .site-main { order: 2; }
.content-wrap.sidebar-left .sidebar-area { order: 1; }
@media (max-width: 960px) {
  .content-wrap, .content-wrap.sidebar-left { grid-template-columns: 1fr; }
  .content-wrap.sidebar-left .site-main { order: 1; }
  .content-wrap.sidebar-left .sidebar-area { order: 2; }
}

/* 文章卡片 */
.post-list { display: grid; gap: 28px; }
.post-card {
  background: var(--sy-surface);
  border: 1px solid var(--sy-border);
  border-radius: var(--sy-radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr;
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
  transition: transform var(--sy-transition), box-shadow var(--sy-transition), border-color var(--sy-transition);
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sy-shadow);
  border-color: color-mix(in srgb, var(--sy-primary) 30%, var(--sy-border));
}
.post-card.no-thumb { grid-template-columns: 1fr; }
.post-card-thumb { overflow: hidden; height: 200px; position: relative; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.post-card:hover .post-card-thumb img { transform: scale(1.07) rotate(0.6deg); }

/* 缺省色块 + 单字（无特色图片时的卡片封面） */
.sy-glyph-block {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sy-font-title);
}
.sy-glyph-block .glyph {
  font-size: 58px; font-weight: 700; line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
}
.post-card:hover .sy-glyph-block .glyph { transform: scale(1.14) rotate(5deg); }
.sy-glyph-v1 { background: linear-gradient(135deg, #c0392b, #d4a017); }
.sy-glyph-v2 { background: linear-gradient(135deg, #2c3e50, #4a69bd); }
.sy-glyph-v3 { background: linear-gradient(135deg, #1e7e5a, #7ac74f); }
.sy-glyph-v4 { background: linear-gradient(135deg, #7b2d8b, #c0392b); }
.sy-glyph-v5 { background: linear-gradient(135deg, #b3541e, #e8a87c); }
.sy-glyph-v6 { background: linear-gradient(135deg, #16425b, #81a4cd); }
.post-card-body { padding: 24px 28px; display: flex; flex-direction: column; }
.post-card-meta { display: flex; gap: 16px; font-size: 13px; color: var(--sy-text-muted); margin-bottom: 10px; flex-wrap: wrap; }
.post-card-meta .cat { color: var(--sy-accent); font-weight: 600; }
.post-card-title { font-family: var(--sy-font-title); font-size: 22px; line-height: 1.45; }
.post-card-title a { color: var(--sy-text); }
.post-card-title a:hover { color: var(--sy-primary); }
.post-card-excerpt { margin-top: 10px; color: var(--sy-text-muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-more { margin-top: auto; padding-top: 16px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.post-card-more .arrow { transition: transform var(--sy-transition); }
.post-card:hover .post-card-more .arrow { transform: translateX(6px); }

/* 卡片式列表模式 */
.sy-layout-cards .post-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.sy-layout-cards .post-card { grid-template-columns: 1fr; }
.sy-layout-cards .post-card-thumb { height: 200px; }

/* ============================================================
   分页
============================================================ */
.sy-pagination { margin-top: 44px; display: flex; justify-content: center; gap: 8px; }
.sy-pagination .page-numbers {
  min-width: 42px; height: 42px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--sy-border); border-radius: 10px;
  background: var(--sy-surface); color: var(--sy-text);
  transition: all var(--sy-transition);
}
.sy-pagination .page-numbers.current, .sy-pagination .page-numbers:hover {
  background: var(--sy-primary); border-color: var(--sy-primary); color: #fff;
  transform: translateY(-2px);
}

/* 无限滚动加载指示器 */
.sy-load-more {
  margin-top: 36px; display: flex; align-items: center; justify-content: center;
  gap: 12px; color: var(--sy-text-muted); font-size: 14px;
  transition: opacity var(--sy-transition);
}
.sy-load-more .glyph {
  font-family: var(--sy-font-title); font-size: 26px; font-weight: 700;
  color: var(--sy-primary); display: inline-block;
}
.sy-load-more.waiting { opacity: 0; }
.sy-load-more.active { opacity: 1; }
.sy-load-more.active .glyph { animation: suFloat 1.2s ease-in-out infinite alternate; }
.sy-load-more.done { opacity: 1; }
.sy-load-more.done .glyph { display: none; }

/* ============================================================
   文章正文
============================================================ */
.single-article {
  background: var(--sy-surface);
  border: 1px solid var(--sy-border);
  border-radius: var(--sy-radius);
  padding: 48px clamp(24px, 5vw, 64px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}
.entry-header { margin-bottom: 32px; text-align: center; }
.entry-title {
  font-family: var(--sy-font-title);
  font-size: clamp(26px, 3.6vw, 40px); line-height: 1.4; letter-spacing: 1px;
}
.entry-meta { margin-top: 16px; display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--sy-text-muted); }
.entry-thumb { border-radius: var(--sy-radius); margin: 0 0 32px; overflow: hidden; }
.entry-thumb img { width: 100%; max-height: 440px; object-fit: cover; }
.entry-content { font-size: 16.5px; }
.entry-content h2, .entry-content h3, .entry-content h4 {
  font-family: var(--sy-font-title);
  margin: 2em 0 0.8em; line-height: 1.4;
}
.entry-content h2 { font-size: 26px; padding-left: 14px; border-left: 4px solid var(--sy-primary); }
.entry-content h3 { font-size: 22px; }
.entry-content p { margin: 1.2em 0; }
.entry-content blockquote {
  margin: 1.6em 0; padding: 18px 24px;
  border-left: 4px solid var(--sy-accent);
  background: color-mix(in srgb, var(--sy-accent) 8%, transparent);
  border-radius: 0 10px 10px 0; color: var(--sy-text-muted);
}
.entry-content img { border-radius: 10px; margin: 1.2em auto; }
.entry-content pre {
  background: #1e1f24; color: #e8e5e0; padding: 20px 24px;
  border-radius: 10px; overflow-x: auto; font-size: 14px; line-height: 1.7;
}
.entry-content code { background: color-mix(in srgb, var(--sy-primary) 10%, transparent); padding: 2px 7px; border-radius: 5px; font-size: 0.9em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.entry-content th, .entry-content td { border: 1px solid var(--sy-border); padding: 10px 14px; }
.entry-content th { background: color-mix(in srgb, var(--sy-primary) 6%, transparent); }
.entry-content a { border-bottom: 1px dashed var(--sy-primary); }

.entry-tags { margin-top: 36px; display: flex; gap: 10px; flex-wrap: wrap; }
.entry-tags a {
  font-size: 13px; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--sy-border); color: var(--sy-text-muted);
  transition: all var(--sy-transition);
}
.entry-tags a:hover { background: var(--sy-primary); border-color: var(--sy-primary); color: #fff; transform: translateY(-2px); }

/* 作者卡片 & 相关文章 */
.author-box, .related-posts {
  margin-top: 40px; background: var(--sy-surface);
  border: 1px solid var(--sy-border); border-radius: var(--sy-radius);
  padding: 28px;
}
.author-box-inner { display: flex; gap: 20px; align-items: center; }
.author-monogram {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--sy-primary), var(--sy-accent));
  color: #fff; font-family: var(--sy-font-title);
  font-size: 32px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--sy-primary) 35%, transparent);
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin-top: 18px; }
.related-item { border: 1px solid var(--sy-border); border-radius: 10px; overflow: hidden; transition: all var(--sy-transition); }
.related-item:hover { transform: translateY(-4px); box-shadow: var(--sy-shadow); }
.related-item img { height: 110px; width: 100%; object-fit: cover; }
.related-item .t { padding: 12px 14px; font-size: 14px; line-height: 1.5; color: var(--sy-text); }
.section-title { font-family: var(--sy-font-title); font-size: 20px; }

/* ============================================================
   侧边栏
============================================================ */
.sidebar-area { display: grid; gap: 24px; position: sticky; top: calc(var(--sy-header-h) + 20px); }
/* 小工具容器本身成为 grid，确保各小工具之间有间隙 */
.widget-area { display: grid; gap: 24px; min-width: 0; }
.widget {
  background: var(--sy-surface); border: 1px solid var(--sy-border);
  border-radius: var(--sy-radius); padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.widget-title {
  font-family: var(--sy-font-title); font-size: 17px; margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 2px solid var(--sy-border); position: relative;
}
.widget-title::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 42px; height: 2px;
  background: var(--sy-primary); border-radius: 2px;
}
.widget ul { list-style: none; display: grid; gap: 8px; }
.widget ul li { padding-left: 16px; position: relative; }
.widget ul li::before { content: "·"; position: absolute; left: 0; color: var(--sy-primary); font-weight: 700; }
.widget a { color: var(--sy-text); font-size: 14.5px; }
.widget a:hover { color: var(--sy-primary); padding-left: 3px; }

/* ============================================================
   苏韵自定义小工具
============================================================ */
/* 关于博主 */
.sy-w-about { text-align: center; }
.sy-w-about .sy-w-avatar {
  width: 84px; height: 84px; margin: 4px auto 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--sy-primary), var(--sy-accent));
  color: #fff; font-family: var(--sy-font-title); font-size: 40px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--sy-primary) 30%, transparent);
}
.sy-w-about .sy-w-name { font-family: var(--sy-font-title); font-size: 18px; font-weight: 700; }
.sy-w-about .sy-w-bio { margin-top: 8px; font-size: 14px; color: var(--sy-text-muted); }
.sy-w-about .sy-social-row { justify-content: center; margin-top: 14px; }

/* 文章列表（最新/热门共用） */
.sy-posts-list { display: grid; gap: 14px; }
.sy-posts-list .item { display: flex; gap: 12px; align-items: center; }
.sy-posts-list .sy-w-thumb {
  width: 56px; height: 56px; border-radius: 10px; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sy-font-title); font-size: 24px; font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}
.sy-posts-list .sy-w-thumb img { width: 56px; height: 56px; object-fit: cover; }
.sy-posts-list .meta { min-width: 0; }
.sy-posts-list .t { font-size: 14.5px; line-height: 1.5; }
.sy-posts-list .t a {
  color: var(--sy-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sy-posts-list .t a:hover { color: var(--sy-primary); padding-left: 0; }
.sy-posts-list .d { font-size: 12px; color: var(--sy-text-muted); margin-top: 2px; }

/* 热门文章名次徽章 */
.sy-posts-list.hot .rank {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sy-font-title); font-weight: 700; font-size: 15px;
  background: color-mix(in srgb, var(--sy-border) 60%, transparent);
  color: var(--sy-text-muted);
}
.sy-posts-list.hot .item:nth-child(1) .rank,
.sy-posts-list.hot .item:nth-child(2) .rank,
.sy-posts-list.hot .item:nth-child(3) .rank {
  background: linear-gradient(135deg, var(--sy-primary), var(--sy-accent));
  color: #fff;
}

/* 最新评论 */
.sy-comments-list { display: grid; gap: 14px; }
.sy-comments-list .item { display: flex; gap: 10px; }
.sy-w-avatar-sm {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--sy-primary), var(--sy-accent));
  color: #fff; font-family: var(--sy-font-title); font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.sy-comments-list .meta { min-width: 0; }
.sy-comments-list .who { font-size: 13px; font-weight: 600; }
.sy-comments-list .txt {
  font-size: 13.5px; color: var(--sy-text-muted); margin: 2px 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sy-comments-list .on {
  font-size: 12px; color: var(--sy-primary);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* 标签云 */
.sy-w-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sy-w-tags a {
  font-size: 13px !important; line-height: 1; padding: 6px 13px;
  border: 1px solid var(--sy-border); border-radius: 999px;
  color: var(--sy-text-muted); background: var(--sy-bg);
  transition: all var(--sy-transition);
}
.sy-w-tags a:hover {
  background: var(--sy-primary); border-color: var(--sy-primary);
  color: #fff; transform: translateY(-2px); padding-left: 13px;
}
.sy-social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sy-social-row a {
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--sy-border); display: flex;
  align-items: center; justify-content: center; font-size: 18px;
  transition: all var(--sy-transition);
}
.sy-social-row a:hover { background: var(--sy-primary); border-color: var(--sy-primary); color: #fff; transform: translateY(-4px) rotate(-6deg); }

/* ============================================================
   友情链接页面
============================================================ */
.sy-links-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px;
  margin-bottom: 28px;
}
.sy-link-card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  background: var(--sy-surface); border: 1px solid var(--sy-border);
  border-radius: var(--sy-radius); padding: 24px 22px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
  transition: transform var(--sy-transition), box-shadow var(--sy-transition), border-color var(--sy-transition);
}
.sy-link-card:hover {
  transform: translateY(-6px); box-shadow: var(--sy-shadow);
  border-color: color-mix(in srgb, var(--sy-primary) 30%, var(--sy-border));
}
/* 离线链接：整卡置灰 */
.sy-link-card.is-offline {
  filter: grayscale(1);
  opacity: 0.55;
  background: color-mix(in srgb, var(--sy-border) 35%, var(--sy-surface));
  box-shadow: none;
}
.sy-link-card.is-offline .sy-link-char {
  background: color-mix(in srgb, var(--sy-border) 70%, var(--sy-text-muted));
}
.sy-link-card.is-offline:hover {
  transform: none; box-shadow: none;
  border-color: var(--sy-border);
}
.sy-link-card.is-offline:hover .sy-link-name { color: var(--sy-text); }
.sy-link-form-box { margin-top: 28px; }
.sy-link-card .sy-link-status {
  position: absolute; top: 12px; right: 12px;
  font-size: 11.5px; line-height: 1; padding: 5px 10px; border-radius: 999px;
}
.sy-link-status.st-online  { background: rgba(30,126,90,.12); color: #1e7e5a; }
.sy-link-status.st-offline { background: rgba(192,57,43,.12); color: #c0392b; }
.sy-link-status.st-pending { background: color-mix(in srgb, var(--sy-border) 60%, transparent); color: var(--sy-text-muted); }
.sy-link-card .sy-link-char {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--sy-primary), var(--sy-accent));
  color: #fff; font-family: var(--sy-font-title); font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.sy-link-card .sy-link-name {
  font-family: var(--sy-font-title); font-size: 17px; font-weight: 700; color: var(--sy-text);
}
.sy-link-card:hover .sy-link-name { color: var(--sy-primary); }
.sy-link-card .sy-link-desc {
  font-size: 13.5px; color: var(--sy-text-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 提交结果提示 */
.sy-link-notice { padding: 14px 20px; border-radius: 10px; font-size: 14.5px; margin-bottom: 24px; }
.sy-link-notice.ok  { background: rgba(30,126,90,.1); color: #1e7e5a; border: 1px solid rgba(30,126,90,.3); }
.sy-link-notice.err { background: rgba(192,57,43,.08); color: #c0392b; border: 1px solid rgba(192,57,43,.3); }

/* 申请表单 */
.sy-link-form { display: grid; gap: 16px; }
.sy-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sy-form-row .sy-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sy-link-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sy-link-form input, .sy-link-form textarea {
  padding: 11px 15px; border: 1px solid var(--sy-border); border-radius: 10px;
  background: var(--sy-bg); color: var(--sy-text); font-family: inherit; font-size: 15px;
}
.sy-link-form input:focus, .sy-link-form textarea:focus { outline: 2px solid var(--sy-primary); border-color: transparent; }
.sy-link-form button {
  justify-self: start; padding: 12px 36px; border: none; border-radius: 10px;
  background: var(--sy-primary); color: #fff; font-size: 15px; cursor: pointer;
  transition: all var(--sy-transition);
}
.sy-link-form button:hover { background: var(--sy-primary-dark); transform: translateY(-2px); }
@media (max-width: 640px) { .sy-form-row { grid-template-columns: 1fr; } }

/* ============================================================
   页脚
============================================================ */
.site-footer {
  margin-top: 60px; border-top: 1px solid var(--sy-border);
  background: var(--sy-surface); position: relative;
}
.footer-inner {
  max-width: var(--sy-max-width); margin: 0 auto; padding: 40px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.footer-nav ul { list-style: none; display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: var(--sy-text-muted); font-size: 14px; }
.footer-nav a:hover { color: var(--sy-primary); }
.copyright { font-size: 13.5px; color: var(--sy-text-muted); }

/* 返回顶部 */
.sy-backtop {
  position: fixed; right: 28px; bottom: 32px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  border: none; background: var(--sy-primary); color: #fff;
  font-size: 18px; cursor: pointer; box-shadow: var(--sy-shadow);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: all var(--sy-transition);
}
.sy-backtop.show { opacity: 1; visibility: visible; transform: translateY(0); }
.sy-backtop:hover { background: var(--sy-primary-dark); transform: translateY(-4px); }

/* ============================================================
   评论区
============================================================ */
.comments-area { margin-top: 40px; }
.comment-list { list-style: none; display: grid; gap: 18px; }
.comment-list .comment {
  background: var(--sy-surface); border: 1px solid var(--sy-border);
  border-radius: 12px; padding: 20px 22px;
}
.comment-list .children { list-style: none; margin-top: 14px; padding-left: 26px; display: grid; gap: 14px; }
.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] {
  width: 100%; padding: 12px 16px; border: 1px solid var(--sy-border);
  border-radius: 10px; background: var(--sy-bg); color: var(--sy-text); font-family: inherit;
}
.comment-form input[type="submit"] {
  padding: 12px 34px; background: var(--sy-primary); color: #fff;
  border: none; border-radius: 10px; cursor: pointer; font-size: 15px;
  transition: all var(--sy-transition);
}
.comment-form input[type="submit"]:hover { background: var(--sy-primary-dark); transform: translateY(-2px); }
.comment-reply-link { font-size: 13px; }

/* ============================================================
   动画系统（JS + IntersectionObserver 驱动）
============================================================ */
.sy-anim { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.sy-anim.visible { opacity: 1; transform: translateY(0); }
.sy-anim-delay-1 { transition-delay: 0.1s; }
.sy-anim-delay-2 { transition-delay: 0.2s; }
.sy-anim-delay-3 { transition-delay: 0.3s; }
.sy-anim-left { transform: translateX(-32px); }
.sy-anim-right { transform: translateX(32px); }
.sy-anim-zoom { transform: scale(0.92); }
body.sy-no-anim .sy-anim { opacity: 1; transform: none; transition: none; }
body.sy-no-anim .su-char { animation: none; }

/* 页面切换淡入 */
.page-enter { animation: pageIn 0.6s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ============================================================
   响应式
============================================================ */
@media (max-width: 768px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card-thumb { height: 180px; }
  .menu-toggle {
    display: flex; margin-left: auto; width: 40px; height: 40px;
    align-items: center; justify-content: center; font-size: 20px;
    background: none; border: 1px solid var(--sy-border); border-radius: 10px;
    color: var(--sy-text); cursor: pointer;
  }
  .header-actions { margin-left: 0; }
  .main-nav {
    position: fixed; top: var(--sy-header-h); left: 0; right: 0;
    background: var(--sy-surface); border-bottom: 1px solid var(--sy-border);
    max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
  }
  .main-nav.open { max-height: 60vh; overflow-y: auto; }
  .main-nav ul { flex-direction: column; padding: 12px 20px 20px; }
  .main-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; display: none; }
  .main-nav li:hover > .sub-menu { display: block; }
  .hero { padding: 44px 24px 28px; }
  .single-article { padding: 30px 22px; }
  .sy-backtop { right: 16px; bottom: 20px; }
}
