/* 小说热度小部件样式 */
.novel-popularity-widget {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.novel-popularity-widget.clickable {
    cursor: pointer;
    user-select: none;
}

.novel-popularity-widget.clickable:hover {
    transform: translateY(-1px);
}

.novel-popularity-widget.hover .novel-popularity-icon {
    transform: scale(1.1);
}

/* 图标样式 */
.novel-popularity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.novel-popularity-emoji {
    font-style: normal;
    font-size: 1.2em;
}

/* 文字样式 */
.novel-popularity-text {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 500;
}

.novel-popularity-label {
    font-weight: 400;
    opacity: 0.8;
}

.novel-popularity-count {
    font-weight: 600;
    min-width: 20px;
    text-align: left;
}

/* 处理中状态 */
.novel-popularity-widget.processing {
    opacity: 0.6;
    pointer-events: none;
}

.novel-popularity-widget.processing .novel-popularity-icon {
    animation: pulse 1s infinite;
}

/* 热度增加动画 */
.novel-popularity-widget.popularity-increased {
    animation: popularityBounce 0.6s ease-out;
}

.novel-popularity-widget.popularity-increased .novel-popularity-icon {
    animation: iconPulse 0.6s ease-out;
}

.novel-popularity-widget.popularity-increased .novel-popularity-count {
    animation: countGlow 0.6s ease-out;
}

/* 动画定义 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes popularityBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.1); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes countGlow {
    0% { 
        color: inherit; 
        text-shadow: none; 
    }
    50% { 
        color: #ff6b35; 
        text-shadow: 0 0 10px rgba(255, 107, 53, 0.5); 
    }
    100% { 
        color: inherit; 
        text-shadow: none; 
    }
}

/* 消息提示样式 */
.novel-popularity-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.novel-popularity-message.show {
    transform: translateX(0);
}

.novel-popularity-message-success {
    background-color: #4caf50;
}

.novel-popularity-message-error {
    background-color: #f44336;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .novel-popularity-widget {
        font-size: 13px;
    }
    
    .novel-popularity-icon {
        font-size: 14px;
    }
    
    .novel-popularity-message {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .novel-popularity-message.show {
        transform: translateY(0);
    }
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    .novel-popularity-widget {
        color: #e0e0e0;
    }
    
    .novel-popularity-label {
        opacity: 0.7;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .novel-popularity-widget.clickable:hover {
        outline: 2px solid currentColor;
        outline-offset: 2px;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .novel-popularity-widget,
    .novel-popularity-icon,
    .novel-popularity-message {
        transition: none;
    }
    
    .novel-popularity-widget.processing .novel-popularity-icon,
    .novel-popularity-widget.popularity-increased,
    .novel-popularity-widget.popularity-increased .novel-popularity-icon,
    .novel-popularity-widget.popularity-increased .novel-popularity-count {
        animation: none;
    }
}

/* Elementor编辑器样式 */
.elementor-editor-active .novel-popularity-widget.clickable {
    pointer-events: none;
}

.elementor-editor-active .novel-popularity-widget::after {
    content: "预览模式";
    position: absolute;
    top: -20px;
    left: 0;
    font-size: 10px;
    color: #666;
    opacity: 0.7;
} 