﻿/* === 康康的博客 UI Theme === */

/* CSS Variables - Light Theme (Default) */
:root {
  --bg-primary: #f1f5f9;
  --bg-secondary: #e8edf3;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-strong: rgba(255, 255, 255, 0.88);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: rgba(59, 130, 246, 0.1);
  --accent2: #6366f1;
  --accent2-light: rgba(99, 102, 241, 0.08);
  --border: rgba(148, 163, 184, 0.25);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 8px 32px rgba(59, 130, 246, 0.15);
  --card-bg: rgba(255, 255, 255, 0.65);
  --nav-bg: rgba(241, 245, 249, 0.85);
  --footer-bg: rgba(226, 232, 240, 0.9);
  --input-bg: rgba(255, 255, 255, 0.75);
  --input-border: rgba(148, 163, 184, 0.35);
  --badge-bg: #3b82f6;
  --gradient-start: #3b82f6;
  --gradient-end: #6366f1;
  --blur: 16px;
  --radius: 14px;
  --radius-sm: 8px;
}

/* Dark Theme */
html.dark {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-glass: rgba(15, 23, 42, 0.75);
  --bg-glass-strong: rgba(30, 41, 59, 0.88);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --accent-light: rgba(96, 165, 250, 0.12);
  --accent2: #818cf8;
  --accent2-light: rgba(129, 140, 248, 0.1);
  --border: rgba(100, 116, 139, 0.2);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 32px rgba(96, 165, 250, 0.2);
  --card-bg: rgba(30, 41, 59, 0.65);
  --nav-bg: rgba(15, 23, 42, 0.85);
  --footer-bg: rgba(30, 41, 59, 0.9);
  --input-bg: rgba(30, 41, 59, 0.75);
  --input-border: rgba(71, 85, 105, 0.35);
  --badge-bg: #3b82f6;
}

.dark {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-glass: rgba(15, 23, 42, 0.75);
  --bg-glass-strong: rgba(30, 41, 59, 0.88);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --accent-light: rgba(96, 165, 250, 0.12);
  --accent2: #818cf8;
  --accent2-light: rgba(129, 140, 248, 0.1);
  --border: rgba(100, 116, 139, 0.2);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 32px rgba(96, 165, 250, 0.15);
  --card-bg: rgba(30, 41, 59, 0.6);
  --nav-bg: rgba(15, 23, 42, 0.88);
  --footer-bg: rgba(15, 23, 42, 0.92);
  --input-bg: rgba(30, 41, 59, 0.6);
  --input-border: rgba(100, 116, 139, 0.3);
  --badge-bg: #60a5fa;
  --gradient-start: #60a5fa;
  --gradient-end: #818cf8;
}

