/* ============================================================
   newplanet blog · 自定义样式
   风格：简约、耐看、低饱和自然色
   改这里就够了，不需要动主题源码
   ============================================================ */

:root {
  --ink: #2c2f33;
  --ink-soft: #55595f;
  --muted: #8a8f98;
  --line: rgba(23, 35, 61, .08);
  --card: rgba(255, 255, 255, .82);
  --accent: #5b7c99;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(23, 35, 61, .08);
}

/* ---------- 基础排版 ---------- */
body {
  background: #eef1f5 url('/images/banner/bg.webp') center / cover fixed no-repeat;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  -webkit-font-smoothing: antialiased;
}

#article-container,
#recent-posts .recent-post-item .post-title,
#aside-content .card-widget {
  letter-spacing: .012em;
}

#article-container p,
#article-container li {
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--ink);
}

/* ---------- 首屏 ---------- */
#page-header.full_page,
#page-header.not-home-page {
  height: 100vh;
  position: relative;
}

#page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 26, 34, .45) 0%, rgba(20, 26, 34, .12) 45%, rgba(20, 26, 34, .55) 100%);
  pointer-events: none;
  z-index: 1;
}

#page-header #site-info {
  position: relative;
  z-index: 2;
}

#page-header #site-title {
  font-size: clamp(1.6rem, 3.2vw, 3rem);
  font-weight: 700;
  letter-spacing: .1em;
  text-shadow: 0 6px 28px rgba(0, 0, 0, .45);
}

#page-header #site-subtitle {
  margin-top: 10px;
  font-size: clamp(.9rem, 1.1vw, 1.05rem);
  letter-spacing: .35em;
  opacity: .88;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}

/* ---------- 卡片：毛玻璃 ---------- */
#recent-posts .recent-post-item,
#aside-content .card-widget,
#pagination .page-number,
#pagination .extend,
.post-copyright,
.card-widget {
  background: var(--card) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .6) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  transition: transform .3s ease, box-shadow .3s ease;
}

#recent-posts .recent-post-item:hover,
#aside-content .card-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(23, 35, 61, .14) !important;
}

#recent-posts .recent-post-item .post-title a {
  font-weight: 600;
  color: var(--ink);
}

#recent-posts .recent-post-item .post-title a:hover {
  color: var(--accent);
}

/* 卡片封面：统一比例 + 轻微缩放 */
#recent-posts .recent-post-item .post_cover img {
  transition: transform .5s ease;
}

#recent-posts .recent-post-item:hover .post_cover img {
  transform: scale(1.04);
}

/* ---------- 导航栏 ---------- */
#page-header.nav-fixed #nav,
#nav {
  background: rgba(255, 255, 255, .66) !important;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

#nav .site-name,
#nav a {
  color: var(--ink) !important;
}

/* ---------- 正文（阅读区） ---------- */
#article-container {
  max-width: 760px;
  margin: 0 auto;
}

#article-container h1,
#article-container h2,
#article-container h3 {
  color: var(--ink);
  font-weight: 650;
  letter-spacing: .02em;
}

#article-container h2 {
  margin: 2.6em 0 1em;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  font-size: 1.35rem;
}

#article-container h3 {
  margin: 2em 0 .8em;
  font-size: 1.12rem;
}

#article-container a {
  color: var(--accent);
  border-bottom: 1px solid rgba(91, 124, 153, .35);
}

#article-container a:hover {
  border-bottom-color: var(--accent);
}

/* 引用 */
#article-container blockquote {
  margin: 1.8em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: rgba(91, 124, 153, .07);
  color: var(--ink-soft);
}

#article-container blockquote p {
  margin: 0;
  color: var(--ink-soft);
}

/* 行内代码与代码块 */
#article-container code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(23, 35, 61, .06);
  color: #b35b6b;
  font-size: .9em;
}

#article-container figure.highlight,
#article-container pre {
  margin: 1.6em 0;
  border-radius: 10px !important;
  box-shadow: 0 6px 20px rgba(23, 35, 61, .07);
  border: 1px solid var(--line);
}

#article-container figure.highlight pre {
  margin: 0;
  padding: 16px 18px;
}

#article-container figure.highlight code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* 图片：圆角、居中、留白 */
#article-container img {
  display: block;
  margin: 1.8em auto;
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(23, 35, 61, .12);
}

/* 表格 */
#article-container table {
  margin: 1.6em 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(23, 35, 61, .06);
}

#article-container table th {
  background: rgba(91, 124, 153, .1);
  color: var(--ink);
  font-weight: 600;
}

#article-container table td,
#article-container table th {
  border-color: var(--line);
}

/* ---------- 文章页头 ---------- */
#page-header.post-bg #post-info {
  text-shadow: 0 4px 20px rgba(0, 0, 0, .45);
}

#page-header #post-info .post-title {
  font-weight: 700;
  letter-spacing: .03em;
}

/* ---------- 侧边栏 ---------- */
#aside-content .card-widget .card-info-name,
#aside-content .card-widget .item-headline {
  font-weight: 600;
  color: var(--ink);
}

/* ---------- 分页 ---------- */
#pagination .page-number.current {
  background: var(--accent) !important;
  color: #fff !important;
}

/* ---------- 页脚 ---------- */
#footer {
  background: transparent;
  color: var(--muted);
}

#footer a {
  color: var(--ink-soft);
}

/* ---------- 相册 ---------- */
.gallery-group-main {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 6px 0 40px;
}

figure.gallery-group {
  position: relative;
  overflow: hidden;
  margin: 0;
  width: calc(50% - 8px);
  height: 240px;
  border-radius: 12px;
  background: #0d1117;
  box-shadow: var(--shadow);
}

figure.gallery-group img.gallery-group-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .88;
  transition: opacity .4s ease, transform .6s ease;
}

figure.gallery-group:hover img.gallery-group-img {
  opacity: .62;
  transform: scale(1.05);
}

figure.gallery-group figcaption {
  position: absolute;
  inset: 0;
  padding: 1.4rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

figure.gallery-group .gallery-group-name {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .05em;
}

figure.gallery-group p {
  margin: 4px 0 0;
  font-size: .8rem;
  opacity: .78;
}

figure.gallery-group figcaption > a {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.memo-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
}

@media screen and (max-width: 860px) {
  figure.gallery-group {
    width: 100%;
    height: 210px;
  }
  #article-container p,
  #article-container li {
    font-size: 16px;
    line-height: 1.9;
  }
}

/* ---------- 暗色模式 ---------- */
[data-theme='dark'] {
  --ink: #e6e8ec;
  --ink-soft: #b8bcc4;
  --muted: #8b9099;
  --line: rgba(255, 255, 255, .1);
  --card: rgba(28, 32, 38, .72);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

[data-theme='dark'] body {
  background: #14171c url('/images/banner/bg.webp') center / cover fixed no-repeat;
}

[data-theme='dark'] #recent-posts .recent-post-item .post-title a,
[data-theme='dark'] #article-container h2,
[data-theme='dark'] #article-container h3 {
  color: var(--ink);
}

[data-theme='dark'] #article-container code {
  background: rgba(255, 255, 255, .1);
  color: #e2a3ae;
}

[data-theme='dark'] #nav a,
[data-theme='dark'] #nav .site-name {
  color: var(--ink) !important;
}
