:root {
  --cj-accent: #0ea5e9;
  --cj-accent-strong: #0369a1;
  --cj-radius: 16px;
  --cj-shadow: 0 14px 36px rgba(15, 23, 42, .08);
}

body { text-rendering: optimizeLegibility; }

#navbar { border-bottom: 1px solid rgba(148, 163, 184, .15); }
#navbar .navbar-brand { font-weight: 750; letter-spacing: -.02em; }

.banner .mask { background: linear-gradient(120deg, rgba(2, 8, 23, .74), rgba(3, 105, 161, .25)) !important; }
.banner-text .h2, .banner-text .h1 { text-shadow: 0 3px 24px rgba(0, 0, 0, .36); letter-spacing: -.025em; }

.index-card, #board, .category-list, .tagcloud, .list-group {
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: var(--cj-radius) !important;
  box-shadow: var(--cj-shadow);
}
.index-card { overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.index-card:hover { transform: translateY(-4px); box-shadow: 0 20px 46px rgba(15, 23, 42, .13); }
.index-img img { transition: transform .55s ease; }
.index-card:hover .index-img img { transform: scale(1.035); }

.markdown-body { line-height: 1.85; }

/* 标题正文字号层级，解决主题未设置 font-size 导致标题不显眼的问题 */
.markdown-body h1 { font-size: 1.85em; margin-top: 2.2em; padding-bottom: .35em; border-bottom: 1px solid var(--line-color, rgba(148, 163, 184, .25)); }
.markdown-body h2 { font-size: 1.48em; margin-top: 2em; padding-bottom: .45em; border-bottom: 1px solid rgba(148, 163, 184, .25); }
.markdown-body h3 { font-size: 1.22em; }
.markdown-body h4 { font-size: 1.08em; }

/* 文章页面主标题 H1 */
#seo-header { font-size: 1.85em; }

.markdown-body a { text-decoration-thickness: .08em; text-underline-offset: .18em; }
.markdown-body blockquote { border-left: 4px solid var(--cj-accent); border-radius: 0 10px 10px 0; background: rgba(14, 165, 233, .06); padding: .8em 1.1em; }
.markdown-body img { border-radius: 12px; box-shadow: 0 8px 28px rgba(15, 23, 42, .12); }
.markdown-body table { display: table; width: 100%; border-radius: 10px; overflow: hidden; }
.markdown-body thead tr { background: rgba(14, 165, 233, .08); }
.markdown-body code:not(pre code) { border-radius: 5px; padding: .15em .38em; color: #c026d3; background: rgba(192, 38, 211, .07); }

figure.highlight, .markdown-body pre { border-radius: 12px !important; box-shadow: 0 8px 24px rgba(2, 8, 23, .14); }
figure.highlight code, .markdown-body pre code { font-family: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace; line-height: 1.72; }

.tocbot-active-link { color: var(--cj-accent) !important; font-weight: 650; }
.tocbot-is-collapsible { transition: max-height .25s ease; }
#scroll-top-button { border-radius: 50%; box-shadow: 0 7px 22px rgba(2, 132, 199, .28); }
#nprogress .bar { background: linear-gradient(90deg, #38bdf8, #8b5cf6) !important; }
::selection { color: #082f49; background: rgba(125, 211, 252, .58); }

html[data-user-color-scheme="dark"] { --cj-shadow: 0 16px 42px rgba(0, 0, 0, .28); }
html[data-user-color-scheme="dark"] .index-card,
html[data-user-color-scheme="dark"] #board { border-color: rgba(148, 163, 184, .12); }
html[data-user-color-scheme="dark"] .markdown-body blockquote { background: rgba(56, 189, 248, .07); }
html[data-user-color-scheme="dark"] .markdown-body code:not(pre code) { color: #f0abfc; background: rgba(217, 70, 239, .09); }
html[data-user-color-scheme="dark"] ::selection { color: #e0f2fe; background: rgba(3, 105, 161, .72); }

@media (max-width: 767px) {
  :root { --cj-radius: 12px; }
  .banner { background-position: 58% center !important; }
  .markdown-body { line-height: 1.78; }
}

/* Article image watermark and drag protection */
.cj-watermarked-image {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 1.2em auto;
  line-height: 0;
  overflow: hidden;
  border-radius: 12px;
}

.cj-watermarked-image > img {
  display: block;
  margin: 0 !important;
  max-width: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.cj-image-watermark {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  color: rgba(255, 255, 255, .78);
  font: 600 12px/1.2 Inter, "PingFang SC", sans-serif;
  letter-spacing: .04em;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .85);
  pointer-events: none;
  user-select: none;
}

@media (max-width: 767px) {
  .cj-image-watermark { right: 8px; bottom: 7px; font-size: 10px; }
}

/* Follow.it email subscription card */
.cj-subscribe {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(320px, .9fr);
  align-items: center;
  gap: 18px;
  width: min(1080px, calc(100% - 32px));
  margin: 36px auto 12px;
  padding: 24px 26px;
  overflow: hidden;
  color: #334155;
  background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(240, 249, 255, .94));
  border: 1px solid rgba(14, 165, 233, .22);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .09);
}

.cj-subscribe::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -76px;
  top: -110px;
  border-radius: 50%;
  background: rgba(14, 165, 233, .1);
  pointer-events: none;
}

.cj-subscribe__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  font-size: 22px;
  background: linear-gradient(135deg, #0ea5e9, #4f46e5);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(2, 132, 199, .24);
}

.cj-subscribe__copy h2 {
  margin: 0 0 5px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.25;
}

.cj-subscribe__copy p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.cj-subscribe__form {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 9px;
}

.cj-subscribe__form input {
  min-width: 0;
  flex: 1;
  height: 44px;
  padding: 0 14px;
  color: #334155;
  background: rgba(255, 255, 255, .9);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.cj-subscribe__form input::placeholder { color: #94a3b8; }
.cj-subscribe__form input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .14);
}

.cj-subscribe__form button {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 19px;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  background: linear-gradient(135deg, #0284c7, #4f46e5);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 7px 18px rgba(2, 132, 199, .2);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.cj-subscribe__form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(2, 132, 199, .28);
}

.cj-subscribe__provider {
  position: absolute;
  right: 28px;
  bottom: 5px;
  color: #94a3b8 !important;
  font-size: 10px;
  text-decoration: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html[data-user-color-scheme="dark"] .cj-subscribe {
  color: #cbd5e1;
  background: linear-gradient(135deg, rgba(17, 24, 39, .97), rgba(15, 23, 42, .96));
  border-color: rgba(56, 189, 248, .2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
}
html[data-user-color-scheme="dark"] .cj-subscribe__copy h2 { color: #f1f5f9; }
html[data-user-color-scheme="dark"] .cj-subscribe__copy p { color: #94a3b8; }
html[data-user-color-scheme="dark"] .cj-subscribe__form input {
  color: #e2e8f0;
  background: rgba(2, 8, 23, .72);
  border-color: #334155;
}

@media (max-width: 900px) {
  .cj-subscribe { grid-template-columns: auto 1fr; }
  .cj-subscribe__form { grid-column: 1 / -1; }
}

@media (max-width: 575px) {
  .cj-subscribe {
    width: calc(100% - 22px);
    gap: 13px;
    margin-top: 24px;
    padding: 20px 18px 25px;
    border-radius: 15px;
  }
  .cj-subscribe__icon { width: 42px; height: 42px; border-radius: 12px; }
  .cj-subscribe__copy h2 { font-size: 18px; }
  .cj-subscribe__form { flex-direction: column; }
  .cj-subscribe__form button { width: 100%; }
  .cj-subscribe__provider { right: 18px; bottom: 4px; }
}