/* Base */
* { box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  word-wrap: break-word;
  margin: 0;
  min-height: 100vh;
  transition: background 0.4s, color 0.4s;
}
/* Cute background pattern */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(59,130,246,0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(132,94,247,0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(148,163,184,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
body.dark::before {
  background:
    radial-gradient(circle at 20% 20%, rgba(96,165,250,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(167,139,250,0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(100,50,200,0.03) 0%, transparent 60%);
}
a { color: var(--accent); transition: all .3s; }
a:hover { color: var(--accent-hover); text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; }
code { white-space: normal; border-radius: 4px; color: #3b82f6; background: var(--accent-light); padding: 1px 5px; }
pre { border-radius: var(--radius-sm); border: none; background: var(--bg-glass-strong); backdrop-filter: blur(var(--blur)); }
.form-control {
  height: auto; border: 2px solid var(--input-border); background: var(--input-bg);
  box-shadow: none; border-radius: var(--radius-sm); backdrop-filter: blur(8px);
  transition: border-color .3s, box-shadow .3s;
}
.form-control:focus {
  border-color: var(--accent); background: var(--input-bg);
  box-shadow: 0 0 0 3px var(--accent-light); outline: none;
}
.container { max-width: 1100px; position: relative; z-index: 1; }

/* === NAVBAR (Frosted Glass) === */
.navbar-inverse {
  background: var(--nav-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: none;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.05);
  transition: background .4s;
}
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color .3s, background .3s;
  border-radius: var(--radius-sm);
  margin: 4px 2px;
  padding: 10px 14px;
}
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > .active > a:hover {
  color: var(--accent);
  background: var(--accent-light);
}
.navbar-inverse .navbar-toggle { border-color: var(--border); }
.navbar-inverse .navbar-toggle .icon-bar { background: var(--text-secondary); }
.navbar-inverse .navbar-collapse { border-color: var(--border); }
.navbar-brand { font-weight: bold; font-size: 18px !important; color: var(--accent) !important; }

/* === THEME TOGGLE BUTTON === */
.theme-toggle {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow);
  transition: all .3s;
}
.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
body.dark .theme-toggle .icon-sun { display: inline; }
body.dark .theme-toggle .icon-moon { display: none; }

/* === GLASS MIXIN === */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background .4s, border-color .3s, box-shadow .3s, transform .3s;
}

/* === ARTICLE CARD === */
.article {
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
  transition: all .35s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow);
}
.article:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--accent);
}
.article-stick {
  position: absolute;
  top: -6px;
  right: 6%;
  font-size: 32px;
  color: var(--accent);
  opacity: 0.5;
}
.label-zan {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  padding: 4px 14px;
  margin-bottom: 12px;
  display: inline-block;
  border-radius: 20px;
  font-size: 12px;
  font-weight: normal;
  letter-spacing: 0.5px;
}
.label-zan a { color: #fff; }
.label-zan a:hover { color: #fff; text-decoration: none; opacity: 0.9; }
.article h3 {
  font-size: 18px;
  margin: 0 0 10px;
  line-height: 1.6;
  font-weight: bold;
}
.article h3 a { color: var(--text-primary); }
.article h3 a:hover { color: var(--accent); text-decoration: none; }
.article hr { border: none; border-top: 1px dashed var(--border); margin: 12px 0; }
.zan-outline {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
  overflow: hidden;
  margin-bottom: 5px;
}
.post-info {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 8px;
}
.post-info span { margin-left: 15px; }
.post-info span:first-child { margin-left: 0; }
.post-info i { margin-right: 3px; color: var(--accent); }

/* Section Title */
.section-title {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 20px;
  border-radius: var(--radius);
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(59,130,246,0.15);
}
.section-title i { margin-right: 8px; }

/* === ARTICLE DETAIL === */
.zan-article {
  padding: 15px 0;
  line-height: 2;
  font-size: 15px;
  color: var(--text-primary);
}
.zan-article h1, .zan-article h2, .zan-article h3 {
  margin: 25px 0 12px;
  color: var(--text-primary);
  font-weight: bold;
}
.zan-article h2 {
  font-size: 20px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
}
.zan-article h3 { font-size: 17px; }
.zan-article p { margin-bottom: 16px; }
.zan-article img { max-width: 100%; margin: 12px 0; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.zan-article pre {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(var(--blur));
  padding: 18px;
  overflow-x: auto;
  border-left: 3px solid var(--accent);
  margin: 18px 0;
  font-size: 13px;
  line-height: 1.6;
}
.zan-article code { background: var(--accent-light); padding: 2px 6px; font-size: 13px; color: var(--accent); }
.zan-article pre code { color: var(--text-primary); padding: 0; background: none; }
.zan-article blockquote {
  border-left: 4px solid var(--accent);
  padding: 14px 20px;
  margin: 18px 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}
.zan-article ul, .zan-article ol { margin: 12px 0 12px 24px; }
.zan-article li { margin-bottom: 6px; }
.zan-article table { width: 100%; border-collapse: collapse; margin: 18px 0; border-radius: var(--radius-sm); overflow: hidden; }
.zan-article table th, .zan-article table td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  font-size: 14px;
}
.zan-article table th { background: var(--accent-light); font-weight: bold; color: var(--text-primary); }

/* Tags */
.zan-tags { clear: both; padding-top: 8px; margin-bottom: 10px; }
.zan-tags a {
  display: inline-block;
  padding: 4px 14px;
  margin: 0 5px 5px 0;
  background: var(--accent-light);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 12px;
  border-radius: 20px;
  transition: all .3s;
}
.zan-tags a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* === BUTTONS === */
.btn-zan-solid-pi {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  padding: 10px 22px;
  font-size: 14px;
  border-radius: 25px;
  transition: all .3s;
  box-shadow: 0 4px 15px rgba(59,130,246,0.25);
}
.btn-zan-solid-pi:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.3);
}
.btn-zan-line-pp {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 8px 22px;
  font-size: 14px;
  border-radius: 25px;
  transition: all .3s;
}
.btn-zan-line-pp:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.btn-default {
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--card-bg);
  border-radius: 25px;
  backdrop-filter: blur(8px);
}
.btn-default:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
.btn-danger { background: #3b82f6; border-color: #3b82f6; color: #fff; border-radius: 25px; }
.btn-danger:hover { background: #2563eb; border-color: #2563eb; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 5px 14px; font-size: 12px; border-radius: 20px; }
.btn { border-radius: 25px !important; transition: all .3s; }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* === PAGINATION === */
#zan-page { margin: 25px 0; }
.pagination-zan { margin: 0; }
.pagination-zan > li > span,
.pagination-zan > li > a {
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  margin-left: 3px;
  font-size: 13px;
  border-radius: var(--radius-sm) !important;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  transition: all .3s;
}
.pagination-zan > .active > span,
.pagination-zan > li > a:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-color: transparent;
}

/* === SIDEBAR === */
.panel-zan {
  border: 1px solid var(--border);
  margin-bottom: 20px;
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background .4s;
}
.panel-zan .panel-heading {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: bold;
  border-bottom: none;
  letter-spacing: 0.5px;
}
.panel-zan .list-group-item {
  border: 0;
  padding: 0;
  display: inline-block;
  margin: 3px 4px;
  padding: 5px 14px;
  border-radius: 20px;
  background: var(--accent-light);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  transition: all .3s;
}
.panel-zan .list-group-item:last-child { border-bottom: 0; }
.panel-zan .list-group-item:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  padding-left: 14px;
}
.zan-category { padding: 12px 15px; }
.panel-zan .list-group-item .badge {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 10px;
  min-width: 24px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(59,130,246,0.2);
}
#list-total {
  padding: 16px 20px;
  color: var(--text-secondary);
  font-size: 13px;
}
#list-total ul { list-style: none; margin: 0; padding: 0; }
#list-total li { padding: 6px 0; border-bottom: 1px dashed var(--border); }
#list-total li:last-child { border-bottom: 0; }

