/* === 正面（首页/文章页）：真 · 背景模糊 === */

.card.bg-base-100,
.bg-base-200,
.bg-base-300 {
  background-color: rgba(38, 34, 28, 0.55) !important;
  background-image: none !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

article.prose {
  background-color: rgba(38, 34, 28, 0.72) !important;
  background-image: none !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.75rem !important;
  padding: 2rem !important;
  box-shadow: none !important;
}

/* === 标签淡彩循环（8 色轮换） === */

a.badge,
.badge-ghost,
.tags a,
a[href*="/tags/"] {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 0.5rem !important;
  padding: 0.25rem 0.65rem !important;
  background-image: none !important;
  transition: all 0.2s ease;
}

/* 8 种柔和色循环 */
a.badge:nth-of-type(8n+1),
a[href*="/tags/"]:nth-of-type(8n+1) {
  background-color: rgba(255, 182, 193, 0.18) !important;
  color: #f5a9b8 !important;
  border-color: rgba(255, 182, 193, 0.4) !important;
}
a.badge:nth-of-type(8n+2),
a[href*="/tags/"]:nth-of-type(8n+2) {
  background-color: rgba(255, 203, 164, 0.18) !important;
  color: #f0b782 !important;
  border-color: rgba(255, 203, 164, 0.4) !important;
}
a.badge:nth-of-type(8n+3),
a[href*="/tags/"]:nth-of-type(8n+3) {
  background-color: rgba(255, 233, 156, 0.18) !important;
  color: #e8cf74 !important;
  border-color: rgba(255, 233, 156, 0.4) !important;
}
a.badge:nth-of-type(8n+4),
a[href*="/tags/"]:nth-of-type(8n+4) {
  background-color: rgba(186, 230, 164, 0.18) !important;
  color: #9dd178 !important;
  border-color: rgba(186, 230, 164, 0.4) !important;
}
a.badge:nth-of-type(8n+5),
a[href*="/tags/"]:nth-of-type(8n+5) {
  background-color: rgba(164, 230, 219, 0.18) !important;
  color: #7ecdbb !important;
  border-color: rgba(164, 230, 219, 0.4) !important;
}
a.badge:nth-of-type(8n+6),
a[href*="/tags/"]:nth-of-type(8n+6) {
  background-color: rgba(164, 211, 245, 0.18) !important;
  color: #79b8e0 !important;
  border-color: rgba(164, 211, 245, 0.4) !important;
}
a.badge:nth-of-type(8n+7),
a[href*="/tags/"]:nth-of-type(8n+7) {
  background-color: rgba(203, 180, 230, 0.18) !important;
  color: #a589cc !important;
  border-color: rgba(203, 180, 230, 0.4) !important;
}
a.badge:nth-of-type(8n+8),
a[href*="/tags/"]:nth-of-type(8n+8) {
  background-color: rgba(240, 170, 210, 0.18) !important;
  color: #d88cb2 !important;
  border-color: rgba(240, 170, 210, 0.4) !important;
}

a.badge:hover,
.badge-ghost:hover,
.tags a:hover,
a[href*="/tags/"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* 各色系自己的 hover 加深 */
a.badge:nth-of-type(8n+1):hover,
a[href*="/tags/"]:nth-of-type(8n+1):hover {
  background-color: rgba(255, 138, 160, 0.28) !important;
  color: #ff8aa0 !important;
  border-color: #ff8aa0 !important;
}
a.badge:nth-of-type(8n+2):hover,
a[href*="/tags/"]:nth-of-type(8n+2):hover {
  background-color: rgba(255, 156, 82, 0.28) !important;
  color: #ff9c52 !important;
  border-color: #ff9c52 !important;
}
a.badge:nth-of-type(8n+3):hover,
a[href*="/tags/"]:nth-of-type(8n+3):hover {
  background-color: rgba(255, 212, 61, 0.28) !important;
  color: #ffd43d !important;
  border-color: #ffd43d !important;
}
a.badge:nth-of-type(8n+4):hover,
a[href*="/tags/"]:nth-of-type(8n+4):hover {
  background-color: rgba(126, 199, 79, 0.28) !important;
  color: #7ec74f !important;
  border-color: #7ec74f !important;
}
a.badge:nth-of-type(8n+5):hover,
a[href*="/tags/"]:nth-of-type(8n+5):hover {
  background-color: rgba(76, 192, 168, 0.28) !important;
  color: #4cc0a8 !important;
  border-color: #4cc0a8 !important;
}
a.badge:nth-of-type(8n+6):hover,
a[href*="/tags/"]:nth-of-type(8n+6):hover {
  background-color: rgba(79, 163, 219, 0.28) !important;
  color: #4fa3db !important;
  border-color: #4fa3db !important;
}
a.badge:nth-of-type(8n+7):hover,
a[href*="/tags/"]:nth-of-type(8n+7):hover {
  background-color: rgba(138, 102, 192, 0.28) !important;
  color: #b088e0 !important;
  border-color: #8a66c0 !important;
}
a.badge:nth-of-type(8n+8):hover,
a[href*="/tags/"]:nth-of-type(8n+8):hover {
  background-color: rgba(209, 101, 152, 0.28) !important;
  color: #e88cb8 !important;
  border-color: #d16598 !important;
}

.breadcrumbs a {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 0.4rem !important;
  padding: 0.1rem 0.5rem !important;
}

/* === 回到顶部按钮（磨砂玻璃） === */
#back-to-top {
  position: fixed;
  right: 1.75rem;
  bottom: 1.75rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(38, 34, 28, 0.55);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover {
  background: rgba(60, 54, 44, 0.7);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
  transform: translateY(-2px);
}
#back-to-top:active {
  transform: translateY(0);
}
@media (max-width: 640px) {
  #back-to-top {
    right: 0.85rem;
    bottom: 0.85rem;
    width: 40px;
    height: 40px;
  }
}

/* === 吸顶导航：fixed + 默认透明，滚动后才磨砂 === */
nav.sticky {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin-top: 0 !important;
  z-index: 50 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  outline: none !important;
  transition: background 0.3s ease, backdrop-filter 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Alpine 在滚动 > 30px 时给 nav 加 bg-base-100 类，命中它做磨砂 */
nav.sticky.bg-base-100 {
  background: rgba(38, 34, 28, 0.55) !important;
  backdrop-filter: blur(14px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.4) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) !important;
}

/* 给 fixed 之后腾空间，避免内容被遮 */
.flip-container {
  padding-top: 5rem;
}

/* === 翻页按钮 === */
.custom-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 2.5rem auto 1rem;
  flex-wrap: wrap;
}
.pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(38, 34, 28, 0.55);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}
.pager-btn:hover {
  background: rgba(60, 54, 44, 0.7);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
  transform: translateY(-1px);
}
.pager-btn:active {
  transform: translateY(0);
}
.pager-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.pager-info {
  font-size: 0.8rem;
  opacity: 0.65;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  padding: 0 0.5rem;
}

/* === 每日一言：文案 + 署名同一行，署名右对齐 === */
#daily-quote .quote-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 0.6rem !important;
  margin: 0.4rem 0 !important;
}
#daily-quote .quote-text {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
#daily-quote .quote-from {
  flex: 0 0 auto !important;
  margin-left: auto !important;
  text-align: right !important;
  font-style: italic !important;
  font-size: 0.8rem !important;
  opacity: 0.65 !important;
  letter-spacing: 0.05em !important;
  white-space: nowrap !important;
}
