/* 通用全局切换抽屉与全局重置 */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "SimSun", "STSong", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", "Consolas", "Courier New", monospace;
}

/* 浮动切换胶囊与抽屉菜单 */
.blog-switcher-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(18, 18, 24, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.blog-switcher-trigger:hover {
  transform: translateY(-2px) scale(1.03);
  background: rgba(30, 30, 45, 0.98);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.blog-switcher-trigger .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* 切换弹窗抽屉 */
.blog-switcher-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.blog-switcher-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.blog-switcher-panel {
  width: 92%;
  max-width: 840px;
  max-height: 88vh;
  background: #13141c;
  color: #f1f5f9;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  padding: 28px;
  transform: translateY(20px) scale(0.97);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-sans);
}

.blog-switcher-modal.active .blog-switcher-panel {
  transform: translateY(0) scale(1);
}

.blog-switcher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 22px;
}

.blog-switcher-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
}

.blog-switcher-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.blog-switcher-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.blog-switcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.blog-switcher-item {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.blog-switcher-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.blog-switcher-item.current {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.5);
}

.blog-switcher-item.current::after {
  content: "当前浏览";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  background: #3b82f6;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.blog-item-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.blog-item-name {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 6px;
}

.blog-item-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.blog-switcher-footer {
  margin-top: 24px;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-hub-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  transition: opacity 0.2s;
}

.blog-hub-btn:hover {
  opacity: 0.9;
}

/* ============================================================
   全局通用动效与交互增强类 (FX Engine Styles)
   ============================================================ */

/* 1. 元素滚动视口平滑入场 */
.fx-reveal-init {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--fx-delay, 0s);
  will-change: opacity, transform;
}

.fx-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 2. 点击水波纹扩散动效 */
.fx-ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  transform: scale(0);
  animation: fxRippleAnim 0.55s ease-out forwards;
}

@keyframes fxRippleAnim {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* 3. 顶部阅读进度指示条 */
.fx-reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #ec4899, #f59e0b);
  z-index: 100001;
  pointer-events: none;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}