/* Search form */
#searchform { margin-bottom: 20px; }
#searchform .form-control {
  border: 2px solid var(--border);
  padding: 10px 16px;
  font-size: 13px;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
}
#searchform .form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

/* === FOOTER === */
.footer-space { padding: 10px 0 5px 0; }
.footer-space-line {
  height: 5px;
  background: linear-gradient(to right, var(--accent), var(--accent2), #6366f1, #339af0, #51cf66, #ffd43b);
  border-radius: 3px;
}
.zan-copyright {
  background: var(--footer-bg);
  backdrop-filter: blur(var(--blur));
  color: var(--text-muted);
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  border-top: 1px solid var(--border);
}
.zan-copyright a { color: var(--text-muted); }
.zan-copyright a:hover { color: var(--accent); }
#zan-gotop { position: fixed; bottom: 30px; right: 30px; display: none; z-index: 999; }
#zan-gotop .gotop {
  width: 44px; height: 44px; line-height: 44px; text-align: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border-radius: 50%; cursor: pointer;
  box-shadow: 0 4px 15px rgba(59,130,246,0.25);
  transition: all .3s;
}
#zan-gotop .gotop:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 6px 20px rgba(59,130,246,0.3); }

/* === FLASH === */
.flash { padding: 14px 20px; margin-bottom: 15px; font-size: 13px; border-radius: var(--radius-sm); backdrop-filter: blur(8px); }
.flash-success { background: rgba(81,207,102,0.15); color: #2b8a3e; border: 1px solid rgba(81,207,102,0.3); }
.flash-error { background: rgba(232,67,147,0.1); color: #c2255c; border: 1px solid rgba(232,67,147,0.2); }
.flash-info { background: rgba(51,154,240,0.1); color: #1864ab; border: 1px solid rgba(51,154,240,0.2); }
body.dark .flash-success { color: #69db7c; }
body.dark .flash-error { color: #93c5fd; }
body.dark .flash-info { color: #74c0fc; }

/* === LOGIN === */
.login-form {
  max-width: 400px;
  margin: 40px auto;
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur));
  padding: 35px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.login-form h2 { text-align: center; margin-bottom: 25px; font-size: 20px; color: var(--accent); }

/* === FORM GROUP === */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px; border: 2px solid var(--input-border);
  font-size: 13px; outline: none; transition: border-color .3s, box-shadow .3s;
  background: var(--input-bg); border-radius: var(--radius-sm); color: var(--text-primary);
  backdrop-filter: blur(8px);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.form-group textarea { resize: vertical; min-height: 200px; }

/* === ADMIN === */
.admin-nav { margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.admin-nav .btn { margin-right: 5px; margin-bottom: 5px; }
.stat-row { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 150px;
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur));
  padding: 22px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.stat-card .num { font-size: 32px; font-weight: bold; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-card .label { color: var(--text-muted); font-size: 12px; margin-top: 5px; }
.table { width: 100%; border-collapse: collapse; margin-bottom: 0; }
.table th, .table td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-primary);
}
.table th { background: var(--accent-light); color: var(--text-secondary); font-weight: bold; }
.table tr:hover td { background: var(--accent-light); }
.label { display: inline-block; padding: 3px 10px; font-size: 11px; border-radius: 15px; font-weight: normal; }
.label-success { background: rgba(81,207,102,0.2); color: #2b8a3e; }
.label-default { background: var(--accent-light); color: var(--text-muted); }

/* Tag checklist */
.tag-checklist {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.tag-checklist::before {
  content: ''; position: absolute; top: -30%; right: -20%; width: 200px; height: 200px;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.tag-checklist::after {
  content: ''; position: absolute; bottom: -20%; left: -10%; width: 160px; height: 160px;
  background: radial-gradient(circle, var(--accent2-light) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.tag-checklist > label {
  display: inline-flex !important; align-items: center; gap: 7px;
  padding: 8px 18px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--border); border-radius: 25px;
  font-size: 13px; color: var(--text-secondary);
  cursor: pointer; transition: all .3s ease;
  margin-bottom: 0; font-weight: normal;
  position: relative; z-index: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.tag-checklist > label:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59,130,246,0.15);
}
.tag-checklist > label:has(input:checked) {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 20px rgba(59,130,246,0.3);
  transform: translateY(-1px);
}
.tag-checklist > label:has(input:checked):hover {
  box-shadow: 0 6px 24px rgba(59,130,246,0.4);
  transform: translateY(-2px);
}
.tag-checklist > label input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--accent);
  border-radius: 4px; margin: 0;
}
.tag-checklist > label:has(input:checked) input[type="checkbox"] {
  accent-color: #fff;
}

/* Error pages */
.error-page { text-align: center; padding: 80px 20px; }
.error-page .error-code {
  font-size: 80px; font-weight: bold; margin-bottom: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.error-page .error-msg { color: var(--text-muted); font-size: 15px; margin-bottom: 25px; }

/* === BODYER === */
#zan-bodyer { padding: 25px 0; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .stat-row { flex-direction: column; }
  .login-form { margin: 20px 15px; }
  .post-info span { display: block; margin-left: 0; margin-bottom: 3px; }
  .article { padding: 18px 16px; }
  .section-title { font-size: 14px; padding: 12px 16px; }
  .theme-toggle { top: auto; bottom: 80px; right: 15px; width: 44px; height: 44px; font-size: 18px; }
}

/* Hide first h1 in article content */
.zan-article > h1:first-child { display: none; }


/* === GUESTBOOK === */
.register-link { color: var(--text-muted); font-size: 13px; margin-top: 15px; text-align: center; }
.register-link a { color: var(--accent); }
/* === SCROLLBAR (Cute) === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--accent), var(--accent2)); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* === SELECTION === */
::selection { background: var(--accent-light); color: var(--accent); }

/* Flash messages */
.flash-message {
  padding: 12px 20px; border-radius: var(--radius-sm); margin-bottom: 20px;
  font-size: 14px; display: flex; align-items: center; gap: 10px;
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  animation: flashSlideIn 0.3s ease;
}
.flash-success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); color: #16a34a; }
.flash-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #dc2626; }
.flash-info { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.3); color: #2563eb; }
body.dark .flash-success { background: rgba(34,197,94,0.15); color: #4ade80; }
body.dark .flash-error { background: rgba(239,68,68,0.15); color: #f87171; }
body.dark .flash-info { background: rgba(59,130,246,0.15); color: #60a5fa; }
@keyframes flashSlideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }


/* Enhanced search form */
.search-form-enhanced { position: relative; margin-bottom: 24px; }
.search-form-enhanced input[type="text"] {
  width: 100%; padding: 14px 50px 14px 20px;
  background: var(--bg-glass); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 15px; color: var(--text-primary);
  transition: all .3s; outline: none;
}
.search-form-enhanced input[type="text"]:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}
.search-form-enhanced input[type="text"]::placeholder { color: var(--text-muted); }
.search-form-enhanced button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; color: #fff; width: 38px; height: 38px; border-radius: 10px;
  cursor: pointer; transition: all .3s;
}
.search-form-enhanced button:hover { opacity: 0.9; transform: translateY(-50%) scale(1.05); }

/* Pagination polish */
.pagination-zan > li > a, .pagination-zan > li > span {
  background: var(--bg-glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border); color: var(--text-secondary);
  border-radius: var(--radius-sm); margin: 0 3px; transition: all .3s;
}
.pagination-zan > li > a:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.pagination-zan > .active > a, .pagination-zan > .active > span {
  background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff;
  box-shadow: 0 2px 10px rgba(59,130,246,0.25);
}
.pagination-zan > .disabled > a, .pagination-zan > .disabled > span { opacity: 0.5; }


/* Admin table */
.table { color: var(--text-primary); }
.table > thead > tr > th { border-bottom: 2px solid var(--border); color: var(--text-secondary); font-weight: 600; font-size: 13px; }
.table > tbody > tr > td { border-top: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.table-hover > tbody > tr:hover { background: var(--accent-light); }
.table-responsive { border-radius: var(--radius-sm); overflow: hidden; }


/* Post excerpt */
.post-excerpt {
  font-size: 13px; color: var(--text-muted); line-height: 1.7;
  margin: 8px 0 12px; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.post-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 15px; flex-wrap: wrap; }
.post-meta span { display: inline-flex; align-items: center; gap: 4px; }
.post-meta i { font-size: 11px; }


/* Link hover effects */
a { color: var(--accent); transition: color .3s; }
a:hover { color: var(--accent-hover); text-decoration: none; }
.article a, .zan-article a { color: var(--accent); border-bottom: 1px solid transparent; transition: all .3s; }
.article a:hover, .zan-article a:hover { border-bottom-color: var(--accent); }


/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; opacity: 0.5; }
.empty-state p { font-size: 15px; }


/* Loading spinner */
.loading-spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* Focus styles for accessibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


/* Smooth scroll */
html { scroll-behavior: smooth; }


/* Print styles */
@media print {
  #zan-header, #zan-footer, .sidebar, #zan-gotop, #reading-progress, #theme-toggle,
  .admin-nav, .pagination, .btn { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .zan-article { max-width: 100% !important; }
  a { color: #000 !important; text-decoration: underline !important; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 11px; }
}


/* Tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%); padding: 4px 10px; font-size: 12px;
  background: var(--text-primary); color: var(--bg-primary);
  border-radius: 4px; white-space: nowrap; z-index: 1000;
  animation: tooltipIn 0.2s ease;
}
@keyframes tooltipIn { from { opacity: 0; transform: translateX(-50%) translateY(4px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }


/* Badge count */
.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--accent); color: #fff; font-size: 11px;
  border-radius: 10px; font-weight: 600;
}


/* Card hover lift effect */
.card-lift { transition: transform .3s, box-shadow .3s; }
.card-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }


/* Avatar */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-size: 14px; font-weight: 600; text-transform: uppercase;
}
.avatar-sm { width: 24px; height: 24px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 20px; }


/* Tag pill (for displaying tags inline) */
.tag-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; font-size: 12px;
  background: var(--accent-light); color: var(--accent);
  border-radius: 12px; transition: all .3s;
}
.tag-pill:hover { background: var(--accent); color: #fff; }


/* Divider */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.divider-text { display: flex; align-items: center; gap: 16px; color: var(--text-muted); font-size: 13px; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }


/* Table of Contents */
.toc { padding: 16px 20px; margin-bottom: 24px; background: var(--bg-glass); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.toc-title { font-weight: 600; font-size: 14px; margin-bottom: 10px; color: var(--text-primary); }
.toc ul { list-style: none; padding-left: 0; margin: 0; }
.toc li { padding: 4px 0; }
.toc a { font-size: 13px; color: var(--text-secondary); }
.toc a:hover { color: var(--accent); }
.toc li li { padding-left: 16px; }


/* Keyboard shortcut hint */
kbd {
  display: inline-block; padding: 2px 6px; font-size: 11px;
  background: var(--bg-glass-strong); border: 1px solid var(--border);
  border-radius: 4px; box-shadow: 0 1px 0 var(--border);
  font-family: monospace; color: var(--text-secondary);
}


/* Status indicators */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-published { background: #22c55e; }
.status-draft { background: #f59e0b; }
.status-pending { background: #3b82f6; }


/* Horizontal rule */
.zan-article hr { border: none; height: 2px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 24px 0; }


/* Text emphasis */
.zan-article strong { color: var(--text-primary); font-weight: 700; }
.zan-article em { color: var(--text-secondary); }


/* Heading anchors */
.zan-article h1, .zan-article h2, .zan-article h3, .zan-article h4 { position: relative; }
.zan-article h2 { font-size: 22px; margin: 28px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.zan-article h3 { font-size: 18px; margin: 24px 0 12px; }
.zan-article h4 { font-size: 16px; margin: 20px 0 10px; }


/* Footer improvements */
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--text-muted); font-size: 13px; transition: color .3s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 12px; }


/* Sidebar improvements */
.sidebar-stat { display: flex; justify-content: space-around; padding: 12px 0; }
.sidebar-stat-item { text-align: center; }
.sidebar-stat-num { font-size: 20px; font-weight: 700; color: var(--accent); }
.sidebar-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }


/* Custom alerts */
.alert-custom {
  padding: 12px 16px; border-radius: var(--radius-sm); margin: 12px 0;
  font-size: 13px; display: flex; align-items: center; gap: 8px;
}
.alert-info-custom { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2); color: #2563eb; }
.alert-success-custom { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); color: #16a34a; }
.alert-warning-custom { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); color: #d97706; }

.home-stats { display:flex;justify-content:center;gap:30px;padding:16px 0;margin-bottom:20px;flex-wrap:wrap; }
.home-stat-item { text-align:center; }
.home-stat-num { font-size:24px;font-weight:700;color:var(--accent); }
.home-stat-label { font-size:12px;color:var(--text-muted); }

.article-footer { display:flex;justify-content:space-between;align-items:center;padding-top:10px;margin-top:10px;border-top:1px solid var(--border);font-size:12px;color:var(--text-muted); }
.article-footer .label { font-size:11px; }

.nav-active { color:#fff!important;background:rgba(255,255,255,0.1);border-radius:var(--radius-sm); }

/* Admin quick actions */
.admin-quick { display:flex;gap:12px;flex-wrap:wrap;padding:20px; }
.admin-quick .btn { font-size:13px; }

/* Post tags inline */
.post-tags-inline { display:flex;gap:6px;flex-wrap:wrap;margin-top:8px; }
.post-tags-inline .tag-pill { font-size:11px;padding:2px 8px; }
/* Image placeholder */
.img-placeholder { display:flex;align-items:center;justify-content:center;background:var(--accent-light);color:var(--text-muted);border-radius:var(--radius-sm);min-height:200px;font-size:48px; }
/* Form textarea */
.form-group textarea.form-control { min-height:120px;resize:vertical;font-family:inherit; }
.form-group select.form-control { cursor:pointer; }
/* Button group actions */
.btn-group-actions { display:flex;gap:4px; }
.btn-group-actions .btn { padding:3px 8px;font-size:12px; }
/* Post meta enhanced */
.post-meta-enhanced { display:flex;gap:16px;flex-wrap:wrap;padding:12px 0;font-size:13px;color:var(--text-muted);border-bottom:1px solid var(--border);margin-bottom:16px; }
.post-meta-enhanced span { display:inline-flex;align-items:center;gap:5px; }
/* Skeleton loading */
.skeleton { background:linear-gradient(90deg,var(--bg-secondary) 25%,var(--bg-glass) 50%,var(--bg-secondary) 75%);background-size:200% 100%;animation:skeleton-shine 1.5s infinite;border-radius:var(--radius-sm); }
@keyframes skeleton-shine { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.skeleton-text { height:14px;margin-bottom:8px; }
.skeleton-title { height:20px;width:60%;margin-bottom:12px; }
/* Toast notification */
.toast-container { position:fixed;top:20px;right:20px;z-index:10000;display:flex;flex-direction:column;gap:8px; }
.toast { padding:12px 20px;border-radius:var(--radius-sm);backdrop-filter:blur(var(--blur));box-shadow:var(--shadow);animation:toastIn 0.3s ease;font-size:14px;max-width:350px; }
.toast-success { background:rgba(34,197,94,0.15);border:1px solid rgba(34,197,94,0.3);color:#16a34a; }
.toast-error { background:rgba(239,68,68,0.15);border:1px solid rgba(239,68,68,0.3);color:#dc2626; }
@keyframes toastIn { from{opacity:0;transform:translateX(30px)} to{opacity:1;transform:translateX(0)} }
/* Dark mode scrollbar */
body.dark ::-webkit-scrollbar-track { background:#1e293b; }
body.dark ::-webkit-scrollbar-thumb { background:#475569; }
body.dark ::-webkit-scrollbar-thumb:hover { background:#64748b; }
/* Responsive image */
.zan-article img { max-width:100%;height:auto; }
/* Keyboard shortcut display */
.kbd-group { display:flex;gap:8px;align-items:center;margin:8px 0; }

.skip-to-content{position:absolute;top:-100px;left:0;padding:8px 16px;background:var(--accent);color:#fff;z-index:10000;border-radius:0 0 4px 0;transition:top .3s}
.skip-to-content:focus{top:0}

.breadcrumb-nav a{color:var(--text-muted);transition:color .3s}
.breadcrumb-nav a:hover{color:var(--accent)}
.breadcrumb-nav i{margin:0 6px;font-size:11px}

.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.text-truncate-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.text-truncate-3{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

.gap-4{gap:4px}
.gap-8{gap:8px}
.gap-12{gap:12px}
.mt-8{margin-top:8px}
.mt-16{margin-top:16px}
.mb-8{margin-bottom:8px}
.mb-16{margin-bottom:16px}
.text-center{text-align:center}
.flex{display:flex}
.flex-wrap{flex-wrap:wrap}
.items-center{align-items:center}
.justify-between{justify-content:space-between}

noscript{display:block;padding:20px;text-align:center;background:#fee2e2;color:#991b1b;border-radius:8px;margin:20px}

/* 点赞按钮（借鉴test.com） */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 50px;
    background: var(--card-bg, #fff);
    color: var(--text-muted, #64748b);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}
.like-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.05);
}
.like-btn.liked {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}
.like-btn.liked i {
    color: #ef4444;
    animation: likePopIn 0.3s ease;
}
@keyframes likePopIn {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}
.like-btn i {
    font-size: 18px;
}
.like-section {
    padding: 20px 0;
}
/* === 文章卡片可点击样式 === */
.clickable-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.clickable-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.clickable-card a.post-link {
  color: inherit;
  text-decoration: none;
}
.clickable-card a.post-link:hover {
  color: var(--accent, #3b82f6);
}
/* === 平台标识徽章（借鉴test.com表白墙） === */
.platform-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: #fff;
  margin-bottom: 12px;
}
.platform-badge i { margin-right: 4px; }
.platform-badge.platform-web { background: #6b7280; }
.platform-badge.platform-wechat { background: #07c160; }
.platform-badge.platform-qq { background: #12b7f5; }
/* === 微信联系侧栏 === */
.wechat-contact-box {
  padding: 14px;
  text-align: center;
}
.wechat-desc {
  margin: 0 0 12px;
  color: var(--text-secondary, #666);
  line-height: 1.7;
  font-size: 13px;
  text-align: left;
}
.wechat-id {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--accent-light, rgba(59,130,246,0.08));
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
}
.wechat-id span {
  color: var(--text-muted, #999);
}
.wechat-id strong {
  color: #07c160;
  word-break: break-all;
}
.wechat-qr-item {
  margin-top: 12px;
}
.wechat-qr-title {
  margin-bottom: 8px;
  color: var(--text-primary, #333);
  font-weight: 600;
  font-size: 13px;
}
.wechat-qr-item img {
  max-width: 100%;
  width: 180px;
  height: auto;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border, #eee);
  background: #fff;
  padding: 6px;
}
/* === 2026 UI Polish: AI-inspired clean glass interface === */
:root {
  --surface-highlight: rgba(255,255,255,0.92);
  --ring: rgba(59,130,246,0.28);
}
.dark {
  --surface-highlight: rgba(30,41,59,0.92);
  --ring: rgba(96,165,250,0.26);
}
body {
  background:
    linear-gradient(135deg, rgba(59,130,246,0.08), rgba(99,102,241,0.05) 35%, transparent 70%),
    var(--bg-primary);
}
#zan-bodyer .row {
  align-items: flex-start;
}
.article,
.panel-zan,
.stat-card,
.wechat-admin-hero,
.wechat-preview-card,
.wechat-upload-card {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--surface-highlight), var(--card-bg));
  box-shadow: 0 14px 40px rgba(15,23,42,0.08);
}
.dark .article,
.dark .panel-zan,
.dark .stat-card,
.dark .wechat-admin-hero,
.dark .wechat-preview-card,
.dark .wechat-upload-card {
  background: linear-gradient(145deg, rgba(30,41,59,0.86), rgba(15,23,42,0.72));
  box-shadow: 0 16px 46px rgba(0,0,0,0.24);
}
.panel-zan,
.article {
  border-radius: 18px;
}
.panel-zan .panel-heading {
  border-radius: 18px 18px 0 0;
  letter-spacing: .2px;
}
.btn,
.form-control {
  border-radius: 10px;
}
.form-control {
  padding: 10px 12px;
}
.form-control:focus {
  box-shadow: 0 0 0 4px var(--ring);
}
.btn-zan-solid-pi {
  border: 0;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 10px 24px rgba(37,99,235,0.22);
}
.btn-zan-solid-pi:hover {
  box-shadow: 0 14px 32px rgba(37,99,235,0.30);
}
.navbar-inverse {
  position: sticky;
  top: 0;
  z-index: 999;
}
.zan-post h3,
.article h3 {
  font-weight: 750;
  letter-spacing: -0.02em;
}
.zan-article {
  font-size: 16px;
  line-height: 1.9;
}
.zan-article h2,
.zan-article h3 {
  margin-top: 28px;
  font-weight: 700;
}
.zan-article blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-light);
  border-radius: 0 12px 12px 0;
}
.table {
  background: transparent;
}
.table > thead > tr > th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.admin-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0 16px;
}
.admin-nav .btn {
  margin: 0;
}
.stat-row {
  gap: 14px;
}
.stat-card {
  border-radius: 16px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* === WeChat paste upload admin === */
.wechat-admin-hero {
  border-radius: 20px;
  padding: 24px 26px;
  position: relative;
  overflow: hidden;
}
.wechat-admin-hero::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(7,193,96,0.20), transparent 68%);
}
.wechat-admin-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(7,193,96,0.12);
  color: #07c160;
  font-size: 12px;
  font-weight: 700;
}
.wechat-admin-hero h2 {
  margin: 12px 0 8px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.wechat-admin-hero p {
  margin: 0;
  color: var(--text-secondary);
}
.wechat-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}
.wechat-form-main .help-text,
.wechat-upload-head span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}
.wechat-upload-card {
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 18px;
}
.wechat-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.wechat-upload-head strong {
  color: var(--text-primary);
}
.wechat-paste-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 128px;
  margin-bottom: 12px;
  padding: 18px;
  border: 1.5px dashed rgba(7,193,96,0.45);
  border-radius: 14px;
  background: rgba(7,193,96,0.07);
  color: var(--text-secondary);
  text-align: center;
  cursor: text;
  transition: all .25s ease;
}
.wechat-paste-zone:hover,
.wechat-paste-zone:focus {
  outline: none;
  border-color: #07c160;
  box-shadow: 0 0 0 4px rgba(7,193,96,0.12);
  background: rgba(7,193,96,0.10);
}
.wechat-paste-zone i {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #07c160;
  color: #fff;
  font-size: 18px;
}
.wechat-paste-zone b {
  color: var(--text-primary);
}
.wechat-paste-zone small {
  color: var(--text-muted);
}
.wechat-paste-zone.is-uploading {
  border-color: var(--accent);
  background: var(--accent-light);
}
.wechat-paste-zone.is-success {
  border-color: #07c160;
  background: rgba(7,193,96,0.12);
}
.wechat-paste-zone.is-error {
  border-color: #ef4444;
  background: rgba(239,68,68,0.08);
}
.wechat-preview-panel {
  position: sticky;
  top: 88px;
  align-self: start;
}
.wechat-preview-title {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-weight: 700;
}
.wechat-preview-card {
  border-radius: 18px;
  padding: 16px;
}
.preview-desc {
  color: var(--text-secondary);
  line-height: 1.7;
}
.preview-id {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(7,193,96,0.10);
  margin-bottom: 14px;
}
.preview-id strong {
  color: #07c160;
  word-break: break-all;
}
.preview-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.preview-images span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 12px;
}
.preview-images img,
.preview-images img[src=''] {
  display: none;
}
.preview-images img[src]:not([src='']) {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 6px;
}
.wechat-panel .panel-heading {
  background: linear-gradient(135deg, rgba(7,193,96,0.12), var(--accent-light));
}
.wechat-qr-item img {
  box-shadow: 0 12px 28px rgba(7,193,96,0.12);
}
@media (max-width: 991px) {
  .wechat-form-grid {
    grid-template-columns: 1fr;
  }
  .wechat-preview-panel {
    position: static;
  }
}
@media (max-width: 640px) {
  .article,
  .panel-zan {
    border-radius: 14px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .wechat-upload-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .wechat-admin-hero {
    padding: 20px;
  }
}
/* === Pinned article badge === */
.pinned-post {
  border-color: rgba(245,158,11,0.40);
  box-shadow: 0 16px 42px rgba(245,158,11,0.12);
}
.pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #b45309;
  background: rgba(245,158,11,0.14);
  font-weight: 700;
}
.dark .pinned-badge {
  color: #fbbf24;
  background: rgba(245,158,11,0.16);
}
/* === Admin post editor usability polish === */
.form-help {
  display: block;
  margin-top: 8px;
  color: var(--text-muted, #94a3b8);
  font-size: 12px;
}
.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.42);
}
.dark .tag-picker {
  background: rgba(15,23,42,0.35);
}
.tag-picker-item {
  margin: 0;
  cursor: pointer;
  user-select: none;
}
.tag-picker-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tag-picker-item span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  background: var(--bg-glass);
  box-shadow: 0 6px 16px rgba(15,23,42,0.05);
  transition: all .22s ease;
}
.tag-picker-item:hover span {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent);
}
.tag-picker-item input:checked + span {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 22px rgba(59,130,246,0.22);
}
.pin-control-group > label:first-child {
  margin-bottom: 10px;
}
.pin-switch-card {
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-glass);
  cursor: pointer;
  transition: all .22s ease;
}
.pin-switch-card:hover {
  border-color: rgba(245,158,11,0.55);
  box-shadow: 0 12px 26px rgba(245,158,11,0.10);
}
.pin-switch-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pin-switch-track {
  width: 58px;
  height: 32px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(148,163,184,0.28);
  transition: all .22s ease;
  flex: 0 0 auto;
}
.pin-switch-thumb {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: #fff;
  box-shadow: 0 4px 12px rgba(15,23,42,0.18);
  transform: translateX(0);
  transition: all .22s ease;
}
.pin-switch-card input:checked + .pin-switch-track {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}
.pin-switch-card input:checked + .pin-switch-track .pin-switch-thumb {
  color: #f59e0b;
  transform: translateX(26px);
}
.pin-switch-copy strong {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
}
.pin-switch-copy small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* === Softer article list title cards === */
.article-list .article.zan-post {
  border-radius: 22px;
  padding: 22px 24px;
  border-color: rgba(148,163,184,0.18);
}
.article-list .post-title {
  display: inline-flex;
  max-width: 100%;
  margin: 4px 0 12px;
  padding: 9px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(59,130,246,0.09), rgba(99,102,241,0.06));
  border: 1px solid rgba(59,130,246,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}
.article-list .post-title a {
  color: var(--text-primary);
  line-height: 1.45;
}
.article-list .post-title:hover {
  border-color: rgba(59,130,246,0.28);
  background: linear-gradient(135deg, rgba(59,130,246,0.14), rgba(99,102,241,0.10));
}
.article-list .post-summary {
  padding: 0 4px;
  color: var(--text-secondary);
  line-height: 1.75;
}
.article-list .post-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 100%;
}
.article-list .post-info span {
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148,163,184,0.10);
}
.dark .article-list .post-title {
  background: linear-gradient(135deg, rgba(96,165,250,0.12), rgba(129,140,248,0.08));
  border-color: rgba(96,165,250,0.18);
}
@media (max-width: 640px) {
  .article-list .post-info {
    float: none !important;
    justify-content: flex-start;
    margin-bottom: 10px;
  }
  .article-list .post-title {
    display: flex;
  }
}

