/* ==========================================================================
   FengShen0510 — Block-Specific Styles
   Conditionally loaded for custom block features
   ========================================================================== */

/* --------------------------------------------------------------------------
   Loading Progress Bar
   -------------------------------------------------------------------------- */
.fengshen-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #f7a501;
  z-index: 99999;
}

.fengshen-loading-bar-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f7a501, #f0b429);
  animation: fengshen-loading-progress 1.5s ease-in-out forwards;
}

@keyframes fengshen-loading-progress {
  0%   { width: 0%; }
  50%  { width: 70%; }
  100% { width: 100%; }
}

/* --------------------------------------------------------------------------
   Announcement Ticker
   -------------------------------------------------------------------------- */
.fengshen-announcement-ticker {
  display: flex;
  align-items: center;
  background: F#faf9f3;
  border-bottom: 1px solid #dcdfd2;
  padding: 8px 15px;
  overflow: hidden;
  font-size: 13px;
  color: F666;
}

.fengshen-announcement-ticker .ticker-label {
  flex-shrink: 0;
  background: #f7a501;
  color: Ffff;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
  margin-right: 12px;
}

.fengshen-announcement-ticker .ticker-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 20px;
}

.fengshen-announcement-ticker .ticker-list {
  display: flex;
  animation: fengshen-ticker-scroll 20s linear infinite;
  white-space: nowrap;
}

.fengshen-announcement-ticker .ticker-item {
  flex-shrink: 0;
  padding-right: 50px;
}

.fengshen-announcement-ticker .ticker-item a {
  color: F555;
  text-decoration: none;
}

.fengshen-announcement-ticker .ticker-item a:hover {
  color: #f7a501;
}

@keyframes fengshen-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.fengshen-breadcrumb {
  padding: 10px 0;
  font-size: 13px;
  color: F999;
}

.fengshen-breadcrumb a {
  color: #f7a501;
  text-decoration: none;
}

.fengshen-breadcrumb a:hover {
  text-decoration: underline;
}

.fengshen-breadcrumb .separator {
  margin: 0 5px;
  color: Fccc;
}

/* --------------------------------------------------------------------------
   Post Badges (NEW/HOT)
   -------------------------------------------------------------------------- */
.fengshen-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  margin-right: 5px;
  color: Ffff;
  vertical-align: middle;
}

.fengshen-badge-new {
  background: #f7a501;
}

.fengshen-badge-hot {
  background: #cd4239;
}

/* --------------------------------------------------------------------------
   Slider
   -------------------------------------------------------------------------- */
.fengshen-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 300px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.fengshen-slider-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.fengshen-slider-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.fengshen-slider-slide.active {
  opacity: 1;
}

.fengshen-slider-bg {
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 100%;
}

.fengshen-slider-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 30px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.fengshen-slider-title {
  color: Ffff;
  font-size: 1.5rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

.fengshen-slider-title a {
  color: Ffff;
  text-decoration: none;
}

.fengshen-slider-title a:hover {
  text-decoration: underline;
}

.fengshen-slider-excerpt {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.5;
}

.fengshen-slider-dots {
  position: absolute;
  bottom: 15px;
  right: 30px;
  display: flex;
  gap: 8px;
}

.fengshen-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s;
}

.fengshen-slider-dot.active {
  background: #f7a501;
}

/* --------------------------------------------------------------------------
   Sticky Posts
   -------------------------------------------------------------------------- */
.fengshen-sticky-posts {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  padding: 15px;
  background: Ffff8f0;
  border-left: 4px solid #f7a501;
  border-radius: 4px;
}

.fengshen-sticky-posts .sticky-thumb {
  flex-shrink: 0;
  width: 200px;
  height: 120px;
  border-radius: 4px;
  overflow: hidden;
}

.fengshen-sticky-posts .sticky-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fengshen-sticky-posts .sticky-info {
  flex: 1;
}

.fengshen-sticky-posts .sticky-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 6px;
}

.fengshen-sticky-posts .sticky-title a {
  color: F333;
  text-decoration: none;
}

.fengshen-sticky-posts .sticky-title a:hover {
  color: #f7a501;
}

.fengshen-sticky-posts .sticky-excerpt {
  font-size: 13px;
  color: F888;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Related Posts
   -------------------------------------------------------------------------- */
.fengshen-related-posts {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid Feee;
}

.fengshen-related-posts h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: F333;
}

