/* ==================================================================
   起源小说网 · ORIGIN NOVELS
   统一视觉：柔和紫青渐变 / 圆角玻璃感 / 可爱但不失科技感
   ================================================================== */

:root {
  --bg: #f7f5ff;
  --surface: #ffffff;
  --surface-2: #fbfaff;
  --ink: #17152b;
  --ink-2: #3f3b5c;
  --muted: #837fa3;
  --line: rgba(123, 92, 255, .14);
  --line-strong: rgba(123, 92, 255, .28);
  --violet: #7b5cff;
  --violet-2: #9d83ff;
  --cyan: #1fc9dc;
  --pink: #ff8ab5;
  --mint: #6fe0b0;
  --amber: #ffc46b;
  --grad: linear-gradient(135deg, #7b5cff 0%, #9d83ff 42%, #1fc9dc 100%);
  --grad-soft: linear-gradient(135deg, rgba(123, 92, 255, .12), rgba(31, 201, 220, .12));
  --shadow-sm: 0 4px 14px rgba(76, 60, 140, .08);
  --shadow: 0 14px 34px rgba(76, 60, 140, .10);
  --shadow-lg: 0 26px 60px rgba(76, 60, 140, .16);
  --radius: 22px;
  --radius-sm: 14px;
  --font: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 10% -10%, rgba(123, 92, 255, .16), transparent 62%),
    radial-gradient(880px 520px at 96% 2%, rgba(31, 201, 220, .14), transparent 64%),
    radial-gradient(600px 400px at 50% 110%, rgba(255, 138, 181, .12), transparent 70%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(23, 21, 43, .055) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}

main { flex: 1; position: relative; z-index: 1; }

.wrap { width: min(1120px, 100% - 44px); margin: 0 auto; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.muted { color: var(--muted); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.spark {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--grad); margin-right: 8px; vertical-align: 1px;
  box-shadow: 0 0 0 3px rgba(123, 92, 255, .12);
}

/* ------------------------------- Header ------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(255, 255, 255, .72);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--grad);
  color: #fff; font-weight: 700; font-size: 19px;
  display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(123, 92, 255, .32), inset 0 1px 0 rgba(255,255,255,.35);
  letter-spacing: -.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 18px; letter-spacing: .02em; }
.brand-text small { font-size: 10px; letter-spacing: .22em; color: var(--muted); font-weight: 500; }
.header-nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2);
  transition: .22s ease;
}
.nav-link:hover { background: rgba(123, 92, 255, .08); color: var(--violet); }

/* ------------------------------- Buttons ------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  transition: transform .2s ease, box-shadow .25s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 24px rgba(123, 92, 255, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(123, 92, 255, .34); }
.btn-primary:active { transform: translateY(0) scale(.99); }
.btn-soft {
  background: rgba(255, 255, 255, .85); color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-soft:hover { background: #fff; border-color: var(--violet-2); color: var(--violet); }
.btn-ghost {
  background: rgba(255, 255, 255, .6); color: var(--ink-2);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: #fff; color: var(--violet); border-color: var(--violet-2); }
.btn-danger {
  background: linear-gradient(135deg, #ff7a9c, #ff5670); color: #fff;
  box-shadow: 0 10px 22px rgba(255, 96, 128, .26);
}
.btn-danger:hover { transform: translateY(-2px); }
.btn-sm { padding: 8px 15px; font-size: 13px; }
.btn-xs { padding: 6px 12px; font-size: 12px; border-radius: 999px; }
.btn-icon { font-size: 15px; }
.btn-arrow { font-size: 14px; opacity: .8; }
.btn.is-disabled, .btn[disabled] {
  opacity: .55; pointer-events: none; cursor: not-allowed;
}
.btn-block { width: 100%; }

/* ------------------------------- Chips ------------------------------- */

.chip-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 26px;
  padding: 4px 0;
}
.chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
  color: var(--ink-2);
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: .2s ease;
}
.chip:hover { border-color: var(--violet-2); color: var(--violet); transform: translateY(-1px); }
.chip.is-active {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px rgba(123, 92, 255, .26);
}
.chip-count {
  font-family: var(--mono); font-size: 11px;
  background: rgba(23, 21, 43, .07); padding: 1px 7px; border-radius: 999px;
}
.chip.is-active .chip-count { background: rgba(255, 255, 255, .28); }

