/* ===== Butterfly Custom CSS ===== */
#4A90D9色系

/* --- Header Enhancement --- */
#page-header.full_page {
  position: relative;
}

#page-header.full_page::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.05) 40%,
    rgba(240, 246, 252, 0) 70%,
    rgba(240, 246, 252, 0.6) 85%,
    rgba(240, 246, 252, 1) 100%
  );
  pointer-events: none;
  z-index: 1;
}

#page-header.full_page #site-info {
  z-index: 2;
}

#site-title {
  font-weight: 700;
  letter-spacing: 4px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

#site-subtitle {
  font-weight: 400;
  letter-spacing: 2px;
  opacity: 0.95;
}

/* --- Navigation Enhancement --- */
#nav {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(240, 246, 252, 0.15) !important;
  transition: all 0.4s ease;
}

#nav.show {
  background: rgba(240, 246, 252, 0.2) !important;
}

#nav.fixed {
  background: rgba(240, 246, 252, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#nav.fixed .site-name,
#nav.fixed a {
  color: #2C3E50 !important;
}

#nav .site-name {
  font-weight: 700;
  font-size: 1.1em;
  letter-spacing: 1px;
}

#nav .menus_items .menus_item .site-page {
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

#nav .menus_items .menus_item .site-page:hover {
  color: #4A90D9 !important;
}

#nav .menus_items .menus_item .site-page::after {
  background-color: #5BA0E0 !important;
  height: 2px;
}

/* --- Scroll-Down Arrow Enhancement --- */
#scroll-down .scroll-down-effects {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* --- Card/Post Item Styling --- */
.recent-post-item {
  border-radius: 12px !important;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1px solid rgba(74, 144, 217, 0.06);
}

.recent-post-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(74, 144, 217, 0.12) !important;
  border-color: rgba(74, 144, 217, 0.12);
}

.recent-post-item .recent-post-info {
  padding: 28px 32px 24px !important;
}

.recent-post-item .recent-post-info.no-cover {
  padding: 32px 32px 28px !important;
}

.recent-post-item .article-title {
  font-size: 1.45em !important;
  font-weight: 600;
  line-height: 1.5;
  transition: all 0.3s ease;
  color: #2C3E50 !important;
}

.recent-post-item .article-title:hover {
  color: #4A90D9 !important;
}

.recent-post-item .article-meta-wrap {
  margin: 8px 0 12px !important;
  font-size: 0.88em !important;
  color: #7A8A9A !important;
}

.recent-post-item .content {
  color: #5A6A7A;
  line-height: 1.8;
  font-size: 0.95em;
}

/* --- Post Meta Date Icon Enhancement --- */
.post-meta-date i {
  color: #5BA0E0;
}

/* --- Pagination Enhancement --- */
#pagination .pagination {
  margin-top: 24px;
}

#pagination .page-number {
  border-radius: 8px !important;
  transition: all 0.3s ease;
  font-weight: 500;
}

#pagination .page-number.current {
  background: #5BA0E0 !important;
  box-shadow: 0 4px 12px rgba(201, 137, 115, 0.3);
}

#pagination .page-number:not(.current):hover {
  background: rgba(201, 137, 115, 0.1);
  color: #4A90D9 !important;
}

#pagination .extend:hover {
  background: rgba(201, 137, 115, 0.1);
  color: #4A90D9 !important;
}

/* --- Aside Card Styling --- */
.card-widget {
  border-radius: 12px !important;
  border: 1px solid rgba(74, 144, 217, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  padding: 22px 24px !important;
}

.card-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74, 144, 217, 0.1) !important;
  border-color: rgba(74, 144, 217, 0.1);
}

.card-widget .item-headline {
  font-size: 1.1em !important;
  font-weight: 600;
  color: #2C3E50;
}

.card-widget .item-headline i {
  color: #4A90D9;
}

/* --- Aside Author Card --- */
.card-info .author-info-name {
  font-weight: 700 !important;
  color: #2C3E50;
  font-size: 1.5em !important;
}

.card-info .author-info-description {
  color: #7A8A9A;
  font-size: 0.92em;
}

.card-info .site-data .headline {
  color: #7A8A9A !important;
  font-size: 0.9em !important;
}

.card-info .site-data .length-num {
  color: #4A90D9 !important;
  font-weight: 600;
}

#card-info-btn {
  background: linear-gradient(135deg, #4A90D9, #6BB3F0) !important;
  border-radius: 8px !important;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease !important;
}

#card-info-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(74, 144, 217, 0.25) !important;
}

/* --- Tag Cloud Styling --- */
.card-tag-cloud a {
  padding: 2px 10px !important;
  margin: 3px 4px;
  border-radius: 14px;
  background: rgba(74, 144, 217, 0.06);
  transition: all 0.3s ease !important;
  font-size: 0.85em !important;
}

.card-tag-cloud a:hover {
  background: #4A90D9 !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.25);
}