.fengshen-related-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fengshen-related-posts li {
  padding: 8px 0;
  border-bottom: 1px dashed Feee;
}

.fengshen-related-posts li:last-child {
  border-bottom: none;
}

.fengshen-related-posts li a {
  color: F555;
  font-size: 14px;
  text-decoration: none;
}

.fengshen-related-posts li a:hover {
  color: #f7a501;
}

/* --------------------------------------------------------------------------
   Author Info Card
   -------------------------------------------------------------------------- */
.fengshen-author-info {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: Ff9f9f9;
  border-radius: 8px;
  margin: 20px 0;
}

.fengshen-author-info .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #f7a501;
}

.fengshen-author-info .name {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 5px;
  color: F333;
}

.fengshen-author-info .bio {
  font-size: 0.9rem;
  color: F666;
  line-height: 1.6;
}

.fengshen-author-info .meta {
  font-size: 0.8rem;
  color: F999;
  margin-top: 10px;
}

.fengshen-author-info .donate-link {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: #f7a501;
  color: Ffff;
  border-radius: 3px;
  text-decoration: none;
  font-size: 13px;
  transition: background 0.2s;
}

.fengshen-author-info .donate-link:hover {
  background: #dd9001;
  color: Ffff;
}

/* --------------------------------------------------------------------------
   Reader Wall
   -------------------------------------------------------------------------- */
.fengshen-reader-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0;
}

.fengshen-reader-wall-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 60px;
}

.fengshen-reader-wall-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid Feee;
  transition: transform 0.3s;
}

.fengshen-reader-wall-item img:hover {
  transform: scale(1.15);
}

.fengshen-reader-wall-item span {
  font-size: 11px;
  color: F666;
  margin-top: 4px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60px;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.fengshen-pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 30px 0;
  padding: 15px 0;
}

.fengshen-pagination a,
.fengshen-pagination span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid Fddd;
  border-radius: 3px;
  font-size: 14px;
  color: F555;
  text-decoration: none;
  transition: all 0.2s;
}

.fengshen-pagination a:hover {
  background: #f7a501;
  color: Ffff;
  border-color: #f7a501;
}

.fengshen-pagination .current {
  background: #f7a501;
  color: Ffff;
  border-color: #f7a501;
}

/* --------------------------------------------------------------------------
   TOC
   -------------------------------------------------------------------------- */
.fengshen-toc {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: Ffff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-width: 250px;
  max-height: 60vh;
  overflow-y: auto;
  font-size: 13px;
}

.fengshen-toc-title {
  font-weight: bold;
  margin-bottom: 10px;
  color: F333;
  font-size: 14px;
}

.fengshen-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fengshen-toc li {
  margin-bottom: 5px;
}

.fengshen-toc a {
  color: F555;
  text-decoration: none;
  display: block;
  padding: 3px 0;
}

.fengshen-toc a:hover {
  color: #f7a501;
}

.fengshen-toc .toc-h3 {
  padding-left: 15px;
}

/* --------------------------------------------------------------------------
   Ad Slot
   -------------------------------------------------------------------------- */
.fengshen-ad-slot {
  text-align: center;
  padding: 15px 0;
  overflow: hidden;
}

.fengshen-ad-slot img {
  max-width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   Post Views
   -------------------------------------------------------------------------- */
.fengshen-post-views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: F999;
}

/* --------------------------------------------------------------------------
   Responsive (≤768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .fengshen-slider {
    height: 200px;
  }

  .fengshen-slider-title {
    font-size: 1.2rem;
  }

  .fengshen-slider-content {
    padding: 15px 20px;
  }

  .fengshen-slider-dots {
    right: 15px;
    bottom: 10px;
  }

  .fengshen-toc {
    display: none;
  }

  .fengshen-author-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .fengshen-sticky-posts {
    flex-direction: column;
  }

  .fengshen-sticky-posts .sticky-thumb {
    width: 100%;
    height: 160px;
  }

  .fengshen-announcement-ticker {
    padding: 6px 10px;
    font-size: 12px;
  }

  .fengshen-pagination a,
  .fengshen-pagination span {
    padding: 5px 10px;
    font-size: 12px;
  }
}
