/* 晶体收藏功能样式 */

/* 收藏按钮样式 */
.favorite-section {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.favorite-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 25px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.favorite-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: #fff5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.favorite-btn.favorited {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: #fff;
}

.favorite-btn.favorited:hover {
    background: #ff5252;
    border-color: #ff5252;
}

.favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.favorite-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.favorite-btn:hover i {
    transform: scale(1.1);
}

.favorite-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #888;
    font-size: 14px;
}

.favorite-count-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.favorite-count-item i {
    color: #ff6b6b;
}

/* 提示消息样式 */
.crystal-message {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
}

.crystal-message.show {
    transform: translateX(0);
}

.crystal-message-success {
    background: #28a745;
}

.crystal-message-error {
    background: #dc3545;
}

.crystal-message-warning {
    background: #ffc107;
    color: #212529;
}

.crystal-message-info {
    background: #17a2b8;
}

.crystal-message i {
    margin-right: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .favorite-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .favorite-btn {
        justify-content: center;
        padding: 12px 20px;
    }
    
    .favorite-stats {
        justify-content: center;
    }
    
    .crystal-message {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
    .favorite-section {
        border-color: #333;
    }
    
    .favorite-btn {
        background: #2a2a2a;
        border-color: #444;
        color: #ccc;
    }
    
    .favorite-btn:hover {
        background: #3a2a2a;
        border-color: #ff6b6b;
        color: #ff6b6b;
    }
    
    .favorite-stats {
        color: #aaa;
    }
}

/* 动画效果 */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.favorite-btn.favorited i {
    animation: heartBeat 0.6s ease;
}

/* 加载状态 */
.favorite-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 