:root {
  --zjx-card-bg: rgba(255, 255, 255, 0.88);
  --zjx-card-border: rgba(255, 255, 255, 0.58);
  --zjx-ink: #1d2a31;
  --zjx-muted: #5a6872;
  --zjx-accent: #2f7d6d;
  --default-bg-color: #edf4f1;
}

html,
body {
  min-height: 100%;
}

body {
  background: url("/images/background-optimized.jpg") center center / cover fixed no-repeat !important;
  color: var(--zjx-ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(247, 250, 248, 0.38), rgba(239, 244, 241, 0.76)),
    rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

#web_bg {
  background: transparent !important;
  opacity: 1 !important;
  animation: none !important;
  -webkit-animation: none !important;
  -moz-animation: none !important;
  -o-animation: none !important;
  -ms-animation: none !important;
}

#web_bg.bg-animation {
  animation: none !important;
  -webkit-animation: none !important;
  -moz-animation: none !important;
  -o-animation: none !important;
  -ms-animation: none !important;
}

#page-header {
  background-color: #edf4f1 !important;
  background-position: center center !important;
  background-size: cover !important;
}

#page-header.full_page {
  min-height: 100vh !important;
  height: 100vh !important;
}

#nav {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#nav.show {
  background: transparent !important;
  box-shadow: none !important;
}

#site-title,
#site-subtitle {
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.38);
}

#site-title {
  letter-spacing: 0;
}

#site-subtitle {
  line-height: 1.8;
}

#recent-posts .recent-post-item,
.card-widget,
#page,
#post,
#archive,
#tag,
#category {
  border: 1px solid var(--zjx-card-border);
  background: var(--zjx-card-bg);
  box-shadow: 0 18px 48px rgba(23, 35, 42, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#aside-content .card-info .avatar-img img {
  border: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(30, 44, 51, 0.2);
}

#aside-content .card-info .author-info-name {
  color: var(--zjx-ink);
  font-weight: 700;
}

#aside-content .card-info .author-info-description {
  color: var(--zjx-muted);
}

#aside-content .card-info .site-data > a .headline {
  color: var(--zjx-muted);
}

#aside-content .card-info .site-data > a .length-num {
  color: var(--zjx-accent);
  font-weight: 700;
}

#aside-content #card-info-btn,
.button--animated {
  background: var(--zjx-accent) !important;
  border-radius: 8px;
}

a {
  color: #286f62;
}

a:hover {
  color: #c46a3a;
}

#recent-posts .recent-post-item .post_cover img.post-bg {
  filter: saturate(1.08) contrast(1.02);
}

#recent-posts > .recent-post-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

#recent-posts .recent-post-item {
  flex-direction: column !important;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#recent-posts .recent-post-item .post_cover,
#recent-posts .recent-post-item .post_cover a {
  width: 100% !important;
  height: 180px !important;
}

#recent-posts .recent-post-item .post_cover img.post-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#recent-posts .recent-post-item > .recent-post-info {
  width: 100% !important;
  padding: 18px 20px 20px !important;
}

#recent-posts .recent-post-item > .recent-post-info > .article-title {
  display: -webkit-box;
  min-height: 3.1em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-sort-item-title,
#recent-posts .recent-post-item > .recent-post-info > .article-title {
  color: var(--zjx-ink);
}

.zjx-nav-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: #fff;
}

.zjx-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: background 0.2s ease, transform 0.2s ease;
}

.zjx-search-toggle:hover,
.zjx-search-toggle:focus-visible,
.zjx-nav-search.is-open .zjx-search-toggle {
  background: rgba(255, 255, 255, 0.18);
}

.zjx-search-toggle:active {
  transform: scale(0.94);
}

.zjx-search-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1200;
  display: none;
  width: min(420px, 86vw);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 52px rgba(23, 35, 42, 0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.zjx-nav-search.is-open .zjx-search-popover {
  display: block;
}

.zjx-search-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(47, 125, 109, 0.22);
  border-radius: 8px;
  outline: 0;
  background: rgba(246, 250, 248, 0.96);
  color: var(--zjx-ink);
  font: inherit;
}

.zjx-search-input::placeholder {
  color: var(--zjx-muted);
}

.zjx-search-panel {
  display: none;
  width: 100%;
  max-height: min(520px, 72vh);
  margin-top: 10px;
  overflow-y: auto;
  border: 1px solid rgba(47, 125, 109, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
}

.zjx-search-panel.is-visible {
  display: block;
}

.zjx-search-empty {
  padding: 18px 20px;
  color: var(--zjx-muted);
}

.zjx-search-result {
  display: block;
  padding: 14px 18px;
  color: var(--zjx-ink);
  border-bottom: 1px solid rgba(47, 125, 109, 0.12);
}

.zjx-search-result:last-child {
  border-bottom: 0;
}

.zjx-search-result:hover {
  background: rgba(47, 125, 109, 0.08);
}

.zjx-search-title,
.zjx-search-meta,
.zjx-search-snippet {
  display: block;
}

.zjx-search-title {
  font-weight: 700;
  line-height: 1.45;
}

.zjx-search-meta {
  margin-top: 4px;
  color: var(--zjx-accent);
  font-size: 0.78rem;
}

.zjx-search-snippet {
  margin-top: 6px;
  color: var(--zjx-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.zjx-click-heart {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  animation: zjx-heart-float 1.08s ease-out forwards;
}

@keyframes zjx-heart-float {
  0% {
    opacity: 0;
    transform: translate(-50%, -35%) scale(0.4) rotate(0deg);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -75%) scale(1.16) rotate(-8deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -190%) scale(1.42) rotate(16deg);
  }
}

.post-copyright {
  border-radius: 8px;
  background: rgba(245, 249, 246, 0.92);
}

#footer {
  background: transparent !important;
  box-shadow: none;
}

#footer::before {
  display: none !important;
}

#footer > *,
#footer a {
  color: rgba(29, 42, 49, 0.88) !important;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.78);
}

#footer a:hover {
  color: var(--zjx-accent) !important;
}

@media (max-width: 768px) {
  #page-header.index-bg {
    height: 100vh;
  }

  #site-title {
    font-size: 2rem;
  }

  #recent-posts > .recent-post-items {
    grid-template-columns: 1fr;
  }

  #recent-posts .recent-post-item .post_cover,
  #recent-posts .recent-post-item .post_cover a {
    height: 168px !important;
  }

  .zjx-nav-search {
    margin-left: 2px;
  }
}

@media (max-width: 420px) {
  .zjx-search-popover {
    right: -42px;
    width: min(340px, 92vw);
  }
}
