/* 文章详情页收藏按钮容器 */
.favorite-button-single-container {
    margin: 20px 0;
    padding: 15px 0;
    position: relative;
    z-index: 9999;
}

.favorite-button-single {
    text-align: left;
}

/* 文章列表收藏按钮容器 - 只在桌面端显示 */
.favorite-button-archive {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 当鼠标悬停在包含按钮的容器上时显示按钮 */
.post-thumbnail:hover .favorite-button-archive,
.entry-thumbnail:hover .favorite-button-archive,
.wp-post-image:hover .favorite-button-archive {
    opacity: 1;
}

/* 确保缩略图容器有相对定位，以便按钮定位 */
.post-thumbnail, .entry-thumbnail {
    position: relative;
}

/* 防止按钮超出边界 */
.favorite-button-archive .favorite-btn {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 移动端：隐藏文章列表的收藏按钮 */
@media (max-width: 768px) {
    .favorite-button-archive {
        display: none !important;
    }
}

/* 通用收藏按钮样式 - 美化圆角版本 */
.favorite-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: white;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    line-height: 1;
}

.favorite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.favorite-btn.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.favorite-btn.active:hover {
    background: linear-gradient(135deg, #ee5a24 0%, #ff6b6b 100%);
}

.favorite-icon {
    font-size: 14px;
    transition: all 0.3s ease;
}

.favorite-btn.active .favorite-icon {
    animation: heartBeat 0.6s ease;
}

/* 清除所有收藏按钮 */
.favorite-actions {
    margin: 15px 0;
    text-align: center;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* 全局消息样式 */
.favorite-global-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.favorite-global-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.favorite-global-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 同步通知样式 */
.sync-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-width: 400px;
    display: none;
}

.sync-notice-content {
    padding: 20px;
    position: relative;
}

.sync-notice-content h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
}

.sync-notice-content p {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.5;
}

.sync-notice-actions {
    display: flex;
    gap: 10px;
}

.btn-primary, .btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.close-sync-notice {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-sync-notice:hover {
    background: #f8f9fa;
    color: #666;
}

/* 收藏页面样式 */
.favorite-posts-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.favorite-posts-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.favorite-posts-list {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.favorite-post-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.favorite-post-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.favorite-post-thumbnail {
    width: 150px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
}

.favorite-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.favorite-post-thumbnail:hover img {
    transform: scale(1.05);
}

.favorite-post-content {
    flex: 1;
    min-width: 0;
	line-height: 0.5em;
}

/* 修复：设置收藏页面标题字体大小为18px */
.favorite-post-title {
    font-size: 18px;
    margin: 0 0 8px 0;
    line-height: 1.4;
    font-weight: 600;
}

.favorite-post-title a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.3s ease;
	font-size: 18px;
	line-height: 1
}

.favorite-post-title a:hover {
    color: #3498db;
}

.favorite-post-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.favorite-post-meta {
    font-size: 12px;
    color: #999;
}

.favorite-post-actions {
    margin-left: 15px;
    flex-shrink: 0;
}

.remove-favorite {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.remove-favorite:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.3);
}

/* 分页样式 */
.favorite-pagination {
    text-align: center;
    margin: 30px 0;
}

.favorite-pagination-nav {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.favorite-page-link, .favorite-page-current {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.favorite-page-link {
    background: #f8f9fa;
    color: #667eea;
    border: 1px solid #dee2e6;
}

.favorite-page-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.favorite-page-current {
    background: #667eea;
    color: white;
    border: 1px solid #667eea;
}

.favorite-empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.favorite-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.favorite-error {
    text-align: center;
    padding: 20px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 6px;
}

.user-status-notice {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.user-status-notice p {
    margin: 0 0 10px 0;
    color: #0066cc;
}

.user-status-notice a {
    color: #004499;
    text-decoration: underline;
}

/* 动画效果 */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .favorite-post-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .favorite-post-thumbnail {
        width: 100%;
        height: 150px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .favorite-post-actions {
        margin-left: 0;
        margin-top: 15px;
        align-self: stretch;
    }
    
    .remove-favorite {
        width: 100%;
    }
    
    .favorite-button-single {
        text-align: left;
    }
    
    .sync-notice {
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .sync-notice-actions {
        flex-direction: column;
    }
    
    .favorite-pagination-nav {
        gap: 4px;
    }
    
    .favorite-page-link, .favorite-page-current {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .favorite-global-message {
        left: 20px;
        right: 20px;
        top: 10px;
    }
}

/* 针对不同主题的兼容性调整 */
.favorite-button-single-container {
    clear: both;
}