/* --- Archive/Category List Styling --- */
.card-archive-list .card-archive-list-item a,
.card-category-list .card-category-list-item a {
  border-radius: 6px !important;
  transition: all 0.3s ease !important;
}

.card-archive-list .card-archive-list-item a:hover,
.card-category-list .card-category-list-item a:hover {
  background: rgba(166, 95, 70, 0.08) !important;
  color: #4A90D9 !important;
  padding-left: 14px !important;
}

/* --- Recent Post Aside Styling --- */
.aside-list-item .content .title:hover {
  color: #4A90D9 !important;
}

.aside-list-item .content time {
  color: #5BA0E0 !important;
}

/* --- Footer Enhancement --- */
#footer {
  background: linear-gradient(135deg, #4A90D9, #2D6BA8, #4A90D9) !important;
  position: relative;
  overflow: hidden;
}

#footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('/img/backgroundimage.png') center/cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
}

#footer .footer-other {
  padding: 30px 20px !important;
}

#footer .copyright {
  font-size: 0.95em;
  letter-spacing: 1px;
  opacity: 0.92;
}

#footer .framework-info {
  font-size: 0.85em;
  opacity: 0.7;
  margin-top: 4px;
}

#footer a:hover {
  color: #B0D4F1 !important;
  text-decoration: underline;
}

/* --- Right Side Button Styling --- */
#rightside button {
  transition: all 0.3s ease;
}

#rightside button:hover {
  color: #4A90D9 !important;
}

#go-up {
  background: rgba(74, 144, 217, 0.12);
  border-radius: 50%;
  transition: all 0.3s ease;
}

#go-up:hover {
  background: #4A90D9;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

/* --- Web Background Animation --- */
#web_bg {
  background-color: #F0F6FC !important;
}

/* --- Selection Color --- */
*::selection {
  background: rgba(74, 144, 217, 0.25) !important;
  color: #2C3E50 !important;
}

/* --- Blockquote Styling --- */
blockquote {
  border-left: 4px solid #7BB8E8 !important;
  background: rgba(74, 144, 217, 0.12) !important;
  border-radius: 0 8px 8px 0;
  padding: 12px 20px !important;
}

/* --- Code Block Styling (light theme) --- */
#article-container figure.highlight,
#article-container .highlight pre {
  border-radius: 8px;
}

/* --- Post Copyright --- */
.post-copyright {
  border-radius: 8px;
  border: 1px solid rgba(74, 144, 217, 0.1) !important;
}

/* --- Related Posts --- */
.relatedPosts {
  border-radius: 12px;
  overflow: hidden;
}

.relatedPosts .relatedPosts-list .content .title {
  font-weight: 500;
}

/* --- Announcement Card Icon --- */
.card-announcement .item-headline i {
  color: #5BA0E0 !important;
}

/* --- Scroll to Top Percent --- */
.scroll-percent {
  font-size: 0.75em;
  font-weight: 600;
  color: #4A90D9;
}

#go-up:hover .scroll-percent {
  color: #fff;
}

/* --- Loading Animation Customization --- */
.loading-bg {
  background: #F0F6FC !important;
}

/* --- Responsive Fixes --- */
@media screen and (max-width: 768px) {
  .recent-post-item .recent-post-info {
    padding: 20px 20px 18px !important;
  }

  .recent-post-item .article-title {
    font-size: 1.25em !important;
  }

  .card-widget {
    padding: 18px 20px !important;
  }

  #site-title {
    font-size: 1.8em !important;
    letter-spacing: 2px;
  }

  #site-subtitle {
    font-size: 1em !important;
  }

  #footer .footer-other {
    padding: 24px 16px !important;
  }
}

@media screen and (min-width: 2000px) {
  .recent-post-item .article-title {
    font-size: 1.6em !important;
  }

  .layout {
    max-width: 1400px;
  }
}

/* --- Smooth Anchor Scrolling --- */
html {
  scroll-behavior: smooth;
}

/* --- Canvas Nest (Particle) Override --- */
#canvas-nest {
  opacity: 0.5;
  pointer-events: none;
}

/* --- Post Content Typography --- */
.layout-post .content-wrap {
  background: #F4F9FE;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* --- Post Tag Labels --- */
.tag_share .post-tags a {
  border-radius: 14px;
  padding: 2px 12px;
  background: rgba(74, 144, 217, 0.06);
  transition: all 0.3s ease;
}

.tag_share .post-tags a:hover {
  background: #4A90D9;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.2);
}

/* --- Page Header Slightly Smaller for Non-Home --- */
#page-header.not-home-page {
  height: 360px;
}

@media screen and (max-width: 768px) {
  #page-header.not-home-page {
    height: 250px;
  }
}

/* --- Post Page Header Gradient --- */
#page-header.post-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.05) 50%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
  z-index: 1;
}

#post-info {
  z-index: 2;
}