.tag {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px;
  color: var(--violet);
  background: rgba(123, 92, 255, .10);
  border: 1px solid rgba(123, 92, 255, .16);
  text-transform: uppercase;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--line);
  font-size: 12px; color: var(--ink-2);
}
.badge label { color: var(--muted); font-size: 11px; letter-spacing: .06em; }

.status-pill {
  position: absolute; left: 10px; top: 10px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: #fff; backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.status-pill.is-ongoing { background: linear-gradient(135deg, #1fc9dc, #35a8ff); }
.status-pill.is-finished { background: linear-gradient(135deg, #7b5cff, #b06bff); }

/* ------------------------------- Hero ------------------------------- */

.hero { padding: 56px 0 34px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  color: var(--violet); text-transform: uppercase;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 999px;
}
.hero-title {
  font-size: clamp(34px, 5vw, 54px); line-height: 1.2; letter-spacing: -.02em;
  margin: 20px 0 18px; font-weight: 800;
}
.hero-sub { color: var(--ink-2); font-size: 15px; line-height: 1.9; max-width: 520px; }
.hero-stats { display: flex; align-items: center; gap: 20px; margin-top: 30px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--mono); font-size: 26px; font-weight: 700; line-height: 1.1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.stat-sep { width: 1px; height: 30px; background: var(--line-strong); }

.hero-art { position: relative; height: 300px; display: grid; place-items: center; }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.orb-a {
  width: 210px; height: 210px; right: 8%; top: 4%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.92), rgba(123,92,255,.32) 45%, rgba(123,92,255,.06) 70%);
  box-shadow: inset 0 0 40px rgba(255,255,255,.6);
}
.orb-b {
  width: 120px; height: 120px; left: 4%; bottom: 6%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.95), rgba(31,201,220,.38) 50%, rgba(31,201,220,.08) 74%);
}
.floating-book {
  position: relative; width: 180px; height: 224px; border-radius: 16px 10px 10px 16px;
  background: linear-gradient(150deg, #ffffff, #f2eeff);
  box-shadow: 0 30px 60px rgba(76, 60, 140, .20), 0 0 0 1px rgba(123,92,255,.12);
  transform: rotate(-7deg);
  animation: floaty 6s ease-in-out infinite;
}
.fb-page {
  position: absolute; inset: 14px 16px 14px 34px; border-radius: 8px;
  background: repeating-linear-gradient(180deg, rgba(123,92,255,.10) 0 2px, transparent 2px 13px), #fff;
  border: 1px solid rgba(123,92,255,.10);
}
.fb-page-2 { inset: 18px 20px 18px 40px; opacity: .5; }
.fb-spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 26px;
  border-radius: 16px 0 0 16px;
  background: var(--grad);
  box-shadow: inset -3px 0 8px rgba(0,0,0,.12);
}
.fb-star {
  position: absolute; right: -14px; top: -16px; font-size: 26px; color: var(--pink);
  animation: twinkle 3.4s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: rotate(-7deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(-14px); }
}
@keyframes twinkle {
  0%, 100% { opacity: .55; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.12); }
}

/* ------------------------------- Library ------------------------------- */

.library { padding: 22px 0 72px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  margin-bottom: 22px;
}
.section-title { font-size: 24px; margin: 0 0 4px; letter-spacing: -.01em; }
.section-sub { margin: 0; color: var(--muted); font-size: 13px; }
.search-box {
  position: relative; display: flex; align-items: center;
  background: rgba(255, 255, 255, .9); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 0 6px 0 14px; height: 44px; min-width: 280px;
  box-shadow: var(--shadow-sm);
  transition: .2s ease;
}
.search-box:focus-within {
  border-color: var(--violet); box-shadow: 0 0 0 4px rgba(123, 92, 255, .12);
}
.search-icon { color: var(--muted); font-size: 17px; margin-right: 8px; }
.search-box input {
  border: 0; outline: 0; background: transparent; font-family: inherit;
  font-size: 14px; width: 100%; height: 100%; color: var(--ink);
}
.search-box input::placeholder { color: #a9a5c2; }

.novel-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr));
  gap: 22px;
}
.novel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .28s cubic-bezier(.2,.8,.3,1), box-shadow .3s ease, border-color .3s ease;
  position: relative;
}
.novel-card::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  padding: 1px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.novel-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.novel-card:hover::after { opacity: .85; }

