/* WhoReadThis 插件专用样式 - 独立文件避免冲突 */ /* 版本: 1.0.6 */ .whoreadthis-container { border-radius: 10px; overflow: hidden; position: relative; z-index: 10; margin: 0 0 30px 0; clear: both; box-sizing: border-box; } /* 标题区域 */ .whoreadthis-container .whoreadthis-header-section { padding: 18px 24px; background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); border: 1px solid #e1e8ed; position: relative; z-index: 20; box-sizing: border-box; } /* 深色模式支持 */ body.dark-mode .whoreadthis-container .whoreadthis-header-section, body.theme-dark .whoreadthis-container .whoreadthis-header-section, body.dark .whoreadthis-container .whoreadthis-header-section { background: rgb(10 12 25 / 1); border: 1px solid #2d3748; } /* 标题文字 */ .whoreadthis-container .whoreadthis-header { margin: 0; font-size: 18px; color: #fff; display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; font-weight: 600; position: relative; z-index: 25; box-sizing: border-box; } /* 深色模式标题 */ body.dark-mode .whoreadthis-container .whoreadthis-header h3, body.theme-dark .whoreadthis-container .whoreadthis-header h3, body.dark .whoreadthis-container .whoreadthis-header h3 { color: #e2e8f0 !important; } /* 计数徽章 */ .whoreadthis-container .whoreadthis-count-badge { background-color: rgba(255, 255, 255, 0.2); color: white; padding: 4px 8px; border-radius: 12px; font-size: 13px; margin-left: 8px; display: inline-block; vertical-align: middle; } /* 深色模式徽章 */ body.dark-mode .whoreadthis-container .whoreadthis-count-badge, body.theme-dark .whoreadthis-container .whoreadthis-count-badge, body.dark .whoreadthis-container .whoreadthis-count-badge { background-color: rgba(255, 255, 255, 0.1); color: #e2e8f0; } /* 切换按钮 */ .whoreadthis-container .whoreadthis-toggle-btn { font-size: 0.8em; color: #fff; display: flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 4px; transition: all 0.3s ease; font-weight: normal; border: none; cursor: pointer; position: relative; z-index: 30; background: transparent; box-sizing: border-box; } .whoreadthis-container .whoreadthis-toggle-btn:hover { background: rgba(255, 255, 255, 0.2); } .whoreadthis-container .whoreadthis-toggle-btn .toggle-arrow { font-size: 14px; line-height: 1; transition: transform 0.3s ease; display: inline-block; } .whoreadthis-container .whoreadthis-toggle-btn.expanded .toggle-arrow { transform: rotate(180deg); } /* 内容区域 */ .whoreadthis-container .whoreadthis-content-section { padding: 0 24px; background: #f9fafb; border-top: none; border-radius: 0 0 10px 10px; position: relative; z-index: 15; box-sizing: border-box; } /* 深色模式内容区域 */ body.dark-mode .whoreadthis-container .whoreadthis-content-section, body.theme-dark .whoreadthis-container .whoreadthis-content-section, body.dark .whoreadthis-container .whoreadthis-content-section { background: rgb(15 23 42 / 1); } /* 项目包装器 */ .whoreadthis-container .whoreadthis-items-wrapper { transition: all 0.3s ease; overflow: hidden; position: relative; z-index: 15; box-sizing: border-box; } .whoreadthis-container .whoreadthis-items-wrapper.collapsed { max-height: 0; opacity: 0; visibility: hidden; padding: 0; } .whoreadthis-container .whoreadthis-items-wrapper.expanded { max-height: 5000px; opacity: 1; visibility: visible; padding: 20px 0; } /* 阅读者列表 */ .whoreadthis-container .whoreadthis-users { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; position: relative; z-index: 40; box-sizing: border-box; } .whoreadthis-container .whoreadthis-user { position: relative; z-index: 45; box-sizing: border-box; } /* 头像包装器 */ .whoreadthis-container .whoreadthis-avatar-wrapper { position: relative; display: block; z-index: 50; text-decoration: none; box-sizing: border-box; } /* 头像样式 */ .whoreadthis-container .whoreadthis-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; cursor: pointer; display: block; position: relative; z-index: 55; transition: transform 0.3s ease; box-sizing: border-box; } .whoreadthis-container .whoreadthis-avatar:hover { transform: scale(1.05); } .whoreadthis-container .whoreadthis-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; padding: 2px; border: 2px solid #f15a22; display: block; transition: transform 0.4s ease-out; box-sizing: border-box; } .whoreadthis-container .whoreadthis-avatar img:hover { transform: rotateZ(360deg); } /* 空状态 */ .whoreadthis-container .whoreadthis-empty { text-align: center; color: #95a5a6; font-style: italic; padding: 20px; } /* 响应式设计 */ @media (max-width: 768px) { .whoreadthis-container .whoreadthis-header-section, .whoreadthis-container .whoreadthis-content-section { padding: 14px 18px; } .whoreadthis-container .whoreadthis-header { font-size: 16px; } .whoreadthis-container .whoreadthis-users { gap: 8px; } } @media (max-width: 480px) { .whoreadthis-container .whoreadthis-header-section, .whoreadthis-container .whoreadthis-content-section { padding: 12px 15px; } .whoreadthis-container .whoreadthis-header { font-size: 14px; } .whoreadthis-container .whoreadthis-count-badge { font-size: 11px; padding: 3px 6px; } .whoreadthis-container .whoreadthis-users { gap: 6px; justify-content: center; } } /* 动画效果 */ @keyframes whoreadthisFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .whoreadthis-container .whoreadthis-items-wrapper.expanded .whoreadthis-user { animation: whoreadthisFadeIn 0.3s ease forwards; } /* 为每个头像添加延迟动画 */ .whoreadthis-container .whoreadthis-items-wrapper.expanded .whoreadthis-user:nth-child(1) { animation-delay: 0.05s; } .whoreadthis-container .whoreadthis-items-wrapper.expanded .whoreadthis-user:nth-child(2) { animation-delay: 0.1s; } .whoreadthis-container .whoreadthis-items-wrapper.expanded .whoreadthis-user:nth-child(3) { animation-delay: 0.15s; } .whoreadthis-container .whoreadthis-items-wrapper.expanded .whoreadthis-user:nth-child(4) { animation-delay: 0.2s; } .whoreadthis-container .whoreadthis-items-wrapper.expanded .whoreadthis-user:nth-child(5) { animation-delay: 0.25s; } .whoreadthis-container .whoreadthis-items-wrapper.expanded .whoreadthis-user:nth-child(6) { animation-delay: 0.3s; } .whoreadthis-container .whoreadthis-items-wrapper.expanded .whoreadthis-user:nth-child(7) { animation-delay: 0.35s; } .whoreadthis-container .whoreadthis-items-wrapper.expanded .whoreadthis-user:nth-child(8) { animation-delay: 0.4s; } .whoreadthis-container .whoreadthis-items-wrapper.expanded .whoreadthis-user:nth-child(9) { animation-delay: 0.45s; } .whoreadthis-container .whoreadthis-items-wrapper.expanded .whoreadthis-user:nth-child(10) { animation-delay: 0.5s; }