/* --- Card Widget Specific Shadow --- */
.card-widget.card-info {
  background: linear-gradient(180deg, #F0F6FC, #F0F6FC);
}

.card-widget.card-announcement {
  background: linear-gradient(135deg, rgba(74, 144, 217, 0.08), rgba(240, 246, 252, 0.8));
}

/* --- Announcement Content Styling --- */
.announcement_content {
  color: #5A6A7A;
  line-height: 1.8;
  font-size: 0.95em;
  padding: 4px 0;
}

/* --- Site Data Counters --- */
.site-data a:hover div {
  color: #4A90D9 !important;
}

/* --- Post Navigation Paging --- */
.pagination-post {
  border-radius: 12px !important;
  overflow: hidden;
}

/* --- Web Info Counters --- */
.card-webinfo .webinfo-item div:first-child {
  color: #7A8A9A;
  font-size: 0.9em;
}

.card-webinfo .webinfo-item div:last-child {
  font-weight: 600;
  color: #4A90D9;
}

/* --- Busuanzi Loader Icon --- */
.fa-spinner {
  color: #5BA0E0;
}

/* --- Post Copyright Custom --- */
.post-copyright {
  background: rgba(240, 246, 252, 0.6) !important;
}

.post-copyright .post-copyright-params .post-copyright-meta {
  color: #4A90D9 !important;
}

/* --- Category/Tag Page Header --- */
.category-lists .category-list .category-list-item a,
.tag-lists .tag-list .tag-list-item a {
  border-radius: 6px;
  transition: all 0.3s ease;
}

.category-lists .category-list .category-list-item a:hover,
.tag-lists .tag-list .tag-list-item a:hover {
  background: rgba(166, 95, 70, 0.08);
  color: #4A90D9 !important;
}

/* --- Archive Page Timeline --- */
.article-sort {
  border-radius: 12px;
  padding: 24px;
}

.article-sort .article-sort-item {
  transition: all 0.3s ease;
  border-radius: 8px;
}

.article-sort .article-sort-item:hover {
  transform: translateX(4px);
}

.article-sort .article-sort-item .article-sort-item-time {
  color: #5BA0E0 !important;
}

/* --- 404 Page --- */
#error-wrap .error-content {
  border-radius: 12px;
}

/* --- Post - Table of Contents --- */
#card-toc .toc-content .toc-link {
  transition: all 0.2s ease;
}

#card-toc .toc-content .toc-link:hover {
  color: #4A90D9 !important;
}

#card-toc .toc-content .toc-link.active {
  background: #5BA0E0 !important;
}

/* --- Firefox Scrollbar --- */
@-moz-document url-prefix() {
  * {
    scrollbar-color: #5BA0E0 transparent;
  }
}

/* --- WebKit Scrollbar --- */
*::-webkit-scrollbar-thumb {
  background: #5BA0E0 !important;
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #5BA0E0 !important;
}

/* --- Image Hover Effect --- */
.post_cover .post-bg {
  transition: transform 0.6s ease !important;
}

.recent-post-item:hover .post_cover .post-bg {
  transform: scale(1.08);
}

/* --- Tag Page Specific --- */
.tag-cloud-title {
  color: #2C3E50;
}

.tag-cloud-tags a {
  border-radius: 14px;
  padding: 4px 14px !important;
  background: rgba(74, 144, 217, 0.06);
  transition: all 0.3s ease;
  margin: 4px;
}

.tag-cloud-tags a:hover {
  background: #4A90D9 !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.25);
}

/* --- Comment Section --- */
#local-comments {
  border-radius: 12px;
  padding: 20px;
  background: #F0F6FC;
}

/* --- Comment Button Styling --- */
.comments-switch .first-comment {
  color: #4A90D9 !important;
}

.comments-switch .second-comment {
  color: #5BA0E0 !important;
}

/* --- Links (Flink) Page --- */
.flink .flink-list .flink-list-item {
  border-radius: 12px;
  transition: all 0.3s ease;
}

.flink .flink-list .flink-list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(74, 144, 217, 0.12);
}

/* --- Entry Transition Animation --- */
#content-inner {
  animation: fadeInUp 0.8s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Staggered Card Animation --- */
.recent-post-item {
  animation: cardFadeIn 0.6s ease both;
}

.recent-post-item:nth-child(1) { animation-delay: 0.05s; }
.recent-post-item:nth-child(2) { animation-delay: 0.1s; }
.recent-post-item:nth-child(3) { animation-delay: 0.15s; }
.recent-post-item:nth-child(4) { animation-delay: 0.2s; }
.recent-post-item:nth-child(5) { animation-delay: 0.25s; }
.recent-post-item:nth-child(6) { animation-delay: 0.3s; }
.recent-post-item:nth-child(7) { animation-delay: 0.35s; }
.recent-post-item:nth-child(8) { animation-delay: 0.4s; }
.recent-post-item:nth-child(9) { animation-delay: 0.45s; }
.recent-post-item:nth-child(10) { animation-delay: 0.5s; }

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Preloader Color --- */
#loading {
  background: #F0F6FC !important;
}

#loading .loading-word {
  color: #4A90D9 !important;
}

#loading .loading-pic i {
  color: #5BA0E0 !important;
}