.novel-cover {
  position: relative; display: block; aspect-ratio: 4 / 3;
  background: var(--grad-soft); overflow: hidden;
}
.novel-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.novel-card:hover .novel-cover img { transform: scale(1.06); }
.cover-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,.75), transparent 55%),
    linear-gradient(140deg, #efe9ff, #e6fbff 60%, #ffe9f3);
}
.cover-fallback span {
  font-size: 40px; font-weight: 800; color: #fff;
  text-shadow: 0 6px 18px rgba(123, 92, 255, .45);
  width: 76px; height: 76px; display: grid; place-items: center;
  border-radius: 20px; background: var(--grad);
  box-shadow: 0 14px 30px rgba(123, 92, 255, .28);
}
.cover-fallback i {
  position: absolute; bottom: 12px; right: 14px;
  font-style: normal; font-family: var(--mono); font-size: 9px;
  letter-spacing: .18em; color: rgba(23, 21, 43, .35);
}

.novel-body { padding: 16px 18px 18px; }
.novel-title {
  margin: 0 0 6px; font-size: 16.5px; font-weight: 700; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.9em;
}
.novel-title a { transition: color .2s ease; }
.novel-card:hover .novel-title a { color: var(--violet); }
.novel-author { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.novel-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.novel-meta .mono { color: var(--muted); }

.empty-state, .empty-inline {
  grid-column: 1 / -1; text-align: center; padding: 60px 20px;
  background: rgba(255, 255, 255, .6); border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty-orb {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; font-size: 24px; color: #fff;
  background: var(--grad); box-shadow: 0 14px 28px rgba(123, 92, 255, .26);
}
.empty-state h3 { margin: 0 0 8px; font-size: 18px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.empty-inline { padding: 34px; color: var(--muted); font-size: 14px; }
.no-result { text-align: center; color: var(--muted); padding: 30px 0; font-size: 14px; }

/* ------------------------------- Catalog ------------------------------- */

.crumb {
  display: flex; align-items: center; gap: 8px; padding: 26px 0 4px;
  font-size: 12.5px; color: var(--muted); font-family: var(--mono);
}
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--violet); }
.crumb em { font-style: normal; color: var(--ink-2); }

.catalog-hero {
  display: grid; grid-template-columns: 260px 1fr; gap: 40px;
  align-items: start; padding: 26px 0 46px;
}
.catalog-cover {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 3 / 4; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); background: var(--surface);
}
.catalog-cover img { width: 100%; height: 100%; object-fit: cover; }
.catalog-info { padding-top: 6px; }
.catalog-title { font-size: clamp(28px, 4vw, 40px); margin: 14px 0 10px; letter-spacing: -.02em; line-height: 1.25; }
.catalog-author { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.catalog-author strong { color: var(--ink); font-weight: 600; }
.catalog-desc {
  margin: 0 0 22px; color: var(--ink-2); font-size: 14.5px; line-height: 1.95;
  padding: 18px 22px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .72); border: 1px solid var(--line);
}
.catalog-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.catalog-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.chapter-panel {
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px 12px;
  box-shadow: var(--shadow);
  margin-bottom: 80px;
}
.chapter-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.chapter-panel-head h2 { margin: 0; font-size: 18px; }
.chapter-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; padding: 10px 0 16px; }
.chapter-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 12px; transition: .2s ease;
  border-bottom: 1px dashed rgba(123, 92, 255, .10);
}
.chapter-item:hover { background: rgba(123, 92, 255, .07); transform: translateX(3px); }
.ch-no {
  font-family: var(--mono); font-size: 11.5px; color: var(--violet);
  background: rgba(123, 92, 255, .10); padding: 3px 9px; border-radius: 999px;
  white-space: nowrap;
}
.ch-title { flex: 1; font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-arrow { color: var(--muted); opacity: 0; transition: .2s ease; }
.chapter-item:hover .ch-arrow { opacity: 1; color: var(--violet); }

/* ------------------------------- Reader ------------------------------- */

.reader-progress {
  position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 60;
  background: rgba(123, 92, 255, .10);
}
.reader-progress span {
  display: block; height: 100%; width: 0%;
  background: var(--grad); box-shadow: 0 0 12px rgba(123, 92, 255, .5);
  transition: width .12s linear;
}
.reader-shell { width: min(820px, 100% - 44px); margin: 0 auto; padding: 30px 0 70px; }
.reader-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 4px 18px; font-size: 13px; color: var(--muted);
}
.reader-back { color: var(--violet); font-weight: 600; }
.reader-book { font-size: 13px; }
.reader-pos { color: var(--muted); }

