/* ============ 科幻科技化主题 · 变量 ============ */
:root {
  --bg: #030712;
  --bg-2: #0a0f1e;
  --bg-3: #101830;
  --text: #e0f2fe;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --neon: #00f0ff;
  --neon-dim: #0891b2;
  --neon-soft: rgba(0, 240, 255, 0.12);
  --neon-glow: rgba(0, 240, 255, 0.4);
  --electric: #3b82f6;
  --electric-soft: rgba(59, 130, 246, 0.15);
  --purple: #8b5cf6;
  --purple-soft: rgba(139, 92, 246, 0.12);
  --grad: linear-gradient(135deg, #00f0ff 0%, #3b82f6 50%, #8b5cf6 100%);
  --grad-soft: linear-gradient(135deg, rgba(0,240,255,.06), rgba(139,92,246,.06));
  --border: rgba(0, 240, 255, 0.15);
  --border-bright: rgba(0, 240, 255, 0.35);
  --radius: 4px;
  --shadow: 0 0 30px rgba(0, 240, 255, 0.08), 0 8px 32px rgba(0, 0, 0, 0.6);
  --glow: 0 0 0 1px var(--border-bright), 0 0 20px rgba(0, 240, 255, 0.2), 0 0 40px rgba(0, 240, 255, 0.08);
  --header-h: 64px;
  --mono: "JetBrains Mono", "Fira Code", "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(800px 400px at 15% -5%, rgba(0,240,255,.06), transparent 60%),
    radial-gradient(800px 400px at 85% 5%, rgba(139,92,246,.06), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  position: relative;
}

/* 科技网格背景 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.025) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* 扫描线效果 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(0, 240, 255, 0.012) 3px,
    rgba(0, 240, 255, 0.012) 4px
  );
  pointer-events: none;
  z-index: 1;
}

a { color: var(--neon); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 2; }
main { position: relative; z-index: 2; }

/* ============ 页头 ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0, 240, 255, 0.08), 0 4px 20px rgba(0, 0, 0, 0.4);
}
.site-header::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  opacity: 0.4;
}
.header-inner {
  max-width: 1180px; margin: 0 auto; height: var(--header-h);
  display: flex; align-items: center; gap: 18px; padding: 0 20px;
}
.logo { display: flex; align-items: center; height: 100%; flex-shrink: 0; }
.logo-img { height: 36px; width: auto; object-fit: contain; filter: drop-shadow(0 0 8px var(--neon-glow)); }
.logo-text {
  font-size: 18px; font-weight: 700; letter-spacing: 2px; color: var(--neon);
  text-transform: uppercase;
  font-family: var(--mono);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}
.logo-text::before {
  content: "▶"; display: inline-block; margin-right: 8px;
  color: var(--neon);
  animation: cursorBlink 1.2s steps(2) infinite;
}
@keyframes cursorBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0.3; } }

.header-collapse { display: flex; align-items: center; gap: 16px; flex: 1; justify-content: flex-end; }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 8px 14px; border-radius: var(--radius); color: var(--muted-2);
  font-size: 14px; font-weight: 600; transition: all .2s; white-space: nowrap; position: relative;
  letter-spacing: .5px;
  font-family: var(--mono);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 8px 100%);
}
.main-nav a:hover { color: var(--neon); background: var(--neon-soft); text-shadow: 0 0 8px var(--neon-glow); }
.main-nav a.active {
  color: var(--bg);
  background: var(--neon);
  text-shadow: none;
  box-shadow: 0 0 16px var(--neon-glow);
}

.search-box {
  display: flex; align-items: center;
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; transition: all .2s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 8px 100%);
}
.search-box:focus-within { border-color: var(--neon); box-shadow: 0 0 12px var(--neon-soft); }
.search-box input { background: transparent; border: none; outline: none; color: var(--text); padding: 8px 12px; width: 170px; font-size: 13px; font-family: var(--mono); }
.search-box input::placeholder { color: var(--muted); }
.search-box button { background: var(--neon); color: var(--bg); border: none; padding: 8px 14px; font-size: 13px; font-weight: 700; letter-spacing: 1px; transition: all .2s; }
.search-box button:hover { background: #5eead4; box-shadow: 0 0 12px var(--neon-glow); }

.btn-ghost {
  background: transparent; color: var(--muted-2); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: var(--radius); font-size: 13px; font-weight: 600; transition: all .2s; white-space: nowrap;
  font-family: var(--mono); letter-spacing: 1px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 8px 100%);
}
.btn-ghost:hover { color: var(--neon); border-color: var(--neon); background: var(--neon-soft); box-shadow: 0 0 12px var(--neon-soft); }
.btn-primary {
  background: var(--neon); color: var(--bg); border: none; padding: 11px 22px; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; transition: all .2s; letter-spacing: 2px;
  font-family: var(--mono);
  box-shadow: 0 0 20px var(--neon-soft), 0 0 40px rgba(0, 240, 255, 0.1);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%);
}
.btn-primary:hover { background: #5eead4; transform: translateY(-1px); box-shadow: 0 0 24px var(--neon-glow); }

.menu-toggle { display: none; background: transparent; border: 1px solid var(--border); color: var(--neon); font-size: 20px; width: 40px; height: 40px; border-radius: var(--radius); }

/* ============ 横幅轮播（淡入 + Ken Burns + 科技覆层） ============ */
.banner {
  position: relative; width: 100%; height: clamp(260px, 42vw, 480px); overflow: hidden;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.banner-track { position: relative; height: 100%; width: 100%; }
.banner-slide {
  position: absolute; inset: 0; background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: 0; transform: scale(1.05); transition: opacity 1.2s ease;
}
.banner-slide::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(3,7,18,.30) 0%, rgba(3,7,18,.10) 40%, rgba(3,7,18,.75) 100%),
    linear-gradient(90deg, rgba(0,240,255,.08), transparent 30%, transparent 70%, rgba(139,92,246,.08));
}
.banner-slide.active { opacity: 1; transform: scale(1); animation: kenburns 7s ease forwards; }
@keyframes kenburns { from { transform: scale(1.1); } to { transform: scale(1); } }

/* 横幅科技装饰角 */
.banner::before {
  content: ""; position: absolute; top: 0; left: 0; width: 60px; height: 60px; z-index: 4;
  border-top: 2px solid var(--neon);
  border-left: 2px solid var(--neon);
  filter: drop-shadow(0 0 6px var(--neon-glow));
  pointer-events: none;
}
.banner::after {
  content: ""; position: absolute; bottom: 0; right: 0; width: 60px; height: 60px; z-index: 4;
  border-bottom: 2px solid var(--neon);
  border-right: 2px solid var(--neon);
  filter: drop-shadow(0 0 6px var(--neon-glow));
  pointer-events: none;
}

.banner-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.banner-dots .dot { width: 8px; height: 8px; border-radius: 0; background: rgba(255,255,255,.2); cursor: pointer; transition: all .3s; border: 1px solid rgba(0,240,255,.3); }
.banner-dots .dot.active { background: var(--neon); width: 24px; border-color: var(--neon); box-shadow: 0 0 12px var(--neon-glow); }

/* ============ 主页文章区 ============ */
.home { padding: 50px 0 64px; flex: 1; }
.section-title {
  font-size: 22px; font-weight: 700; margin-bottom: 28px; padding-left: 16px;
  letter-spacing: 3px; text-transform: uppercase;
  font-family: var(--mono);
  color: var(--text);
  position: relative;
}
.section-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--neon);
  box-shadow: 0 0 10px var(--neon-glow);
}
.section-title::after {
  content: "_"; color: var(--neon); animation: cursorBlink 1.2s steps(2) infinite; margin-left: 4px;
}

