/* 长按菜单样式 */
.context-menu {
  position: fixed;
  background: var(--bg-secondary);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 8px;
  z-index: 10000;
  min-width: 150px;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.context-menu-item:hover {
  background: var(--bg-hover);
}

.context-menu-item:active {
  background: var(--bg-active);
}

.context-menu-item svg {
  flex-shrink: 0;
}

/* 收藏夹覆盖层 */
.favorites-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 收藏夹面板 */
.favorites-panel {
  width: 100%;
  max-height: 85vh;
  background: var(--bg-primary);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* 收藏夹头部 */
.favorites-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.favorites-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

/* 筛选按钮 */
.favorites-filters {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: var(--bg-hover);
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* 收藏夹内容 */
.favorites-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state p {
  margin: 0;
  font-size: 15px;
}

/* 收藏项 */
.favorite-item {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}

.favorite-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.favorite-item-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-hover);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.favorite-item-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.favorite-item-content {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  word-wrap: break-word;
}

.favorite-item-content img,
.favorite-item-content video {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}

.favorite-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.favorite-item-btn {
  flex: 1;
  padding: 8px;
  border: none;
  background: var(--bg-hover);
  color: var(--text-secondary);
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.favorite-item-btn:hover {
  background: var(--bg-active);
  color: var(--text-primary);
}

.favorite-item-btn svg {
  width: 16px;
  height: 16px;
}

/* 桌面端适配 */
@media (min-width: 768px) {
  .favorites-overlay {
    align-items: center;
    justify-content: center;
  }

  .favorites-panel {
    max-width: 600px;
    max-height: 80vh;
    border-radius: 20px;
    animation: scaleIn 0.3s;
  }

  @keyframes scaleIn {
    from {
      transform: scale(0.9);
      opacity: 0;
    }
    to {
      transform: scale(1);
      opacity: 1;
    }
  }
}