.reader-paper {
  background: linear-gradient(180deg, #ffffff, #fdfcff);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(26px, 4vw, 52px);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.reader-paper::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: var(--grad); opacity: .8;
}
.reader-head { text-align: center; padding-bottom: 26px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.chapter-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  color: var(--violet); text-transform: uppercase;
}
.chapter-title { font-size: clamp(24px, 3.4vw, 34px); margin: 12px 0 12px; letter-spacing: -.01em; }
.reader-meta { color: var(--muted); font-size: 11.5px; }

.reader-content {
  font-size: 17.5px; line-height: 2.15; color: #24223a;
  letter-spacing: .01em;
}
.reader-content p { margin: 0 0 1.1em; text-indent: 2em; text-align: justify; }
.reader-content p.empty-hint { text-indent: 0; text-align: center; color: var(--muted); }

.reader-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 44px; }
.read-nav-btn {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 20px; border-radius: 16px;
  background: rgba(255, 255, 255, .85); border: 1px solid var(--line);
  transition: .22s ease;
}
.read-nav-btn:hover { border-color: var(--violet-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.read-nav-btn:nth-child(2) { text-align: right; }
.read-nav-btn.is-disabled { opacity: .5; pointer-events: none; }
.rnb-dir { font-size: 11px; letter-spacing: .1em; color: var(--violet); font-family: var(--mono); }
.rnb-title { font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-foot { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }

/* ------------------------------- About ------------------------------- */

.about-wrap { padding: 54px 0 80px; }
.about-card {
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 60px);
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.about-card::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px;
  border-radius: 50%; background: var(--grad-soft); filter: blur(10px);
}
.about-title { font-size: clamp(30px, 4.4vw, 44px); margin: 16px 0 14px; letter-spacing: -.02em; }
.about-lead { color: var(--ink-2); font-size: 15px; line-height: 2; max-width: 720px; margin: 0 0 34px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.about-block {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px 22px;
}
.about-block h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: .1em; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.about-strong { margin: 0 0 8px; font-size: 22px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about-text { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.9; }
.about-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.about-note { text-align: center; color: var(--muted); font-size: 12.5px; padding: 26px 10px 0; }

/* ------------------------------- Footer ------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(10px);
  position: relative; z-index: 1;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 0; font-size: 12.5px; color: var(--muted); flex-wrap: wrap;
}
.footer-left { display: flex; align-items: center; gap: 8px; }
.footer-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); transition: color .2s ease; }
.footer-links a:hover { color: var(--violet); }

/* ==================================================================
   管理后台
   ================================================================== */

body.admin-body {
  background:
    radial-gradient(800px 500px at 15% -10%, rgba(123, 92, 255, .18), transparent 60%),
    radial-gradient(700px 460px at 100% 0%, rgba(31, 201, 220, .14), transparent 62%),
    var(--bg);
}

.admin-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.admin-header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 66px;
}
.admin-id {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--muted);
}
.admin-badge {
  padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .06em;
}
.admin-badge.super { background: var(--grad); color: #fff; }
.admin-badge.normal { background: rgba(123, 92, 255, .12); color: var(--violet); }

.admin-main { padding: 34px 0 80px; }

.panel {
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  margin-bottom: 22px;
}
.panel-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.panel-title { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.panel-sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.login-wrap { display: grid; place-items: center; min-height: 74vh; padding: 40px 0; }
.login-card {
  width: min(430px, 100%);
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  padding: 38px 34px;
  position: relative; overflow: hidden;
}
.login-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--grad);
}
.login-orb {
  width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 18px;
  background: var(--grad); display: grid; place-items: center;
  color: #fff; font-size: 24px; font-weight: 800;
  box-shadow: 0 14px 30px rgba(123, 92, 255, .3);
}
.login-title { text-align: center; font-size: 22px; margin: 0 0 6px; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 26px; }

.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 8px; letter-spacing: .02em;
}
.field .hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 6px; font-weight: 400; }
.input, .textarea, .select {
  width: 100%; padding: 12px 15px; font-family: inherit; font-size: 14px;
  color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 13px;
  outline: 0; transition: .2s ease;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--violet); box-shadow: 0 0 0 4px rgba(123, 92, 255, .12);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.85; }