.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.article-card {
  display: flex; flex-direction: column; aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, rgba(10,15,30,.8), rgba(16,24,48,.6));
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all .3s; position: relative;
  backdrop-filter: blur(8px);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.article-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(135deg, transparent 0%, transparent 90%, var(--neon-soft) 100%);
  opacity: 0; transition: opacity .3s;
}
.article-card:hover { border-color: var(--border-bright); transform: translateY(-4px); box-shadow: var(--glow); }
.article-card:hover::before { opacity: 1; }
.card-img { flex: 0 0 58%; background-size: cover; background-position: center; background-color: var(--bg-3); position: relative; }
.card-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(3,7,18,.6)); }
.card-img.no-img { background: linear-gradient(135deg, #0a0f1e, #101830); position: relative; }
.card-img.no-img::before { content: "▣"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; opacity: .12; color: var(--neon); z-index: 1; }
.card-img.no-img::after { background: none; }
.card-body { flex: 1; padding: 14px 16px; display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 2; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.card-excerpt { font-size: 12px; color: var(--muted-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--mono); line-height: 1.5; }

.empty { color: var(--muted); text-align: center; padding: 40px 0; grid-column: 1 / -1; font-family: var(--mono); letter-spacing: 1px; }

/* ============ 文章详情 ============ */
.article-detail { padding: 42px 0 64px; max-width: 840px; margin: 0 auto; }
.article-detail .article-title { font-size: 30px; font-weight: 800; margin-bottom: 20px; line-height: 1.35; color: var(--text); text-align: center; text-shadow: 0 0 20px rgba(0,240,255,.1); }
.article-cover { width: 100%; height: 320px; background-size: cover; background-position: center; border-radius: var(--radius); margin-bottom: 26px; border: 1px solid var(--border); position: relative; }
.article-cover::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none; background: linear-gradient(180deg, transparent 70%, rgba(3,7,18,.3)); }
.article-content { font-size: 16px; color: #cbd5e1; line-height: 1.95; }
.article-content img { border-radius: var(--radius); margin: 14px 0; box-shadow: var(--shadow); border: 1px solid var(--border); }
/* 行内 emoji / 图标 SVG：源站图标无固有宽高，浏览器会撑成默认大图且无法调整；
   此处按 1em 行内图标渲染（仅作用于无 width/height 属性、以 .svg 结尾的图片，不影响普通配图） */
.article-content img[src$=".svg"]:not([width]):not([height]) { width: 1.2em; height: 1.2em; display: inline-block; vertical-align: middle; margin: 0 2px; border: 0; box-shadow: none; border-radius: 0; }
.article-content h2, .article-content h3 { margin: 22px 0 10px; color: var(--neon); text-shadow: 0 0 8px var(--neon-soft); }
.article-content p { margin: 12px 0; }
.article-content ul, .article-content ol { margin: 12px 0; padding-left: 22px; }
.article-content li { margin: 6px 0; }
.article-content strong { color: #e2e8f0; font-weight: 700; }
.article-content em { font-style: italic; }
.article-content a { color: var(--neon); text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { text-shadow: 0 0 8px var(--neon-glow); }
/* Quill 富文本渲染：对齐 / 缩进 / 块级元素 */
.article-content .ql-align-center { text-align: center; }
.article-content .ql-align-right { text-align: right; }
.article-content .ql-align-justify { text-align: justify; }
.article-content .ql-indent-1 { padding-left: 2em; }
.article-content .ql-indent-2 { padding-left: 4em; }
.article-content .ql-indent-3 { padding-left: 6em; }
.article-content h1 { font-size: 26px; margin: 24px 0 12px; color: var(--neon); text-shadow: 0 0 8px var(--neon-soft); }
.article-content blockquote { margin: 16px 0; padding: 10px 18px; border-left: 3px solid var(--neon); background: rgba(0,240,255,.06); border-radius: 6px; color: #dbe4f0; }
.article-content pre { margin: 14px 0; padding: 14px; background: rgba(3,7,18,.7); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; font-family: var(--mono); color: #cbd5e1; }
.article-content img { max-width: 100%; height: auto; }
.back-link { display: inline-block; margin-bottom: 22px; color: var(--muted-2); font-weight: 600; font-family: var(--mono); font-size: 13px; letter-spacing: 1px; }
.back-link:hover { color: var(--neon); text-shadow: 0 0 8px var(--neon-soft); }

/* ============ 通用页面标题 ============ */
.page-head { padding: 46px 0 8px; }
.page-head h1 {
  font-size: 28px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase;
  font-family: var(--mono);
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(0,240,255,.2));
}
.page-head p { color: var(--muted-2); margin-top: 6px; font-family: var(--mono); font-size: 13px; letter-spacing: 1px; }

/* ============ 电子书 / 游戏列表 ============ */
.card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; padding: 30px 0 64px; }
.list-card {
  background: linear-gradient(160deg, rgba(10,15,30,.8), rgba(16,24,48,.6));
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .3s; position: relative;
  backdrop-filter: blur(8px);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.list-card:hover { border-color: var(--border-bright); transform: translateY(-4px); box-shadow: var(--glow); }
.list-card .lc-img { height: 160px; background-size: cover; background-position: center; background-color: var(--bg-3); position: relative; }
.list-card .lc-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(3,7,18,.5)); }
.list-card .lc-img.no-img { background: linear-gradient(135deg, #0a0f1e, #101830); }
.list-card .lc-img.no-img::before { content: "◆"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 36px; opacity: .12; color: var(--neon); }
.list-card .lc-body { padding: 16px 18px; position: relative; z-index: 2; }
.list-card .lc-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.list-card .lc-desc { font-size: 12px; color: var(--muted-2); font-family: var(--mono); }
.list-card .lc-action { margin-top: 12px; }
.list-card a.open-btn {
  display: inline-block; background: var(--neon); color: var(--bg); padding: 8px 18px; border-radius: var(--radius); font-size: 13px; font-weight: 700;
  font-family: var(--mono); letter-spacing: 1px;
  box-shadow: 0 0 16px var(--neon-soft);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 8px 100%);
  transition: all .2s;
}
.list-card a.open-btn:hover { background: #5eead4; box-shadow: 0 0 24px var(--neon-glow); }

/* ============ 搜索结果 ============ */
.search-bar { padding: 32px 0 10px; }
.search-bar input {
  width: 100%; background: rgba(10,15,30,.6); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
  padding: 14px 18px; font-size: 15px; outline: none; transition: all .2s;
  font-family: var(--mono); letter-spacing: 1px;
  backdrop-filter: blur(8px);
}
.search-bar input:focus { border-color: var(--neon); box-shadow: 0 0 16px var(--neon-soft); }
.search-bar input::placeholder { color: var(--muted); }
.result-group { margin: 28px 0; }
.result-group h3 { font-size: 16px; margin-bottom: 14px; color: var(--neon); font-weight: 700; font-family: var(--mono); letter-spacing: 2px; text-transform: uppercase; }
.result-item {
  display: block; padding: 14px 16px;
  background: linear-gradient(160deg, rgba(10,15,30,.8), rgba(16,24,48,.6));
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; transition: all .2s;
  backdrop-filter: blur(8px);
}
.result-item:hover { border-color: var(--border-bright); transform: translateX(4px); box-shadow: 0 0 12px var(--neon-soft); }
.result-item .ri-title { font-weight: 700; }
.result-item .ri-sub { font-size: 12px; color: var(--muted-2); margin-top: 4px; font-family: var(--mono); }

/* ============ 登录 ============ */
.login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 60px 20px; position: relative; z-index: 2; }
.login-box {
  width: 100%; max-width: 380px;
  background: linear-gradient(160deg, rgba(10,15,30,.9), rgba(16,24,48,.7));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 32px; box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  position: relative;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.login-box::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
}
.login-box h2 {
  text-align: center; margin-bottom: 24px;
  font-family: var(--mono); letter-spacing: 3px; text-transform: uppercase; font-size: 18px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.login-box label { display: block; font-size: 12px; color: var(--muted-2); margin-bottom: 16px; font-family: var(--mono); letter-spacing: 1px; text-transform: uppercase; }
.login-box input {
  width: 100%; margin-top: 6px; background: rgba(3,7,18,.5); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); padding: 12px 15px; font-size: 14px; outline: none;
  font-family: var(--mono);
}
.login-box input:focus { border-color: var(--neon); box-shadow: 0 0 12px var(--neon-soft); }
.login-box .btn-primary { width: 100%; }
.login-msg { text-align: center; color: #f87171; font-size: 13px; margin-bottom: 12px; min-height: 18px; font-family: var(--mono); }

/* ============ 管理后台 ============ */
.admin-main { flex: 1; display: flex; gap: 24px; max-width: 1180px; margin: 0 auto; padding: 30px 20px 64px; width: 100%; }
.admin-side { width: 210px; flex-shrink: 0; }
.admin-side h2 { font-size: 18px; margin-bottom: 18px; font-weight: 800; font-family: var(--mono); letter-spacing: 2px; }
.tabs { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.tabs li { padding: 11px 14px; border-radius: var(--radius); color: var(--muted-2); cursor: pointer; font-size: 14px; font-weight: 600; transition: all .2s; font-family: var(--mono); letter-spacing: 1px; border: 1px solid transparent; }
.tabs li:hover { background: var(--neon-soft); color: var(--neon); border-color: var(--border); }
.tabs li.active { background: var(--neon); color: var(--bg); box-shadow: 0 0 16px var(--neon-soft); }
.admin-content { flex: 1; min-width: 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.tab-panel h3 { font-size: 17px; margin: 8px 0 16px; font-weight: 700; font-family: var(--mono); letter-spacing: 2px; color: var(--neon); }
.admin-form { background: linear-gradient(160deg, rgba(10,15,30,.8), rgba(16,24,48,.6)); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 30px; backdrop-filter: blur(8px); }
.admin-form label { display: block; font-size: 12px; color: var(--muted-2); margin-bottom: 14px; font-family: var(--mono); letter-spacing: 1px; text-transform: uppercase; }
.admin-form input[type=text], .admin-form input[type=password], .admin-form textarea, .admin-form input[type=file] {
  width: 100%; margin-top: 6px; background: rgba(3,7,18,.5); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); padding: 11px 13px; font-size: 14px; font-family: var(--mono); outline: none; transition: border-color .2s;
}
.admin-form textarea { resize: vertical; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
.admin-form input:focus, .admin-form textarea:focus { border-color: var(--neon); box-shadow: 0 0 8px var(--neon-soft); }
.img-insert-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.form-actions { display: flex; gap: 10px; align-items: center; }
/* Quill 富文本编辑器（后台）暗色适配 */
#editor { background: rgba(3,7,18,.5); border-radius: var(--radius); }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--border); }
.ql-toolbar.ql-snow { background: rgba(16,24,48,.6); border-radius: var(--radius) var(--radius) 0 0; }
.ql-container.ql-snow { border-radius: 0 0 var(--radius) var(--radius); }
.ql-editor { min-height: 340px; color: var(--text); font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 15px; }
.ql-editor img { max-width: 100%; height: auto; }
.ql-editor.ql-blank::before { color: var(--muted-2); font-style: normal; }
/* 后台编辑器内：与发布页一致的行内图标渲染，粘贴的表情 SVG 不会撑大 */
.ql-editor img[src$=".svg"]:not([width]):not([height]) { width: 1.2em; height: 1.2em; display: inline-block; vertical-align: middle; margin: 0 2px; }
.ql-snow .ql-stroke { stroke: var(--muted-2); }
.ql-snow .ql-fill, .ql-snow .ql-stroke.ql-fill { fill: var(--muted-2); }
.ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke, .ql-snow .ql-toolbar button.ql-active .ql-stroke { stroke: var(--neon); }
.ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow .ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill, .ql-snow .ql-toolbar button.ql-active .ql-fill { fill: var(--neon); }
.ql-snow .ql-picker { color: var(--muted-2); }
.ql-snow .ql-picker-options { background: #0b1220; border-color: var(--border); }
.ql-snow .ql-picker-label:hover, .ql-snow .ql-picker-label.ql-active { color: var(--neon); }
.ql-snow .ql-tooltip { background: #0b1220; border-color: var(--border); color: var(--text); }
.ql-snow .ql-tooltip input[type=text] { background: rgba(3,7,18,.8); border-color: var(--border); color: var(--text); }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row { display: flex; align-items: center; gap: 12px; background: linear-gradient(160deg, rgba(10,15,30,.8), rgba(16,24,48,.6)); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; backdrop-filter: blur(8px); }
.admin-row .ar-thumb { width: 56px; height: 56px; border-radius: var(--radius); background-size: cover; background-position: center; background-color: var(--bg-3); flex-shrink: 0; border: 1px solid var(--border); }
.admin-row .ar-info { flex: 1; min-width: 0; }
.admin-row .ar-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-row .ar-sub { font-size: 11px; color: var(--muted-2); font-family: var(--mono); }
.admin-row .ar-actions { display: flex; gap: 8px; flex-shrink: 0; }
.mini-btn { background: rgba(3,7,18,.5); border: 1px solid var(--border); color: var(--text); padding: 7px 13px; border-radius: var(--radius); font-size: 12px; font-weight: 600; font-family: var(--mono); letter-spacing: 1px; transition: all .2s; }
.mini-btn:hover { border-color: var(--neon); color: var(--neon); background: var(--neon-soft); }
.mini-btn.danger:hover { border-color: #f87171; color: #f87171; background: rgba(248,113,113,.08); }
hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ============ PDF 阅读器 ============ */
.ebook-reader { flex: 1; display: flex; flex-direction: column; }
.ebook-reader iframe { flex: 1; border: none; width: 100%; min-height: calc(100vh - var(--header-h) - 60px); background: var(--bg-2); }

/* ============ 页脚 ============ */
footer {
  border-top: 1px solid var(--border); padding: 24px 0; text-align: center; color: var(--muted);
  font-size: 12px; margin-top: auto; font-family: var(--mono); letter-spacing: 1px;
  position: relative; z-index: 2;
  background: rgba(3,7,18,.6);
}
footer::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
}

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .admin-main { flex-direction: column; }
  .admin-side { width: 100%; }
  .tabs { flex-direction: row; flex-wrap: wrap; }
  .tabs li { flex: 1; text-align: center; }
}
@media (max-width: 768px) {
  .menu-toggle { display: block; margin-left: auto; }
  .header-collapse {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 12px;
    background: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px; display: none;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
  }
  .header-collapse.open { display: flex; }
  .main-nav { flex-direction: column; gap: 4px; }
  .main-nav a { padding: 12px; }
  .search-box { width: 100%; }
  .search-box input { flex: 1; width: auto; }
  .article-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .banner::before, .banner::after { width: 40px; height: 40px; }
  .article-card, .list-card { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
}
