/* ================================================================
   商途指路 - 全站样式表（升级版）
   配色：深蓝底 + 暖金点缀，高端稳重
   ================================================================ */

:root {
  --primary: #0B2545;
  --primary-light: #13315C;
  --primary-mid: #1B4068;
  --primary-dark: #061A30;
  --accent: #C09737;
  --accent-light: #D4AF5E;
  --accent-soft: #F5EBD0;
  --gradient: linear-gradient(135deg, #0B2545 0%, #13315C 50%, #1B4068 100%);
  --gold-gradient: linear-gradient(135deg, #C09737 0%, #D4AF5E 100%);
  --bg: #FFFFFF;
  --bg-soft: #F8F7F4;
  --bg-card: #FFFFFF;
  --bg-tint: #FAFAF8;
  --text: #1A1A2E;
  --text-soft: #6B6E7A;
  --text-muted: #9CA0AC;
  --border: #EAE8E3;
  --border-light: #F0EDE7;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(11, 37, 69, 0.04);
  --shadow: 0 4px 24px rgba(11, 37, 69, 0.07);
  --shadow-lg: 0 12px 40px rgba(11, 37, 69, 0.12);
  --maxw: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg-soft);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4 { line-height: 1.3; color: var(--primary-dark); font-weight: 700; letter-spacing: -0.01em; }

/* ---- Header (glassmorphism) ---- */
.site-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(234, 232, 227, 0.6);
  position: sticky; top: 0; z-index: 100;
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; color: var(--primary); letter-spacing: -0.02em; }
.logo .mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gradient); color: #fff; display: grid; place-items: center; font-size: 19px;
  box-shadow: 0 4px 12px rgba(11, 37, 69, 0.25);
}
.logo:hover { text-decoration: none; color: var(--primary); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a {
  padding: 9px 16px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; font-size: 15px; transition: all .2s;
}
.nav a:hover { background: var(--bg-soft); text-decoration: none; color: var(--primary); }
.nav a.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(11, 37, 69, 0.2); }
.nav-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--primary); }

/* ---- Hero ---- */
.hero {
  background: var(--gradient); color: #fff; padding: 72px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -60%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(192, 151, 55, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: ''; position: absolute; bottom: -40%; left: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
  border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 42px; margin: 0 0 16px; color: #fff; font-weight: 800; letter-spacing: -0.02em; }
.hero p { font-size: 18px; max-width: 640px; opacity: 0.88; margin: 0 0 28px; line-height: 1.7; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: var(--radius-sm); font-weight: 600;
  border: 0; cursor: pointer; font-size: 15px; transition: all .25s; letter-spacing: 0.01em;
}
.btn-primary { background: var(--gold-gradient); color: #fff; box-shadow: 0 4px 16px rgba(192, 151, 55, 0.35); }
.btn-primary:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(192, 151, 55, 0.45); }
.btn-ghost { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); backdrop-filter: blur(4px); }
.btn-ghost:hover { text-decoration: none; background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.5); }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); padding: 11px 24px; border-radius: var(--radius-sm); }
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }

/* ---- Sections ---- */
.section { padding: 60px 0; }
.section.alt { background: #fff; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: 30px; margin: 0; position: relative; display: inline-block; }
.section-title h2::after { content: ''; display: block; width: 40px; height: 3px; background: var(--gold-gradient); border-radius: 2px; margin: 10px auto 0; }
.section-title p { color: var(--text-soft); margin: 8px 0 0; font-size: 15px; }

/* ---- Grid & Cards ---- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent-soft); }
.card .thumb { aspect-ratio: 16/9; background: var(--bg-soft); display: grid; place-items: center; color: var(--text-muted); font-size: 14px; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .thumb img { transform: scale(1.05); }
.card .body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card .cat-tag { display: inline-block; font-size: 12px; color: var(--primary); background: var(--accent-soft); padding: 4px 12px; border-radius: 20px; margin-bottom: 10px; font-weight: 600; width: fit-content; }
.card h3 { font-size: 18px; margin: 0 0 8px; line-height: 1.4; }
.card p { color: var(--text-soft); margin: 0 0 14px; font-size: 14px; flex: 1; }
.card .meta { font-size: 13px; color: var(--text-muted); }

/* ---- Category filter ---- */
.cat-filter { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 28px; }
.cat-filter a { padding: 7px 18px; border: 1px solid var(--border); border-radius: 20px; color: var(--text-soft); font-size: 14px; transition: all .2s; }
.cat-filter a.active, .cat-filter a:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }

/* ---- 标签下搜索框 ---- */
.tag-search { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 0 auto 14px; max-width: 560px; flex-wrap: wrap; }
.tag-search-input { flex: 1 1 320px; min-width: 220px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 22px; font-size: 14px; outline: none; transition: border-color .2s; }
.tag-search-input:focus { border-color: var(--primary); }
.tag-search-btn { padding: 10px 22px; border: none; border-radius: 22px; background: var(--primary); color: #fff; font-size: 14px; cursor: pointer; transition: opacity .2s; }
.tag-search-btn:hover { opacity: .9; }
.tag-search-clear { color: var(--text-soft); font-size: 13px; text-decoration: underline; }
.tag-search-hint { text-align: center; color: var(--text-soft); font-size: 13px; margin: 0 0 18px; }

/* ---- Article detail ---- */
.article-wrap { display: grid; grid-template-columns: 1fr; max-width: 820px; margin: 0 auto; }
.article-head h1 { font-size: 30px; margin: 18px 0 10px; }
.article-head .info { color: var(--text-soft); font-size: 14px; margin-bottom: 18px; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin: 10px 0 24px; box-shadow: var(--shadow-sm); }
.article-body { font-size: 17px; }
.article-body h2 { font-size: 23px; margin: 30px 0 12px; padding-left: 14px; border-left: 4px solid var(--accent); }
.article-body h3 { font-size: 19px; margin: 22px 0 10px; }
.article-body p { margin: 14px 0; }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body img { border-radius: var(--radius-sm); margin: 16px 0; }
.article-body blockquote { border-left: 3px solid var(--accent); padding: 8px 18px; margin: 16px 0; background: var(--bg-tint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-soft); }
.article-body code { background: var(--bg-tint); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

/* ---- Breadcrumb ---- */
.breadcrumb { font-size: 14px; color: var(--text-soft); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ---- Netdisk card ---- */
.netdisk-card {
  border: 1px solid var(--accent-soft); background: linear-gradient(135deg, #FDFBF5 0%, #F8F4E8 100%);
  border-radius: var(--radius); padding: 18px 20px; margin: 18px 0; position: relative; overflow: hidden;
}
.netdisk-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold-gradient); }
.nd-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.nd-badge { background: var(--primary); color: #fff; font-size: 12px; padding: 3px 12px; border-radius: 6px; white-space: nowrap; font-weight: 600; }
.nd-name { font-weight: 700; color: var(--primary-dark); }
.nd-intro { color: var(--text-soft); font-size: 14px; margin-bottom: 8px; }
.nd-code { font-size: 14px; margin-bottom: 10px; }
.nd-code span { font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.nd-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-copy, .btn-open { padding: 9px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; cursor: pointer; border: 1px solid var(--primary); transition: all .2s; }
.btn-copy { background: #fff; color: var(--primary); }
.btn-copy:hover { background: var(--bg-soft); }
.btn-open { background: var(--primary); color: #fff; }
.btn-open:hover { text-decoration: none; filter: brightness(1.1); }
.btn-copy.copied { background: #16a34a; color: #fff; border-color: #16a34a; }

/* ---- Contact ---- */
.contact-box { max-width: 560px; margin: 0 auto; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.contact-box img.qr { width: 220px; height: 220px; object-fit: contain; margin: 0 auto 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.contact-box .qr-placeholder { width: 220px; height: 220px; margin: 0 auto 18px; border: 2px dashed var(--border); border-radius: var(--radius-sm); display: grid; place-items: center; color: var(--text-muted); }
.contact-info { text-align: left; margin-top: 22px; font-size: 15px; }
.contact-info div { padding: 8px 0; border-bottom: 1px dashed var(--border); }

/* ---- Footer ---- */
.site-footer { background: var(--primary-dark); color: #B8C0CC; padding: 48px 0 28px; margin-top: 40px; position: relative; overflow: hidden; }
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.site-footer a { color: #B8C0CC; transition: color .2s; }
.site-footer a:hover { color: var(--accent-light); text-decoration: none; }
.site-footer h4 { color: #fff; margin: 0 0 16px; font-size: 16px; text-align: center; }
.footer-random { text-align: center; }
.footer-random-list { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; max-width: 920px; margin: 0 auto; }
.footer-random-list a { font-size: 14px; line-height: 1.9; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 26px; padding-top: 20px; font-size: 13px; text-align: center; color: #6B7280; }
.tagline { color: #889; font-size: 14px; max-width: 420px; }

/* ---- Admin ---- */
.admin-body { background: #f1f5f9; min-height: 100vh; }

.admin-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 230px;
  background: var(--primary-dark); color: #fff;
  display: flex; flex-direction: column; z-index: 110;
  box-shadow: 4px 0 20px rgba(11, 37, 69, 0.18);
}
.admin-sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.admin-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.admin-logo .mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--gold-gradient);
  display: grid; place-items: center; font-size: 16px; font-weight: 800; color: #fff;
}
.admin-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.admin-logo-text strong { font-size: 16px; letter-spacing: -0.02em; }
.admin-logo-text small { font-size: 12px; color: #94a3b8; font-weight: 400; }
.admin-sidebar-close { display: none; color: #cbd5e1; font-size: 24px; cursor: pointer; padding: 4px; }

.admin-sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 12px; }
.admin-sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 8px; color: #cbd5e1;
  font-size: 14px; font-weight: 500; margin-bottom: 4px;
  transition: all .2s;
}
.admin-sidebar-nav a:hover, .admin-sidebar-nav a.active { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }
.admin-sidebar-nav .admin-icon {
  width: 22px; text-align: center; font-weight: 700; font-size: 13px; opacity: .9;
}

.admin-sidebar-foot {
  padding: 14px 12px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; gap: 4px;
}
.admin-sidebar-foot a { color: #94a3b8; font-size: 13px; padding: 6px 14px; border-radius: 6px; }
.admin-sidebar-foot a:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }

.admin-topbar {
  position: fixed; left: 230px; top: 0; right: 0; height: 56px;
  background: #fff; border-bottom: 1px solid var(--border); z-index: 105;
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
}
.admin-topbar-left { display: flex; align-items: center; gap: 12px; }
.admin-menu-btn {
  display: none; background: var(--primary); color: #fff; border: 0;
  width: 34px; height: 34px; border-radius: 8px; font-size: 18px; cursor: pointer;
}
.admin-topbar-title { font-weight: 700; font-size: 16px; color: var(--primary-dark); }
.admin-topbar-out { font-size: 14px; color: var(--primary); }
.admin-topbar-out:hover { color: var(--accent); }

.admin-container { max-width: 1100px; margin-left: 230px; padding: 76px 24px 32px; }
.admin-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 22px; margin-bottom: 20px; }
.admin-card h2 { margin-top: 0; }

.admin-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(11,37,69,0.45); z-index: 108; }
.admin-sidebar-toggle:checked ~ .admin-sidebar { transform: translateX(0); }
.admin-sidebar-toggle:checked ~ .admin-sidebar-overlay { display: block; }

@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .25s; }
  .admin-sidebar-close { display: block; }
  .admin-menu-btn { display: inline-grid; place-items: center; }
  .admin-topbar { left: 0; }
  .admin-container { margin-left: 0; }
}

/* ---- Forms / Tables (admin & other) ---- */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-row input[type=text], .form-row input[type=url], .form-row input[type=number], .form-row input[type=password], .form-row textarea, .form-row select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; font-family: inherit;
}
.form-row textarea { min-height: 160px; resize: vertical; }
.form-row .hint { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.row-inline { display: flex; gap: 14px; flex-wrap: wrap; }
.row-inline > div { flex: 1; min-width: 200px; }
.switch { display: inline-flex; align-items: center; gap: 8px; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.btn-danger { background: #ef4444; color: #fff; border: 0; }
.badge-pub { background: #dcfce7; color: #166534; padding: 2px 8px; border-radius: 12px; font-size: 12px; }
.badge-draft { background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 12px; font-size: 12px; }
.login-wrap { max-width: 380px; margin: 80px auto; background: #fff; padding: 36px; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.login-wrap h2 { text-align: center; }
.login-wrap .error { color: #ef4444; margin-bottom: 12px; font-size: 14px; }
table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
table.admin-table th { background: #f8fafc; }
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dash-stat { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.dash-stat .num { font-size: 30px; font-weight: 800; color: var(--primary); }
.dash-stat .label { color: var(--text-soft); font-size: 14px; }
.res-picker { border: 1px solid var(--border); border-radius: 8px; padding: 12px; max-height: 220px; overflow: auto; }
.res-picker label { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-weight: 400; }

/* ================================================================
   Mobile Bottom Navigation (App-style tab bar)
   ================================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(234, 232, 227, 0.8);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 24px rgba(11, 37, 69, 0.06);
}
.mobile-nav .mn-list {
  display: flex; justify-content: space-around; align-items: center;
  max-width: var(--maxw); margin: 0 auto; padding: 0 8px;
}
.mobile-nav .mn-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 6px 6px; flex: 1; min-width: 0;
  color: var(--text-muted); font-size: 11px; font-weight: 500;
  transition: color .2s; text-decoration: none;
}
.mobile-nav .mn-item svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: all .2s; }
.mobile-nav .mn-item .mn-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-nav .mn-item.active { color: var(--primary); font-weight: 700; }
.mobile-nav .mn-item.active svg { stroke: var(--accent); transform: translateY(-1px); }
.mobile-nav .mn-item:active { color: var(--primary); }

/* ---- Body padding for mobile nav ---- */
body.has-mobile-nav { padding-bottom: 0; }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 48px 0 56px; }
  .hero h1 { font-size: 34px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .site-header .bar { height: 56px; }
  .logo { font-size: 18px; gap: 10px; }
  .logo .mark { width: 32px; height: 32px; font-size: 16px; }

  /* Hide top nav, show bottom nav */
  .nav, .nav-toggle { display: none !important; }
  .mobile-nav { display: block; }
  body.has-mobile-nav { padding-bottom: 64px; }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 48px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .section { padding: 40px 0; }
  .section-title h2 { font-size: 24px; }
  .card .body { padding: 16px; }
  .article-head h1 { font-size: 24px; }
  .article-body { font-size: 16px; }
  .article-body h2 { font-size: 20px; }
  .dash-grid { grid-template-columns: 1fr; }
  .contact-box { padding: 24px; }
  .site-footer { padding: 36px 0 20px; }
}

/* ================================================================
   多图封面管理器（后台）
   ================================================================ */
.cover-manager { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: #fff; }
.cm-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cm-filebtn { position: relative; overflow: hidden; cursor: pointer; margin: 0; }
.cm-url { flex: 1; min-width: 200px; }
.cm-tip { margin-top: 8px; }
.cm-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.cm-item { position: relative; width: 130px; height: 82px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.cm-item img { width: 100%; height: 100%; object-fit: cover; }
.cm-del { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; }
.cm-del:hover { background: #ef4444; }
.cm-empty { color: var(--text-muted); font-size: 13px; padding: 8px 0; }

/* 富文本编辑器高度 */
#editor { border: 1px solid var(--border); border-radius: 0 0 8px 8px; }
.ql-toolbar.ql-snow { border: 1px solid var(--border); border-radius: 8px 8px 0 0; }
.ql-container.ql-snow { border: none; }
.ql-editor { min-height: 300px; font-size: 16px; }

/* ================================================================
   前台封面轮播
   ================================================================ */
.carousel { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); margin: 10px 0 24px; box-shadow: var(--shadow-sm); }
.carousel-track { display: flex; height: 100%; transition: transform .4s ease; }
.carousel-slide { min-width: 100%; height: 100%; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; font-size: 24px; cursor: pointer; display: grid; place-items: center; z-index: 2; }
.carousel-btn:hover { background: rgba(0,0,0,.65); }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }
.carousel-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; gap: 8px; justify-content: center; z-index: 2; }
.carousel-dots .dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.6); cursor: pointer; }
.carousel-dots .dot.active { background: var(--accent); }

/* ================================================================
   文章列表快捷显隐 / 网盘选择（后台）
   ================================================================ */
.toggle-hidden { min-width: 72px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--primary-dark); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; font-size: 13px; }
.chip-x { border: 0; background: transparent; color: var(--primary); cursor: pointer; font-size: 15px; line-height: 1; }
.chip-x:hover { color: #ef4444; }
.res-opt { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-weight: 400; }
.res-opt input { margin: 0; }

/* ================================================================
   多网盘链接块（.nd-list 内含多个 .nd-link）
   ================================================================ */
.nd-list { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.nd-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--accent-soft); border-radius: var(--radius-sm); padding: 12px 16px; background: #fff; box-shadow: var(--shadow-sm); }
.nd-link .nd-badge { margin-bottom: 0; flex-shrink: 0; }
.nd-link .nd-code { margin: 2px 0 10px; }
.nd-link .nd-actions { gap: 8px; flex-shrink: 0; }
@media (max-width: 480px) { .nd-link { flex-wrap: wrap; } .nd-link .nd-actions { width: 100%; } }

/* ================================================================
   资料详情页：摘要 / 标签
   ================================================================ */
.res-summary { font-size: 16px; color: var(--text-soft); background: var(--bg-soft); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 18px; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.tag { background: var(--accent-soft); color: var(--primary-dark); border: 1px solid var(--border); border-radius: 20px; padding: 4px 14px; font-size: 13px; }

/* ================================================================
   页脚：随机一句话 / 第四栏
   ================================================================ */
.footer-quote { text-align: center; color: var(--accent-light); font-size: 15px; font-style: italic; margin: 24px 0 10px; letter-spacing: .3px; }
.footer-random-list a { transition: color .2s; }

/* ================================================================
   常见问题 FAQ
   ================================================================ */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-sm); }
.faq-q { margin: 0 0 10px; font-size: 18px; color: var(--primary-dark); }
.faq-a { color: var(--text-soft); }

/* ================================================================
   后台：网盘搜索栏 / 多链接行
   ================================================================ */
.res-search-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.res-search-bar input { flex: 1; max-width: 360px; }
.link-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.link-row input { flex: 1; min-width: 140px; }
.link-del { border: 0; background: #fee2e2; color: #b91c1c; min-width: 56px; height: 40px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.link-del:hover { background: #fecaca; }