.textarea.tall { min-height: 420px; font-size: 15px; line-height: 2; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--violet) 50%), linear-gradient(135deg, var(--violet) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.file-drop {
  border: 2px dashed var(--line-strong); border-radius: 16px;
  padding: 24px; text-align: center; background: var(--surface-2);
  transition: .2s ease; cursor: pointer;
}
.file-drop:hover, .file-drop.is-over { border-color: var(--violet); background: rgba(123, 92, 255, .05); }
.file-drop input[type=file] { display: none; }
.file-drop-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.file-drop-sub { font-size: 12.5px; color: var(--muted); }
.file-drop code { font-family: var(--mono); background: rgba(123, 92, 255, .1); padding: 2px 7px; border-radius: 6px; font-size: 11.5px; }
.file-chosen { margin-top: 14px; font-size: 12.5px; color: var(--violet); font-family: var(--mono); word-break: break-all; }

.novel-admin-list { display: grid; gap: 12px; }
.novel-admin-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface-2); transition: .2s ease;
}
.novel-admin-row:hover { border-color: var(--violet-2); background: #fff; box-shadow: var(--shadow-sm); }
.admin-thumb {
  width: 52px; height: 66px; border-radius: 10px; overflow: hidden; flex: none;
  background: var(--grad-soft); display: grid; place-items: center;
  font-weight: 800; color: #fff; text-shadow: 0 3px 8px rgba(123,92,255,.4);
  border: 1px solid var(--line);
}
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-row-main { flex: 1; min-width: 180px; }
.admin-row-title { font-size: 15px; font-weight: 700; margin: 0 0 3px; }
.admin-row-meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.admin-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.chapter-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.chapter-table thead th {
  text-align: left; padding: 12px 14px; background: var(--surface-2);
  font-size: 11.5px; letter-spacing: .08em; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--line); text-transform: uppercase;
}
.chapter-table tbody td { padding: 11px 14px; border-bottom: 1px dashed rgba(123, 92, 255, .1); vertical-align: middle; }
.chapter-table tbody tr:hover { background: rgba(123, 92, 255, .04); }
.chapter-table .c-no { font-family: var(--mono); color: var(--violet); font-weight: 700; }
.chapter-table .c-title { font-size: 14px; }
.chapter-table .c-file { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.chapter-table input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--violet); cursor: pointer; }

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px; border-radius: 14px; background: var(--surface-2);
  border: 1px solid var(--line); margin-bottom: 16px;
}
.toolbar .toolbar-info { margin-left: auto; font-size: 12px; color: var(--muted); font-family: var(--mono); }

.alert {
  padding: 13px 18px; border-radius: 14px; font-size: 13.5px; margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid transparent;
}
.alert-ok { background: rgba(111, 224, 176, .14); border-color: rgba(111, 224, 176, .4); color: #157a52; }
.alert-err { background: rgba(255, 138, 181, .14); border-color: rgba(255, 138, 181, .45); color: #b62a5c; }
.alert-info { background: rgba(123, 92, 255, .10); border-color: rgba(123, 92, 255, .28); color: #573bd0; }
.alert ul { margin: 4px 0 0 18px; padding: 0; }

.section-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.tab-link {
  padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .7); color: var(--muted);
}
.tab-link.is-active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(123,92,255,.24); }

.toggle-form { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.status-indicator { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.status-indicator .dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.ongoing { background: var(--cyan); box-shadow: 0 0 0 4px rgba(31, 201, 220, .16); }
.dot.finished { background: var(--violet); box-shadow: 0 0 0 4px rgba(123, 92, 255, .16); }

.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: rgba(23, 21, 43, .92); color: #fff; padding: 12px 22px;
  border-radius: 999px; font-size: 13px; z-index: 90; opacity: 0;
  transition: .3s ease; pointer-events: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------- Responsive ------------------------------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { height: 220px; order: -1; }
  .catalog-hero { grid-template-columns: 190px 1fr; gap: 24px; }
  .chapter-list { grid-template-columns: 1fr; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { height: 64px; }
  .header-nav .nav-link { display: none; }
  .brand-text small { display: none; }
  .hero { padding: 34px 0 20px; }
  .hero-sub br { display: none; }
  .section-head { flex-direction: column; align-items: stretch; }
  .search-box { min-width: 0; width: 100%; }
  .novel-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .novel-title { font-size: 14px; }
  .catalog-hero { grid-template-columns: 1fr; }
  .catalog-cover { max-width: 210px; margin: 0 auto; }
  .catalog-title, .catalog-author { text-align: center; }
  .catalog-actions .btn { flex: 1; }
  .reader-content { font-size: 16.5px; line-height: 2; }
  .reader-nav { grid-template-columns: 1fr; }
  .read-nav-btn:nth-child(2) { text-align: left; }
  .panel { padding: 20px 18px; }
  .panel-head { flex-direction: column; align-items: stretch; }
  .admin-row-actions { width: 100%; }
}
